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:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/index) to query the instance IDs.
  • Call [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Key ID(s). The maximum number of key pairs in each request is 100. The key pair ID is in the format of `skey-3glfot13`.
    You can obtain the available key pair IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/sshkey) to query the key pair IDs.
  • Call [DescribeKeyPairs](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) and look for `KeyId` in the response. + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` + + // Whether to force shut down a running instances. It is recommended to manually shut down a running instance before associating a key pair with it. Valid values:
  • TRUE: force shut down an instance after a normal shutdown fails.
  • FALSE: do not force shut down an instance after a normal shutdown fails.

    Default value: FALSE. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +type AssociateInstancesKeyPairsRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). The maximum number of instances in each request is 100.
    You can obtain the available instance IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/index) to query the instance IDs.
  • Call [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Key ID(s). The maximum number of key pairs in each request is 100. The key pair ID is in the format of `skey-3glfot13`.
    You can obtain the available key pair IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/sshkey) to query the key pair IDs.
  • Call [DescribeKeyPairs](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) and look for `KeyId` in the response. + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` + + // Whether to force shut down a running instances. It is recommended to manually shut down a running instance before associating a key pair with it. Valid values:
  • TRUE: force shut down an instance after a normal shutdown fails.
  • FALSE: do not force shut down an instance after a normal shutdown fails.

    Default value: FALSE. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +func (r *AssociateInstancesKeyPairsRequest) 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 *AssociateInstancesKeyPairsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "KeyIds") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateInstancesKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type AssociateInstancesKeyPairsResponseParams struct { + // 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 AssociateInstancesKeyPairsResponse struct { + *tchttp.BaseResponse + Response *AssociateInstancesKeyPairsResponseParams `json:"Response"` +} + +func (r *AssociateInstancesKeyPairsResponse) 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 *AssociateInstancesKeyPairsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type AssociateSecurityGroupsRequestParams struct { + // ID of the security group to be associated, such as `sg-efil73jd`. Only one security group can be associated. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // ID of the instance bound in the format of ins-lesecurk. You can specify up to 100 instances in each request. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` +} + +type AssociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // ID of the security group to be associated, such as `sg-efil73jd`. Only one security group can be associated. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // ID of the instance bound in the format of ins-lesecurk. You can specify up to 100 instances in each request. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` +} + +func (r *AssociateSecurityGroupsRequest) 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 *AssociateSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupIds") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type AssociateSecurityGroupsResponseParams struct { + // 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 AssociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *AssociateSecurityGroupsResponseParams `json:"Response"` +} + +func (r *AssociateSecurityGroupsResponse) 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 *AssociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ChargePrepaid struct { + // Purchased usage period, in month. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36 + Period *uint64 `json:"Period,omitnil,omitempty" name:"Period"` + + // Auto renewal flag. Valid values:
  • NOTIFY_AND_AUTO_RENEW: notify upon expiration and renew automatically
  • NOTIFY_AND_MANUAL_RENEW: notify upon expiration but do not renew automatically
  • DISABLE_NOTIFY_AND_MANUAL_RENEW: neither notify upon expiration nor renew automatically

    Default value: NOTIFY_AND_AUTO_RENEW. If this parameter is specified as NOTIFY_AND_AUTO_RENEW, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. + RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` +} + +type ChcDeployExtraConfig struct { + +} + +type ChcHost struct { + // CHC host ID + ChcId *string `json:"ChcId,omitnil,omitempty" name:"ChcId"` + + // Instance name + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Server serial number + SerialNumber *string `json:"SerialNumber,omitnil,omitempty" name:"SerialNumber"` + + // CHC host status
    + // + InstanceState *string `json:"InstanceState,omitnil,omitempty" name:"InstanceState"` + + // Device type + // Note: This field may return `null`, indicating that no valid values can be obtained. + DeviceType *string `json:"DeviceType,omitnil,omitempty" name:"DeviceType"` + + // Availability zone + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // Out-of-band network + // Note: This field may return `null`, indicating that no valid values can be obtained. + BmcVirtualPrivateCloud *VirtualPrivateCloud `json:"BmcVirtualPrivateCloud,omitnil,omitempty" name:"BmcVirtualPrivateCloud"` + + // Out-of-band network IP + // Note: This field may return `null`, indicating that no valid values can be obtained. + BmcIp *string `json:"BmcIp,omitnil,omitempty" name:"BmcIp"` + + // Out-of-band network security group ID + // Note: This field may return `null`, indicating that no valid values can be obtained. + BmcSecurityGroupIds []*string `json:"BmcSecurityGroupIds,omitnil,omitempty" name:"BmcSecurityGroupIds"` + + // Deployment network + // Note: This field may return `null`, indicating that no valid values can be obtained. + DeployVirtualPrivateCloud *VirtualPrivateCloud `json:"DeployVirtualPrivateCloud,omitnil,omitempty" name:"DeployVirtualPrivateCloud"` + + // Deployment network IP + // Note: This field may return `null`, indicating that no valid values can be obtained. + DeployIp *string `json:"DeployIp,omitnil,omitempty" name:"DeployIp"` + + // Deployment network security group ID + // Note: This field may return `null`, indicating that no valid values can be obtained. + DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` + + // ID of the associated CVM + // Note: This field may return `null`, indicating that no valid values can be obtained. + CvmInstanceId *string `json:"CvmInstanceId,omitnil,omitempty" name:"CvmInstanceId"` + + // Server creation time + CreatedTime *string `json:"CreatedTime,omitnil,omitempty" name:"CreatedTime"` + + // Instance hardware description, including CPU cores, memory capacity and disk capacity. + // Note: This field may return `null`, indicating that no valid values can be obtained. + HardwareDescription *string `json:"HardwareDescription,omitnil,omitempty" name:"HardwareDescription"` + + // CPU cores of the CHC host + // Note: This field may return `null`, indicating that no valid values can be obtained. + CPU *int64 `json:"CPU,omitnil,omitempty" name:"CPU"` + + // Memory capacity of the CHC host (unit: GB) + // Note: This field may return `null`, indicating that no valid values can be obtained. + Memory *int64 `json:"Memory,omitnil,omitempty" name:"Memory"` + + // Disk capacity of the CHC host + // Note: This field may return `null`, indicating that no valid values can be obtained. + Disk *string `json:"Disk,omitnil,omitempty" name:"Disk"` + + // MAC address assigned under the out-of-band network + // Note: This field may return `null`, indicating that no valid values can be obtained. + BmcMAC *string `json:"BmcMAC,omitnil,omitempty" name:"BmcMAC"` + + // MAC address assigned under the deployment network + // Note: This field may return `null`, indicating that no valid values can be obtained. + DeployMAC *string `json:"DeployMAC,omitnil,omitempty" name:"DeployMAC"` + + // Management type + // HOSTING: Hosting + // TENANT: Leasing + // Note: This field may return `null`, indicating that no valid values can be obtained. + TenantType *string `json:"TenantType,omitnil,omitempty" name:"TenantType"` + + // CHC DHCP option, which is used for MiniOS debugging. + // Note: This field may return `null`, indicating that no valid values can be obtained. + DeployExtraConfig *ChcDeployExtraConfig `json:"DeployExtraConfig,omitnil,omitempty" name:"DeployExtraConfig"` +} + +type ChcHostDeniedActions struct { + // CHC instance ID + ChcId *string `json:"ChcId,omitnil,omitempty" name:"ChcId"` + + // CHC instance status + State *string `json:"State,omitnil,omitempty" name:"State"` + + // Actions not allowed for the current CHC instance + DenyActions []*string `json:"DenyActions,omitnil,omitempty" name:"DenyActions"` +} + +// Predefined struct for user +type ConfigureChcAssistVpcRequestParams struct { + // CHC host IDs + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + // Out-of-band network information + BmcVirtualPrivateCloud *VirtualPrivateCloud `json:"BmcVirtualPrivateCloud,omitnil,omitempty" name:"BmcVirtualPrivateCloud"` + + // Out-of-band network security group list + BmcSecurityGroupIds []*string `json:"BmcSecurityGroupIds,omitnil,omitempty" name:"BmcSecurityGroupIds"` + + // Deployment network information + DeployVirtualPrivateCloud *VirtualPrivateCloud `json:"DeployVirtualPrivateCloud,omitnil,omitempty" name:"DeployVirtualPrivateCloud"` + + // Deployment network security group list + DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` +} + +type ConfigureChcAssistVpcRequest struct { + *tchttp.BaseRequest + + // CHC host IDs + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + // Out-of-band network information + BmcVirtualPrivateCloud *VirtualPrivateCloud `json:"BmcVirtualPrivateCloud,omitnil,omitempty" name:"BmcVirtualPrivateCloud"` + + // Out-of-band network security group list + BmcSecurityGroupIds []*string `json:"BmcSecurityGroupIds,omitnil,omitempty" name:"BmcSecurityGroupIds"` + + // Deployment network information + DeployVirtualPrivateCloud *VirtualPrivateCloud `json:"DeployVirtualPrivateCloud,omitnil,omitempty" name:"DeployVirtualPrivateCloud"` + + // Deployment network security group list + DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` +} + +func (r *ConfigureChcAssistVpcRequest) 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 *ConfigureChcAssistVpcRequest) 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, "BmcVirtualPrivateCloud") + delete(f, "BmcSecurityGroupIds") + delete(f, "DeployVirtualPrivateCloud") + delete(f, "DeploySecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ConfigureChcAssistVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ConfigureChcAssistVpcResponseParams struct { + // 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 ConfigureChcAssistVpcResponse struct { + *tchttp.BaseResponse + Response *ConfigureChcAssistVpcResponseParams `json:"Response"` +} + +func (r *ConfigureChcAssistVpcResponse) 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 *ConfigureChcAssistVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ConfigureChcDeployVpcRequestParams struct { + // CHC instance ID + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + // Deployment network information + DeployVirtualPrivateCloud *VirtualPrivateCloud `json:"DeployVirtualPrivateCloud,omitnil,omitempty" name:"DeployVirtualPrivateCloud"` + + // Deployment network security group list + DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` +} + +type ConfigureChcDeployVpcRequest struct { + *tchttp.BaseRequest + + // CHC instance ID + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + // Deployment network information + DeployVirtualPrivateCloud *VirtualPrivateCloud `json:"DeployVirtualPrivateCloud,omitnil,omitempty" name:"DeployVirtualPrivateCloud"` + + // Deployment network security group list + DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` +} + +func (r *ConfigureChcDeployVpcRequest) 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 *ConfigureChcDeployVpcRequest) 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, "DeployVirtualPrivateCloud") + delete(f, "DeploySecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ConfigureChcDeployVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ConfigureChcDeployVpcResponseParams struct { + // 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 ConfigureChcDeployVpcResponse struct { + *tchttp.BaseResponse + Response *ConfigureChcDeployVpcResponseParams `json:"Response"` +} + +func (r *ConfigureChcDeployVpcResponse) 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 *ConfigureChcDeployVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ConvertOperatingSystemsRequestParams struct { + // ID of an instance to execute operating system switching. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Whether it is a minimum scale switching. + MinimalConversion *bool `json:"MinimalConversion,omitnil,omitempty" name:"MinimalConversion"` + + // Whether it is pre-check only. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Target operating system type for switching. Only TencentOS is supported. + TargetOSType *string `json:"TargetOSType,omitnil,omitempty" name:"TargetOSType"` +} + +type ConvertOperatingSystemsRequest struct { + *tchttp.BaseRequest + + // ID of an instance to execute operating system switching. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Whether it is a minimum scale switching. + MinimalConversion *bool `json:"MinimalConversion,omitnil,omitempty" name:"MinimalConversion"` + + // Whether it is pre-check only. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Target operating system type for switching. Only TencentOS is supported. + TargetOSType *string `json:"TargetOSType,omitnil,omitempty" name:"TargetOSType"` +} + +func (r *ConvertOperatingSystemsRequest) 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 *ConvertOperatingSystemsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "MinimalConversion") + delete(f, "DryRun") + delete(f, "TargetOSType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ConvertOperatingSystemsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ConvertOperatingSystemsResponseParams struct { + // Information about the target operating system, which is returned only when the input parameter DryRun is true. + // Note: This field may return null, indicating that no valid value is found. + SupportTargetOSList []*TargetOS `json:"SupportTargetOSList,omitnil,omitempty" name:"SupportTargetOSList"` + + // Task ID for operating system switching. + // Note: This field may return null, indicating that no valid value is found. + TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"` + + // 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 ConvertOperatingSystemsResponse struct { + *tchttp.BaseResponse + Response *ConvertOperatingSystemsResponseParams `json:"Response"` +} + +func (r *ConvertOperatingSystemsResponse) 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 *ConvertOperatingSystemsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CpuTopology struct { + // Number of physical CPU cores to enable. + CoreCount *int64 `json:"CoreCount,omitnil,omitempty" name:"CoreCount"` + + // Number of threads per core. This parameter determines whether to enable or disable hyper-threading.
  • 1: Disable hyper-threading.

  • 2: Enable hyper-threading.
  • + // If not set, an instance uses the default hyper-threading policy. For how to enable or disable hyper-threading, refer to [Enabling and Disabling Hyper-Threading](https://intl.cloud.tencent.com/document/product/213/103798?from_cn_redirect=1). + ThreadPerCore *int64 `json:"ThreadPerCore,omitnil,omitempty" name:"ThreadPerCore"` +} + +// Predefined struct for user +type CreateDisasterRecoverGroupRequestParams struct { + // Name of the spread placement group. The name must be 1-60 characters long and can contain both Chinese characters and English letters. + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // Type of a spread placement group. Valid values:
  • HOST: physical machine.
  • SW: switch.
  • RACK: rack.
  • + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // A string used to ensure the idempotency of the request, which is generated by the user and must be unique to each request. The maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see 'How to ensure idempotency'. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + + Affinity *int64 `json:"Affinity,omitnil,omitempty" name:"Affinity"` + + // List of tag description. By specifying this parameter, the tag can be bound to the placement group. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` +} + +type CreateDisasterRecoverGroupRequest struct { + *tchttp.BaseRequest + + // Name of the spread placement group. The name must be 1-60 characters long and can contain both Chinese characters and English letters. + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // Type of a spread placement group. Valid values:
  • HOST: physical machine.
  • SW: switch.
  • RACK: rack.
  • + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // A string used to ensure the idempotency of the request, which is generated by the user and must be unique to each request. The maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see 'How to ensure idempotency'. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + Affinity *int64 `json:"Affinity,omitnil,omitempty" name:"Affinity"` + + // List of tag description. By specifying this parameter, the tag can be bound to the placement group. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` +} + +func (r *CreateDisasterRecoverGroupRequest) 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 *CreateDisasterRecoverGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Name") + delete(f, "Type") + delete(f, "ClientToken") + delete(f, "Affinity") + delete(f, "TagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDisasterRecoverGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateDisasterRecoverGroupResponseParams struct { + // List of spread placement group IDs. + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitnil,omitempty" name:"DisasterRecoverGroupId"` + + // Type of a spread placement group. Valid values:
  • HOST: physical machine.
  • SW: switch.
  • RACK: rack.
  • + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // Name of the spread placement group. The name must be 1-60 characters long and can contain both Chinese characters and English letters. + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // The maximum number of CVMs in a placement group. + CvmQuotaTotal *int64 `json:"CvmQuotaTotal,omitnil,omitempty" name:"CvmQuotaTotal"` + + // The current number of CVMs in a placement group. + CurrentNum *int64 `json:"CurrentNum,omitnil,omitempty" name:"CurrentNum"` + + // Creation time of the placement group. + CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` + + // 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 CreateDisasterRecoverGroupResponse struct { + *tchttp.BaseResponse + Response *CreateDisasterRecoverGroupResponseParams `json:"Response"` +} + +func (r *CreateDisasterRecoverGroupResponse) 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 *CreateDisasterRecoverGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateImageRequestParams struct { + // Image name + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // ID of the instance from which an image will be created. This parameter is required when using instance to create an image. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Image description + ImageDescription *string `json:"ImageDescription,omitnil,omitempty" name:"ImageDescription"` + + // Whether to perform forced power-off operation to create an image. + // Valid values:
  • true: indicates that an image is created after forced power-off operation

  • false: indicates that an image is created in the power-on state


  • Default value: false.

    Creating an image in the power-on state may result in some unbacked-up data, affecting data security. + ForcePoweroff *string `json:"ForcePoweroff,omitnil,omitempty" name:"ForcePoweroff"` + + // Whether to enable Sysprep when creating a Windows image. + // Valid values: `TRUE` and `FALSE`; default value: `FALSE`. + // + // Click [here](https://intl.cloud.tencent.com/document/product/213/43498?from_cn_redirect=1) to learn more about Sysprep. + Sysprep *string `json:"Sysprep,omitnil,omitempty" name:"Sysprep"` + + // IDs of data disks included in the image. + DataDiskIds []*string `json:"DataDiskIds,omitnil,omitempty" name:"DataDiskIds"` + + // Specified snapshot ID used to create an image. A system disk snapshot must be included. It cannot be passed together with `InstanceId`. + SnapshotIds []*string `json:"SnapshotIds,omitnil,omitempty" name:"SnapshotIds"` + + // Success status of this request, without affecting the resources involved + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Tag description list. This parameter is used to bind a tag to a custom image. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // Image family + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` +} + +type CreateImageRequest struct { + *tchttp.BaseRequest + + // Image name + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // ID of the instance from which an image will be created. This parameter is required when using instance to create an image. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Image description + ImageDescription *string `json:"ImageDescription,omitnil,omitempty" name:"ImageDescription"` + + // Whether to perform forced power-off operation to create an image. + // Valid values:
  • true: indicates that an image is created after forced power-off operation

  • false: indicates that an image is created in the power-on state


  • Default value: false.

    Creating an image in the power-on state may result in some unbacked-up data, affecting data security. + ForcePoweroff *string `json:"ForcePoweroff,omitnil,omitempty" name:"ForcePoweroff"` + + // Whether to enable Sysprep when creating a Windows image. + // Valid values: `TRUE` and `FALSE`; default value: `FALSE`. + // + // Click [here](https://intl.cloud.tencent.com/document/product/213/43498?from_cn_redirect=1) to learn more about Sysprep. + Sysprep *string `json:"Sysprep,omitnil,omitempty" name:"Sysprep"` + + // IDs of data disks included in the image. + DataDiskIds []*string `json:"DataDiskIds,omitnil,omitempty" name:"DataDiskIds"` + + // Specified snapshot ID used to create an image. A system disk snapshot must be included. It cannot be passed together with `InstanceId`. + SnapshotIds []*string `json:"SnapshotIds,omitnil,omitempty" name:"SnapshotIds"` + + // Success status of this request, without affecting the resources involved + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Tag description list. This parameter is used to bind a tag to a custom image. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // Image family + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` +} + +func (r *CreateImageRequest) 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 *CreateImageRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageName") + delete(f, "InstanceId") + delete(f, "ImageDescription") + delete(f, "ForcePoweroff") + delete(f, "Sysprep") + delete(f, "DataDiskIds") + delete(f, "SnapshotIds") + delete(f, "DryRun") + delete(f, "TagSpecification") + delete(f, "ImageFamily") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateImageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateImageResponseParams struct { + // Image ID. + // Note: This field may return null, indicating that no valid value was found. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // 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 CreateImageResponse struct { + *tchttp.BaseResponse + Response *CreateImageResponseParams `json:"Response"` +} + +func (r *CreateImageResponse) 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 *CreateImageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateKeyPairRequestParams struct { + // Name of the key pair, which can contain numbers, letters, and underscores, with a maximum length of 25 characters. + KeyName *string `json:"KeyName,omitnil,omitempty" name:"KeyName"` + + // ID of the project to which the created key pair belongs. + // + // You can obtain a project ID in the following ways: + //
  • Query the project ID through the project list.
  • + //
  • Call the [DescribeProjects](https://intl.cloud.tencent.com/document/api/651/78725?from_cn_redirect=1) API and obtain the `projectId` from the return information.
  • + ProjectId *int64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` + + // Tag description list. This parameter is used to bind a tag to a key pair. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` +} + +type CreateKeyPairRequest struct { + *tchttp.BaseRequest + + // Name of the key pair, which can contain numbers, letters, and underscores, with a maximum length of 25 characters. + KeyName *string `json:"KeyName,omitnil,omitempty" name:"KeyName"` + + // ID of the project to which the created key pair belongs. + // + // You can obtain a project ID in the following ways: + //
  • Query the project ID through the project list.
  • + //
  • Call the [DescribeProjects](https://intl.cloud.tencent.com/document/api/651/78725?from_cn_redirect=1) API and obtain the `projectId` from the return information.
  • + ProjectId *int64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` + + // Tag description list. This parameter is used to bind a tag to a key pair. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` +} + +func (r *CreateKeyPairRequest) 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 *CreateKeyPairRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyName") + delete(f, "ProjectId") + delete(f, "TagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateKeyPairRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateKeyPairResponseParams struct { + // Key pair information. + KeyPair *KeyPair `json:"KeyPair,omitnil,omitempty" name:"KeyPair"` + + // 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 CreateKeyPairResponse struct { + *tchttp.BaseResponse + Response *CreateKeyPairResponseParams `json:"Response"` +} + +func (r *CreateKeyPairResponse) 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 *CreateKeyPairResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateLaunchTemplateRequestParams struct { + // Instance launch template name. It can include 2-128 characters. + LaunchTemplateName *string `json:"LaunchTemplateName,omitnil,omitempty" name:"LaunchTemplateName"` + + // Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH (for dedicated CVMs) + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images (for Chinese mainland only)

  • To check the image ID:
  • For public images, custom images, and shared images, go to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE). For marketplace images, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Description of instance launch template versions. This parameter can contain 2-256 characters. + LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitnil,omitempty" name:"LaunchTemplateVersionDescription"` + + // The instance model. Different resource specifications are specified for different instance models. + //
  • To view specific values for `PREPAID` or `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, the system will specify the default model according to the dynamic resource sales in the current region.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, you need to specify this parameter as `CDH_1C1G`. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // System disk configuration of the instance. If this parameter is not specified, the default value will be used. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC, CLOUD_PREMIUM, or CLOUD_SSD data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Number of instances to be purchased. Value range for monthly-subscribed instances: [1, 300]. Value range for pay-as-you-go instances: [1, 100]. Default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on quota, see CVM instance [Purchase Limits](https://intl.cloud.tencent.com/document/product/213/2664). + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Instance name to be displayed.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances at the same time and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string, `server_{R:3}`. If you only purchase 1 instance, the instance will be named `server_3`; if you purchase 2, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances at the same time and do not specify a pattern string, the instance names will be suffixed by `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase 2 instances and the instance name body is `server_`, the instance names will be `server_1` and `server_2`.
  • This parameter can contain up to 60 characters, including the pattern string. + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Enhanced service. You can use this parameter to specify whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Host name of the CVM.
  • Dots (.) or hyphens (-) cannot be the start or end of a host name or appear consecutively in a host name.
  • For Windows instances, the host name must be 2-15 characters long and can contain uppercase and lowercase letters, numbers, and hyphens (-). It cannot contain dots (.) or contain only numbers.
  • For other instances, such as Linux instances, the host name must be 2-60 characters long. It supports multiple dots (.) and allows uppercase and lowercase letters, numbers, and hyphens (-) between any two dots (.). + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. + ActionTimer *ActionTimer `json:"ActionTimer,omitnil,omitempty" name:"ActionTimer"` + + // Placement group ID. You can only specify one. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` + + // The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // Market options of the instance, such as parameters related to spot instances. This parameter is required for spot instances. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // Whether the request is a dry run only. + // true: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. + // If the dry run fails, the corresponding error code will be returned. + // If the dry run succeeds, the RequestId will be returned. + // false (default value): send a normal request and create instance(s) if all the requirements are met. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/13887?from_cn_redirect=1) API. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Instance [Billing Mode](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1). Valid values:
  • `PREPAID`: prepaid, i.e., billed for monthly-subscribed instances
  • `POSTPAID_BY_HOUR`: pay-as-you-go on an hourly basis
  • `CDHPAID`: billed for CDH instances, not the CVMs running on the CDHs.
  • `SPOTPAID`: billed for spot instances.
    Default value: POSTPAID_BY_HOUR. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Details of the monthly subscription, including the purchase period, auto-renewal. It is required if the `InstanceChargeType` is `PREPAID`. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:
  • true: Instance protection is enabled, and the instance is not allowed to be deleted through the API.

  • false: Instance protection is disabled, and the instance is allowed to be deleted through the API.


  • Default value: false. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` + + // Instance launch template tag description list. By specifying the TemplateTag parameter, you can bind tags to the instance launch template. + LaunchTemplateTagSpecification []*TagSpecification `json:"LaunchTemplateTagSpecification,omitnil,omitempty" name:"LaunchTemplateTagSpecification"` +} + +type CreateLaunchTemplateRequest struct { + *tchttp.BaseRequest + + // Instance launch template name. It can include 2-128 characters. + LaunchTemplateName *string `json:"LaunchTemplateName,omitnil,omitempty" name:"LaunchTemplateName"` + + // Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH (for dedicated CVMs) + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images (for Chinese mainland only)

  • To check the image ID:
  • For public images, custom images, and shared images, go to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE). For marketplace images, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Description of instance launch template versions. This parameter can contain 2-256 characters. + LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitnil,omitempty" name:"LaunchTemplateVersionDescription"` + + // The instance model. Different resource specifications are specified for different instance models. + //
  • To view specific values for `PREPAID` or `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, the system will specify the default model according to the dynamic resource sales in the current region.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, you need to specify this parameter as `CDH_1C1G`. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // System disk configuration of the instance. If this parameter is not specified, the default value will be used. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC, CLOUD_PREMIUM, or CLOUD_SSD data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Number of instances to be purchased. Value range for monthly-subscribed instances: [1, 300]. Value range for pay-as-you-go instances: [1, 100]. Default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on quota, see CVM instance [Purchase Limits](https://intl.cloud.tencent.com/document/product/213/2664). + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Instance name to be displayed.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances at the same time and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string, `server_{R:3}`. If you only purchase 1 instance, the instance will be named `server_3`; if you purchase 2, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances at the same time and do not specify a pattern string, the instance names will be suffixed by `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase 2 instances and the instance name body is `server_`, the instance names will be `server_1` and `server_2`.
  • This parameter can contain up to 60 characters, including the pattern string. + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Enhanced service. You can use this parameter to specify whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Host name of the CVM.
  • Dots (.) or hyphens (-) cannot be the start or end of a host name or appear consecutively in a host name.
  • For Windows instances, the host name must be 2-15 characters long and can contain uppercase and lowercase letters, numbers, and hyphens (-). It cannot contain dots (.) or contain only numbers.
  • For other instances, such as Linux instances, the host name must be 2-60 characters long. It supports multiple dots (.) and allows uppercase and lowercase letters, numbers, and hyphens (-) between any two dots (.). + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. + ActionTimer *ActionTimer `json:"ActionTimer,omitnil,omitempty" name:"ActionTimer"` + + // Placement group ID. You can only specify one. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` + + // The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // Market options of the instance, such as parameters related to spot instances. This parameter is required for spot instances. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // Whether the request is a dry run only. + // true: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. + // If the dry run fails, the corresponding error code will be returned. + // If the dry run succeeds, the RequestId will be returned. + // false (default value): send a normal request and create instance(s) if all the requirements are met. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/13887?from_cn_redirect=1) API. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Instance [Billing Mode](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1). Valid values:
  • `PREPAID`: prepaid, i.e., billed for monthly-subscribed instances
  • `POSTPAID_BY_HOUR`: pay-as-you-go on an hourly basis
  • `CDHPAID`: billed for CDH instances, not the CVMs running on the CDHs.
  • `SPOTPAID`: billed for spot instances.
    Default value: POSTPAID_BY_HOUR. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Details of the monthly subscription, including the purchase period, auto-renewal. It is required if the `InstanceChargeType` is `PREPAID`. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:
  • true: Instance protection is enabled, and the instance is not allowed to be deleted through the API.

  • false: Instance protection is disabled, and the instance is allowed to be deleted through the API.


  • Default value: false. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` + + // Instance launch template tag description list. By specifying the TemplateTag parameter, you can bind tags to the instance launch template. + LaunchTemplateTagSpecification []*TagSpecification `json:"LaunchTemplateTagSpecification,omitnil,omitempty" name:"LaunchTemplateTagSpecification"` +} + +func (r *CreateLaunchTemplateRequest) 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 *CreateLaunchTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateName") + delete(f, "Placement") + delete(f, "ImageId") + delete(f, "LaunchTemplateVersionDescription") + delete(f, "InstanceType") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "VirtualPrivateCloud") + delete(f, "InternetAccessible") + delete(f, "InstanceCount") + delete(f, "InstanceName") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "ClientToken") + delete(f, "HostName") + delete(f, "ActionTimer") + delete(f, "DisasterRecoverGroupIds") + delete(f, "TagSpecification") + delete(f, "InstanceMarketOptions") + delete(f, "UserData") + delete(f, "DryRun") + delete(f, "CamRoleName") + delete(f, "HpcClusterId") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + delete(f, "DisableApiTermination") + delete(f, "LaunchTemplateTagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLaunchTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateLaunchTemplateResponseParams struct { + // The ID of successfully created instance launch template. This parameter will be returned when the instance launch template is created through the `CreateLaunchTemplate` API. + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // 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 CreateLaunchTemplateResponse struct { + *tchttp.BaseResponse + Response *CreateLaunchTemplateResponseParams `json:"Response"` +} + +func (r *CreateLaunchTemplateResponse) 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 *CreateLaunchTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateLaunchTemplateVersionRequestParams struct { + // Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH (for dedicated CVMs) + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // Instance launch template ID. This parameter is used as a basis for creating new template versions. + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // This parameter, when specified, is used to create instance launch templates. If this parameter is not specified, the default version will be used. + LaunchTemplateVersion *int64 `json:"LaunchTemplateVersion,omitnil,omitempty" name:"LaunchTemplateVersion"` + + // Description of instance launch template versions. This parameter can contain 2-256 characters. + LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitnil,omitempty" name:"LaunchTemplateVersionDescription"` + + // Instance model. Different instance models specify different resource specifications. + // + //
  • For instances created with the payment modes PREPAID or POSTPAID_BY_HOUR, the specific values can be obtained by calling the [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) API for the latest specification table or referring to [Instance Specifications](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, the system will dynamically assign a default model based on the current resource sales situation in a region.

  • For instances created with the payment mode CDHPAID, this parameter has the prefix "CDH_" and is generated based on the CPU and memory configuration. The specific format is: CDH_XCXG. For example, for creating a CDH instance with 1 CPU core and 1 GB memory, this parameter should be CDH_1C1G.
  • + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images (for Chinese mainland only)

  • To check the image ID:
  • For public images, custom images, and shared images, go to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE). For marketplace images, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // System disk configuration of the instance. If this parameter is not specified, the default value will be used. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC, CLOUD_PREMIUM, or CLOUD_SSD data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Number of instances to be purchased. Value range for monthly-subscribed instances: [1, 300]. Value range for pay-as-you-go instances: [1, 100]. Default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on quota, see CVM instance [Purchase Limits](https://intl.cloud.tencent.com/document/product/213/2664). + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Instance name.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string `server_{R:3}`. If you purchase only one instance, the instance will be named `server_3`; if you purchase two, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances without specifying a pattern string, the instance names will be suffixed with `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase two instances with the name `server_`, the instance names will be `server_1` and `server_2`.
  • This parameter can contain up to 60 characters (including pattern strings).
  • + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Enhanced service. You can use this parameter to specify whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Hostname of Cloud Virtual Machine.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.

  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.

  • Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).
  • + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. + ActionTimer *ActionTimer `json:"ActionTimer,omitnil,omitempty" name:"ActionTimer"` + + // Placement group ID. You can only specify one. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` + + // The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // Market options of the instance, such as parameters related to spot instances. This parameter is required for spot instances. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // Whether the request is a dry run only. + // `true`: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. + // If the dry run fails, the corresponding error code will be returned. + // If the dry run succeeds, the RequestId will be returned. + // `false` (default value): send a normal request and create instance(s) if all the requirements are met. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/36223?from_cn_redirect=1) API. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Instance [billing mode](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).
  • PREPAID: prepaid, that is, monthly subscription.
  • POSTPAID_BY_HOUR: pay-as-you-go by hour.
  • CDHPAID: CDH instance (created based on CDH; the resources of the host are free of charge).
  • SPOTPAID: spot payment.
  • Default value: POSTPAID_BY_HOUR. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Details of the monthly subscription, including the purchase period, auto-renewal. It is required if the `InstanceChargeType` is `PREPAID`. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:
  • TRUE: Instance protection is enabled, and the instance is not allowed to be deleted through the API.

  • FALSE: Instance protection is disabled, and the instance is allowed to be deleted through the API.


  • Default value: FALSE. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` +} + +type CreateLaunchTemplateVersionRequest struct { + *tchttp.BaseRequest + + // Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone, project, and CDH (for dedicated CVMs) + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // Instance launch template ID. This parameter is used as a basis for creating new template versions. + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // This parameter, when specified, is used to create instance launch templates. If this parameter is not specified, the default version will be used. + LaunchTemplateVersion *int64 `json:"LaunchTemplateVersion,omitnil,omitempty" name:"LaunchTemplateVersion"` + + // Description of instance launch template versions. This parameter can contain 2-256 characters. + LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitnil,omitempty" name:"LaunchTemplateVersionDescription"` + + // Instance model. Different instance models specify different resource specifications. + // + //
  • For instances created with the payment modes PREPAID or POSTPAID_BY_HOUR, the specific values can be obtained by calling the [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) API for the latest specification table or referring to [Instance Specifications](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, the system will dynamically assign a default model based on the current resource sales situation in a region.

  • For instances created with the payment mode CDHPAID, this parameter has the prefix "CDH_" and is generated based on the CPU and memory configuration. The specific format is: CDH_XCXG. For example, for creating a CDH instance with 1 CPU core and 1 GB memory, this parameter should be CDH_1C1G.
  • + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images (for Chinese mainland only)

  • To check the image ID:
  • For public images, custom images, and shared images, go to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE). For marketplace images, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // System disk configuration of the instance. If this parameter is not specified, the default value will be used. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC, CLOUD_PREMIUM, or CLOUD_SSD data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If this parameter is not specified, the classic network is used by default. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be same as the number of VPC IPs, which cannot be greater than 20. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Number of instances to be purchased. Value range for monthly-subscribed instances: [1, 300]. Value range for pay-as-you-go instances: [1, 100]. Default value: 1. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on quota, see CVM instance [Purchase Limits](https://intl.cloud.tencent.com/document/product/213/2664). + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Instance name.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string `server_{R:3}`. If you purchase only one instance, the instance will be named `server_3`; if you purchase two, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances without specifying a pattern string, the instance names will be suffixed with `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase two instances with the name `server_`, the instance names will be `server_1` and `server_2`.
  • This parameter can contain up to 60 characters (including pattern strings).
  • + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Enhanced service. You can use this parameter to specify whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Hostname of Cloud Virtual Machine.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.

  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.

  • Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).
  • + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. + ActionTimer *ActionTimer `json:"ActionTimer,omitnil,omitempty" name:"ActionTimer"` + + // Placement group ID. You can only specify one. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` + + // The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // Market options of the instance, such as parameters related to spot instances. This parameter is required for spot instances. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // Whether the request is a dry run only. + // `true`: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. + // If the dry run fails, the corresponding error code will be returned. + // If the dry run succeeds, the RequestId will be returned. + // `false` (default value): send a normal request and create instance(s) if all the requirements are met. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/36223?from_cn_redirect=1) API. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Instance [billing mode](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).
  • PREPAID: prepaid, that is, monthly subscription.
  • POSTPAID_BY_HOUR: pay-as-you-go by hour.
  • CDHPAID: CDH instance (created based on CDH; the resources of the host are free of charge).
  • SPOTPAID: spot payment.
  • Default value: POSTPAID_BY_HOUR. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Details of the monthly subscription, including the purchase period, auto-renewal. It is required if the `InstanceChargeType` is `PREPAID`. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:
  • TRUE: Instance protection is enabled, and the instance is not allowed to be deleted through the API.

  • FALSE: Instance protection is disabled, and the instance is allowed to be deleted through the API.


  • Default value: FALSE. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` +} + +func (r *CreateLaunchTemplateVersionRequest) 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 *CreateLaunchTemplateVersionRequest) 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, "LaunchTemplateId") + delete(f, "LaunchTemplateVersion") + delete(f, "LaunchTemplateVersionDescription") + delete(f, "InstanceType") + delete(f, "ImageId") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "VirtualPrivateCloud") + delete(f, "InternetAccessible") + delete(f, "InstanceCount") + delete(f, "InstanceName") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "ClientToken") + delete(f, "HostName") + delete(f, "ActionTimer") + delete(f, "DisasterRecoverGroupIds") + delete(f, "TagSpecification") + delete(f, "InstanceMarketOptions") + delete(f, "UserData") + delete(f, "DryRun") + delete(f, "CamRoleName") + delete(f, "HpcClusterId") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + delete(f, "DisableApiTermination") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLaunchTemplateVersionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateLaunchTemplateVersionResponseParams struct { + // Version number of the new instance launch template. + LaunchTemplateVersionNumber *int64 `json:"LaunchTemplateVersionNumber,omitnil,omitempty" name:"LaunchTemplateVersionNumber"` + + // 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 CreateLaunchTemplateVersionResponse struct { + *tchttp.BaseResponse + Response *CreateLaunchTemplateVersionResponseParams `json:"Response"` +} + +func (r *CreateLaunchTemplateVersionResponse) 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 *CreateLaunchTemplateVersionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DataDisk struct { + // Data disk size (in GB). The minimum adjustment increment is 10 GB. The value range varies by data disk type. For more information on limits, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952?from_cn_redirect=1). The default value is 0, indicating that no data disk is purchased. For more information, see the product documentation. + DiskSize *int64 `json:"DiskSize,omitnil,omitempty" name:"DiskSize"` + + // Data disk type. For the detailed restrictions on the data disk type, refer to [Storage Overview](https://cloud.tencent.com/document/product/213/4952). Valid values:
  • LOCAL_BASIC: Local Disk
  • LOCAL_SSD: Local SSD
  • LOCAL_NVME: Local NVMe Disk, which is strongly related with InstanceType and can not be specified
  • LOCAL_PRO: Local HDD, which is strongly related with InstanceType and can not be specified
  • CLOUD_BASIC: Basic Cloud Disk
  • CLOUD_PREMIUM: Premium Disk
  • CLOUD_SSD: Cloud SSD
  • CLOUD_HSSD: Enhanced SSD
  • CLOUD_TSSD: Tremendous SSD
  • CLOUD_BSSD: Balanced SSD

    Default value: LOCAL_BASIC.

    This parameter is invalid for the `ResizeInstanceDisk` API.
  • + DiskType *string `json:"DiskType,omitnil,omitempty" name:"DiskType"` + + // Data disk ID. Note that it's not available for `LOCAL_BASIC` and `LOCAL_SSD` disks. + // It is only used as a response parameter for APIs such as `DescribeInstances`, and cannot be used as a request parameter for APIs such as `RunInstances`. + DiskId *string `json:"DiskId,omitnil,omitempty" name:"DiskId"` + + // Whether the data disk is terminated with the Cloud Virtual Machine (CVM). Valid values: + // + //
  • true: Terminate the data disk when the CVM is terminated. Only the pay-as-you-go cloud disk billed by hour is supported.
  • + //
  • + // false: Retain the data disk when the CVM is terminated.
    + // Default value: true.
    + // This parameter is currently only used for the `RunInstances` API. + //
  • + // Note: This field may return null, indicating that no valid value is found. + DeleteWithInstance *bool `json:"DeleteWithInstance,omitnil,omitempty" name:"DeleteWithInstance"` + + // Data disk snapshot ID. The size of the selected data disk snapshot must be smaller than that of the data disk. + // Note: This field may return null, indicating that no valid value is found. + SnapshotId *string `json:"SnapshotId,omitnil,omitempty" name:"SnapshotId"` + + // Whether a data disk is encrypted. Valid values: + //
  • true: encrypted.
  • + //
  • + // false: not encrypted.
    + // Default value: false.
    + // This parameter is currently used only in the `RunInstances` API. + //
  • + // Note: This field may return null, indicating that no valid value is found. + Encrypt *bool `json:"Encrypt,omitnil,omitempty" name:"Encrypt"` + + // ID of the custom CMK in the format of UUID or "kms-abcd1234". This parameter is used to encrypt cloud disks. + // + // Currently, this parameter is only used in the `RunInstances` API. + // Note: this field may return null, indicating that no valid values can be obtained. + KmsKeyId *string `json:"KmsKeyId,omitnil,omitempty" name:"KmsKeyId"` + + // Cloud disk performance, in MB/s + // Note: this field may return `null`, indicating that no valid values can be obtained. + ThroughputPerformance *int64 `json:"ThroughputPerformance,omitnil,omitempty" name:"ThroughputPerformance"` + + // ID of the dedicated cluster to which the instance belongs. + // Note: this field may return `null`, indicating that no valid values can be obtained. + CdcId *string `json:"CdcId,omitnil,omitempty" name:"CdcId"` + + // Burst performance. + // + // Note: This field is in beta test. + // Note: This field may return null, indicating that no valid value is found. + BurstPerformance *bool `json:"BurstPerformance,omitnil,omitempty" name:"BurstPerformance"` + + // Disk name, with a length of not more than 128 characters. + // + // This parameter is in invite-only testing and is not yet open for use. + DiskName *string `json:"DiskName,omitnil,omitempty" name:"DiskName"` +} + +// Predefined struct for user +type DeleteDisasterRecoverGroupsRequestParams struct { + // ID list of spread placement groups, obtainable via the [DescribeDisasterRecoverGroups](https://intl.cloud.tencent.com/document/api/213/17810?from_cn_redirect=1) API. You can operate up to 10 spread placement groups in each request. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` +} + +type DeleteDisasterRecoverGroupsRequest struct { + *tchttp.BaseRequest + + // ID list of spread placement groups, obtainable via the [DescribeDisasterRecoverGroups](https://intl.cloud.tencent.com/document/api/213/17810?from_cn_redirect=1) API. You can operate up to 10 spread placement groups in each request. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` +} + +func (r *DeleteDisasterRecoverGroupsRequest) 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 *DeleteDisasterRecoverGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DisasterRecoverGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteDisasterRecoverGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteDisasterRecoverGroupsResponseParams struct { + // 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 DeleteDisasterRecoverGroupsResponse struct { + *tchttp.BaseResponse + Response *DeleteDisasterRecoverGroupsResponseParams `json:"Response"` +} + +func (r *DeleteDisasterRecoverGroupsResponse) 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 *DeleteDisasterRecoverGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteImagesRequestParams struct { + // List of the IDs of the instances to be deleted. + ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` + + // Whether to delete the snapshot associated with the image + DeleteBindedSnap *bool `json:"DeleteBindedSnap,omitnil,omitempty" name:"DeleteBindedSnap"` + + // Check whether deleting an image is supported + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` +} + +type DeleteImagesRequest struct { + *tchttp.BaseRequest + + // List of the IDs of the instances to be deleted. + ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` + + // Whether to delete the snapshot associated with the image + DeleteBindedSnap *bool `json:"DeleteBindedSnap,omitnil,omitempty" name:"DeleteBindedSnap"` + + // Check whether deleting an image is supported + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` +} + +func (r *DeleteImagesRequest) 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 *DeleteImagesRequest) 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, "DeleteBindedSnap") + delete(f, "DryRun") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteImagesResponseParams struct { + // 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 DeleteImagesResponse struct { + *tchttp.BaseResponse + Response *DeleteImagesResponseParams `json:"Response"` +} + +func (r *DeleteImagesResponse) 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 *DeleteImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteKeyPairsRequestParams struct { + // One or more key pair IDs to be operated. The maximum number of key pairs per request is 100.
    You can obtain an available key pair ID in the following ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/sshkey) to query the key pair ID.

  • Call the [DescribeKeyPairs](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) API and obtain the key pair ID from the `KeyId` in the response.
  • + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` +} + +type DeleteKeyPairsRequest struct { + *tchttp.BaseRequest + + // One or more key pair IDs to be operated. The maximum number of key pairs per request is 100.
    You can obtain an available key pair ID in the following ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/sshkey) to query the key pair ID.

  • Call the [DescribeKeyPairs](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) API and obtain the key pair ID from the `KeyId` in the response.
  • + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` +} + +func (r *DeleteKeyPairsRequest) 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 *DeleteKeyPairsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteKeyPairsResponseParams struct { + // 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 DeleteKeyPairsResponse struct { + *tchttp.BaseResponse + Response *DeleteKeyPairsResponseParams `json:"Response"` +} + +func (r *DeleteKeyPairsResponse) 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 *DeleteKeyPairsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteLaunchTemplateRequestParams struct { + // The launch template ID + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` +} + +type DeleteLaunchTemplateRequest struct { + *tchttp.BaseRequest + + // The launch template ID + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` +} + +func (r *DeleteLaunchTemplateRequest) 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 *DeleteLaunchTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteLaunchTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteLaunchTemplateResponseParams struct { + // 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 DeleteLaunchTemplateResponse struct { + *tchttp.BaseResponse + Response *DeleteLaunchTemplateResponseParams `json:"Response"` +} + +func (r *DeleteLaunchTemplateResponse) 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 *DeleteLaunchTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteLaunchTemplateVersionsRequestParams struct { + // The launch template ID + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // List of instance launch template versions. + LaunchTemplateVersions []*int64 `json:"LaunchTemplateVersions,omitnil,omitempty" name:"LaunchTemplateVersions"` +} + +type DeleteLaunchTemplateVersionsRequest struct { + *tchttp.BaseRequest + + // The launch template ID + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // List of instance launch template versions. + LaunchTemplateVersions []*int64 `json:"LaunchTemplateVersions,omitnil,omitempty" name:"LaunchTemplateVersions"` +} + +func (r *DeleteLaunchTemplateVersionsRequest) 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 *DeleteLaunchTemplateVersionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateId") + delete(f, "LaunchTemplateVersions") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteLaunchTemplateVersionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteLaunchTemplateVersionsResponseParams struct { + // 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 DeleteLaunchTemplateVersionsResponse struct { + *tchttp.BaseResponse + Response *DeleteLaunchTemplateVersionsResponseParams `json:"Response"` +} + +func (r *DeleteLaunchTemplateVersionsResponse) 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 *DeleteLaunchTemplateVersionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeChcDeniedActionsRequestParams struct { + // CHC instance ID + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` +} + +type DescribeChcDeniedActionsRequest struct { + *tchttp.BaseRequest + + // CHC instance ID + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` +} + +func (r *DescribeChcDeniedActionsRequest) 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 *DescribeChcDeniedActionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ChcIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeChcDeniedActionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeChcDeniedActionsResponseParams struct { + // Actions not allowed for the CHC instance + ChcHostDeniedActionSet []*ChcHostDeniedActions `json:"ChcHostDeniedActionSet,omitnil,omitempty" name:"ChcHostDeniedActionSet"` + + // 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 DescribeChcDeniedActionsResponse struct { + *tchttp.BaseResponse + Response *DescribeChcDeniedActionsResponseParams `json:"Response"` +} + +func (r *DescribeChcDeniedActionsResponse) 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 *DescribeChcDeniedActionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeChcHostsRequestParams struct { + // 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"` + + //
  • zone
  • + //

    Filter by the availability zone, such as `ap-guangzhou-1`.

    Type: String

    Optional

    Valid values: See Regions and Availability Zones

    + //
  • instance-name
  • + //

    Filter by the instance name.

    Type: String

    Optional

    + //
  • instance-state
  • + //

    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

    + //
  • device-type
  • + //

    Filter by the device type.

    Type: String

    Optional

    + //
  • vpc-id
  • + //

    Filter by the unique VPC ID.

    Type: String

    Optional

    + //
  • subnet-id
  • + //

    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"` + + //
  • zone
  • + //

    Filter by the availability zone, such as `ap-guangzhou-1`.

    Type: String

    Optional

    Valid values: See Regions and Availability Zones

    + //
  • instance-name
  • + //

    Filter by the instance name.

    Type: String

    Optional

    + //
  • instance-state
  • + //

    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

    + //
  • device-type
  • + //

    Filter by the device type.

    Type: String

    Optional

    + //
  • vpc-id
  • + //

    Filter by the unique VPC ID.

    Type: String

    Optional

    + //
  • subnet-id
  • + //

    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"` + + //
  • `tag-key` - String - Optional - Filter by the tag key.
  • + //
  • `tag-value` - String - Optional - Filter by the tag value.
  • + //
  • `tag:tag-key` - String - Optional - Filter by the tag key-value pair. Replace `tag-key` with the actual tag keys.
  • + // Each request can have up to 10 `Filters` and 5 `Filters.Values`. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type DescribeDisasterRecoverGroupsRequest struct { + *tchttp.BaseRequest + + // 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"` + + //
  • `tag-key` - String - Optional - Filter by the tag key.
  • + //
  • `tag-value` - String - Optional - Filter by the tag value.
  • + //
  • `tag:tag-key` - String - Optional - Filter by the tag key-value pair. Replace `tag-key` with the actual tag keys.
  • + // Each request can have up to 10 `Filters` and 5 `Filters.Values`. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *DescribeDisasterRecoverGroupsRequest) 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 *DescribeDisasterRecoverGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DisasterRecoverGroupIds") + 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!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDisasterRecoverGroupsResponseParams struct { + // Information on spread placement groups. + DisasterRecoverGroupSet []*DisasterRecoverGroup `json:"DisasterRecoverGroupSet,omitnil,omitempty" name:"DisasterRecoverGroupSet"` + + // Total number of placement groups of the user. + 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 DescribeDisasterRecoverGroupsResponse struct { + *tchttp.BaseResponse + Response *DescribeDisasterRecoverGroupsResponseParams `json:"Response"` +} + +func (r *DescribeDisasterRecoverGroupsResponse) 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 *DescribeDisasterRecoverGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeHostsRequestParams struct { + //
  • zone
  • + //

    Filter by the availability zone, such as `ap-guangzhou-1`.

    Type: String

    Optional

    Valid values: See Regions and Availability Zones

    + //
  • project-id
  • + //

    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

    + //
  • host-id
  • + //

    Filter by the CDH instance ID. Format: host-xxxxxxxx.

    Type: String

    Optional

    + //
  • host-name
  • + //

    Filter by the host name.

    Type: String

    Optional

    + //
  • host-state
  • + //

    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 + + //
  • zone
  • + //

    Filter by the availability zone, such as `ap-guangzhou-1`.

    Type: String

    Optional

    Valid values: See Regions and Availability Zones

    + //
  • project-id
  • + //

    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

    + //
  • host-id
  • + //

    Filter by the CDH instance ID. Format: host-xxxxxxxx.

    Type: String

    Optional

    + //
  • host-name
  • + //

    Filter by the host name.

    Type: String

    Optional

    + //
  • host-state
  • + //

    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:
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.
  • View the image IDs in the [Image Console](https://console.cloud.tencent.com/cvm/image). + ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` + + // Filters. Each request can have up to 10 `Filters`, and 5 `Filters.Values` for each filter. `ImageIds` and `Filters` cannot be specified at the same time. See details: + // + //
  • image-id
  • + //

    Filter by the image ID.

    Type: String

    Optional

    + //
  • image-type
  • + //

    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)

    + //
  • image-name
  • + //

    Filter by the image name.

    Type: String

    Optional

    + //
  • platform
  • + //

    Filter by the image operating system, such as `CentOS`.

    Type: String

    Optional

    + //
  • tag-key
  • + //

    Filter by the tag key.

    Type: String

    Optional

    + //
  • tag-value
  • + //

    Filter by the tag value.

    Type: String

    Optional

    + //
  • tag:tag-key
  • + //

    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:
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.
  • View the image IDs in the [Image Console](https://console.cloud.tencent.com/cvm/image). + ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` + + // Filters. Each request can have up to 10 `Filters`, and 5 `Filters.Values` for each filter. `ImageIds` and `Filters` cannot be specified at the same time. See details: + // + //
  • image-id
  • + //

    Filter by the image ID.

    Type: String

    Optional

    + //
  • image-type
  • + //

    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)

    + //
  • image-name
  • + //

    Filter by the image name.

    Type: String

    Optional

    + //
  • platform
  • + //

    Filter by the image operating system, such as `CentOS`.

    Type: String

    Optional

    + //
  • tag-key
  • + //

    Filter by the tag key.

    Type: String

    Optional

    + //
  • tag-value
  • + //

    Filter by the tag value.

    Type: String

    Optional

    + //
  • tag:tag-key
  • + //

    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). + //
  • INSTANCE_DEGRADE: downgrade the instance configurations
  • + Operation *string `json:"Operation,omitnil,omitempty" name:"Operation"` +} + +type DescribeInstancesOperationLimitRequest struct { + *tchttp.BaseRequest + + // 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). + //
  • INSTANCE_DEGRADE: downgrade the instance configurations
  • + Operation *string `json:"Operation,omitnil,omitempty" name:"Operation"` +} + +func (r *DescribeInstancesOperationLimitRequest) 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 *DescribeInstancesOperationLimitRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "Operation") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstancesOperationLimitRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancesOperationLimitResponseParams struct { + // The maximum number of times you can modify the instance configurations (degrading the configurations) + InstanceOperationLimitSet []*OperationCountLimit `json:"InstanceOperationLimitSet,omitnil,omitempty" name:"InstanceOperationLimitSet"` + + // 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 DescribeInstancesOperationLimitResponse struct { + *tchttp.BaseResponse + Response *DescribeInstancesOperationLimitResponseParams `json:"Response"` +} + +func (r *DescribeInstancesOperationLimitResponse) 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 *DescribeInstancesOperationLimitResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancesRequestParams struct { + // Query by instance ID(s). 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. However, `InstanceIds` and `Filters` cannot be specified at the same time. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Filters + //
  • `zone` - String - Optional - Filter by the availability zone.
  • + //
  • `project-id` - Integer - Optional - 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.
  • + //
  • `host-id` - String - Optional - Filter by the CDH instance ID. Format: `host-xxxxxxxx`.
  • + // `vpc-id` - String - Optional - Filter by the VPC ID. Format: `vpc-xxxxxxxx`. + //
  • `subnet-id` - String - Optional - Filter by the subnet ID. Format: `subnet-xxxxxxxx`.
  • + // `instance-id` - String - Optional - Filter by the instance ID. Format: `ins-xxxxxxxx`. + // `security-group-id` - String - Optional - Filter by the security group ID. Format: `sg-8jlk3f3r`. + // `instance-name` - String - Optional - Filter by the instance name. + // `instance-charge-type` - String - Optional - Filter by the instance billing method. `POSTPAID_BY_HOUR`: pay-as-you-go | `CDHPAID`: You are only billed for [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances, not the CVMs running on the [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances. + // `private-ip-address` - String - Optional - Filter by the private IP address of the instance's primary ENI. + // `public-ip-address` - String - Optional - Filter by the public IP address of the instance's primary ENI, including the IP addresses automatically assigned during the instance creation and the EIPs manually associated after the instance creation. + //
  • `tag-key` - String - Optional - Filter by the tag key.
  • + // `tag-value` - String - Optional - Filter by the tag value. + //
  • `tag:tag-key` - String - Optional - Filter by the tag key-value pair. Replace `tag-key` with the actual tag keys. See example 2.
  • + // Each request can have up to 10 `Filters` and 5 `Filters.Values`. You cannot specify `InstanceIds` and `Filters` at the same time. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // 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"` +} + +type DescribeInstancesRequest struct { + *tchttp.BaseRequest + + // Query by instance ID(s). 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. However, `InstanceIds` and `Filters` cannot be specified at the same time. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Filters + //
  • `zone` - String - Optional - Filter by the availability zone.
  • + //
  • `project-id` - Integer - Optional - 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.
  • + //
  • `host-id` - String - Optional - Filter by the CDH instance ID. Format: `host-xxxxxxxx`.
  • + // `vpc-id` - String - Optional - Filter by the VPC ID. Format: `vpc-xxxxxxxx`. + //
  • `subnet-id` - String - Optional - Filter by the subnet ID. Format: `subnet-xxxxxxxx`.
  • + // `instance-id` - String - Optional - Filter by the instance ID. Format: `ins-xxxxxxxx`. + // `security-group-id` - String - Optional - Filter by the security group ID. Format: `sg-8jlk3f3r`. + // `instance-name` - String - Optional - Filter by the instance name. + // `instance-charge-type` - String - Optional - Filter by the instance billing method. `POSTPAID_BY_HOUR`: pay-as-you-go | `CDHPAID`: You are only billed for [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances, not the CVMs running on the [CDH](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) instances. + // `private-ip-address` - String - Optional - Filter by the private IP address of the instance's primary ENI. + // `public-ip-address` - String - Optional - Filter by the public IP address of the instance's primary ENI, including the IP addresses automatically assigned during the instance creation and the EIPs manually associated after the instance creation. + //
  • `tag-key` - String - Optional - Filter by the tag key.
  • + // `tag-value` - String - Optional - Filter by the tag value. + //
  • `tag:tag-key` - String - Optional - Filter by the tag key-value pair. Replace `tag-key` with the actual tag keys. See example 2.
  • + // Each request can have up to 10 `Filters` and 5 `Filters.Values`. You cannot specify `InstanceIds` and `Filters` at the same time. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // 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"` +} + +func (r *DescribeInstancesRequest) 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 *DescribeInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancesResponseParams struct { + // Number of instances meeting the filtering conditions. + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // Detailed instance information. + InstanceSet []*Instance `json:"InstanceSet,omitnil,omitempty" name:"InstanceSet"` + + // 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 DescribeInstancesResponse struct { + *tchttp.BaseResponse + Response *DescribeInstancesResponseParams `json:"Response"` +} + +func (r *DescribeInstancesResponse) 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 *DescribeInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancesStatusRequestParams struct { + // Query by instance ID(s). 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"` + + // 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"` +} + +type DescribeInstancesStatusRequest struct { + *tchttp.BaseRequest + + // Query by instance ID(s). 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"` + + // 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"` +} + +func (r *DescribeInstancesStatusRequest) 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 *DescribeInstancesStatusRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstancesStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancesStatusResponseParams struct { + // Number of instance states meeting the filtering conditions. + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // [Instance status](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) list. + InstanceStatusSet []*InstanceStatus `json:"InstanceStatusSet,omitnil,omitempty" name:"InstanceStatusSet"` + + // 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 DescribeInstancesStatusResponse struct { + *tchttp.BaseResponse + Response *DescribeInstancesStatusResponseParams `json:"Response"` +} + +func (r *DescribeInstancesStatusResponse) 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 *DescribeInstancesStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInternetChargeTypeConfigsRequestParams struct { + +} + +type DescribeInternetChargeTypeConfigsRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeInternetChargeTypeConfigsRequest) 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 *DescribeInternetChargeTypeConfigsRequest) 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", "DescribeInternetChargeTypeConfigsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInternetChargeTypeConfigsResponseParams struct { + // List of network billing methods. + InternetChargeTypeConfigSet []*InternetChargeTypeConfig `json:"InternetChargeTypeConfigSet,omitnil,omitempty" name:"InternetChargeTypeConfigSet"` + + // 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 DescribeInternetChargeTypeConfigsResponse struct { + *tchttp.BaseResponse + Response *DescribeInternetChargeTypeConfigsResponseParams `json:"Response"` +} + +func (r *DescribeInternetChargeTypeConfigsResponse) 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 *DescribeInternetChargeTypeConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeKeyPairsRequestParams struct { + // Key pair ID(s) in the format of `skey-11112222`. This API supports using multiple IDs as filters at the same time. For more information on the format of this parameter, see the `id.N` section in [API Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). You cannot specify `KeyIds` and `Filters` at the same time. You can log in to the [console](https://console.cloud.tencent.com/cvm/index) to query the key pair IDs. + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` + + // Filters + //
  • `project-id` - Integer - Optional - Filter by project ID. To view the list of project IDs, you can go to [Project Management](https://console.cloud.tencent.com/project), or call the `DescribeProject` API and look for `projectId` in the response.
  • + //
  • `key-name` - String - Optional - Filter by key pair name.
  • You cannot specify `KeyIds` and `Filters` at the same time. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // Offset. The default value is `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 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"` +} + +type DescribeKeyPairsRequest struct { + *tchttp.BaseRequest + + // Key pair ID(s) in the format of `skey-11112222`. This API supports using multiple IDs as filters at the same time. For more information on the format of this parameter, see the `id.N` section in [API Introduction](https://intl.cloud.tencent.com/document/api/213/15688?from_cn_redirect=1). You cannot specify `KeyIds` and `Filters` at the same time. You can log in to the [console](https://console.cloud.tencent.com/cvm/index) to query the key pair IDs. + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` + + // Filters + //
  • `project-id` - Integer - Optional - Filter by project ID. To view the list of project IDs, you can go to [Project Management](https://console.cloud.tencent.com/project), or call the `DescribeProject` API and look for `projectId` in the response.
  • + //
  • `key-name` - String - Optional - Filter by key pair name.
  • You cannot specify `KeyIds` and `Filters` at the same time. + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // Offset. The default value is `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 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"` +} + +func (r *DescribeKeyPairsRequest) 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 *DescribeKeyPairsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeKeyPairsResponseParams struct { + // Number of key pairs meeting the filtering conditions. + TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // Detailed information on key pairs. + KeyPairSet []*KeyPair `json:"KeyPairSet,omitnil,omitempty" name:"KeyPairSet"` + + // 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 DescribeKeyPairsResponse struct { + *tchttp.BaseResponse + Response *DescribeKeyPairsResponseParams `json:"Response"` +} + +func (r *DescribeKeyPairsResponse) 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 *DescribeKeyPairsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeLaunchTemplateVersionsRequestParams struct { + // The launch template ID + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // List of instance launch templates. + LaunchTemplateVersions []*uint64 `json:"LaunchTemplateVersions,omitnil,omitempty" name:"LaunchTemplateVersions"` + + // The minimum version number specified, which defaults to 0. + MinVersion *uint64 `json:"MinVersion,omitnil,omitempty" name:"MinVersion"` + + // The maximum version number specified, which defaults to 30. + MaxVersion *uint64 `json:"MaxVersion,omitnil,omitempty" name:"MaxVersion"` + + // 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 *uint64 `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 *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // Specify whether to query the default version. This parameter and `LaunchTemplateVersions` cannot be specified at the same time. + DefaultVersion *bool `json:"DefaultVersion,omitnil,omitempty" name:"DefaultVersion"` +} + +type DescribeLaunchTemplateVersionsRequest struct { + *tchttp.BaseRequest + + // The launch template ID + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // List of instance launch templates. + LaunchTemplateVersions []*uint64 `json:"LaunchTemplateVersions,omitnil,omitempty" name:"LaunchTemplateVersions"` + + // The minimum version number specified, which defaults to 0. + MinVersion *uint64 `json:"MinVersion,omitnil,omitempty" name:"MinVersion"` + + // The maximum version number specified, which defaults to 30. + MaxVersion *uint64 `json:"MaxVersion,omitnil,omitempty" name:"MaxVersion"` + + // 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 *uint64 `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 *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // Specify whether to query the default version. This parameter and `LaunchTemplateVersions` cannot be specified at the same time. + DefaultVersion *bool `json:"DefaultVersion,omitnil,omitempty" name:"DefaultVersion"` +} + +func (r *DescribeLaunchTemplateVersionsRequest) 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 *DescribeLaunchTemplateVersionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateId") + delete(f, "LaunchTemplateVersions") + delete(f, "MinVersion") + delete(f, "MaxVersion") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "DefaultVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLaunchTemplateVersionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeLaunchTemplateVersionsResponseParams struct { + // Total number of instance launch templates. + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // Set of instance launch template versions. + LaunchTemplateVersionSet []*LaunchTemplateVersionInfo `json:"LaunchTemplateVersionSet,omitnil,omitempty" name:"LaunchTemplateVersionSet"` + + // 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 DescribeLaunchTemplateVersionsResponse struct { + *tchttp.BaseResponse + Response *DescribeLaunchTemplateVersionsResponseParams `json:"Response"` +} + +func (r *DescribeLaunchTemplateVersionsResponse) 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 *DescribeLaunchTemplateVersionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeLaunchTemplatesRequestParams struct { + // 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"` +} + +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 { + //
  • zone
  • + // Filters by the availability zones in which the reserved instance can be purchased, such as `ap-guangzhou-1`. + // Type: String + // Required: no + // Valid values: list of regions/availability zones + // + //
  • product-description
  • + // Filters by the platform description (operating system) of the reserved instance, such as `linux`. + // Type: String + // Required: no + // Valid value: linux + // + //
  • duration
  • + // Filters by the **validity** of the reserved instance, which is the purchased usage period. For example, `31536000`. + // Type: Integer + // Unit: second + // Required: no + // Valid value: 31536000 (1 year) + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type DescribeReservedInstancesConfigInfosRequest struct { + *tchttp.BaseRequest + + //
  • zone
  • + // Filters by the availability zones in which the reserved instance can be purchased, such as `ap-guangzhou-1`. + // Type: String + // Required: no + // Valid values: list of regions/availability zones + // + //
  • product-description
  • + // Filters by the platform description (operating system) of the reserved instance, such as `linux`. + // Type: String + // Required: no + // Valid value: linux + // + //
  • duration
  • + // Filters by the **validity** of the reserved instance, which is the purchased usage period. For example, `31536000`. + // Type: Integer + // Unit: second + // Required: no + // Valid value: 31536000 (1 year) + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *DescribeReservedInstancesConfigInfosRequest) 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 *DescribeReservedInstancesConfigInfosRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeReservedInstancesConfigInfosRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeReservedInstancesConfigInfosResponseParams struct { + // Static configurations of the reserved instance. + ReservedInstanceConfigInfos []*ReservedInstanceConfigInfoItem `json:"ReservedInstanceConfigInfos,omitnil,omitempty" name:"ReservedInstanceConfigInfos"` + + // 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 DescribeReservedInstancesConfigInfosResponse struct { + *tchttp.BaseResponse + Response *DescribeReservedInstancesConfigInfosResponseParams `json:"Response"` +} + +func (r *DescribeReservedInstancesConfigInfosResponse) 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 *DescribeReservedInstancesConfigInfosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeReservedInstancesOfferingsRequestParams struct { + // 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"` + + //
  • zone
  • + //

    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

    + //
  • duration
  • + //

    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)

    + //
  • instance-type
  • + //

    Filters by type of the Reserved Instance, such as `S3.MEDIUM4`.

    Type: String

    Required: no

    Valid values: please see Instance Types

    + //
  • offering-type
  • + //

    Filters by **payment term**, such as `All Upfront`.

    Type: String

    Required: no

    Valid value: All Upfront

    + //
  • product-description
  • + //

    Filters by the platform description (operating system) of the Reserved Instance, such as `linux`.

    Type: String

    Required: no

    Valid value: linux

    + //
  • reserved-instances-offering-id
  • + //

    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"` + + //
  • zone
  • + //

    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

    + //
  • duration
  • + //

    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)

    + //
  • instance-type
  • + //

    Filters by type of the Reserved Instance, such as `S3.MEDIUM4`.

    Type: String

    Required: no

    Valid values: please see Instance Types

    + //
  • offering-type
  • + //

    Filters by **payment term**, such as `All Upfront`.

    Type: String

    Required: no

    Valid value: All Upfront

    + //
  • product-description
  • + //

    Filters by the platform description (operating system) of the Reserved Instance, such as `linux`.

    Type: String

    Required: no

    Valid value: linux

    + //
  • reserved-instances-offering-id
  • + //

    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"` + + //
  • zone
  • + //

    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.

    + //
  • duration
  • + //

    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).

    + //
  • instance-type
  • + //

    Filter by [specifications of reserved instances]. For example, S3.MEDIUM4.

    Type: String.

    Required: No.

    Valid values: See the reserved instance specification list.

    + //
  • instance-family
  • + //

    Filter by [types of reserved instances]. For example, S3.

    Type: String.

    Required: No.

    Valid values: See the reserved instance type list.

    + //
  • offering-type
  • + //

    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).

    + //
  • product-description
  • + //

    Filter by [platform descriptions] (operating system) of reserved instances. For example, linux.

    Type: String.

    Required: No.

    Valid value: linux.

    + //
  • reserved-instances-id
  • + //

    Filter by [IDs of purchased reserved instances]. For example, 650c138f-ae7e-4750-952a-96841d6e9fc1.

    Type: String.

    Required: No.

    + //
  • state
  • + //

    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"` + + //
  • zone
  • + //

    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.

    + //
  • duration
  • + //

    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).

    + //
  • instance-type
  • + //

    Filter by [specifications of reserved instances]. For example, S3.MEDIUM4.

    Type: String.

    Required: No.

    Valid values: See the reserved instance specification list.

    + //
  • instance-family
  • + //

    Filter by [types of reserved instances]. For example, S3.

    Type: String.

    Required: No.

    Valid values: See the reserved instance type list.

    + //
  • offering-type
  • + //

    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).

    + //
  • product-description
  • + //

    Filter by [platform descriptions] (operating system) of reserved instances. For example, linux.

    Type: String.

    Required: No.

    Valid value: linux.

    + //
  • reserved-instances-id
  • + //

    Filter by [IDs of purchased reserved instances]. For example, 650c138f-ae7e-4750-952a-96841d6e9fc1.

    Type: String.

    Required: No.

    + //
  • state
  • + //

    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 { + //
  • instance-charge-type-String-required: no-(filter) billing mode of instances. (POSTPAID_BY_HOUR: pay-as-you-go billing by hour | SPOTPAID: spot billing, which is suitable for a [spot instance] (https://intl.cloud.Tencent.com/document/product/213/17817) | CDHPAID: CDH billing, that is, billing only for CDH, but not for the instances on CDH. )
  • + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type DescribeZoneInstanceConfigInfosRequest struct { + *tchttp.BaseRequest + + //
  • instance-charge-type-String-required: no-(filter) billing mode of instances. (POSTPAID_BY_HOUR: pay-as-you-go billing by hour | SPOTPAID: spot billing, which is suitable for a [spot instance] (https://intl.cloud.Tencent.com/document/product/213/17817) | CDHPAID: CDH billing, that is, billing only for CDH, but not for the instances on CDH. )
  • + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *DescribeZoneInstanceConfigInfosRequest) 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 *DescribeZoneInstanceConfigInfosRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeZoneInstanceConfigInfosRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeZoneInstanceConfigInfosResponseParams struct { + // List of model configurations for the availability zone. + InstanceTypeQuotaSet []*InstanceTypeQuotaItem `json:"InstanceTypeQuotaSet,omitnil,omitempty" name:"InstanceTypeQuotaSet"` + + // 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 DescribeZoneInstanceConfigInfosResponse struct { + *tchttp.BaseResponse + Response *DescribeZoneInstanceConfigInfosResponseParams `json:"Response"` +} + +func (r *DescribeZoneInstanceConfigInfosResponse) 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 *DescribeZoneInstanceConfigInfosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeZonesRequestParams struct { + +} + +type DescribeZonesRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeZonesRequest) 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 *DescribeZonesRequest) 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", "DescribeZonesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeZonesResponseParams struct { + // Number of availability zones. + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // List of availability zones. + ZoneSet []*ZoneInfo `json:"ZoneSet,omitnil,omitempty" name:"ZoneSet"` + + // 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 DescribeZonesResponse struct { + *tchttp.BaseResponse + Response *DescribeZonesResponseParams `json:"Response"` +} + +func (r *DescribeZonesResponse) 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 *DescribeZonesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DisassociateInstancesKeyPairsRequestParams struct { + // Instance ID(s). The maximum number of instances in each request is 100.

    You can obtain the available instance IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/index) to query the instance IDs.
  • Call [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // List of key pair IDs. The maximum number of key pairs in each request is 100. The key pair ID is in the format of `skey-11112222`.

    You can obtain the available key pair IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/sshkey) to query the key pair IDs.
  • Call [DescribeKeyPairs](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) and look for `KeyId` in the response. + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` + + // Whether to force shut down a running instances. It is recommended to manually shut down a running instance before disassociating a key pair from it. Valid values:
  • TRUE: force shut down an instance after a normal shutdown fails.
  • FALSE: do not force shut down an instance after a normal shutdown fails.

    Default value: FALSE. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +type DisassociateInstancesKeyPairsRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). The maximum number of instances in each request is 100.

    You can obtain the available instance IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/index) to query the instance IDs.
  • Call [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // List of key pair IDs. The maximum number of key pairs in each request is 100. The key pair ID is in the format of `skey-11112222`.

    You can obtain the available key pair IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/sshkey) to query the key pair IDs.
  • Call [DescribeKeyPairs](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) and look for `KeyId` in the response. + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` + + // Whether to force shut down a running instances. It is recommended to manually shut down a running instance before disassociating a key pair from it. Valid values:
  • TRUE: force shut down an instance after a normal shutdown fails.
  • FALSE: do not force shut down an instance after a normal shutdown fails.

    Default value: FALSE. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +func (r *DisassociateInstancesKeyPairsRequest) 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 *DisassociateInstancesKeyPairsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "KeyIds") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateInstancesKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DisassociateInstancesKeyPairsResponseParams struct { + // 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 DisassociateInstancesKeyPairsResponse struct { + *tchttp.BaseResponse + Response *DisassociateInstancesKeyPairsResponseParams `json:"Response"` +} + +func (r *DisassociateInstancesKeyPairsResponse) 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 *DisassociateInstancesKeyPairsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DisassociateSecurityGroupsRequestParams struct { + // ID of the security group to be disassociated, such as `sg-efil73jd`. Only one security group can be disassociated. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // ID(s) of the instance(s) to be disassociated,such as `ins-lesecurk`. You can specify multiple instances. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` +} + +type DisassociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // ID of the security group to be disassociated, such as `sg-efil73jd`. Only one security group can be disassociated. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // ID(s) of the instance(s) to be disassociated,such as `ins-lesecurk`. You can specify multiple instances. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` +} + +func (r *DisassociateSecurityGroupsRequest) 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 *DisassociateSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupIds") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DisassociateSecurityGroupsResponseParams struct { + // 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 DisassociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *DisassociateSecurityGroupsResponseParams `json:"Response"` +} + +func (r *DisassociateSecurityGroupsResponse) 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 *DisassociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisasterRecoverGroup struct { + // ID of a spread placement group. + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitnil,omitempty" name:"DisasterRecoverGroupId"` + + // Name of a spread placement group, which must be 1-60 characters long. + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // Type of a spread placement group. Valid values:
    + //
  • HOST: physical machine.
  • + //
  • SW: switch.
  • + //
  • RACK: rack.
  • + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // The maximum number of CVMs that can be hosted in a spread placement group. + CvmQuotaTotal *int64 `json:"CvmQuotaTotal,omitnil,omitempty" name:"CvmQuotaTotal"` + + // The current number of CVMs in a spread placement group. + CurrentNum *int64 `json:"CurrentNum,omitnil,omitempty" name:"CurrentNum"` + + // The list of CVM IDs in a spread placement group. + // Note: This field may return null, indicating that no valid value was found. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Creation time of a spread placement group. + // Note: This field may return null, indicating that no valid value is found. + CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` + + // List of tags associated with the placement group. + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` +} + +type EnhancedService struct { + // Enables cloud security service. If this parameter is not specified, the cloud security service will be enabled by default. + SecurityService *RunSecurityServiceEnabled `json:"SecurityService,omitnil,omitempty" name:"SecurityService"` + + // Enables cloud monitor service. If this parameter is not specified, the cloud monitor service will be enabled by default. + MonitorService *RunMonitorServiceEnabled `json:"MonitorService,omitnil,omitempty" name:"MonitorService"` + + // Whether to enable the TAT service. If this parameter is not specified, the TAT service is enabled for public images and disabled for other images by default. + AutomationService *RunAutomationServiceEnabled `json:"AutomationService,omitnil,omitempty" name:"AutomationService"` +} + +// Predefined struct for user +type EnterRescueModeRequestParams struct { + // Instance ID Needs to Enter Rescue Mode + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // System Password in Rescue Mode + Password *string `json:"Password,omitnil,omitempty" name:"Password"` + + // System Username in Rescue Mode + Username *string `json:"Username,omitnil,omitempty" name:"Username"` + + // Whether to perform forced shutdown. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +type EnterRescueModeRequest struct { + *tchttp.BaseRequest + + // Instance ID Needs to Enter Rescue Mode + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // System Password in Rescue Mode + Password *string `json:"Password,omitnil,omitempty" name:"Password"` + + // System Username in Rescue Mode + Username *string `json:"Username,omitnil,omitempty" name:"Username"` + + // Whether to perform forced shutdown. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +func (r *EnterRescueModeRequest) 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 *EnterRescueModeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "Password") + delete(f, "Username") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnterRescueModeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type EnterRescueModeResponseParams struct { + // 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 EnterRescueModeResponse struct { + *tchttp.BaseResponse + Response *EnterRescueModeResponseParams `json:"Response"` +} + +func (r *EnterRescueModeResponse) 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 *EnterRescueModeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ExitRescueModeRequestParams struct { + // Instance ID Exiting Rescue Mode + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` +} + +type ExitRescueModeRequest struct { + *tchttp.BaseRequest + + // Instance ID Exiting Rescue Mode + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` +} + +func (r *ExitRescueModeRequest) 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 *ExitRescueModeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ExitRescueModeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ExitRescueModeResponseParams struct { + // 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 ExitRescueModeResponse struct { + *tchttp.BaseResponse + Response *ExitRescueModeResponseParams `json:"Response"` +} + +func (r *ExitRescueModeResponse) 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 *ExitRescueModeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ExportImagesRequestParams struct { + // COS bucket name + BucketName *string `json:"BucketName,omitnil,omitempty" name:"BucketName"` + + // List of image IDs + ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` + + // Format of the exported image file. Valid values: `RAW`, `QCOW2`, `VHD` and `VMDK`. Default value: `RAW`. + ExportFormat *string `json:"ExportFormat,omitnil,omitempty" name:"ExportFormat"` + + // Prefix list of the name of exported files + FileNamePrefixList []*string `json:"FileNamePrefixList,omitnil,omitempty" name:"FileNamePrefixList"` + + // Whether to export only the system disk + OnlyExportRootDisk *bool `json:"OnlyExportRootDisk,omitnil,omitempty" name:"OnlyExportRootDisk"` + + // Check whether the image can be exported + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Role name (Default: `CVM_QcsRole`). Before exporting the images, make sure the role exists, and it has write permission to COS. + RoleName *string `json:"RoleName,omitnil,omitempty" name:"RoleName"` +} + +type ExportImagesRequest struct { + *tchttp.BaseRequest + + // COS bucket name + BucketName *string `json:"BucketName,omitnil,omitempty" name:"BucketName"` + + // List of image IDs + ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` + + // Format of the exported image file. Valid values: `RAW`, `QCOW2`, `VHD` and `VMDK`. Default value: `RAW`. + ExportFormat *string `json:"ExportFormat,omitnil,omitempty" name:"ExportFormat"` + + // Prefix list of the name of exported files + FileNamePrefixList []*string `json:"FileNamePrefixList,omitnil,omitempty" name:"FileNamePrefixList"` + + // Whether to export only the system disk + OnlyExportRootDisk *bool `json:"OnlyExportRootDisk,omitnil,omitempty" name:"OnlyExportRootDisk"` + + // Check whether the image can be exported + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Role name (Default: `CVM_QcsRole`). Before exporting the images, make sure the role exists, and it has write permission to COS. + RoleName *string `json:"RoleName,omitnil,omitempty" name:"RoleName"` +} + +func (r *ExportImagesRequest) 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 *ExportImagesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BucketName") + delete(f, "ImageIds") + delete(f, "ExportFormat") + delete(f, "FileNamePrefixList") + delete(f, "OnlyExportRootDisk") + delete(f, "DryRun") + delete(f, "RoleName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ExportImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ExportImagesResponseParams struct { + // ID of the image export task + TaskId *uint64 `json:"TaskId,omitnil,omitempty" name:"TaskId"` + + // List of COS filenames of the exported images + CosPaths []*string `json:"CosPaths,omitnil,omitempty" name:"CosPaths"` + + // 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 ExportImagesResponse struct { + *tchttp.BaseResponse + Response *ExportImagesResponseParams `json:"Response"` +} + +func (r *ExportImagesResponse) 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 *ExportImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Externals struct { + // Release address + // Note: This field may return null, indicating that no valid value is found. + ReleaseAddress *bool `json:"ReleaseAddress,omitnil,omitempty" name:"ReleaseAddress"` + + // Not supported network. Value:
  • BASIC: classic network
  • VPC1.0: VPC1.0 + // Note: This field may return null, indicating that no valid value was found. + UnsupportNetworks []*string `json:"UnsupportNetworks,omitnil,omitempty" name:"UnsupportNetworks"` + + // Attributes of local HDD storage + // Note: This field may return null, indicating that no valid value is found. + StorageBlockAttr *StorageBlock `json:"StorageBlockAttr,omitnil,omitempty" name:"StorageBlockAttr"` +} + +type Filter struct { + // Filters. + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // Filter values. + Values []*string `json:"Values,omitnil,omitempty" name:"Values"` +} + +type GPUInfo struct { + // Number of GPUs. + // Note: this field may return `null`, indicating that no valid value can be found. + GPUCount *float64 `json:"GPUCount,omitnil,omitempty" name:"GPUCount"` + + // GPU address + // Note: this field may return `null`, indicating that no valid value can be found. + GPUId []*string `json:"GPUId,omitnil,omitempty" name:"GPUId"` + + // GPU type of the instance. + // Note: this field may return `null`, indicating that no valid value can be found. + GPUType *string `json:"GPUType,omitnil,omitempty" name:"GPUType"` +} + +type HostItem struct { + // CDH instance location. This parameter is used to specify the AZ, project, and other attributes of the instance. + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // CDH instance ID + HostId *string `json:"HostId,omitnil,omitempty" name:"HostId"` + + // CDH instance type + HostType *string `json:"HostType,omitnil,omitempty" name:"HostType"` + + // CDH instance name + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // CDH instance billing mode + HostChargeType *string `json:"HostChargeType,omitnil,omitempty" name:"HostChargeType"` + + // CDH instance renewal flag + RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` + + // CDH instance creation time + CreatedTime *string `json:"CreatedTime,omitnil,omitempty" name:"CreatedTime"` + + // CDH instance expiry time + ExpiredTime *string `json:"ExpiredTime,omitnil,omitempty" name:"ExpiredTime"` + + // List of IDs of CVMs created on a CDH instance + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // CDH instance status + HostState *string `json:"HostState,omitnil,omitempty" name:"HostState"` + + // CDH instance IP + HostIp *string `json:"HostIp,omitnil,omitempty" name:"HostIp"` + + // CDH instance resource information + HostResource *HostResource `json:"HostResource,omitnil,omitempty" name:"HostResource"` + + // Cage ID of the CDH instance. This parameter is only valid for CDH instances in the cages of finance availability zones. + // Note: This field may return null, indicating that no valid value is found. + CageId *string `json:"CageId,omitnil,omitempty" name:"CageId"` +} + +type HostResource struct { + // Total number of CPU cores in the CDH instance + CpuTotal *uint64 `json:"CpuTotal,omitnil,omitempty" name:"CpuTotal"` + + // Number of available CPU cores in the CDH instance + CpuAvailable *uint64 `json:"CpuAvailable,omitnil,omitempty" name:"CpuAvailable"` + + // Total memory size of the CDH instance (unit: GiB) + MemTotal *float64 `json:"MemTotal,omitnil,omitempty" name:"MemTotal"` + + // Available memory size of the CDH instance (unit: GiB) + MemAvailable *float64 `json:"MemAvailable,omitnil,omitempty" name:"MemAvailable"` + + // Total disk size of the CDH instance (unit: GiB) + DiskTotal *uint64 `json:"DiskTotal,omitnil,omitempty" name:"DiskTotal"` + + // Available disk size of the CDH instance (unit: GiB) + DiskAvailable *uint64 `json:"DiskAvailable,omitnil,omitempty" name:"DiskAvailable"` + + // Disk type of the CDH instance + DiskType *string `json:"DiskType,omitnil,omitempty" name:"DiskType"` + + // Total number of GPU cards in the CDH instance + GpuTotal *uint64 `json:"GpuTotal,omitnil,omitempty" name:"GpuTotal"` + + // Number of available GPU cards in the CDH instance + GpuAvailable *uint64 `json:"GpuAvailable,omitnil,omitempty" name:"GpuAvailable"` +} + +type Image struct { + // Image ID + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Operating system of the image + OsName *string `json:"OsName,omitnil,omitempty" name:"OsName"` + + // Image type + ImageType *string `json:"ImageType,omitnil,omitempty" name:"ImageType"` + + // Creation time of the image + CreatedTime *string `json:"CreatedTime,omitnil,omitempty" name:"CreatedTime"` + + // Image name + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // Image description + ImageDescription *string `json:"ImageDescription,omitnil,omitempty" name:"ImageDescription"` + + // Image size + ImageSize *int64 `json:"ImageSize,omitnil,omitempty" name:"ImageSize"` + + // Image architecture + Architecture *string `json:"Architecture,omitnil,omitempty" name:"Architecture"` + + // Image state + ImageState *string `json:"ImageState,omitnil,omitempty" name:"ImageState"` + + // Source platform of the image + Platform *string `json:"Platform,omitnil,omitempty" name:"Platform"` + + // Image creator + ImageCreator *string `json:"ImageCreator,omitnil,omitempty" name:"ImageCreator"` + + // Image source + ImageSource *string `json:"ImageSource,omitnil,omitempty" name:"ImageSource"` + + // Synchronization percentage + // Note: This field may return null, indicating that no valid value is found. + SyncPercent *int64 `json:"SyncPercent,omitnil,omitempty" name:"SyncPercent"` + + // Whether the image supports cloud-init + // Note: This field may return null, indicating that no valid value is found. + IsSupportCloudinit *bool `json:"IsSupportCloudinit,omitnil,omitempty" name:"IsSupportCloudinit"` + + // Information on the snapshots associated with the image + // Note: This field may return null, indicating that no valid value is found. + SnapshotSet []*Snapshot `json:"SnapshotSet,omitnil,omitempty" name:"SnapshotSet"` + + // The list of tags bound to the image. + // Note: This field may return `null`, indicating that no valid value was found. + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` + + // Image license type + LicenseType *string `json:"LicenseType,omitnil,omitempty" name:"LicenseType"` + + // Image family, Note: This field may return empty + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` + + // Whether the image is deprecated + ImageDeprecated *bool `json:"ImageDeprecated,omitnil,omitempty" name:"ImageDeprecated"` +} + +type ImageOsList struct { + // Supported Windows OS + // Note: This field may return `null`, indicating that no valid values can be obtained. + Windows []*string `json:"Windows,omitnil,omitempty" name:"Windows"` + + // Supported Linux OS + // Note: This field may return `null`, indicating that no valid values can be obtained. + Linux []*string `json:"Linux,omitnil,omitempty" name:"Linux"` +} + +// Predefined struct for user +type ImportImageRequestParams struct { + // OS architecture of the image to be imported, `x86_64` or `i386`. + Architecture *string `json:"Architecture,omitnil,omitempty" name:"Architecture"` + + // OS type of the image to be imported. You can call `DescribeImportImageOs` to obtain the list of supported operating systems. + OsType *string `json:"OsType,omitnil,omitempty" name:"OsType"` + + // OS version of the image to be imported. You can call `DescribeImportImageOs` to obtain the list of supported operating systems. + OsVersion *string `json:"OsVersion,omitnil,omitempty" name:"OsVersion"` + + // Address on COS where the image to be imported is stored. + ImageUrl *string `json:"ImageUrl,omitnil,omitempty" name:"ImageUrl"` + + // Image name + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // Image description + ImageDescription *string `json:"ImageDescription,omitnil,omitempty" name:"ImageDescription"` + + // Dry run to check the parameters without performing the operation + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Whether to force import the image. For more information, see [Forcibly Import Image](https://intl.cloud.tencent.com/document/product/213/12849). + Force *bool `json:"Force,omitnil,omitempty" name:"Force"` + + // Tag description list. This parameter is used to bind a tag to a custom image. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // The license type used to activate the OS after importing an image. + // Valid values: + // `TencentCloud`: Tencent Cloud official license + // `BYOL`: Bring Your Own License + LicenseType *string `json:"LicenseType,omitnil,omitempty" name:"LicenseType"` + + // Boot mode + BootMode *string `json:"BootMode,omitnil,omitempty" name:"BootMode"` + + // Image family + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` +} + +type ImportImageRequest struct { + *tchttp.BaseRequest + + // OS architecture of the image to be imported, `x86_64` or `i386`. + Architecture *string `json:"Architecture,omitnil,omitempty" name:"Architecture"` + + // OS type of the image to be imported. You can call `DescribeImportImageOs` to obtain the list of supported operating systems. + OsType *string `json:"OsType,omitnil,omitempty" name:"OsType"` + + // OS version of the image to be imported. You can call `DescribeImportImageOs` to obtain the list of supported operating systems. + OsVersion *string `json:"OsVersion,omitnil,omitempty" name:"OsVersion"` + + // Address on COS where the image to be imported is stored. + ImageUrl *string `json:"ImageUrl,omitnil,omitempty" name:"ImageUrl"` + + // Image name + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // Image description + ImageDescription *string `json:"ImageDescription,omitnil,omitempty" name:"ImageDescription"` + + // Dry run to check the parameters without performing the operation + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Whether to force import the image. For more information, see [Forcibly Import Image](https://intl.cloud.tencent.com/document/product/213/12849). + Force *bool `json:"Force,omitnil,omitempty" name:"Force"` + + // Tag description list. This parameter is used to bind a tag to a custom image. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // The license type used to activate the OS after importing an image. + // Valid values: + // `TencentCloud`: Tencent Cloud official license + // `BYOL`: Bring Your Own License + LicenseType *string `json:"LicenseType,omitnil,omitempty" name:"LicenseType"` + + // Boot mode + BootMode *string `json:"BootMode,omitnil,omitempty" name:"BootMode"` + + // Image family + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` +} + +func (r *ImportImageRequest) 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 *ImportImageRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Architecture") + delete(f, "OsType") + delete(f, "OsVersion") + delete(f, "ImageUrl") + delete(f, "ImageName") + delete(f, "ImageDescription") + delete(f, "DryRun") + delete(f, "Force") + delete(f, "TagSpecification") + delete(f, "LicenseType") + delete(f, "BootMode") + delete(f, "ImageFamily") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ImportImageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ImportImageResponseParams struct { + // 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 ImportImageResponse struct { + *tchttp.BaseResponse + Response *ImportImageResponseParams `json:"Response"` +} + +func (r *ImportImageResponse) 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 *ImportImageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ImportKeyPairRequestParams struct { + // Key pair name, which can contain numbers, letters, and underscores, with a maximum length of 25 characters. + KeyName *string `json:"KeyName,omitnil,omitempty" name:"KeyName"` + + // The project ID to which the key pair belongs after it is created.

    You can obtain the project ID in the following ways:
  • Check the project list in the [Project management](https://console.cloud.tencent.com/project) page.
  • Call the `DescribeProject` API and view the `projectId` in the response. + // + // If you want to use the default project, specify 0 for the parameter. + ProjectId *int64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` + + // Content of the public key in the key pair in the `OpenSSH RSA` format. + PublicKey *string `json:"PublicKey,omitnil,omitempty" name:"PublicKey"` + + // Tag description list. This parameter is used to bind a tag to a key pair. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` +} + +type ImportKeyPairRequest struct { + *tchttp.BaseRequest + + // Key pair name, which can contain numbers, letters, and underscores, with a maximum length of 25 characters. + KeyName *string `json:"KeyName,omitnil,omitempty" name:"KeyName"` + + // The project ID to which the key pair belongs after it is created.

    You can obtain the project ID in the following ways:
  • Check the project list in the [Project management](https://console.cloud.tencent.com/project) page.
  • Call the `DescribeProject` API and view the `projectId` in the response. + // + // If you want to use the default project, specify 0 for the parameter. + ProjectId *int64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` + + // Content of the public key in the key pair in the `OpenSSH RSA` format. + PublicKey *string `json:"PublicKey,omitnil,omitempty" name:"PublicKey"` + + // Tag description list. This parameter is used to bind a tag to a key pair. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` +} + +func (r *ImportKeyPairRequest) 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 *ImportKeyPairRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyName") + delete(f, "ProjectId") + delete(f, "PublicKey") + delete(f, "TagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ImportKeyPairRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ImportKeyPairResponseParams struct { + // Key pair ID + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // 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 ImportKeyPairResponse struct { + *tchttp.BaseResponse + Response *ImportKeyPairResponseParams `json:"Response"` +} + +func (r *ImportKeyPairResponse) 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 *ImportKeyPairResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquirePricePurchaseReservedInstancesOfferingRequestParams struct { + // The number of the reserved instances you are purchasing. + InstanceCount *uint64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // The ID of the reserved instance offering. + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitnil,omitempty" name:"ReservedInstancesOfferingId"` + + // Dry run. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see Ensuring Idempotency. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Reserved instance name.
  • The RI name defaults to “unnamed” if this parameter is left empty.
  • You can enter any name within 60 characters (including the pattern string).
  • + ReservedInstanceName *string `json:"ReservedInstanceName,omitnil,omitempty" name:"ReservedInstanceName"` +} + +type InquirePricePurchaseReservedInstancesOfferingRequest struct { + *tchttp.BaseRequest + + // The number of the reserved instances you are purchasing. + InstanceCount *uint64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // The ID of the reserved instance offering. + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitnil,omitempty" name:"ReservedInstancesOfferingId"` + + // Dry run. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see Ensuring Idempotency. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Reserved instance name.
  • The RI name defaults to “unnamed” if this parameter is left empty.
  • You can enter any name within 60 characters (including the pattern string).
  • + ReservedInstanceName *string `json:"ReservedInstanceName,omitnil,omitempty" name:"ReservedInstanceName"` +} + +func (r *InquirePricePurchaseReservedInstancesOfferingRequest) 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 *InquirePricePurchaseReservedInstancesOfferingRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceCount") + delete(f, "ReservedInstancesOfferingId") + delete(f, "DryRun") + delete(f, "ClientToken") + delete(f, "ReservedInstanceName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquirePricePurchaseReservedInstancesOfferingRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquirePricePurchaseReservedInstancesOfferingResponseParams struct { + // Price of the reserved instance with specified configuration. + Price *ReservedInstancePrice `json:"Price,omitnil,omitempty" name:"Price"` + + // 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 InquirePricePurchaseReservedInstancesOfferingResponse struct { + *tchttp.BaseResponse + Response *InquirePricePurchaseReservedInstancesOfferingResponseParams `json:"Response"` +} + +func (r *InquirePricePurchaseReservedInstancesOfferingResponse) 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 *InquirePricePurchaseReservedInstancesOfferingResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceResetInstanceRequestParams struct { + // Instance ID. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // [Image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can obtain the available image IDs in the following ways:
  • For IDs of `public images`, `custom images`, and `shared images`, log in to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information; for IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.
  • + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Configuration of the system disk of the instance. For instances with a cloud disk as the system disk, you can expand the system disk by using this parameter to specify the new capacity after reinstallation. If the parameter is not specified, the system disk capacity remains unchanged by default. You can only expand the capacity of the system disk; reducing its capacity is not supported. When reinstalling the system, you can only modify the capacity of the system disk, not the type. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Enhanced services. You can use this parameter to specify whether to enable services such as Cloud Monitor and Cloud Security. If this parameter is not specified, Cloud Monitor and Cloud Security will be enabled by default. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` +} + +type InquiryPriceResetInstanceRequest struct { + *tchttp.BaseRequest + + // Instance ID. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // [Image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can obtain the available image IDs in the following ways:
  • For IDs of `public images`, `custom images`, and `shared images`, log in to the [console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information; for IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.
  • + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Configuration of the system disk of the instance. For instances with a cloud disk as the system disk, you can expand the system disk by using this parameter to specify the new capacity after reinstallation. If the parameter is not specified, the system disk capacity remains unchanged by default. You can only expand the capacity of the system disk; reducing its capacity is not supported. When reinstalling the system, you can only modify the capacity of the system disk, not the type. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Enhanced services. You can use this parameter to specify whether to enable services such as Cloud Monitor and Cloud Security. If this parameter is not specified, Cloud Monitor and Cloud Security will be enabled by default. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` +} + +func (r *InquiryPriceResetInstanceRequest) 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 *InquiryPriceResetInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "ImageId") + delete(f, "SystemDisk") + delete(f, "LoginSettings") + delete(f, "EnhancedService") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResetInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceResetInstanceResponseParams struct { + // Price of reinstalling the instance with the specified configuration. + Price *Price `json:"Price,omitnil,omitempty" name:"Price"` + + // 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 InquiryPriceResetInstanceResponse struct { + *tchttp.BaseResponse + Response *InquiryPriceResetInstanceResponseParams `json:"Response"` +} + +func (r *InquiryPriceResetInstanceResponse) 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 *InquiryPriceResetInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceResetInstancesInternetMaxBandwidthRequestParams struct { + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. When changing the bandwidth of instances with `BANDWIDTH_PREPAID` or `BANDWIDTH_POSTPAID_BY_HOUR` as the network billing method, you can only specify one instance at a time. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Configuration of public network egress bandwidth. The maximum bandwidth varies among different models. For more information, see the documentation on bandwidth limits. Currently only the `InternetMaxBandwidthOut` parameter is supported. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Date from which the new bandwidth takes effect. Format: `YYYY-MM-DD`, such as `2016-10-30`. The starting date cannot be earlier than the current date. If the starting date is the current date, the new bandwidth takes effect immediately. This parameter is only valid for prepaid bandwidth. If you specify the parameter for bandwidth with other network billing methods, an error code will be returned. + StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"` + + // Date until which the bandwidth takes effect, in the format of `YYYY-MM-DD`, such as `2016-10-30`. The validity period of the new bandwidth covers the end date. The end date should not be later than the expiration date of a monthly subscription instance. You can obtain the expiration date of an instance through the `ExpiredTime` in the return value from the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1). This parameter is only valid for monthly subscription bandwidth, and is not supported for bandwidth billed by other modes. Otherwise, the API will return a corresponding error code. + EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"` +} + +type InquiryPriceResetInstancesInternetMaxBandwidthRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. When changing the bandwidth of instances with `BANDWIDTH_PREPAID` or `BANDWIDTH_POSTPAID_BY_HOUR` as the network billing method, you can only specify one instance at a time. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Configuration of public network egress bandwidth. The maximum bandwidth varies among different models. For more information, see the documentation on bandwidth limits. Currently only the `InternetMaxBandwidthOut` parameter is supported. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Date from which the new bandwidth takes effect. Format: `YYYY-MM-DD`, such as `2016-10-30`. The starting date cannot be earlier than the current date. If the starting date is the current date, the new bandwidth takes effect immediately. This parameter is only valid for prepaid bandwidth. If you specify the parameter for bandwidth with other network billing methods, an error code will be returned. + StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"` + + // Date until which the bandwidth takes effect, in the format of `YYYY-MM-DD`, such as `2016-10-30`. The validity period of the new bandwidth covers the end date. The end date should not be later than the expiration date of a monthly subscription instance. You can obtain the expiration date of an instance through the `ExpiredTime` in the return value from the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1). This parameter is only valid for monthly subscription bandwidth, and is not supported for bandwidth billed by other modes. Otherwise, the API will return a corresponding error code. + EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"` +} + +func (r *InquiryPriceResetInstancesInternetMaxBandwidthRequest) 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 *InquiryPriceResetInstancesInternetMaxBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InternetAccessible") + delete(f, "StartTime") + delete(f, "EndTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResetInstancesInternetMaxBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceResetInstancesInternetMaxBandwidthResponseParams struct { + // Price of the new bandwidth + Price *Price `json:"Price,omitnil,omitempty" name:"Price"` + + // 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 InquiryPriceResetInstancesInternetMaxBandwidthResponse struct { + *tchttp.BaseResponse + Response *InquiryPriceResetInstancesInternetMaxBandwidthResponseParams `json:"Response"` +} + +func (r *InquiryPriceResetInstancesInternetMaxBandwidthResponse) 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 *InquiryPriceResetInstancesInternetMaxBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceResetInstancesTypeRequestParams struct { + // One or more instance IDs to be operated. You can obtain the instance ID through the `InstanceId` in the return value from the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1). The maximum number of instances per request is 1. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Instance model. Resources vary with the instance model. Specific values can be found in the tables of [Instance Types] (https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1) or in the latest specifications via the [DescribeInstanceTypeConfigs] (https://intl.cloud.tencent.com/document/product/213/15749?from_cn_redirect=1) API. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` +} + +type InquiryPriceResetInstancesTypeRequest struct { + *tchttp.BaseRequest + + // One or more instance IDs to be operated. You can obtain the instance ID through the `InstanceId` in the return value from the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1). The maximum number of instances per request is 1. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Instance model. Resources vary with the instance model. Specific values can be found in the tables of [Instance Types] (https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1) or in the latest specifications via the [DescribeInstanceTypeConfigs] (https://intl.cloud.tencent.com/document/product/213/15749?from_cn_redirect=1) API. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` +} + +func (r *InquiryPriceResetInstancesTypeRequest) 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 *InquiryPriceResetInstancesTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InstanceType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResetInstancesTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceResetInstancesTypeResponseParams struct { + // Price of the instance using the specified model + Price *Price `json:"Price,omitnil,omitempty" name:"Price"` + + // 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 InquiryPriceResetInstancesTypeResponse struct { + *tchttp.BaseResponse + Response *InquiryPriceResetInstancesTypeResponseParams `json:"Response"` +} + +func (r *InquiryPriceResetInstancesTypeResponse) 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 *InquiryPriceResetInstancesTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceResizeInstanceDisksRequestParams struct { + // Instance ID. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Configuration information of a data disk to be expanded. Only inelastic data disks (with `Portable` being `false` in the return values of [DescribeDisks](https://intl.cloud.tencent.com/document/api/362/16315?from_cn_redirect=1)) can be expanded. The unit of data disk capacity is GB. The minimum expansion step is 10 GB. For more information about data disk types, refer to Disk Product Introduction. The available data disk type is restricted by the instance type `InstanceType`. Additionally, the maximum allowable capacity for expansion varies by data disk type. + // You should specify either DataDisks or SystemDisk, but you cannot specify both at the same time. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Whether to forcibly shut down a running instance. It is recommended to manually shut down a running instance first and then reset the user password. Valid values:
  • true: Forcibly shut down an instance after a normal shutdown fails.

  • false: Do not forcibly shut down an instance after a normal shutdown fails.


  • Default value: false.

    Forced shutdown is equivalent to turning off a physical computer's power switch. Forced shutdown may cause data loss or file system corruption and should only be used when a server cannot be shut down normally. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +type InquiryPriceResizeInstanceDisksRequest struct { + *tchttp.BaseRequest + + // Instance ID. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Configuration information of a data disk to be expanded. Only inelastic data disks (with `Portable` being `false` in the return values of [DescribeDisks](https://intl.cloud.tencent.com/document/api/362/16315?from_cn_redirect=1)) can be expanded. The unit of data disk capacity is GB. The minimum expansion step is 10 GB. For more information about data disk types, refer to Disk Product Introduction. The available data disk type is restricted by the instance type `InstanceType`. Additionally, the maximum allowable capacity for expansion varies by data disk type. + // You should specify either DataDisks or SystemDisk, but you cannot specify both at the same time. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Whether to forcibly shut down a running instance. It is recommended to manually shut down a running instance first and then reset the user password. Valid values:
  • true: Forcibly shut down an instance after a normal shutdown fails.

  • false: Do not forcibly shut down an instance after a normal shutdown fails.


  • Default value: false.

    Forced shutdown is equivalent to turning off a physical computer's power switch. Forced shutdown may cause data loss or file system corruption and should only be used when a server cannot be shut down normally. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +func (r *InquiryPriceResizeInstanceDisksRequest) 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 *InquiryPriceResizeInstanceDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "DataDisks") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResizeInstanceDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceResizeInstanceDisksResponseParams struct { + // Price of the disks after being expanded to the specified configurations + Price *Price `json:"Price,omitnil,omitempty" name:"Price"` + + // 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 InquiryPriceResizeInstanceDisksResponse struct { + *tchttp.BaseResponse + Response *InquiryPriceResizeInstanceDisksResponseParams `json:"Response"` +} + +func (r *InquiryPriceResizeInstanceDisksResponse) 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 *InquiryPriceResizeInstanceDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceRunInstancesRequestParams struct { + // Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone and project. + // Note: `Placement` is required when `LaunchTemplate` is not specified. If both the parameters are passed in, `Placement` prevails. + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // [Image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are three types of images:
  • Public images
  • Custom images
  • Shared images

  • You can obtain the available image IDs in the following ways:
  • For IDs of `public images`, `custom images`, and `shared images`, log in to the [CVM console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information.
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.
  • + // Note: `ImageId` is required when `LaunchTemplate` is not specified. If both the parameters are passed in, `ImageId` prevails. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // The instance [billing method](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).
  • POSTPAID_BY_HOUR: Pay-as-you-go on an hourly basis
    Default value: POSTPAID_BY_HOUR. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Details of the monthly subscription, including the purchase period, auto-renewal. It is required if the `InstanceChargeType` is `PREPAID`. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // The instance model. Different resource specifications are specified for different models. For specific values, call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) to retrieve the latest specification list or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If the parameter is not specified, `S1.SMALL1` will be used by default. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // System disk configuration of the instance. If this parameter is not specified, the default value will be used. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Data disk configuration of the instance. If the parameter is not specified, no data disk will be purchased by default. If you want to purchase data disks, you can specify 21 data disks, including up to 1 `LOCAL_BASIC` data disk or `LOCAL_SSD` data disk and up to 20 `CLOUD_BASIC` data disks, `CLOUD_PREMIUM` data disks, or `CLOUD_SSD` data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // VPC configurations (VPC ID, subnet ID, etc). If it’s not specified, the classic network will be used by default. If a VPC IP is specified in this parameter, the `InstanceCount` can only be 1. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Configuration of public network bandwidth. If it’s not specified, 0 Mbps is used by default. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Number of instances to purchase. Value range: 1 (default) to 100. It cannot exceed the remaining CVM quota of the user. For more information on quota, see [Restrictions on CVM Instance Purchase](https://intl.cloud.tencent.com/document/product/213/2664). + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Instance name.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string `server_{R:3}`. If you purchase only one instance, the instance will be named `server_3`; if you purchase two, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances without specifying a pattern string, the instance names will be suffixed with `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase two instances with the name `server_`, the instance names will be `server_1` and `server_2`.
  • This parameter can contain up to 60 characters (including pattern strings).
  • + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance, or keep the original login settings of the image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will not be associated with any security group by default. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Enhanced services. You can use this parameter to specify whether to enable services such as Cloud Security and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Cloud Security will be enabled by default. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see Ensuring Idempotency. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Hostname of Cloud Virtual Machine.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.

  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.

  • Instances of other types (such as Linux instances): The hostname should contain 2 to 30 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).
  • + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // The market options of the instance. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // HPC cluster ID. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Information about the CPU topology of an instance. If not specified, it is determined by system resources. + CpuTopology *CpuTopology `json:"CpuTopology,omitnil,omitempty" name:"CpuTopology"` + + + LaunchTemplate *LaunchTemplate `json:"LaunchTemplate,omitnil,omitempty" name:"LaunchTemplate"` +} + +type InquiryPriceRunInstancesRequest struct { + *tchttp.BaseRequest + + // Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone and project. + // Note: `Placement` is required when `LaunchTemplate` is not specified. If both the parameters are passed in, `Placement` prevails. + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // [Image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are three types of images:
  • Public images
  • Custom images
  • Shared images

  • You can obtain the available image IDs in the following ways:
  • For IDs of `public images`, `custom images`, and `shared images`, log in to the [CVM console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE) to query the information.
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.
  • + // Note: `ImageId` is required when `LaunchTemplate` is not specified. If both the parameters are passed in, `ImageId` prevails. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // The instance [billing method](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).
  • POSTPAID_BY_HOUR: Pay-as-you-go on an hourly basis
    Default value: POSTPAID_BY_HOUR. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Details of the monthly subscription, including the purchase period, auto-renewal. It is required if the `InstanceChargeType` is `PREPAID`. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // The instance model. Different resource specifications are specified for different models. For specific values, call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) to retrieve the latest specification list or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If the parameter is not specified, `S1.SMALL1` will be used by default. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // System disk configuration of the instance. If this parameter is not specified, the default value will be used. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Data disk configuration of the instance. If the parameter is not specified, no data disk will be purchased by default. If you want to purchase data disks, you can specify 21 data disks, including up to 1 `LOCAL_BASIC` data disk or `LOCAL_SSD` data disk and up to 20 `CLOUD_BASIC` data disks, `CLOUD_PREMIUM` data disks, or `CLOUD_SSD` data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // VPC configurations (VPC ID, subnet ID, etc). If it’s not specified, the classic network will be used by default. If a VPC IP is specified in this parameter, the `InstanceCount` can only be 1. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Configuration of public network bandwidth. If it’s not specified, 0 Mbps is used by default. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Number of instances to purchase. Value range: 1 (default) to 100. It cannot exceed the remaining CVM quota of the user. For more information on quota, see [Restrictions on CVM Instance Purchase](https://intl.cloud.tencent.com/document/product/213/2664). + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Instance name.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string `server_{R:3}`. If you purchase only one instance, the instance will be named `server_3`; if you purchase two, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances without specifying a pattern string, the instance names will be suffixed with `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase two instances with the name `server_`, the instance names will be `server_1` and `server_2`.
  • This parameter can contain up to 60 characters (including pattern strings).
  • + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance, or keep the original login settings of the image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will not be associated with any security group by default. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Enhanced services. You can use this parameter to specify whether to enable services such as Cloud Security and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Cloud Security will be enabled by default. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see Ensuring Idempotency. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Hostname of Cloud Virtual Machine.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.

  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.

  • Instances of other types (such as Linux instances): The hostname should contain 2 to 30 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).
  • + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // The tag description list. This parameter is used to bind a tag to a resource instance. A tag can only be bound to CVM instances. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // The market options of the instance. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // HPC cluster ID. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Information about the CPU topology of an instance. If not specified, it is determined by system resources. + CpuTopology *CpuTopology `json:"CpuTopology,omitnil,omitempty" name:"CpuTopology"` + + LaunchTemplate *LaunchTemplate `json:"LaunchTemplate,omitnil,omitempty" name:"LaunchTemplate"` +} + +func (r *InquiryPriceRunInstancesRequest) 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 *InquiryPriceRunInstancesRequest) 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, "ImageId") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + delete(f, "InstanceType") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "VirtualPrivateCloud") + delete(f, "InternetAccessible") + delete(f, "InstanceCount") + delete(f, "InstanceName") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "ClientToken") + delete(f, "HostName") + delete(f, "TagSpecification") + delete(f, "InstanceMarketOptions") + delete(f, "HpcClusterId") + delete(f, "CpuTopology") + delete(f, "LaunchTemplate") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceRunInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InquiryPriceRunInstancesResponseParams struct { + // Price of the instance with the specified configurations. + Price *Price `json:"Price,omitnil,omitempty" name:"Price"` + + // 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 InquiryPriceRunInstancesResponse struct { + *tchttp.BaseResponse + Response *InquiryPriceRunInstancesResponseParams `json:"Response"` +} + +func (r *InquiryPriceRunInstancesResponse) 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 *InquiryPriceRunInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Instance struct { + // Location of the instance + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // Instance `ID` + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Instance model + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // Number of CPU cores of the instance; unit: core + CPU *int64 `json:"CPU,omitnil,omitempty" name:"CPU"` + + // Memory capacity; unit: `GB`. + Memory *int64 `json:"Memory,omitnil,omitempty" name:"Memory"` + + // Instance status. Valid values:
  • NORMAL: instance is normal.
  • EXPIRED: instance expired.
  • PROTECTIVELY_ISOLATED: instance is protectively isolated. + RestrictState *string `json:"RestrictState,omitnil,omitempty" name:"RestrictState"` + + // Instance name + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Instance billing plan. Valid values:
  • `POSTPAID_BY_HOUR`: pay after use. You are billed by the hour, by traffic.
  • `CDHPAID`: `CDH` billing plan. Applicable to `CDH` only, not the instances on the host.
    + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Information on the system disk of the instance + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Information of the instance data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // List of private IPs of the instance's primary ENI. + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitnil,omitempty" name:"PrivateIpAddresses"` + + // List of public IPs of the instance's primary ENI. + // Note: This field may return null, indicating that no valid value is found. + PublicIpAddresses []*string `json:"PublicIpAddresses,omitnil,omitempty" name:"PublicIpAddresses"` + + // Information on instance bandwidth. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Information on the VPC where the instance resides. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // `ID` of the image used to create the instance. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Auto renewal flag. Valid values:
  • `NOTIFY_AND_MANUAL_RENEW`: notify upon expiration, but do not renew automatically
  • `NOTIFY_AND_AUTO_RENEW`: notify upon expiration and renew automatically
  • `DISABLE_NOTIFY_AND_MANUAL_RENEW`: do not notify upon expiration and do not renew automatically. + //
  • Note: this parameter is `null` for postpaid instances. + RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` + + // Creation time following the `ISO8601` standard and using `UTC` time in the format of `YYYY-MM-DDThh:mm:ssZ`. + CreatedTime *string `json:"CreatedTime,omitnil,omitempty" name:"CreatedTime"` + + // Expiration time in UTC format following the `ISO8601` standard: `YYYY-MM-DDThh:mm:ssZ`. Note: this parameter is `null` for postpaid instances. + ExpiredTime *string `json:"ExpiredTime,omitnil,omitempty" name:"ExpiredTime"` + + // Operating system name. + OsName *string `json:"OsName,omitnil,omitempty" name:"OsName"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Login settings of the instance. Currently only the key associated with the instance is returned. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Instance state. Valid values:
  • PENDING: creating
  • LAUNCH_FAILED: creation failed
  • RUNNING: running
  • STOPPED: shut down
  • STARTING: starting
  • STOPPING: shutting down
  • REBOOTING: rebooting
  • SHUTDOWN: shut down and to be terminated
  • TERMINATING: terminating.
  • + InstanceState *string `json:"InstanceState,omitnil,omitempty" name:"InstanceState"` + + // List of tags associated with the instance. + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` + + // Instance billing method after shutdown. + // Valid values:
  • KEEP_CHARGING: billing continues after shutdown
  • STOP_CHARGING: billing stops after shutdown
  • NOT_APPLICABLE: the instance is not shut down or stopping billing after shutdown is not applicable to the instance.
    + StopChargingMode *string `json:"StopChargingMode,omitnil,omitempty" name:"StopChargingMode"` + + // Globally unique ID of the instance. + Uuid *string `json:"Uuid,omitnil,omitempty" name:"Uuid"` + + // Last operation of the instance, such as StopInstances or ResetInstance. + LatestOperation *string `json:"LatestOperation,omitnil,omitempty" name:"LatestOperation"` + + // The latest operation status of the instance. Valid values:
  • SUCCESS: operation succeeded
  • OPERATING: operation in progress
  • FAILED: operation failed + LatestOperationState *string `json:"LatestOperationState,omitnil,omitempty" name:"LatestOperationState"` + + // Unique request ID for the last operation of the instance. + LatestOperationRequestId *string `json:"LatestOperationRequestId,omitnil,omitempty" name:"LatestOperationRequestId"` + + // ID of a spread placement group. + // Note: this field may return null, indicating that no valid value is obtained. + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitnil,omitempty" name:"DisasterRecoverGroupId"` + + // IPv6 address of the instance. + // Note: this field may return null, indicating that no valid value is obtained. + IPv6Addresses []*string `json:"IPv6Addresses,omitnil,omitempty" name:"IPv6Addresses"` + + // CAM role name. + // Note: this field may return null, indicating that no valid value is obtained. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // HPC cluster ID. + // Note: this field may return null, indicating that no valid value was found. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // IP list of HPC cluster. + // Note: this field may return null, indicating that no valid value was found. + RdmaIpAddresses []*string `json:"RdmaIpAddresses,omitnil,omitempty" name:"RdmaIpAddresses"` + + + DedicatedClusterId *string `json:"DedicatedClusterId,omitnil,omitempty" name:"DedicatedClusterId"` + + // The isolation status of the instance. Valid values:
  • `ARREAR`: isolated due to overdue payment;
  • `EXPIRE`: isolated upon expiration;
  • `MANMADE`: isolated after manual returning;
  • `NOTISOLATED`: not isolated
  • + // Note: this field may return null, indicating that no valid value was found. + IsolatedSource *string `json:"IsolatedSource,omitnil,omitempty" name:"IsolatedSource"` + + // GPU information. This field is only returned for GPU instances. + // Note: this field may return null, indicating that no valid value was found. + GPUInfo *GPUInfo `json:"GPUInfo,omitnil,omitempty" name:"GPUInfo"` + + // Instance OS license type. Default value: `TencentCloud` + LicenseType *string `json:"LicenseType,omitnil,omitempty" name:"LicenseType"` + + // Whether the termination protection is enabled. Values:
  • `TRUE`: Enable instance protection, which means that this instance can not be deleted by an API action.
  • `FALSE`: Do not enable the instance protection.

    Default value: `FALSE`. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` + + // Default login user + DefaultLoginUser *string `json:"DefaultLoginUser,omitnil,omitempty" name:"DefaultLoginUser"` + + // Default login port + DefaultLoginPort *int64 `json:"DefaultLoginPort,omitnil,omitempty" name:"DefaultLoginPort"` + + // Latest operation errors of the instance. + // Note: This field may return `null`, indicating that no valid values can be obtained. + LatestOperationErrorMsg *string `json:"LatestOperationErrorMsg,omitnil,omitempty" name:"LatestOperationErrorMsg"` +} + +type InstanceChargePrepaid struct { + // Subscription period (in month). Valid values: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, `36`, `48’, `60`. + // Note: This field may return `null`, indicating that no valid values can be obtained. + Period *int64 `json:"Period,omitnil,omitempty" name:"Period"` + + // Auto-renewal flag. Valid values:
  • NOTIFY_AND_AUTO_RENEW: Notify of expiration and automatically renew.

  • NOTIFY_AND_MANUAL_RENEW: Notify of expiration and manually renew.

  • DISABLE_NOTIFY_AND_MANUAL_RENEW: Do not notify of expiration and do not automatically renew.


  • Default value: NOTIFY_AND_MANUAL_RENEW. If this parameter is set to NOTIFY_AND_AUTO_RENEW, an instance will be automatically renewed monthly after expiration, provided that the account balance is sufficient. + // Note: This field may return null, indicating that no valid value is found. + RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` +} + +type InstanceFamilyConfig struct { + // Full name of the model family. + InstanceFamilyName *string `json:"InstanceFamilyName,omitnil,omitempty" name:"InstanceFamilyName"` + + // Acronym of the model family. + InstanceFamily *string `json:"InstanceFamily,omitnil,omitempty" name:"InstanceFamily"` +} + +type InstanceMarketOptionsRequest struct { + // Spot-related options + // Note: This field may return `null`, indicating that no valid values can be obtained. + SpotOptions *SpotMarketOptions `json:"SpotOptions,omitnil,omitempty" name:"SpotOptions"` + + // Market type. Valid value: `spot`. + // Note: This field may return `null`, indicating that no valid values can be obtained. + MarketType *string `json:"MarketType,omitnil,omitempty" name:"MarketType"` +} + +type InstanceStatus struct { + // Instance `ID`. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Instance status. Valid values:
  • PENDING: Creating.
  • LAUNCH_FAILED: Creation failed.
  • RUNNING: Running.
  • STOPPED: Shut down.
  • STARTING: Starting up.
  • STOPPING: Shutting down.
  • REBOOTING: Restarting.
  • SHUTDOWN: Shut down and to be terminated.
  • TERMINATING: Terminating.
  • ENTER_RESCUE_MODE: Entering the rescue mode.
  • RESCUE_MODE: In the rescue mode.
  • EXIT_RESCUE_MODE: Exiting the rescue mode.
  • ENTER_SERVICE_LIVE_MIGRATE: Entering online service migration.
  • SERVICE_LIVE_MIGRATE: In online service migration.
  • EXIT_SERVICE_LIVE_MIGRATE: Exiting online service migration.
  • + InstanceState *string `json:"InstanceState,omitnil,omitempty" name:"InstanceState"` +} + +type InstanceTypeQuotaItem struct { + // Availability zone. + Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"` + + // Instance model. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // Instance billing plan. Valid values:
  • POSTPAID_BY_HOUR: pay after use. You are billed for your traffic by the hour.
  • `CDHPAID`: [`CDH`](https://intl.cloud.tencent.com/document/product/416?from_cn_redirect=1) billing plan. Applicable to `CDH` only, not the instances on the host. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // ENI type. For example, 25 represents an ENI of 25 GB. + NetworkCard *int64 `json:"NetworkCard,omitnil,omitempty" name:"NetworkCard"` + + // Additional data. + // Note: This field may return null, indicating that no valid value is found. + Externals *Externals `json:"Externals,omitnil,omitempty" name:"Externals"` + + // Number of CPU cores of an instance model. + Cpu *int64 `json:"Cpu,omitnil,omitempty" name:"Cpu"` + + // Instance memory capacity; unit: `GB`. + Memory *int64 `json:"Memory,omitnil,omitempty" name:"Memory"` + + // Instance model family. + InstanceFamily *string `json:"InstanceFamily,omitnil,omitempty" name:"InstanceFamily"` + + // Model name. + TypeName *string `json:"TypeName,omitnil,omitempty" name:"TypeName"` + + // List of local disk specifications. If the parameter returns null, it means that local disks cannot be created. + LocalDiskTypeList []*LocalDiskType `json:"LocalDiskTypeList,omitnil,omitempty" name:"LocalDiskTypeList"` + + // Whether an instance is for sale. Valid values:
  • SELL: The instance is available for purchase.
  • SOLD_OUT: The instance has been sold out. + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // Price of an instance model. + Price *ItemPrice `json:"Price,omitnil,omitempty" name:"Price"` + + // Details of out-of-stock items + // Note: this field may return null, indicating that no valid value is obtained. + SoldOutReason *string `json:"SoldOutReason,omitnil,omitempty" name:"SoldOutReason"` + + // Private network bandwidth, in Gbps. + InstanceBandwidth *float64 `json:"InstanceBandwidth,omitnil,omitempty" name:"InstanceBandwidth"` + + // The max packet sending and receiving capability (in 10k PPS). + InstancePps *int64 `json:"InstancePps,omitnil,omitempty" name:"InstancePps"` + + // Number of local storage blocks. + StorageBlockAmount *int64 `json:"StorageBlockAmount,omitnil,omitempty" name:"StorageBlockAmount"` + + // CPU type. + CpuType *string `json:"CpuType,omitnil,omitempty" name:"CpuType"` + + // Number of GPUs of the instance. + Gpu *int64 `json:"Gpu,omitnil,omitempty" name:"Gpu"` + + // Number of FPGAs of the instance. + Fpga *int64 `json:"Fpga,omitnil,omitempty" name:"Fpga"` + + // Descriptive information of the instance. + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + + GpuCount *float64 `json:"GpuCount,omitnil,omitempty" name:"GpuCount"` + + // CPU clock rate of the instance + Frequency *string `json:"Frequency,omitnil,omitempty" name:"Frequency"` + + // Inventory status. Valid values: + //
  • EnoughStock: Inventory is sufficient.
  • + //
  • NormalStock: Supply is guaranteed.
  • + //
  • UnderStock: Inventory is about to sell out.
  • + //
  • WithoutStock: Inventory is already sold out.
  • + // Note: This field may return null, indicating that no valid value is found. + StatusCategory *string `json:"StatusCategory,omitnil,omitempty" name:"StatusCategory"` +} + +type InternetAccessible struct { + // Network connection billing plan. Valid value:
  • TRAFFIC_POSTPAID_BY_HOUR: pay after use. You are billed for your traffic, by the hour. + InternetChargeType *string `json:"InternetChargeType,omitnil,omitempty" name:"InternetChargeType"` + + // The maximum outbound bandwidth of the public network, in Mbps. The default value is 0 Mbps. The upper limit of bandwidth varies for different models. For more information, see [Purchase Network Bandwidth](https://intl.cloud.tencent.com/document/product/213/12523?from_cn_redirect=1). + InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitnil,omitempty" name:"InternetMaxBandwidthOut"` + + // Whether to allocate a public IP address. Valid values:
  • true: Allocate a public IP address.
  • false: Do not allocate a public IP address.

  • When the public network bandwidth is greater than 0 Mbps, you can choose whether to enable the public IP address. The public IP address is enabled by default. When the public network bandwidth is 0, allocating the public IP address is not supported. This parameter is only used as an input parameter in the RunInstances API. + PublicIpAssigned *bool `json:"PublicIpAssigned,omitnil,omitempty" name:"PublicIpAssigned"` + + // Bandwidth package ID. To obatin the IDs, you can call [`DescribeBandwidthPackages`](https://intl.cloud.tencent.com/document/api/215/19209?from_cn_redirect=1) and look for the `BandwidthPackageId` fields in the response. + BandwidthPackageId *string `json:"BandwidthPackageId,omitnil,omitempty" name:"BandwidthPackageId"` +} + +type InternetChargeTypeConfig struct { + // Network billing method. + InternetChargeType *string `json:"InternetChargeType,omitnil,omitempty" name:"InternetChargeType"` + + // Description of the network billing method. + Description *string `json:"Description,omitnil,omitempty" name:"Description"` +} + +type ItemPrice struct { + // The original unit price for pay-as-you-go mode in USD.
  • When a billing tier is returned, it indicates the price fo the returned billing tier. For example, if `UnitPriceSecondStep` is returned, it refers to the unit price for the usage between 0 to 96 hours. Otherwise, it refers to that the unit price for unlimited usage. + // Note: this field may return null, indicating that no valid value is obtained. + UnitPrice *float64 `json:"UnitPrice,omitnil,omitempty" name:"UnitPrice"` + + // Billing unit for pay-as-you-go mode. Valid values:
  • HOUR: billed on an hourly basis. It's used for hourly postpaid instances (`POSTPAID_BY_HOUR`).
  • GB: bill by traffic in GB. It's used for postpaid products that are billed by the hourly traffic (`TRAFFIC_POSTPAID_BY_HOUR`). + // Note: this field may return null, indicating that no valid value is obtained. + ChargeUnit *string `json:"ChargeUnit,omitnil,omitempty" name:"ChargeUnit"` + + // The original price of a pay-in-advance instance, in USD. + // Note: this field may return null, indicating that no valid value is obtained. + OriginalPrice *float64 `json:"OriginalPrice,omitnil,omitempty" name:"OriginalPrice"` + + // Discount price of a prepaid instance, in USD. + // Note: this field may return null, indicating that no valid value is obtained. + DiscountPrice *float64 `json:"DiscountPrice,omitnil,omitempty" name:"DiscountPrice"` + + // Percentage of the original price. For example, if you enter "20.0", the discounted price will be 20% of the original price. + // Note: this field may return null, indicating that no valid values can be obtained. + Discount *float64 `json:"Discount,omitnil,omitempty" name:"Discount"` + + // The discounted unit price for pay-as-you-go mode in USD.
  • When a billing tier is returned, it indicates the price fo the returned billing tier. For example, if `UnitPriceSecondStep` is returned, it refers to the unit price for the usage between 0 to 96 hours. Otherwise, it refers to that the unit price for unlimited usage. + // Note: this field may return null, indicating that no valid value is obtained. + UnitPriceDiscount *float64 `json:"UnitPriceDiscount,omitnil,omitempty" name:"UnitPriceDiscount"` + + // Original unit price for the usage between 96 to 360 hours in USD. It's applicable to pay-as-you-go mode. + // Note: this field may return null, indicating that no valid value is obtained. + UnitPriceSecondStep *float64 `json:"UnitPriceSecondStep,omitnil,omitempty" name:"UnitPriceSecondStep"` + + // Discounted unit price for the usage between 96 to 360 hours in USD. It's applicable to pay-as-you-go mode. + // Note: this field may return null, indicating that no valid value is obtained. + UnitPriceDiscountSecondStep *float64 `json:"UnitPriceDiscountSecondStep,omitnil,omitempty" name:"UnitPriceDiscountSecondStep"` + + // Original unit price for the usage after 360 hours in USD. It's applicable to pay-as-you-go mode. + // Note: this field may return null, indicating that no valid value is obtained. + UnitPriceThirdStep *float64 `json:"UnitPriceThirdStep,omitnil,omitempty" name:"UnitPriceThirdStep"` + + // Discounted unit price for the usage after 360 hours in USD. It's applicable to pay-as-you-go mode. + // Note: this field may return null, indicating that no valid value is obtained. + UnitPriceDiscountThirdStep *float64 `json:"UnitPriceDiscountThirdStep,omitnil,omitempty" name:"UnitPriceDiscountThirdStep"` + + // Original 3-year payment, in USD. This parameter is only available to upfront payment mode. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + OriginalPriceThreeYear *float64 `json:"OriginalPriceThreeYear,omitnil,omitempty" name:"OriginalPriceThreeYear"` + + // Discounted 3-year upfront payment, in USD. This parameter is only available to upfront payment mode. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + DiscountPriceThreeYear *float64 `json:"DiscountPriceThreeYear,omitnil,omitempty" name:"DiscountPriceThreeYear"` + + // Discount for 3-year upfront payment. For example, 20.0 indicates 80% off. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + DiscountThreeYear *float64 `json:"DiscountThreeYear,omitnil,omitempty" name:"DiscountThreeYear"` + + // Original 5-year payment, in USD. This parameter is only available to upfront payment mode. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + OriginalPriceFiveYear *float64 `json:"OriginalPriceFiveYear,omitnil,omitempty" name:"OriginalPriceFiveYear"` + + // Discounted 5-year upfront payment, in USD. This parameter is only available to upfront payment mode. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + DiscountPriceFiveYear *float64 `json:"DiscountPriceFiveYear,omitnil,omitempty" name:"DiscountPriceFiveYear"` + + // Discount for 5-year upfront payment. For example, 20.0 indicates 80% off. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + DiscountFiveYear *float64 `json:"DiscountFiveYear,omitnil,omitempty" name:"DiscountFiveYear"` + + // Original 1-year payment, in USD. This parameter is only available to upfront payment mode. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + OriginalPriceOneYear *float64 `json:"OriginalPriceOneYear,omitnil,omitempty" name:"OriginalPriceOneYear"` + + // Discounted 1-year payment, in USD. This parameter is only available to upfront payment mode. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + DiscountPriceOneYear *float64 `json:"DiscountPriceOneYear,omitnil,omitempty" name:"DiscountPriceOneYear"` + + // Discount for 1-year upfront payment. For example, 20.0 indicates 80% off. + // Note: this field may return `null`, indicating that no valid value was found. + // Note: this field may return `null`, indicating that no valid value was found. + DiscountOneYear *float64 `json:"DiscountOneYear,omitnil,omitempty" name:"DiscountOneYear"` +} + +type KeyPair struct { + // Key pair `ID`, the unique identifier of a key pair. + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // Key pair name. + KeyName *string `json:"KeyName,omitnil,omitempty" name:"KeyName"` + + // `ID` of the project to which a key pair belongs. + ProjectId *int64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` + + // Key pair description. + Description *string `json:"Description,omitnil,omitempty" name:"Description"` + + // Content of public key in a key pair. + PublicKey *string `json:"PublicKey,omitnil,omitempty" name:"PublicKey"` + + // Content of private key in a key pair. Tencent Cloud do not keep private keys. Please keep it properly. + PrivateKey *string `json:"PrivateKey,omitnil,omitempty" name:"PrivateKey"` + + // `ID` list of instances associated with a key. + AssociatedInstanceIds []*string `json:"AssociatedInstanceIds,omitnil,omitempty" name:"AssociatedInstanceIds"` + + // Creation time, which follows the `ISO8601` standard and uses `UTC` time in the format of `YYYY-MM-DDThh:mm:ssZ`. + CreatedTime *string `json:"CreatedTime,omitnil,omitempty" name:"CreatedTime"` + + // The list of tags bound to the key. + // Note: This field may return `null`, indicating that no valid value can be obtained. + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` +} + +type LaunchTemplate struct { + // Instance launch template ID. This parameter enables you to create an instance using the preset parameters in the template. + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // Instance launch template version number. If specified, this parameter will be used to create a new instance launch template. + LaunchTemplateVersion *uint64 `json:"LaunchTemplateVersion,omitnil,omitempty" name:"LaunchTemplateVersion"` +} + +type LaunchTemplateInfo struct { + // Instance launch template version number. + // Note: This field may return `null`, indicating that no valid values can be obtained. + LatestVersionNumber *uint64 `json:"LatestVersionNumber,omitnil,omitempty" name:"LatestVersionNumber"` + + // Instance launch template ID. + // Note: This field may return `null`, indicating that no valid values can be obtained. + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // Instance launch template name. + // Note: This field may return `null`, indicating that no valid values can be obtained. + LaunchTemplateName *string `json:"LaunchTemplateName,omitnil,omitempty" name:"LaunchTemplateName"` + + // Default instance launch template version number. + // Note: This field may return `null`, indicating that no valid values can be obtained. + DefaultVersionNumber *uint64 `json:"DefaultVersionNumber,omitnil,omitempty" name:"DefaultVersionNumber"` + + // Total number of versions that the instance launch template contains. + // Note: This field may return `null`, indicating that no valid values can be obtained. + LaunchTemplateVersionCount *uint64 `json:"LaunchTemplateVersionCount,omitnil,omitempty" name:"LaunchTemplateVersionCount"` + + // UIN of the user who created the template. + // Note: This field may return `null`, indicating that no valid values can be obtained. + CreatedBy *string `json:"CreatedBy,omitnil,omitempty" name:"CreatedBy"` + + // Creation time of the template. + // Note: This field may return `null`, indicating that no valid values can be obtained. + CreationTime *string `json:"CreationTime,omitnil,omitempty" name:"CreationTime"` +} + +type LaunchTemplateVersionData struct { + // Location of the instance. + // Note: This field may return `null`, indicating that no valid values can be obtained. + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // Instance model. + // Note: This field may return `null`, indicating that no valid values can be obtained. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // Instance name. + // Note: This field may return `null`, indicating that no valid values can be obtained. + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Instance billing mode. Valid values:
  • `POSTPAID_BY_HOUR`: postpaid for pay-as-you-go instances
  • `CDHPAID`: billed for CDH instances, not the CVMs running on the CDHs.
    + // Note: This field may return `null`, indicating that no valid values can be obtained. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Instance system disk information. + // Note: This field may return `null`, indicating that no valid values can be obtained. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Instance data disk information. This parameter only covers the data disks purchased together with the instance. + // Note: This field may return `null`, indicating that no valid values can be obtained. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Instance bandwidth information. + // Note: This field may return `null`, indicating that no valid values can be obtained. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Information of the VPC where the instance resides. + // Note: This field may return `null`, indicating that no valid values can be obtained. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // `ID` of the image used to create the instance. + // Note: This field may return `null`, indicating that no valid values can be obtained. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. + // Note: This field may return `null`, indicating that no valid values can be obtained. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Login settings of the instance. Currently, only the key associated with the instance is returned. + // Note: This field may return `null`, indicating that no valid values can be obtained. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // CAM role name. + // Note: This field may return `null`, indicating that no valid values can be obtained. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // HPC cluster `ID`. + // Note: This field may return `null`, indicating that no valid values can be obtained. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Number of instances purchased. + // Note: This field may return `null`, indicating that no valid values can be obtained. + InstanceCount *uint64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Enhanced service. + // Note: This field may return `null`, indicating that no valid values can be obtained. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16KB. + // Note: This field may return `null`, indicating that no valid values can be obtained. + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // Placement group ID. You can only specify one. + // Note: This field may return `null`, indicating that no valid values can be obtained. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` + + // Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. + // Note: This field may return `null`, indicating that no valid values can be obtained. + ActionTimer *ActionTimer `json:"ActionTimer,omitnil,omitempty" name:"ActionTimer"` + + // Market options of the instance, such as parameters related to spot instances. This parameter is required for spot instances. + // Note: This field may return `null`, indicating that no valid values can be obtained. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // Hostname of a CVM. + // Note: This field may return `null`, indicating that no valid values can be obtained. + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // A string used to ensure the idempotency of the request. + // Note: This field may return `null`, indicating that no valid values can be obtained. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Prepaid mode. This parameter indicates relevant parameter settings for monthly-subscribed instances. + // Note: This field may return `null`, indicating that no valid values can be obtained. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // List of tag description. By specifying this parameter, the tag can be bound to the corresponding CVM and CBS instances at the same time. + // Note: This field may return `null`, indicating that no valid values can be obtained. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // Whether to enable termination protection. Valid values: + // + // TRUE: Termination protection is enabled. + // FALSE: Termination protection is disabled. + // + // Default value: `FALSE`. + // Note: This field may return `null`, indicating that no valid values can be obtained. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` +} + +type LaunchTemplateVersionInfo struct { + // Instance launch template version number. + // Note: This field may return `null`, indicating that no valid values can be obtained. + LaunchTemplateVersion *uint64 `json:"LaunchTemplateVersion,omitnil,omitempty" name:"LaunchTemplateVersion"` + + // Details of instance launch template versions. + LaunchTemplateVersionData *LaunchTemplateVersionData `json:"LaunchTemplateVersionData,omitnil,omitempty" name:"LaunchTemplateVersionData"` + + // Creation time of the instance launch template version. + CreationTime *string `json:"CreationTime,omitnil,omitempty" name:"CreationTime"` + + // Instance launch template ID. + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // Specifies whether it’s the default launch template version. + IsDefaultVersion *bool `json:"IsDefaultVersion,omitnil,omitempty" name:"IsDefaultVersion"` + + // Information of instance launch template version description. + // Note: This field may return `null`, indicating that no valid values can be obtained. + LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitnil,omitempty" name:"LaunchTemplateVersionDescription"` + + // Creator account + CreatedBy *string `json:"CreatedBy,omitnil,omitempty" name:"CreatedBy"` +} + +type LocalDiskType struct { + // Type of a local disk. + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // Attributes of a local disk. + PartitionType *string `json:"PartitionType,omitnil,omitempty" name:"PartitionType"` + + // Minimum size of a local disk. + MinSize *int64 `json:"MinSize,omitnil,omitempty" name:"MinSize"` + + // Maximum size of a local disk. + MaxSize *int64 `json:"MaxSize,omitnil,omitempty" name:"MaxSize"` + + // Whether a local disk is required during purchase. Valid values:
  • REQUIRED: required
  • OPTIONAL: optional + Required *string `json:"Required,omitnil,omitempty" name:"Required"` +} + +type LoginSettings struct { + // Instance login password. The password complexity limits vary with the operating system type as follows:
  • The Linux instance password must be 8 to 30 characters long and include at least two of the following: [a-z], [A-Z], [0-9], and special characters of [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ].
  • The Windows instance password must be 12 to 30 characters long and include at least three of the following: [a-z], [A-Z], [0-9], and special characters [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /].

    If this parameter is not specified, you need to set it before login by using the console to "reset password" or by calling the ResetInstancesPassword API. + Password *string `json:"Password,omitnil,omitempty" name:"Password"` + + // List of key IDs. After an instance is associated with a key, you can access the instance with the private key in the key pair. You can call [`DescribeKeyPairs`](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) to obtain `KeyId`. You cannot specify a key and a password at the same time. Windows instances do not support keys. + // Note: This field may return `null`, indicating that no valid values can be obtained. + KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` + + // Maintains the original settings of the image. This parameter cannot be specified simultaneously with Password or KeyIds.N. It can be set to true only when an instance is created with a custom image, shared image, or externally imported image. Valid values:
  • true: indicates that the login settings of the image are maintained
  • false: indicates that the login settings of the image are not maintained
  • Default value: false. + // Note: This field may return null, indicating that no valid value is found. + KeepImageLogin *string `json:"KeepImageLogin,omitnil,omitempty" name:"KeepImageLogin"` +} + +// Predefined struct for user +type ModifyChcAttributeRequestParams struct { + // CHC host IDs + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + // CHC host name + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Server type + DeviceType *string `json:"DeviceType,omitnil,omitempty" name:"DeviceType"` + + // Valid characters: Letters, numbers, hyphens and underscores + BmcUser *string `json:"BmcUser,omitnil,omitempty" name:"BmcUser"` + + // The password can contain 8 to 16 characters, including letters, numbers and special symbols (()`~!@#$%^&*-+=_|{}). + Password *string `json:"Password,omitnil,omitempty" name:"Password"` + + // BMC network security group list + BmcSecurityGroupIds []*string `json:"BmcSecurityGroupIds,omitnil,omitempty" name:"BmcSecurityGroupIds"` +} + +type ModifyChcAttributeRequest struct { + *tchttp.BaseRequest + + // CHC host IDs + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + // CHC host name + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Server type + DeviceType *string `json:"DeviceType,omitnil,omitempty" name:"DeviceType"` + + // Valid characters: Letters, numbers, hyphens and underscores + BmcUser *string `json:"BmcUser,omitnil,omitempty" name:"BmcUser"` + + // The password can contain 8 to 16 characters, including letters, numbers and special symbols (()`~!@#$%^&*-+=_|{}). + Password *string `json:"Password,omitnil,omitempty" name:"Password"` + + // BMC network security group list + BmcSecurityGroupIds []*string `json:"BmcSecurityGroupIds,omitnil,omitempty" name:"BmcSecurityGroupIds"` +} + +func (r *ModifyChcAttributeRequest) 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 *ModifyChcAttributeRequest) 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, "InstanceName") + delete(f, "DeviceType") + delete(f, "BmcUser") + delete(f, "Password") + delete(f, "BmcSecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyChcAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyChcAttributeResponseParams struct { + // 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 ModifyChcAttributeResponse struct { + *tchttp.BaseResponse + Response *ModifyChcAttributeResponseParams `json:"Response"` +} + +func (r *ModifyChcAttributeResponse) 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 *ModifyChcAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyDisasterRecoverGroupAttributeRequestParams struct { + // Spread placement group ID, which can be obtained by calling the [DescribeDisasterRecoverGroups](https://intl.cloud.tencent.com/document/api/213/17810?from_cn_redirect=1) API. + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitnil,omitempty" name:"DisasterRecoverGroupId"` + + // Name of a spread placement group. The name must be 1-60 characters long and can contain both Chinese characters and English letters. + Name *string `json:"Name,omitnil,omitempty" name:"Name"` +} + +type ModifyDisasterRecoverGroupAttributeRequest struct { + *tchttp.BaseRequest + + // Spread placement group ID, which can be obtained by calling the [DescribeDisasterRecoverGroups](https://intl.cloud.tencent.com/document/api/213/17810?from_cn_redirect=1) API. + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitnil,omitempty" name:"DisasterRecoverGroupId"` + + // Name of a spread placement group. The name must be 1-60 characters long and can contain both Chinese characters and English letters. + Name *string `json:"Name,omitnil,omitempty" name:"Name"` +} + +func (r *ModifyDisasterRecoverGroupAttributeRequest) 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 *ModifyDisasterRecoverGroupAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DisasterRecoverGroupId") + delete(f, "Name") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDisasterRecoverGroupAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyDisasterRecoverGroupAttributeResponseParams struct { + // 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 ModifyDisasterRecoverGroupAttributeResponse struct { + *tchttp.BaseResponse + Response *ModifyDisasterRecoverGroupAttributeResponseParams `json:"Response"` +} + +func (r *ModifyDisasterRecoverGroupAttributeResponse) 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 *ModifyDisasterRecoverGroupAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyHostsAttributeRequestParams struct { + // CDH instance ID(s). + HostIds []*string `json:"HostIds,omitnil,omitempty" name:"HostIds"` + + // CDH instance name to be displayed. You can specify any name you like, but its length cannot exceed 60 characters. + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Auto renewal flag. Valid values:
  • NOTIFY_AND_AUTO_RENEW: notify upon expiration and renew automatically
  • NOTIFY_AND_MANUAL_RENEW: notify upon expiration but do not renew automatically
  • DISABLE_NOTIFY_AND_MANUAL_RENEW: neither notify upon expiration nor renew automatically

    If this parameter is specified as NOTIFY_AND_AUTO_RENEW, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. + RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` + + // Project ID. You can use the `AddProject` API to create projects, and obtain the `projectId` field in the response of the `DescribeProject` API. When using the [DescribeHosts](https://intl.cloud.tencent.com/document/api/213/16474?from_cn_redirect=1) API to query instances later, you can filter the results by the project ID. + ProjectId *uint64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` +} + +type ModifyHostsAttributeRequest struct { + *tchttp.BaseRequest + + // CDH instance ID(s). + HostIds []*string `json:"HostIds,omitnil,omitempty" name:"HostIds"` + + // CDH instance name to be displayed. You can specify any name you like, but its length cannot exceed 60 characters. + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Auto renewal flag. Valid values:
  • NOTIFY_AND_AUTO_RENEW: notify upon expiration and renew automatically
  • NOTIFY_AND_MANUAL_RENEW: notify upon expiration but do not renew automatically
  • DISABLE_NOTIFY_AND_MANUAL_RENEW: neither notify upon expiration nor renew automatically

    If this parameter is specified as NOTIFY_AND_AUTO_RENEW, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. + RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` + + // Project ID. You can use the `AddProject` API to create projects, and obtain the `projectId` field in the response of the `DescribeProject` API. When using the [DescribeHosts](https://intl.cloud.tencent.com/document/api/213/16474?from_cn_redirect=1) API to query instances later, you can filter the results by the project ID. + ProjectId *uint64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` +} + +func (r *ModifyHostsAttributeRequest) 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 *ModifyHostsAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "HostIds") + delete(f, "HostName") + delete(f, "RenewFlag") + delete(f, "ProjectId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyHostsAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyHostsAttributeResponseParams struct { + // 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 ModifyHostsAttributeResponse struct { + *tchttp.BaseResponse + Response *ModifyHostsAttributeResponseParams `json:"Response"` +} + +func (r *ModifyHostsAttributeResponse) 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 *ModifyHostsAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyImageAttributeRequestParams struct { + // Image ID, such as `img-gvbnzy6f`. You can obtain the image ID in the following ways:
  • Call the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) API and find the value of `ImageId` in the response.
  • Obtain it in the [Image console](https://console.cloud.tencent.com/cvm/image).
  • + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // New image name, which should meet the following requirements:
  • It should not exceed 60 characters.
  • It should be unique.
  • + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // New image description, which should meet the following requirement:
  • It should not exceed 256 characters.
  • + ImageDescription *string `json:"ImageDescription,omitnil,omitempty" name:"ImageDescription"` + + // Sets the image family; + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` + + // Sets whether the image is deprecated; + ImageDeprecated *bool `json:"ImageDeprecated,omitnil,omitempty" name:"ImageDeprecated"` +} + +type ModifyImageAttributeRequest struct { + *tchttp.BaseRequest + + // Image ID, such as `img-gvbnzy6f`. You can obtain the image ID in the following ways:
  • Call the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) API and find the value of `ImageId` in the response.
  • Obtain it in the [Image console](https://console.cloud.tencent.com/cvm/image).
  • + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // New image name, which should meet the following requirements:
  • It should not exceed 60 characters.
  • It should be unique.
  • + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // New image description, which should meet the following requirement:
  • It should not exceed 256 characters.
  • + ImageDescription *string `json:"ImageDescription,omitnil,omitempty" name:"ImageDescription"` + + // Sets the image family; + ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` + + // Sets whether the image is deprecated; + ImageDeprecated *bool `json:"ImageDeprecated,omitnil,omitempty" name:"ImageDeprecated"` +} + +func (r *ModifyImageAttributeRequest) 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 *ModifyImageAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageId") + delete(f, "ImageName") + delete(f, "ImageDescription") + delete(f, "ImageFamily") + delete(f, "ImageDeprecated") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyImageAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyImageAttributeResponseParams struct { + // 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 ModifyImageAttributeResponse struct { + *tchttp.BaseResponse + Response *ModifyImageAttributeResponseParams `json:"Response"` +} + +func (r *ModifyImageAttributeResponse) 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 *ModifyImageAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyImageSharePermissionRequestParams struct { + // Image ID, such as `img-gvbnzy6f`. You can obtain the image ID in the following ways:
  • Call the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) API and find the value of `ImageId` in the response.

  • Obtain it in the [Image console](https://console.cloud.tencent.com/cvm/image).

  • The image ID should correspond to an image in the `NORMAL` state. For more information on image status, see [Image Data Table](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#Image). + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // ID list of root accounts receiving shared images. For the format of array-type parameters, see [API Introduction](https://intl.cloud.tencent.com/document/api/213/568?from_cn_redirect=1). An account ID is different from a QQ number. For details on root account IDs, refer to the account ID section in [Account Information](https://console.cloud.tencent.com/developer). + AccountIds []*string `json:"AccountIds,omitnil,omitempty" name:"AccountIds"` + + // Operations. Valid values: `SHARE`, sharing an image; `CANCEL`, cancelling an image sharing. + Permission *string `json:"Permission,omitnil,omitempty" name:"Permission"` +} + +type ModifyImageSharePermissionRequest struct { + *tchttp.BaseRequest + + // Image ID, such as `img-gvbnzy6f`. You can obtain the image ID in the following ways:
  • Call the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) API and find the value of `ImageId` in the response.

  • Obtain it in the [Image console](https://console.cloud.tencent.com/cvm/image).

  • The image ID should correspond to an image in the `NORMAL` state. For more information on image status, see [Image Data Table](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#Image). + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // ID list of root accounts receiving shared images. For the format of array-type parameters, see [API Introduction](https://intl.cloud.tencent.com/document/api/213/568?from_cn_redirect=1). An account ID is different from a QQ number. For details on root account IDs, refer to the account ID section in [Account Information](https://console.cloud.tencent.com/developer). + AccountIds []*string `json:"AccountIds,omitnil,omitempty" name:"AccountIds"` + + // Operations. Valid values: `SHARE`, sharing an image; `CANCEL`, cancelling an image sharing. + Permission *string `json:"Permission,omitnil,omitempty" name:"Permission"` +} + +func (r *ModifyImageSharePermissionRequest) 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 *ModifyImageSharePermissionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageId") + delete(f, "AccountIds") + delete(f, "Permission") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyImageSharePermissionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyImageSharePermissionResponseParams struct { + // 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 ModifyImageSharePermissionResponse struct { + *tchttp.BaseResponse + Response *ModifyImageSharePermissionResponseParams `json:"Response"` +} + +func (r *ModifyImageSharePermissionResponse) 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 *ModifyImageSharePermissionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesAttributeRequestParams struct { + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // The instance name, which can not exceed 60 characters + // Either `InstanceName` or `SecurityGroups` must be specified, but they can not be both specified. + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // User data provided to an instance, which needs to be encoded in Base64 format with a maximum size of 16 KB. For details on obtaining this parameter, refer to the startup commands for [Windows](https://intl.cloud.tencent.com/document/product/213/17526?from_cn_redirect=1) and [Linux](https://intl.cloud.tencent.com/document/product/213/17525?from_cn_redirect=1). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // IDs of security groups associated with the specified instance. You can associate with a security group by adding its ID, or cancel the association with a security group by removing its ID. Either `InstanceName` or `SecurityGroups` must be specified, but they cannot be both set. + SecurityGroups []*string `json:"SecurityGroups,omitnil,omitempty" name:"SecurityGroups"` + + // The role bound with the instance. If it is not specified, it indicates to unbind the current role of the CVM. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // Modified hostname of an instance.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.
  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.
  • Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).
  • Note: After the hostname is modified, the instance will restart immediately, and the new hostname will take effect after the restart. + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:
  • true: Instance protection is enabled, and the instance is not allowed to be deleted through the API.
  • false: Instance protection is disabled, and the instance is allowed to be deleted through the API.
  • Default value: false. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` + + // The role type, which is used in conjunction with `CamRoleName`. The value is obtained in `RoleType` field, returning by `CAM DescribeRoleList` and `GetRole` APIs. Valid value: `user`, `system` and `service_linked`. + // For example, when `LinkedRoleIn` is contained in `CamRoleName` (such as `TKE_QCSLinkedRoleInPrometheusService`), the returned `RoleType` of `DescribeRoleList` and `GetRoleis` is `service_linked`, and the `CamRoleType` `service_linked`. + // When the value obtained in `RoleType` is `user` (default) or `system`, `CamRoleType` can be left empty. + CamRoleType *string `json:"CamRoleType,omitnil,omitempty" name:"CamRoleType"` + + // Whether to automatically restart an instance when modifying a hostname. If not specified, the instance will automatically restart by default. + // - true: Modify the hostname and automatically restart the instance. + // - false: Modify the hostname without automatically restarting the instance. A manual restart is required for the new hostname to take effect. + // Note: This parameter is valid only when a hostname is modified. + AutoReboot *bool `json:"AutoReboot,omitnil,omitempty" name:"AutoReboot"` +} + +type ModifyInstancesAttributeRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // The instance name, which can not exceed 60 characters + // Either `InstanceName` or `SecurityGroups` must be specified, but they can not be both specified. + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // User data provided to an instance, which needs to be encoded in Base64 format with a maximum size of 16 KB. For details on obtaining this parameter, refer to the startup commands for [Windows](https://intl.cloud.tencent.com/document/product/213/17526?from_cn_redirect=1) and [Linux](https://intl.cloud.tencent.com/document/product/213/17525?from_cn_redirect=1). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // IDs of security groups associated with the specified instance. You can associate with a security group by adding its ID, or cancel the association with a security group by removing its ID. Either `InstanceName` or `SecurityGroups` must be specified, but they cannot be both set. + SecurityGroups []*string `json:"SecurityGroups,omitnil,omitempty" name:"SecurityGroups"` + + // The role bound with the instance. If it is not specified, it indicates to unbind the current role of the CVM. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // Modified hostname of an instance.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.
  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.
  • Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).
  • Note: After the hostname is modified, the instance will restart immediately, and the new hostname will take effect after the restart. + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:
  • true: Instance protection is enabled, and the instance is not allowed to be deleted through the API.
  • false: Instance protection is disabled, and the instance is allowed to be deleted through the API.
  • Default value: false. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` + + // The role type, which is used in conjunction with `CamRoleName`. The value is obtained in `RoleType` field, returning by `CAM DescribeRoleList` and `GetRole` APIs. Valid value: `user`, `system` and `service_linked`. + // For example, when `LinkedRoleIn` is contained in `CamRoleName` (such as `TKE_QCSLinkedRoleInPrometheusService`), the returned `RoleType` of `DescribeRoleList` and `GetRoleis` is `service_linked`, and the `CamRoleType` `service_linked`. + // When the value obtained in `RoleType` is `user` (default) or `system`, `CamRoleType` can be left empty. + CamRoleType *string `json:"CamRoleType,omitnil,omitempty" name:"CamRoleType"` + + // Whether to automatically restart an instance when modifying a hostname. If not specified, the instance will automatically restart by default. + // - true: Modify the hostname and automatically restart the instance. + // - false: Modify the hostname without automatically restarting the instance. A manual restart is required for the new hostname to take effect. + // Note: This parameter is valid only when a hostname is modified. + AutoReboot *bool `json:"AutoReboot,omitnil,omitempty" name:"AutoReboot"` +} + +func (r *ModifyInstancesAttributeRequest) 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 *ModifyInstancesAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InstanceName") + delete(f, "UserData") + delete(f, "SecurityGroups") + delete(f, "CamRoleName") + delete(f, "HostName") + delete(f, "DisableApiTermination") + delete(f, "CamRoleType") + delete(f, "AutoReboot") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesAttributeResponseParams struct { + // 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 ModifyInstancesAttributeResponse struct { + *tchttp.BaseResponse + Response *ModifyInstancesAttributeResponseParams `json:"Response"` +} + +func (r *ModifyInstancesAttributeResponse) 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 *ModifyInstancesAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesProjectRequestParams struct { + // Instance IDs. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. You can operate up to 100 instances in each request. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Project ID. You can use the API `AddProject` to create projects, and obtain the `projectId` field in the response of the `DescribeProject` API. When using the [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) API to query instances later, you can filter the results by the project ID. + ProjectId *int64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` +} + +type ModifyInstancesProjectRequest struct { + *tchttp.BaseRequest + + // Instance IDs. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. You can operate up to 100 instances in each request. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Project ID. You can use the API `AddProject` to create projects, and obtain the `projectId` field in the response of the `DescribeProject` API. When using the [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) API to query instances later, you can filter the results by the project ID. + ProjectId *int64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` +} + +func (r *ModifyInstancesProjectRequest) 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 *ModifyInstancesProjectRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "ProjectId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesProjectRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesProjectResponseParams struct { + // 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 ModifyInstancesProjectResponse struct { + *tchttp.BaseResponse + Response *ModifyInstancesProjectResponseParams `json:"Response"` +} + +func (r *ModifyInstancesProjectResponse) 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 *ModifyInstancesProjectResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesRenewFlagRequestParams struct { + // For one or more instance IDs to be operated. You can obtain the instance ID through the `instanceid` in the returned value from the API [DescribeInstances](https://cloud.tencent.com/document/api/213/15728). The maximum number of instances that can be operated for each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Auto-renewal flag. Valid values:
  • NOTIFY_AND_AUTO_RENEW: Notifies of expiration and performs auto-renewal.
  • NOTIFY_AND_MANUAL_RENEW: Notifies of expiration but does not perform auto-renewal.
  • DISABLE_NOTIFY_AND_MANUAL_RENEW: Not notifies of expiration nor perform auto-renewal.

  • If this parameter is specified to NOTIFY_AND_AUTO_RENEW, the instance will be automatically renewed on a monthly basis after it expires when there is sufficient account balance. + RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` +} + +type ModifyInstancesRenewFlagRequest struct { + *tchttp.BaseRequest + + // For one or more instance IDs to be operated. You can obtain the instance ID through the `instanceid` in the returned value from the API [DescribeInstances](https://cloud.tencent.com/document/api/213/15728). The maximum number of instances that can be operated for each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Auto-renewal flag. Valid values:
  • NOTIFY_AND_AUTO_RENEW: Notifies of expiration and performs auto-renewal.
  • NOTIFY_AND_MANUAL_RENEW: Notifies of expiration but does not perform auto-renewal.
  • DISABLE_NOTIFY_AND_MANUAL_RENEW: Not notifies of expiration nor perform auto-renewal.

  • If this parameter is specified to NOTIFY_AND_AUTO_RENEW, the instance will be automatically renewed on a monthly basis after it expires when there is sufficient account balance. + RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` +} + +func (r *ModifyInstancesRenewFlagRequest) 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 *ModifyInstancesRenewFlagRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "RenewFlag") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesRenewFlagRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesRenewFlagResponseParams struct { + // 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 ModifyInstancesRenewFlagResponse struct { + *tchttp.BaseResponse + Response *ModifyInstancesRenewFlagResponseParams `json:"Response"` +} + +func (r *ModifyInstancesRenewFlagResponse) 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 *ModifyInstancesRenewFlagResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesVpcAttributeRequestParams struct { + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // VPC configurations. You can use this parameter to specify the VPC ID, subnet ID, VPC IP, etc. If the specified VPC ID and subnet ID (the subnet must be in the same availability zone as the instance) are different from the VPC where the specified instance resides, the instance will be migrated to a subnet of the specified VPC. You can use `PrivateIpAddresses` to specify the VPC subnet IP. If you want to specify the subnet IP, you will need to specify a subnet IP for each of the specified instances, and each `InstanceIds` will match a `PrivateIpAddresses`. If `PrivateIpAddresses` is not specified, the VPC subnet IP will be assigned randomly. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Whether to force shut down a running instances. Default value: TRUE. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` + + // Whether to keep the host name. Default value: FALSE. + ReserveHostName *bool `json:"ReserveHostName,omitnil,omitempty" name:"ReserveHostName"` +} + +type ModifyInstancesVpcAttributeRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // VPC configurations. You can use this parameter to specify the VPC ID, subnet ID, VPC IP, etc. If the specified VPC ID and subnet ID (the subnet must be in the same availability zone as the instance) are different from the VPC where the specified instance resides, the instance will be migrated to a subnet of the specified VPC. You can use `PrivateIpAddresses` to specify the VPC subnet IP. If you want to specify the subnet IP, you will need to specify a subnet IP for each of the specified instances, and each `InstanceIds` will match a `PrivateIpAddresses`. If `PrivateIpAddresses` is not specified, the VPC subnet IP will be assigned randomly. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Whether to force shut down a running instances. Default value: TRUE. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` + + // Whether to keep the host name. Default value: FALSE. + ReserveHostName *bool `json:"ReserveHostName,omitnil,omitempty" name:"ReserveHostName"` +} + +func (r *ModifyInstancesVpcAttributeRequest) 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 *ModifyInstancesVpcAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "VirtualPrivateCloud") + delete(f, "ForceStop") + delete(f, "ReserveHostName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesVpcAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesVpcAttributeResponseParams struct { + // 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 ModifyInstancesVpcAttributeResponse struct { + *tchttp.BaseResponse + Response *ModifyInstancesVpcAttributeResponseParams `json:"Response"` +} + +func (r *ModifyInstancesVpcAttributeResponse) 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 *ModifyInstancesVpcAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyKeyPairAttributeRequestParams struct { + // Key pair ID in the format of `skey-xxxxxxxx`.

    You can obtain the available key pair IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/sshkey) to query the key pair IDs.
  • Call [DescribeKeyPairs](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) and look for `KeyId` in the response. + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // New key pair name, which can contain numbers, letters, and underscores, with a maximum length of 25 characters. + KeyName *string `json:"KeyName,omitnil,omitempty" name:"KeyName"` + + // New key pair description. You can specify any name you like, but its length cannot exceed 60 characters. + Description *string `json:"Description,omitnil,omitempty" name:"Description"` +} + +type ModifyKeyPairAttributeRequest struct { + *tchttp.BaseRequest + + // Key pair ID in the format of `skey-xxxxxxxx`.

    You can obtain the available key pair IDs in two ways:
  • Log in to the [console](https://console.cloud.tencent.com/cvm/sshkey) to query the key pair IDs.
  • Call [DescribeKeyPairs](https://intl.cloud.tencent.com/document/api/213/15699?from_cn_redirect=1) and look for `KeyId` in the response. + KeyId *string `json:"KeyId,omitnil,omitempty" name:"KeyId"` + + // New key pair name, which can contain numbers, letters, and underscores, with a maximum length of 25 characters. + KeyName *string `json:"KeyName,omitnil,omitempty" name:"KeyName"` + + // New key pair description. You can specify any name you like, but its length cannot exceed 60 characters. + Description *string `json:"Description,omitnil,omitempty" name:"Description"` +} + +func (r *ModifyKeyPairAttributeRequest) 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 *ModifyKeyPairAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyId") + delete(f, "KeyName") + delete(f, "Description") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyKeyPairAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyKeyPairAttributeResponseParams struct { + // 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 ModifyKeyPairAttributeResponse struct { + *tchttp.BaseResponse + Response *ModifyKeyPairAttributeResponseParams `json:"Response"` +} + +func (r *ModifyKeyPairAttributeResponse) 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 *ModifyKeyPairAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyLaunchTemplateDefaultVersionRequestParams struct { + // The launch template ID + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // The number of the version that you want to set as the default version + DefaultVersion *int64 `json:"DefaultVersion,omitnil,omitempty" name:"DefaultVersion"` +} + +type ModifyLaunchTemplateDefaultVersionRequest struct { + *tchttp.BaseRequest + + // The launch template ID + LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` + + // The number of the version that you want to set as the default version + DefaultVersion *int64 `json:"DefaultVersion,omitnil,omitempty" name:"DefaultVersion"` +} + +func (r *ModifyLaunchTemplateDefaultVersionRequest) 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 *ModifyLaunchTemplateDefaultVersionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateId") + delete(f, "DefaultVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyLaunchTemplateDefaultVersionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyLaunchTemplateDefaultVersionResponseParams struct { + // 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 ModifyLaunchTemplateDefaultVersionResponse struct { + *tchttp.BaseResponse + Response *ModifyLaunchTemplateDefaultVersionResponseParams `json:"Response"` +} + +func (r *ModifyLaunchTemplateDefaultVersionResponse) 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 *ModifyLaunchTemplateDefaultVersionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type OperationCountLimit struct { + // Instance operation. Valid values:
  • `INSTANCE_DEGRADE`: downgrade an instance
  • `INTERNET_CHARGE_TYPE_CHANGE`: modify the billing plan of the network connection + Operation *string `json:"Operation,omitnil,omitempty" name:"Operation"` + + // Instance ID. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Number of operations already performed. If it returns `-1`, it means there is no limit on the times of the operation. + CurrentCount *int64 `json:"CurrentCount,omitnil,omitempty" name:"CurrentCount"` + + // Maximum number of times you can perform an operation. If it returns `-1`, it means there is no limit on the times of the operation. If it returns `0`, it means that configuration modification is not supported. + LimitCount *int64 `json:"LimitCount,omitnil,omitempty" name:"LimitCount"` +} + +type OsVersion struct { + // Operating system type + OsName *string `json:"OsName,omitnil,omitempty" name:"OsName"` + + // Supported operating system versions + OsVersions []*string `json:"OsVersions,omitnil,omitempty" name:"OsVersions"` + + // Supported operating system architecture + Architecture []*string `json:"Architecture,omitnil,omitempty" name:"Architecture"` +} + +type Placement struct { + // ID of the availability zone where the instance resides. You can call the [DescribeZones](https://intl.cloud.tencent.com/document/product/213/35071) API and obtain the ID in the returned `Zone` field. + Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"` + + // ID of the project to which the instance belongs. This parameter can be obtained from the `projectId` returned by [DescribeProject](https://intl.cloud.tencent.com/document/api/651/78725?from_cn_redirect=1). If this is left empty, the default project is used. + ProjectId *int64 `json:"ProjectId,omitnil,omitempty" name:"ProjectId"` + + // ID list of CDHs from which the instance can be created. If you have purchased CDHs and specify this parameter, the instances you purchase will be randomly deployed on the CDHs. + HostIds []*string `json:"HostIds,omitnil,omitempty" name:"HostIds"` + + // The ID of the CDH to which the instance belongs, only used as an output parameter. + HostId *string `json:"HostId,omitnil,omitempty" name:"HostId"` +} + +type Price struct { + // Instance price. + InstancePrice *ItemPrice `json:"InstancePrice,omitnil,omitempty" name:"InstancePrice"` + + // Network price. + BandwidthPrice *ItemPrice `json:"BandwidthPrice,omitnil,omitempty" name:"BandwidthPrice"` +} + +// Predefined struct for user +type PurchaseReservedInstancesOfferingRequestParams struct { + // The number of the Reserved Instance you are purchasing. + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // The ID of the Reserved Instance. + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitnil,omitempty" name:"ReservedInstancesOfferingId"` + + // Dry run + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see Ensuring Idempotency. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Reserved instance name.
  • The RI name defaults to “unnamed” if this parameter is left empty.
  • You can enter any name within 60 characters (including the pattern string).
  • + ReservedInstanceName *string `json:"ReservedInstanceName,omitnil,omitempty" name:"ReservedInstanceName"` +} + +type PurchaseReservedInstancesOfferingRequest struct { + *tchttp.BaseRequest + + // The number of the Reserved Instance you are purchasing. + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // The ID of the Reserved Instance. + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitnil,omitempty" name:"ReservedInstancesOfferingId"` + + // Dry run + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
    For more information, see Ensuring Idempotency. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Reserved instance name.
  • The RI name defaults to “unnamed” if this parameter is left empty.
  • You can enter any name within 60 characters (including the pattern string).
  • + ReservedInstanceName *string `json:"ReservedInstanceName,omitnil,omitempty" name:"ReservedInstanceName"` +} + +func (r *PurchaseReservedInstancesOfferingRequest) 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 *PurchaseReservedInstancesOfferingRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceCount") + delete(f, "ReservedInstancesOfferingId") + delete(f, "DryRun") + delete(f, "ClientToken") + delete(f, "ReservedInstanceName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "PurchaseReservedInstancesOfferingRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type PurchaseReservedInstancesOfferingResponseParams struct { + // The ID of the Reserved Instance purchased. + ReservedInstanceId *string `json:"ReservedInstanceId,omitnil,omitempty" name:"ReservedInstanceId"` + + // 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 PurchaseReservedInstancesOfferingResponse struct { + *tchttp.BaseResponse + Response *PurchaseReservedInstancesOfferingResponseParams `json:"Response"` +} + +func (r *PurchaseReservedInstancesOfferingResponse) 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 *PurchaseReservedInstancesOfferingResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type RebootInstancesRequestParams struct { + // Instance IDs. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. You can operate up to 100 instances in each request. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Whether to forcibly restart an instance after a normal restart fails. Valid values:
  • `TRUE`: yes;
  • `FALSE`: no

    Default value: `FALSE`. This parameter has been disused. We recommend using `StopType` instead. Note that `ForceReboot` and `StopType` parameters cannot be specified at the same time. + ForceReboot *bool `json:"ForceReboot,omitnil,omitempty" name:"ForceReboot"` + + // Shutdown type. Valid values:
  • SOFT: soft shutdown
  • HARD: hard shutdown
  • SOFT_FIRST: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails

    Default value: SOFT. + StopType *string `json:"StopType,omitnil,omitempty" name:"StopType"` +} + +type RebootInstancesRequest struct { + *tchttp.BaseRequest + + // Instance IDs. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. You can operate up to 100 instances in each request. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Whether to forcibly restart an instance after a normal restart fails. Valid values:
  • `TRUE`: yes;
  • `FALSE`: no

    Default value: `FALSE`. This parameter has been disused. We recommend using `StopType` instead. Note that `ForceReboot` and `StopType` parameters cannot be specified at the same time. + ForceReboot *bool `json:"ForceReboot,omitnil,omitempty" name:"ForceReboot"` + + // Shutdown type. Valid values:
  • SOFT: soft shutdown
  • HARD: hard shutdown
  • SOFT_FIRST: perform a soft shutdown first, and perform a hard shutdown if the soft shutdown fails

    Default value: SOFT. + StopType *string `json:"StopType,omitnil,omitempty" name:"StopType"` +} + +func (r *RebootInstancesRequest) 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 *RebootInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "ForceReboot") + delete(f, "StopType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RebootInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type RebootInstancesResponseParams struct { + // 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 RebootInstancesResponse struct { + *tchttp.BaseResponse + Response *RebootInstancesResponseParams `json:"Response"` +} + +func (r *RebootInstancesResponse) 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 *RebootInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RegionInfo struct { + // Region name, such as `ap-guangzhou` + Region *string `json:"Region,omitnil,omitempty" name:"Region"` + + // Region description, such as South China (Guangzhou) + RegionName *string `json:"RegionName,omitnil,omitempty" name:"RegionName"` + + // Whether the region is available + RegionState *string `json:"RegionState,omitnil,omitempty" name:"RegionState"` +} + +// Predefined struct for user +type RemoveChcAssistVpcRequestParams struct { + // CHC ID + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` +} + +type RemoveChcAssistVpcRequest struct { + *tchttp.BaseRequest + + // CHC ID + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` +} + +func (r *RemoveChcAssistVpcRequest) 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 *RemoveChcAssistVpcRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ChcIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RemoveChcAssistVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type RemoveChcAssistVpcResponseParams struct { + // 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 RemoveChcAssistVpcResponse struct { + *tchttp.BaseResponse + Response *RemoveChcAssistVpcResponseParams `json:"Response"` +} + +func (r *RemoveChcAssistVpcResponse) 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 *RemoveChcAssistVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type RemoveChcDeployVpcRequestParams struct { + // CHC ID + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` +} + +type RemoveChcDeployVpcRequest struct { + *tchttp.BaseRequest + + // CHC ID + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` +} + +func (r *RemoveChcDeployVpcRequest) 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 *RemoveChcDeployVpcRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ChcIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RemoveChcDeployVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type RemoveChcDeployVpcResponseParams struct { + // 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 RemoveChcDeployVpcResponse struct { + *tchttp.BaseResponse + Response *RemoveChcDeployVpcResponseParams `json:"Response"` +} + +func (r *RemoveChcDeployVpcResponse) 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 *RemoveChcDeployVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ReservedInstanceConfigInfoItem struct { + // Abbreviation name of the instance type. + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // Full name of the instance type. + TypeName *string `json:"TypeName,omitnil,omitempty" name:"TypeName"` + + // Priority. + Order *int64 `json:"Order,omitnil,omitempty" name:"Order"` + + // List of instance families. + InstanceFamilies []*ReservedInstanceFamilyItem `json:"InstanceFamilies,omitnil,omitempty" name:"InstanceFamilies"` +} + +type ReservedInstanceFamilyItem struct { + // Instance family. + InstanceFamily *string `json:"InstanceFamily,omitnil,omitempty" name:"InstanceFamily"` + + // Priority. + Order *int64 `json:"Order,omitnil,omitempty" name:"Order"` + + // List of instance types. + InstanceTypes []*ReservedInstanceTypeItem `json:"InstanceTypes,omitnil,omitempty" name:"InstanceTypes"` +} + +type ReservedInstancePrice struct { + // Original upfront payment, in USD. + OriginalFixedPrice *float64 `json:"OriginalFixedPrice,omitnil,omitempty" name:"OriginalFixedPrice"` + + // Discounted upfront payment, in USD. + DiscountFixedPrice *float64 `json:"DiscountFixedPrice,omitnil,omitempty" name:"DiscountFixedPrice"` + + // Original subsequent unit price, in USD/hr. + OriginalUsagePrice *float64 `json:"OriginalUsagePrice,omitnil,omitempty" name:"OriginalUsagePrice"` + + // Discounted subsequent unit price, in USD/hr. + DiscountUsagePrice *float64 `json:"DiscountUsagePrice,omitnil,omitempty" name:"DiscountUsagePrice"` + + // Discount on upfront cost. For example, 20.0 indicates 80% off. Note: This field may return null, indicating that no valid value is found. + // Note: This field may return null, indicating that no valid value is found. + FixedPriceDiscount *float64 `json:"FixedPriceDiscount,omitnil,omitempty" name:"FixedPriceDiscount"` + + // Discount on subsequent cost. For example, 20.0 indicates 80% off. Note: This field may return null, indicating that no valid value is found. + // Note: This field may return null, indicating that no valid value is found. + UsagePriceDiscount *float64 `json:"UsagePriceDiscount,omitnil,omitempty" name:"UsagePriceDiscount"` +} + +type ReservedInstancePriceItem struct { + // Payment method. Valid values: All Upfront, Partial Upfront, and No Upfront. + OfferingType *string `json:"OfferingType,omitnil,omitempty" name:"OfferingType"` + + // Upfront payment, in USD. + FixedPrice *float64 `json:"FixedPrice,omitnil,omitempty" name:"FixedPrice"` + + // Subsequent unit price, in USD/hr. + UsagePrice *float64 `json:"UsagePrice,omitnil,omitempty" name:"UsagePrice"` + + // The ID of the reserved instance offering. + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitnil,omitempty" name:"ReservedInstancesOfferingId"` + + // The availability zone in which the reserved instance can be purchased. + Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"` + + // The **validity** of the reserved instance in seconds, which is the purchased usage period. For example, `31536000`. + // Unit: second + Duration *uint64 `json:"Duration,omitnil,omitempty" name:"Duration"` + + // The operating system of the reserved instance, such as `Linux`. + // Valid value: `Linux`. + ProductDescription *string `json:"ProductDescription,omitnil,omitempty" name:"ProductDescription"` + + // Discount price for subsequent total cost, in USD/hr. + DiscountUsagePrice *float64 `json:"DiscountUsagePrice,omitnil,omitempty" name:"DiscountUsagePrice"` + + // Discount price for upfront total cost, in USD. + DiscountFixedPrice *float64 `json:"DiscountFixedPrice,omitnil,omitempty" name:"DiscountFixedPrice"` +} + +type ReservedInstanceTypeItem struct { + // Instance type. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // Number of CPU cores. + Cpu *uint64 `json:"Cpu,omitnil,omitempty" name:"Cpu"` + + // Memory size. + Memory *uint64 `json:"Memory,omitnil,omitempty" name:"Memory"` + + // Number of GPUs. + Gpu *uint64 `json:"Gpu,omitnil,omitempty" name:"Gpu"` + + // Number of FPGAs. + Fpga *uint64 `json:"Fpga,omitnil,omitempty" name:"Fpga"` + + // Number of local storage blocks. + StorageBlock *uint64 `json:"StorageBlock,omitnil,omitempty" name:"StorageBlock"` + + // Number of NICs. + NetworkCard *uint64 `json:"NetworkCard,omitnil,omitempty" name:"NetworkCard"` + + // Maximum bandwidth. + MaxBandwidth *float64 `json:"MaxBandwidth,omitnil,omitempty" name:"MaxBandwidth"` + + // CPU frequency. + Frequency *string `json:"Frequency,omitnil,omitempty" name:"Frequency"` + + // CPU type. + CpuModelName *string `json:"CpuModelName,omitnil,omitempty" name:"CpuModelName"` + + // Packet forwarding rate. + Pps *uint64 `json:"Pps,omitnil,omitempty" name:"Pps"` + + // Other information. + Externals *Externals `json:"Externals,omitnil,omitempty" name:"Externals"` + + // Remarks. + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // Price information about the reserved instance. + Prices []*ReservedInstancePriceItem `json:"Prices,omitnil,omitempty" name:"Prices"` +} + +type ReservedInstances struct { + // (This field has been deprecated. ReservedInstanceId is recommended.) IDs of purchased reserved instances. For example, ri-rtbh4han. + // + // Deprecated: ReservedInstancesId is deprecated. + ReservedInstancesId *string `json:"ReservedInstancesId,omitnil,omitempty" name:"ReservedInstancesId"` + + // Specifications of reserved instances. For example, S3.MEDIUM4. + // Return values: Reserved instance specification list. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // Availability zones in which reserved instances can be purchased. For example, ap-guangzhou-1. + // Return values: Availability zone list. + Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"` + + // Billing start time of reserved instances. For example, 1949-10-01 00:00:00. + StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"` + + // Billing end time of reserved instances. For example, 1949-10-01 00:00:00. + EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"` + + // Validity periods of reserved instances, which is the purchase duration of reserved instances. For example, 31536000. + // Unit: second. + Duration *int64 `json:"Duration,omitnil,omitempty" name:"Duration"` + + // Number of purchased reserved instances. For example, 10. + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Platform descriptions (operating systems) of reserved instances. For example, linux. + // Return value: linux. + ProductDescription *string `json:"ProductDescription,omitnil,omitempty" name:"ProductDescription"` + + // Statuses of purchased reserved instances. For example: active. + // Return values: active (created) | pending (waiting to be created) | retired (expired). + State *string `json:"State,omitnil,omitempty" name:"State"` + + // Billing currencies of purchasable reserved instances. Use standard currency codes defined in ISO 4217. For example, USD. + // Return value: USD. + CurrencyCode *string `json:"CurrencyCode,omitnil,omitempty" name:"CurrencyCode"` + + // Payment types of reserved instances. For example, All Upfront. + // Return value: All Upfront (fully prepaid). + OfferingType *string `json:"OfferingType,omitnil,omitempty" name:"OfferingType"` + + // Types of reserved instances. For example, S3. + // Return values: Reserved instance type list. + InstanceFamily *string `json:"InstanceFamily,omitnil,omitempty" name:"InstanceFamily"` + + // IDs of purchased reserved instances. For example, ri-rtbh4han. + ReservedInstanceId *string `json:"ReservedInstanceId,omitnil,omitempty" name:"ReservedInstanceId"` + + // Display names of reserved instances. For example, riname-01. + ReservedInstanceName *string `json:"ReservedInstanceName,omitnil,omitempty" name:"ReservedInstanceName"` +} + +type ReservedInstancesOffering struct { + // The availability zones in which the Reserved Instance can be purchased, such as ap-guangzhou-1. + // Valid value: Availability Zones + Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"` + + // The billing currency of the Reserved Instance you are purchasing. It's specified using ISO 4217 standard currency. + // Value: USD. + CurrencyCode *string `json:"CurrencyCode,omitnil,omitempty" name:"CurrencyCode"` + + // The **validity** of the Reserved Instance in seconds, which is the purchased usage period. For example, 31536000. + // Unit: second + Duration *int64 `json:"Duration,omitnil,omitempty" name:"Duration"` + + // The purchase price of the Reserved Instance, such as 4000.0. + // Unit: this field uses the currency code specified in `currencyCode`, and only supports “USD” at this time. + FixedPrice *float64 `json:"FixedPrice,omitnil,omitempty" name:"FixedPrice"` + + // The instance model of the Reserved Instance, such as S3.MEDIUM4. + // Valid values: please see Reserved Instance Types + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // The payment term of the Reserved Instance, such as **All Upfront**. + // Valid value: All Upfront. + OfferingType *string `json:"OfferingType,omitnil,omitempty" name:"OfferingType"` + + // The ID of the Reserved Instance offering, such as 650c138f-ae7e-4750-952a-96841d6e9fc1. + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitnil,omitempty" name:"ReservedInstancesOfferingId"` + + // The operating system of the Reserved Instance, such as **linux**. + // Valid value: linux. + ProductDescription *string `json:"ProductDescription,omitnil,omitempty" name:"ProductDescription"` + + // The hourly usage price of the Reserved Instance, such as 0.0. + // Currently, the only supported payment mode is **All Upfront**, so the default value of `UsagePrice` is 0 USD/hr. + // Unit: USD/hr. This field uses the currency code specified in `currencyCode`, and only supports “USD” at this time. + UsagePrice *float64 `json:"UsagePrice,omitnil,omitempty" name:"UsagePrice"` +} + +// Predefined struct for user +type ResetInstanceRequestParams struct { + // Instance ID. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Specified effective [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can obtain the available image IDs in the following ways:
  • for IDs of `public images`, `custom images`, and `shared images`, log in to the [CVM console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE); for IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call the API [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.
  • + //
    Default value: current image. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Configurations of the system disk. For an instance whose system disk is a cloud disk, this parameter can be used to expand the system disk by specifying a new capacity after reinstallation. The system disk capacity can only be expanded but not shrunk. Reinstalling the system can only resize rather than changing the type of the system disk. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Enhanced services. You can specify whether to enable services such as Cloud Security and Cloud Monitor through this parameter. If this parameter is not specified, Cloud Monitor and Cloud Security are enabled for public images by default, but not enabled for custom images and marketplace images by default. Instead, they use services retained in the images. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // When reinstalling a system, you can modify an instance's hostname.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.

  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.

  • Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).
  • + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16 KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` +} + +type ResetInstanceRequest struct { + *tchttp.BaseRequest + + // Instance ID. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Specified effective [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can obtain the available image IDs in the following ways:
  • for IDs of `public images`, `custom images`, and `shared images`, log in to the [CVM console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE); for IDs of `marketplace images`, go to [Cloud Marketplace](https://market.cloud.tencent.com/list).
  • Call the API [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) and look for `ImageId` in the response.
  • + //
    Default value: current image. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Configurations of the system disk. For an instance whose system disk is a cloud disk, this parameter can be used to expand the system disk by specifying a new capacity after reinstallation. The system disk capacity can only be expanded but not shrunk. Reinstalling the system can only resize rather than changing the type of the system disk. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Login settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center. + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Enhanced services. You can specify whether to enable services such as Cloud Security and Cloud Monitor through this parameter. If this parameter is not specified, Cloud Monitor and Cloud Security are enabled for public images by default, but not enabled for custom images and marketplace images by default. Instead, they use services retained in the images. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // When reinstalling a system, you can modify an instance's hostname.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.

  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.

  • Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).
  • + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16 KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` +} + +func (r *ResetInstanceRequest) 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 *ResetInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "ImageId") + delete(f, "SystemDisk") + delete(f, "LoginSettings") + delete(f, "EnhancedService") + delete(f, "HostName") + delete(f, "UserData") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResetInstanceResponseParams struct { + // 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 ResetInstanceResponse struct { + *tchttp.BaseResponse + Response *ResetInstanceResponseParams `json:"Response"` +} + +func (r *ResetInstanceResponse) 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 *ResetInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResetInstancesInternetMaxBandwidthRequestParams struct { + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. When changing the bandwidth of instances with `BANDWIDTH_PREPAID` or `BANDWIDTH_POSTPAID_BY_HOUR` as the network billing method, you can only specify one instance at a time. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Configuration of public network egress bandwidth. The maximum bandwidth varies among different models. For more information, see the documentation on bandwidth limits. Currently only the `InternetMaxBandwidthOut` parameter is supported. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Date from which the new bandwidth takes effect. Format: `YYYY-MM-DD`, such as `2016-10-30`. The starting date cannot be earlier than the current date. If the starting date is the current date, the new bandwidth takes effect immediately. This parameter is only valid for prepaid bandwidth. If you specify the parameter for bandwidth with other network billing methods, an error code will be returned. + StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"` + + // Date until which the bandwidth takes effect, in the format of `YYYY-MM-DD`, such as `2016-10-30`. The validity period of the new bandwidth covers the end date. The end date should not be later than the expiration date of a monthly subscription instance. You can obtain the expiration date of an instance through the `ExpiredTime` in the return value from the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/9388?from_cn_redirect=1). This parameter is only valid for monthly subscription bandwidth, and is not supported for bandwidth billed by other modes. Otherwise, the API will return a corresponding error code. + EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"` +} + +type ResetInstancesInternetMaxBandwidthRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. When changing the bandwidth of instances with `BANDWIDTH_PREPAID` or `BANDWIDTH_POSTPAID_BY_HOUR` as the network billing method, you can only specify one instance at a time. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Configuration of public network egress bandwidth. The maximum bandwidth varies among different models. For more information, see the documentation on bandwidth limits. Currently only the `InternetMaxBandwidthOut` parameter is supported. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // Date from which the new bandwidth takes effect. Format: `YYYY-MM-DD`, such as `2016-10-30`. The starting date cannot be earlier than the current date. If the starting date is the current date, the new bandwidth takes effect immediately. This parameter is only valid for prepaid bandwidth. If you specify the parameter for bandwidth with other network billing methods, an error code will be returned. + StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"` + + // Date until which the bandwidth takes effect, in the format of `YYYY-MM-DD`, such as `2016-10-30`. The validity period of the new bandwidth covers the end date. The end date should not be later than the expiration date of a monthly subscription instance. You can obtain the expiration date of an instance through the `ExpiredTime` in the return value from the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/9388?from_cn_redirect=1). This parameter is only valid for monthly subscription bandwidth, and is not supported for bandwidth billed by other modes. Otherwise, the API will return a corresponding error code. + EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"` +} + +func (r *ResetInstancesInternetMaxBandwidthRequest) 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 *ResetInstancesInternetMaxBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InternetAccessible") + delete(f, "StartTime") + delete(f, "EndTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstancesInternetMaxBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResetInstancesInternetMaxBandwidthResponseParams struct { + // 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 ResetInstancesInternetMaxBandwidthResponse struct { + *tchttp.BaseResponse + Response *ResetInstancesInternetMaxBandwidthResponseParams `json:"Response"` +} + +func (r *ResetInstancesInternetMaxBandwidthResponse) 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 *ResetInstancesInternetMaxBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResetInstancesPasswordRequestParams struct { + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Login password of the instance. The password requirements vary among different operating systems: + // For a Linux instance, the password must be 8 to 30 characters in length; password with more than 12 characters is recommended. It cannot begin with "/", and must contain at least one character from three of the following categories:
  • Lowercase letters: [a-z]
  • Uppercase letters: [A-Z]
  • Numbers: 0-9
  • Special characters: ()\`\~!@#$%^&\*-+=\_|{}[]:;'<>,.?/ + // For a Windows CVM, the password must be 12 to 30 characters in length. It cannot begin with "/" or contain a username. It must contain at least one character from three of the following categories:
  • Lowercase letters: [a-z]
  • Uppercase letters: [A-Z]
  • Numbers: 0-9
  • Special characters: ()\`\~!@#$%^&\*-+=\_|{}[]:;' <>,.?/
  • If the specified instances include both `Linux` and `Windows` instances, you will need to follow the password requirements for `Windows` instances. + Password *string `json:"Password,omitnil,omitempty" name:"Password"` + + // Username of the instance operating system for which the password needs to be reset. This parameter is limited to 64 characters. + UserName *string `json:"UserName,omitnil,omitempty" name:"UserName"` + + // Whether to force shut down a running instances. It is recommended to manually shut down a running instance before resetting the user password. Valid values:
  • TRUE: force shut down an instance after a normal shutdown fails.
  • FALSE: do not force shut down an instance after a normal shutdown fails.

    Default value: FALSE.

    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 shut down normally. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +type ResetInstancesPasswordRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Login password of the instance. The password requirements vary among different operating systems: + // For a Linux instance, the password must be 8 to 30 characters in length; password with more than 12 characters is recommended. It cannot begin with "/", and must contain at least one character from three of the following categories:
  • Lowercase letters: [a-z]
  • Uppercase letters: [A-Z]
  • Numbers: 0-9
  • Special characters: ()\`\~!@#$%^&\*-+=\_|{}[]:;'<>,.?/ + // For a Windows CVM, the password must be 12 to 30 characters in length. It cannot begin with "/" or contain a username. It must contain at least one character from three of the following categories:
  • Lowercase letters: [a-z]
  • Uppercase letters: [A-Z]
  • Numbers: 0-9
  • Special characters: ()\`\~!@#$%^&\*-+=\_|{}[]:;' <>,.?/
  • If the specified instances include both `Linux` and `Windows` instances, you will need to follow the password requirements for `Windows` instances. + Password *string `json:"Password,omitnil,omitempty" name:"Password"` + + // Username of the instance operating system for which the password needs to be reset. This parameter is limited to 64 characters. + UserName *string `json:"UserName,omitnil,omitempty" name:"UserName"` + + // Whether to force shut down a running instances. It is recommended to manually shut down a running instance before resetting the user password. Valid values:
  • TRUE: force shut down an instance after a normal shutdown fails.
  • FALSE: do not force shut down an instance after a normal shutdown fails.

    Default value: FALSE.

    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 shut down normally. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +func (r *ResetInstancesPasswordRequest) 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 *ResetInstancesPasswordRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "Password") + delete(f, "UserName") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstancesPasswordRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResetInstancesPasswordResponseParams struct { + // 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 ResetInstancesPasswordResponse struct { + *tchttp.BaseResponse + Response *ResetInstancesPasswordResponseParams `json:"Response"` +} + +func (r *ResetInstancesPasswordResponse) 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 *ResetInstancesPasswordResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResetInstancesTypeRequestParams struct { + // Instance ID(s). To obtain the instance IDs, you can call the [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) API and find the value `InstanceId` in the response. The maximum number of instances in each request is 1. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Instance model. Different resource specifications are specified for different models. For specific values, call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) to get the latest specification list or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // Forced shutdown of a running instances. We recommend you firstly try to shut down a running instance manually. Valid values:
  • TRUE: forced shutdown of an instance after a normal shutdown fails.
  • FALSE: no forced shutdown of an instance after a normal shutdown fails.

    Default value: FALSE.

    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 a CVM to shut off if the normal shutdown fails. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +type ResetInstancesTypeRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). To obtain the instance IDs, you can call the [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) API and find the value `InstanceId` in the response. The maximum number of instances in each request is 1. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Instance model. Different resource specifications are specified for different models. For specific values, call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) to get the latest specification list or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // Forced shutdown of a running instances. We recommend you firstly try to shut down a running instance manually. Valid values:
  • TRUE: forced shutdown of an instance after a normal shutdown fails.
  • FALSE: no forced shutdown of an instance after a normal shutdown fails.

    Default value: FALSE.

    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 a CVM to shut off if the normal shutdown fails. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` +} + +func (r *ResetInstancesTypeRequest) 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 *ResetInstancesTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InstanceType") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstancesTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResetInstancesTypeResponseParams struct { + // 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 ResetInstancesTypeResponse struct { + *tchttp.BaseResponse + Response *ResetInstancesTypeResponseParams `json:"Response"` +} + +func (r *ResetInstancesTypeResponse) 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 *ResetInstancesTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResizeInstanceDisksRequestParams struct { + // Instance ID. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Configuration information of a data disk to be expanded. Only inelastic data disks (with `Portable` being `false` in the return values of [DescribeDisks](https://intl.cloud.tencent.com/document/api/362/16315?from_cn_redirect=1)) can be expanded. The unit of data disk capacity is GB. The minimum expansion step is 10 GB. For more information about data disk types, refer to [Disk Product Introduction](https://intl.cloud.tencent.com/document/product/362/2353?from_cn_redirect=1). The available data disk type is restricted by the instance type `InstanceType`. Additionally, the maximum allowable capacity for expansion varies by data disk type. + // You should specify either DataDisks or SystemDisk, but you cannot specify both at the same time. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Whether to forcibly shut down a running instance. It is recommended to manually shut down a running instance first and then reset the user password. Valid values:
  • true: Forcibly shut down an instance after a normal shutdown fails.

  • false: Do not forcibly shut down an instance after a normal shutdown fails.


  • Default value: false.

    Forced shutdown is equivalent to turning off a physical computer's power switch. Forced shutdown may cause data loss or file system corruption and should only be used when a server cannot be shut down normally. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` + + // Configuration information of a system disk to be expanded. Only cloud disks can be expanded. + // + // You should specify either DataDisks or SystemDisk, but you cannot specify both at the same time. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Whether the cloud disk is expanded online. + ResizeOnline *bool `json:"ResizeOnline,omitnil,omitempty" name:"ResizeOnline"` +} + +type ResizeInstanceDisksRequest struct { + *tchttp.BaseRequest + + // Instance ID. To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // Configuration information of a data disk to be expanded. Only inelastic data disks (with `Portable` being `false` in the return values of [DescribeDisks](https://intl.cloud.tencent.com/document/api/362/16315?from_cn_redirect=1)) can be expanded. The unit of data disk capacity is GB. The minimum expansion step is 10 GB. For more information about data disk types, refer to [Disk Product Introduction](https://intl.cloud.tencent.com/document/product/362/2353?from_cn_redirect=1). The available data disk type is restricted by the instance type `InstanceType`. Additionally, the maximum allowable capacity for expansion varies by data disk type. + // You should specify either DataDisks or SystemDisk, but you cannot specify both at the same time. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Whether to forcibly shut down a running instance. It is recommended to manually shut down a running instance first and then reset the user password. Valid values:
  • true: Forcibly shut down an instance after a normal shutdown fails.

  • false: Do not forcibly shut down an instance after a normal shutdown fails.


  • Default value: false.

    Forced shutdown is equivalent to turning off a physical computer's power switch. Forced shutdown may cause data loss or file system corruption and should only be used when a server cannot be shut down normally. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` + + // Configuration information of a system disk to be expanded. Only cloud disks can be expanded. + // + // You should specify either DataDisks or SystemDisk, but you cannot specify both at the same time. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // Whether the cloud disk is expanded online. + ResizeOnline *bool `json:"ResizeOnline,omitnil,omitempty" name:"ResizeOnline"` +} + +func (r *ResizeInstanceDisksRequest) 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 *ResizeInstanceDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "DataDisks") + delete(f, "ForceStop") + delete(f, "SystemDisk") + delete(f, "ResizeOnline") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResizeInstanceDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ResizeInstanceDisksResponseParams struct { + // 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 ResizeInstanceDisksResponse struct { + *tchttp.BaseResponse + Response *ResizeInstanceDisksResponseParams `json:"Response"` +} + +func (r *ResizeInstanceDisksResponse) 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 *ResizeInstanceDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RunAutomationServiceEnabled struct { + // Whether to enable the TAT service. Valid values:
  • `TRUE`: yes;
  • `FALSE`: no

    Default: `FALSE`. + Enabled *bool `json:"Enabled,omitnil,omitempty" name:"Enabled"` +} + +// Predefined struct for user +type RunInstancesRequestParams struct { + // Instance [billing type](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).
  • `POSTPAID_BY_HOUR`: Hourly-based pay-as-you-go
  • `CDHPAID`: Dedicated CVM (associated with a dedicated host. Resource usage of the dedicated host is free of charge.)
  • `SPOTPAID`: [Spot instance](https://intl.cloud.tencent.com/document/product/213/17817)
    Default value: `POSTPAID_BY_HOUR`. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Details of the monthly subscription, including the purchase period, auto-renewal. It is required if the `InstanceChargeType` is `PREPAID`. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // Location of the instance. You can use this parameter to specify the availability zone, project, and CDH (for dedicated CVMs). + // Note: `Placement` is required when `LaunchTemplate` is not specified. If both the parameters are passed in, `Placement` prevails. + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // The instance model. + //
  • To view specific values for `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, `S1.SMALL1` will be used by default.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, specify this parameter as `CDH_1C1G`. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are three types of images:
  • Public images
  • Custom images
  • Shared images

  • To check the image ID:
  • For public images, custom images, and shared images, go to the [CVM console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • + // Note: `ImageId` is required when `LaunchTemplate` is not specified. If both the parameters are passed in, `ImageId` prevails. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // System disk configuration of the instance. If this parameter is not specified, the default value will be used. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC, CLOUD_PREMIUM, or CLOUD_SSD data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be the same as the number of VPC IPs, which cannot be greater than 20. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // The number of instances to be purchased. Value range for pay-as-you-go instances: [1, 100]. Default value: `1`. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on the quota, see [Quota for CVM Instances](https://intl.cloud.tencent.com/document/product/213/2664). + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Instance name.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string `server_{R:3}`. If you purchase only one instance, the instance will be named `server_3`; if you purchase two, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances without specifying a pattern string, the instance names will be suffixed with `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase two instances with the name `server_`, the instance names will be `server_1` and `server_2`.
  • This parameter can contain up to 60 characters (including pattern strings).
  • + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Instance login settings. You can use this parameter to set the login method, password and key of the instance, or keep the original login settings of the image. If it's not specified, the user needs to set the login password using the "Reset password" option in the CVM console or calling the API `ResetInstancesPassword` to complete the creation of the CVM instance(s). + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Enhanced service. You can use this parameter to specify whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idem-potency of the request cannot be guaranteed. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Hostname of an instance.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.

  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.

  • Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).

  • If you purchase multiple instances and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string `server{R:3}`. If you purchase only one instance, the hostname will be `server3`; if you purchase two, they will be `server3` and `server4`. You can specify multiple pattern strings in the format of `{R:x}`.

  • If you purchase multiple instances without specifying a pattern string, the hostnames will be suffixed with `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase two instances with the name `server`, the hostnames will be `server1` and `server2`.
  • + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. + ActionTimer *ActionTimer `json:"ActionTimer,omitnil,omitempty" name:"ActionTimer"` + + // Placement group ID. You can only specify one. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` + + // List of tag description. By specifying this parameter, the tag can be bound to the corresponding CVM and CBS instances at the same time. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // The market options of the instance. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16 KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // Whether the request is a dry run only. + // `true`: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. + // If the dry run fails, the corresponding error code will be returned. + // If the dry run succeeds, the RequestId will be returned. + // `false` (default value): Send a normal request and create instance(s) if all the requirements are met. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Information about the CPU topology of an instance. If not specified, it is determined by system resources. + CpuTopology *CpuTopology `json:"CpuTopology,omitnil,omitempty" name:"CpuTopology"` + + // CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/36223?from_cn_redirect=1) API. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Instance launch template. + LaunchTemplate *LaunchTemplate `json:"LaunchTemplate,omitnil,omitempty" name:"LaunchTemplate"` + + // Specify the ID of the dedicated cluster where the CVM is created. + DedicatedClusterId *string `json:"DedicatedClusterId,omitnil,omitempty" name:"DedicatedClusterId"` + + // Specify the CHC physical server that used to create the CHC CVM. + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + // Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:
  • true: Instance protection is enabled, and the instance is not allowed to be deleted through the API.

  • false: Instance protection is disabled, and the instance is allowed to be deleted through the API.


  • Default value: false. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` +} + +type RunInstancesRequest struct { + *tchttp.BaseRequest + + // Instance [billing type](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).
  • `POSTPAID_BY_HOUR`: Hourly-based pay-as-you-go
  • `CDHPAID`: Dedicated CVM (associated with a dedicated host. Resource usage of the dedicated host is free of charge.)
  • `SPOTPAID`: [Spot instance](https://intl.cloud.tencent.com/document/product/213/17817)
    Default value: `POSTPAID_BY_HOUR`. + InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` + + // Details of the monthly subscription, including the purchase period, auto-renewal. It is required if the `InstanceChargeType` is `PREPAID`. + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` + + // Location of the instance. You can use this parameter to specify the availability zone, project, and CDH (for dedicated CVMs). + // Note: `Placement` is required when `LaunchTemplate` is not specified. If both the parameters are passed in, `Placement` prevails. + Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` + + // The instance model. + //
  • To view specific values for `POSTPAID_BY_HOUR` instances, you can call [DescribeInstanceTypeConfigs](https://intl.cloud.tencent.com/document/api/213/15749?from_cn_redirect=1) or refer to [Instance Types](https://intl.cloud.tencent.com/document/product/213/11518?from_cn_redirect=1). If this parameter is not specified, `S1.SMALL1` will be used by default.
  • For `CDHPAID` instances, the value of this parameter is in the format of `CDH_XCXG` based on the number of CPU cores and memory capacity. For example, if you want to create a CDH instance with a single-core CPU and 1 GB memory, specify this parameter as `CDH_1C1G`. + InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` + + // The [image](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. There are three types of images:
  • Public images
  • Custom images
  • Shared images

  • To check the image ID:
  • For public images, custom images, and shared images, go to the [CVM console](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE).
  • Call [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1), pass in `InstanceType` to retrieve the list of images supported by the current model, and then find the `ImageId` in the response.
  • + // Note: `ImageId` is required when `LaunchTemplate` is not specified. If both the parameters are passed in, `ImageId` prevails. + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // System disk configuration of the instance. If this parameter is not specified, the default value will be used. + SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` + + // The configuration information of instance data disks. If this parameter is not specified, no data disk will be purchased by default. When purchasing, you can specify 21 data disks, which can contain at most 1 LOCAL_BASIC or LOCAL_SSD data disk, and at most 20 CLOUD_BASIC, CLOUD_PREMIUM, or CLOUD_SSD data disks. + DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` + + // Configuration information of VPC. This parameter is used to specify VPC ID and subnet ID, etc. If a VPC IP is specified in this parameter, it indicates the primary ENI IP of each instance. The value of parameter InstanceCount must be the same as the number of VPC IPs, which cannot be greater than 20. + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` + + // Configuration of public network bandwidth. If this parameter is not specified, 0 Mbps will be used by default. + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` + + // The number of instances to be purchased. Value range for pay-as-you-go instances: [1, 100]. Default value: `1`. The specified number of instances to be purchased cannot exceed the remaining quota allowed for the user. For more information on the quota, see [Quota for CVM Instances](https://intl.cloud.tencent.com/document/product/213/2664). + InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` + + // Instance name.
  • If this parameter is not specified, "Unnamed" will be displayed by default.
  • If you purchase multiple instances and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string `server_{R:3}`. If you purchase only one instance, the instance will be named `server_3`; if you purchase two, they will be named `server_3` and `server_4`. You can specify multiple pattern strings in the format of `{R:x}`.
  • If you purchase multiple instances without specifying a pattern string, the instance names will be suffixed with `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase two instances with the name `server_`, the instance names will be `server_1` and `server_2`.
  • This parameter can contain up to 60 characters (including pattern strings).
  • + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // Instance login settings. You can use this parameter to set the login method, password and key of the instance, or keep the original login settings of the image. If it's not specified, the user needs to set the login password using the "Reset password" option in the CVM console or calling the API `ResetInstancesPassword` to complete the creation of the CVM instance(s). + LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` + + // Security groups to which the instance belongs. To obtain the security group IDs, you can call [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808) and look for the `sgld` fields in the response. If this parameter is not specified, the instance will be associated with default security groups. + SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` + + // Enhanced service. You can use this parameter to specify whether to enable services such as Anti-DDoS and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Anti-DDoS are enabled for public images by default. However, for custom images and images from the marketplace, Anti-DDoS and Cloud Monitor are not enabled by default. The original services in the image will be retained. + EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` + + // A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idem-potency of the request cannot be guaranteed. + ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // Hostname of an instance.
  • Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.

  • Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.

  • Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section. Each section can contain letters (case insensitive), digits, and hyphens (-).

  • If you purchase multiple instances and specify a pattern string `{R:x}`, numbers `[x, x+n-1]` will be generated, where `n` represents the number of instances purchased. For example, you specify a pattern string `server{R:3}`. If you purchase only one instance, the hostname will be `server3`; if you purchase two, they will be `server3` and `server4`. You can specify multiple pattern strings in the format of `{R:x}`.

  • If you purchase multiple instances without specifying a pattern string, the hostnames will be suffixed with `1, 2...n`, where `n` represents the number of instances purchased. For example, if you purchase two instances with the name `server`, the hostnames will be `server1` and `server2`.
  • + HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` + + // Scheduled tasks. You can use this parameter to specify scheduled tasks for the instance. Only scheduled termination is supported. + ActionTimer *ActionTimer `json:"ActionTimer,omitnil,omitempty" name:"ActionTimer"` + + // Placement group ID. You can only specify one. + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` + + // List of tag description. By specifying this parameter, the tag can be bound to the corresponding CVM and CBS instances at the same time. + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` + + // The market options of the instance. + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` + + // User data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16 KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for [Windows](https://intl.cloud.tencent.com/document/product/213/17526) or [Linux](https://intl.cloud.tencent.com/document/product/213/17525). + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` + + // Whether the request is a dry run only. + // `true`: dry run only. The request will not create instance(s). A dry run can check whether all the required parameters are specified, whether the request format is right, whether the request exceeds service limits, and whether the specified CVMs are available. + // If the dry run fails, the corresponding error code will be returned. + // If the dry run succeeds, the RequestId will be returned. + // `false` (default value): Send a normal request and create instance(s) if all the requirements are met. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Information about the CPU topology of an instance. If not specified, it is determined by system resources. + CpuTopology *CpuTopology `json:"CpuTopology,omitnil,omitempty" name:"CpuTopology"` + + // CAM role name, which can be obtained from the `roleName` field in the response of the [`DescribeRoleList`](https://intl.cloud.tencent.com/document/product/598/36223?from_cn_redirect=1) API. + CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` + + // HPC cluster ID. The HPC cluster must and can only be specified for a high-performance computing instance. + HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` + + // Instance launch template. + LaunchTemplate *LaunchTemplate `json:"LaunchTemplate,omitnil,omitempty" name:"LaunchTemplate"` + + // Specify the ID of the dedicated cluster where the CVM is created. + DedicatedClusterId *string `json:"DedicatedClusterId,omitnil,omitempty" name:"DedicatedClusterId"` + + // Specify the CHC physical server that used to create the CHC CVM. + ChcIds []*string `json:"ChcIds,omitnil,omitempty" name:"ChcIds"` + + // Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:
  • true: Instance protection is enabled, and the instance is not allowed to be deleted through the API.

  • false: Instance protection is disabled, and the instance is allowed to be deleted through the API.


  • Default value: false. + DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` +} + +func (r *RunInstancesRequest) 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 *RunInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + delete(f, "Placement") + delete(f, "InstanceType") + delete(f, "ImageId") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "VirtualPrivateCloud") + delete(f, "InternetAccessible") + delete(f, "InstanceCount") + delete(f, "InstanceName") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "ClientToken") + delete(f, "HostName") + delete(f, "ActionTimer") + delete(f, "DisasterRecoverGroupIds") + delete(f, "TagSpecification") + delete(f, "InstanceMarketOptions") + delete(f, "UserData") + delete(f, "DryRun") + delete(f, "CpuTopology") + delete(f, "CamRoleName") + delete(f, "HpcClusterId") + delete(f, "LaunchTemplate") + delete(f, "DedicatedClusterId") + delete(f, "ChcIds") + delete(f, "DisableApiTermination") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RunInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type RunInstancesResponseParams struct { + // If you use this API to create instance(s), this parameter will be returned, representing one or more instance IDs. Retuning the instance ID list does not necessarily mean that the instance(s) were created successfully. To check whether the instance(s) were created successfully, you can call [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and check the status of the instances in `InstancesSet` in the response. If the status of an instance changes from "PENDING" to "RUNNING", it means that the instance has been created successfully. + InstanceIdSet []*string `json:"InstanceIdSet,omitnil,omitempty" name:"InstanceIdSet"` + + // 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 RunInstancesResponse struct { + *tchttp.BaseResponse + Response *RunInstancesResponseParams `json:"Response"` +} + +func (r *RunInstancesResponse) 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 *RunInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RunMonitorServiceEnabled struct { + // Whether to enable [Cloud Monitor](https://intl.cloud.tencent.com/document/product/248?from_cn_redirect=1). Valid values:
  • TRUE: enable Cloud Monitor
  • FALSE: do not enable Cloud Monitor

    Default value: TRUE. + Enabled *bool `json:"Enabled,omitnil,omitempty" name:"Enabled"` +} + +type RunSecurityServiceEnabled struct { + // Whether to enable [Cloud Security](https://intl.cloud.tencent.com/document/product/296?from_cn_redirect=1). Valid values:
  • TRUE: enable Cloud Security
  • FALSE: do not enable Cloud Security

    Default value: TRUE. + Enabled *bool `json:"Enabled,omitnil,omitempty" name:"Enabled"` +} + +type SharePermission struct { + // Time when an image was shared. + CreatedTime *string `json:"CreatedTime,omitnil,omitempty" name:"CreatedTime"` + + // ID of the account with which the image is shared. + AccountId *string `json:"AccountId,omitnil,omitempty" name:"AccountId"` +} + +type Snapshot struct { + // Snapshot ID. + SnapshotId *string `json:"SnapshotId,omitnil,omitempty" name:"SnapshotId"` + + // Type of the cloud disk used to create the snapshot. Valid values: + // SYSTEM_DISK: system disk + // DATA_DISK: data disk + DiskUsage *string `json:"DiskUsage,omitnil,omitempty" name:"DiskUsage"` + + // Size of the cloud disk used to create the snapshot; unit: GB. + DiskSize *int64 `json:"DiskSize,omitnil,omitempty" name:"DiskSize"` +} + +type SpotMarketOptions struct { + // Bidding price + MaxPrice *string `json:"MaxPrice,omitnil,omitempty" name:"MaxPrice"` + + // Bidding request type. Currently only "one-time" is supported. + SpotInstanceType *string `json:"SpotInstanceType,omitnil,omitempty" name:"SpotInstanceType"` +} + +// Predefined struct for user +type StartInstancesRequestParams struct { + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` +} + +type StartInstancesRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` +} + +func (r *StartInstancesRequest) 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 *StartInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "StartInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type StartInstancesResponseParams struct { + // 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 StartInstancesResponse struct { + *tchttp.BaseResponse + Response *StartInstancesResponseParams `json:"Response"` +} + +func (r *StartInstancesResponse) 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 *StartInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type StopInstancesRequestParams struct { + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // (Disused. Please use `StopType` instead.) Whether to forcibly shut down an instance after a normal shutdown fails. Valid values:
  • `TRUE`: yes;
  • `FALSE`: no

    Default value: `FALSE`. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` + + // Instance shutdown mode. Valid values:
  • SOFT_FIRST: perform a soft shutdown first, and force shut down the instance if the soft shutdown fails
  • HARD: force shut down the instance directly
  • SOFT: soft shutdown only
    Default value: SOFT. + StopType *string `json:"StopType,omitnil,omitempty" name:"StopType"` + + // Billing method of a pay-as-you-go instance after shutdown. + // Valid values:
  • KEEP_CHARGING: billing continues after shutdown
  • STOP_CHARGING: billing stops after shutdown
    Default value: KEEP_CHARGING. + // This parameter is only valid for some pay-as-you-go instances using cloud disks. For more information, see [No charges when shut down for pay-as-you-go instances](https://intl.cloud.tencent.com/document/product/213/19918). + StoppedMode *string `json:"StoppedMode,omitnil,omitempty" name:"StoppedMode"` +} + +type StopInstancesRequest struct { + *tchttp.BaseRequest + + // Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // (Disused. Please use `StopType` instead.) Whether to forcibly shut down an instance after a normal shutdown fails. Valid values:
  • `TRUE`: yes;
  • `FALSE`: no

    Default value: `FALSE`. + ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` + + // Instance shutdown mode. Valid values:
  • SOFT_FIRST: perform a soft shutdown first, and force shut down the instance if the soft shutdown fails
  • HARD: force shut down the instance directly
  • SOFT: soft shutdown only
    Default value: SOFT. + StopType *string `json:"StopType,omitnil,omitempty" name:"StopType"` + + // Billing method of a pay-as-you-go instance after shutdown. + // Valid values:
  • KEEP_CHARGING: billing continues after shutdown
  • STOP_CHARGING: billing stops after shutdown
    Default value: KEEP_CHARGING. + // This parameter is only valid for some pay-as-you-go instances using cloud disks. For more information, see [No charges when shut down for pay-as-you-go instances](https://intl.cloud.tencent.com/document/product/213/19918). + StoppedMode *string `json:"StoppedMode,omitnil,omitempty" name:"StoppedMode"` +} + +func (r *StopInstancesRequest) 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 *StopInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "ForceStop") + delete(f, "StopType") + delete(f, "StoppedMode") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "StopInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type StopInstancesResponseParams struct { + // 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 StopInstancesResponse struct { + *tchttp.BaseResponse + Response *StopInstancesResponseParams `json:"Response"` +} + +func (r *StopInstancesResponse) 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 *StopInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type StorageBlock struct { + // Local HDD storage type. Value: LOCAL_PRO. + // Note: This field may return null, indicating that no valid value is found. + Type *string `json:"Type,omitnil,omitempty" name:"Type"` + + // Minimum capacity of local HDD storage + // Note: This field may return null, indicating that no valid value is found. + MinSize *int64 `json:"MinSize,omitnil,omitempty" name:"MinSize"` + + // Maximum capacity of local HDD storage + // Note: This field may return null, indicating that no valid value is found. + MaxSize *int64 `json:"MaxSize,omitnil,omitempty" name:"MaxSize"` +} + +type SyncImage struct { + // Image ID + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + + // Region + Region *string `json:"Region,omitnil,omitempty" name:"Region"` +} + +// Predefined struct for user +type SyncImagesRequestParams struct { + // Image ID list. You can obtain the image IDs in the following ways:
  • Call the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) API and find the value of `ImageId` in the response.
  • Obtain the image IDs in the [Image console](https://console.cloud.tencent.com/cvm/image).
    The image IDs should meet the following requirement:
  • The image ID should correspond to an image in the `NORMAL` state.
  • For more information on image status, see [Image Data Table](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#Image). + ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` + + // List of target synchronization regions, which should meet the following requirements:
  • It should be a valid region.
  • If it is a custom image, the target synchronization region cannot be the source region.
  • If it is a shared image, the target synchronization region only supports the source region, meaning the shared image will be copied as a custom image in the source region.
  • Partial region synchronization is not supported currently. For details, see [Copying Images](https://intl.cloud.tencent.com/document/product/213/4943?from_cn_redirect=1#.E5.A4.8D.E5.88.B6.E8.AF.B4.E6.98.8E).
  • For specific regional parameters, refer to [Region](https://intl.cloud.tencent.com/document/product/213/6091?from_cn_redirect=1). + DestinationRegions []*string `json:"DestinationRegions,omitnil,omitempty" name:"DestinationRegions"` + + // Checks whether image synchronization can be initiated. + // + // Default value: false. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Target image name. By default, the source image name is used. + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // Whether to return the ID of the image created in the target region. + // + // Default value: false. + ImageSetRequired *bool `json:"ImageSetRequired,omitnil,omitempty" name:"ImageSetRequired"` + + // Whether to synchronize as an encrypted custom image. + // Default value is `false`. + // Synchronization to an encrypted custom image is only supported within the same region. + Encrypt *bool `json:"Encrypt,omitnil,omitempty" name:"Encrypt"` + + // KMS key ID used when synchronizing to an encrypted custom image. + // This parameter is valid only synchronizing to an encrypted image. + // If KmsKeyId is not specified, the default CBS cloud product KMS key is used. + KmsKeyId *string `json:"KmsKeyId,omitnil,omitempty" name:"KmsKeyId"` +} + +type SyncImagesRequest struct { + *tchttp.BaseRequest + + // Image ID list. You can obtain the image IDs in the following ways:
  • Call the [DescribeImages](https://intl.cloud.tencent.com/document/api/213/15715?from_cn_redirect=1) API and find the value of `ImageId` in the response.
  • Obtain the image IDs in the [Image console](https://console.cloud.tencent.com/cvm/image).
    The image IDs should meet the following requirement:
  • The image ID should correspond to an image in the `NORMAL` state.
  • For more information on image status, see [Image Data Table](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#Image). + ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` + + // List of target synchronization regions, which should meet the following requirements:
  • It should be a valid region.
  • If it is a custom image, the target synchronization region cannot be the source region.
  • If it is a shared image, the target synchronization region only supports the source region, meaning the shared image will be copied as a custom image in the source region.
  • Partial region synchronization is not supported currently. For details, see [Copying Images](https://intl.cloud.tencent.com/document/product/213/4943?from_cn_redirect=1#.E5.A4.8D.E5.88.B6.E8.AF.B4.E6.98.8E).
  • For specific regional parameters, refer to [Region](https://intl.cloud.tencent.com/document/product/213/6091?from_cn_redirect=1). + DestinationRegions []*string `json:"DestinationRegions,omitnil,omitempty" name:"DestinationRegions"` + + // Checks whether image synchronization can be initiated. + // + // Default value: false. + DryRun *bool `json:"DryRun,omitnil,omitempty" name:"DryRun"` + + // Target image name. By default, the source image name is used. + ImageName *string `json:"ImageName,omitnil,omitempty" name:"ImageName"` + + // Whether to return the ID of the image created in the target region. + // + // Default value: false. + ImageSetRequired *bool `json:"ImageSetRequired,omitnil,omitempty" name:"ImageSetRequired"` + + // Whether to synchronize as an encrypted custom image. + // Default value is `false`. + // Synchronization to an encrypted custom image is only supported within the same region. + Encrypt *bool `json:"Encrypt,omitnil,omitempty" name:"Encrypt"` + + // KMS key ID used when synchronizing to an encrypted custom image. + // This parameter is valid only synchronizing to an encrypted image. + // If KmsKeyId is not specified, the default CBS cloud product KMS key is used. + KmsKeyId *string `json:"KmsKeyId,omitnil,omitempty" name:"KmsKeyId"` +} + +func (r *SyncImagesRequest) 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 *SyncImagesRequest) 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, "DestinationRegions") + delete(f, "DryRun") + delete(f, "ImageName") + delete(f, "ImageSetRequired") + delete(f, "Encrypt") + delete(f, "KmsKeyId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SyncImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type SyncImagesResponseParams struct { + // ID of the image created in the destination region + ImageSet []*SyncImage `json:"ImageSet,omitnil,omitempty" name:"ImageSet"` + + // 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 SyncImagesResponse struct { + *tchttp.BaseResponse + Response *SyncImagesResponseParams `json:"Response"` +} + +func (r *SyncImagesResponse) 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 *SyncImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SystemDisk struct { + // System disk type. For the restrictions on the system disk type, refer to [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952?from_cn_redirect=1). Value values:
    + //
  • LOCAL_BASIC: Local Disk
  • + //
  • LOCAL_SSD: Local SSD
  • + //
  • CLOUD_BASIC: Basic Cloud Disk
  • + //
  • CLOUD_SSD: Cloud SSD
  • + //
  • CLOUD_PREMIUM: Premium Disk
  • + //
  • CLOUD_BSSD: Balanced SSD
  • + //
  • CLOUD_HSSD: Enhanced SSD
  • + //
  • CLOUD_TSSD: Tremendous SSD

  • + // Default value: Current disk types with inventory available. + DiskType *string `json:"DiskType,omitnil,omitempty" name:"DiskType"` + + // System disk ID. System disks whose type is `LOCAL_BASIC` or `LOCAL_SSD` do not have an ID and do not support this parameter. + // It is only used as a response parameter for APIs such as `DescribeInstances`, and cannot be used as a request parameter for APIs such as `RunInstances`. + DiskId *string `json:"DiskId,omitnil,omitempty" name:"DiskId"` + + // System disk size; unit: GB; default value: 50 GB. + DiskSize *int64 `json:"DiskSize,omitnil,omitempty" name:"DiskSize"` + + // ID of the dedicated cluster to which the instance belongs. + CdcId *string `json:"CdcId,omitnil,omitempty" name:"CdcId"` + + // Disk name, with a length of not more than 128 characters. + // + // This parameter is in invite-only testing and is not yet open for use. + // Note: This field may return null, indicating that no valid value is found. + DiskName *string `json:"DiskName,omitnil,omitempty" name:"DiskName"` +} + +type Tag struct { + // Tag key + Key *string `json:"Key,omitnil,omitempty" name:"Key"` + + // Tag value + Value *string `json:"Value,omitnil,omitempty" name:"Value"` +} + +type TagSpecification struct { + // Resource type. Valid values: `instance` (CVM), `host` (CDH), `image` (for image), and `keypair` (for key). + // Note: This field may return `null`, indicating that no valid values can be obtained. + ResourceType *string `json:"ResourceType,omitnil,omitempty" name:"ResourceType"` + + // Tag pairs + // Note: This field may return `null`, indicating that no valid values can be obtained. + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` +} + +type TargetOS struct { + // Target operating system type. + TargetOSType *string `json:"TargetOSType,omitnil,omitempty" name:"TargetOSType"` + + // Target operating system version. + TargetOSVersion *string `json:"TargetOSVersion,omitnil,omitempty" name:"TargetOSVersion"` +} + +// Predefined struct for user +type TerminateInstancesRequestParams struct { + // One or more instance IDs to be operated. You can obtain the instance ID through the `InstanceId` in the return value from the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1). The maximum number of instances per request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Whether to release a monthly subscription data disk mounted on an instance. true: Release the data disk along with termination of the instance. false: Only terminate the instance. + // Default value: `false`. + ReleasePrepaidDataDisks *bool `json:"ReleasePrepaidDataDisks,omitnil,omitempty" name:"ReleasePrepaidDataDisks"` +} + +type TerminateInstancesRequest struct { + *tchttp.BaseRequest + + // One or more instance IDs to be operated. You can obtain the instance ID through the `InstanceId` in the return value from the API [DescribeInstances](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1). The maximum number of instances per request is 100. + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // Whether to release a monthly subscription data disk mounted on an instance. true: Release the data disk along with termination of the instance. false: Only terminate the instance. + // Default value: `false`. + ReleasePrepaidDataDisks *bool `json:"ReleasePrepaidDataDisks,omitnil,omitempty" name:"ReleasePrepaidDataDisks"` +} + +func (r *TerminateInstancesRequest) 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 *TerminateInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "ReleasePrepaidDataDisks") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "TerminateInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type TerminateInstancesResponseParams struct { + // 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 TerminateInstancesResponse struct { + *tchttp.BaseResponse + Response *TerminateInstancesResponseParams `json:"Response"` +} + +func (r *TerminateInstancesResponse) 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 *TerminateInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type VirtualPrivateCloud struct { + // VPC ID in the format of `vpc-xxx`. To obtain valid VPC IDs, you can log in to the [console](https://console.cloud.tencent.com/vpc/vpc?rid=1) or call the [DescribeVpcs](https://www.tencentcloud.com/document/product/215/15778) API and look for the `unVpcId` fields in the response. If you specify `DEFAULT` for both `VpcId` and `SubnetId` when creating an instance, the default VPC will be used. + VpcId *string `json:"VpcId,omitnil,omitempty" name:"VpcId"` + + // VPC subnet ID in the format `subnet-xxx`. To obtain valid subnet IDs, you can log in to the [console](https://console.cloud.tencent.com/vpc/subnet?rid=1) or call [DescribeSubnets](https://intl.cloud.tencent.com/document/api/215/15784?from_cn_redirect=1) and look for the `unSubnetId` fields in the response. If you specify `DEFAULT` for both `SubnetId` and `VpcId` when creating an instance, the default VPC will be used. + SubnetId *string `json:"SubnetId,omitnil,omitempty" name:"SubnetId"` + + // Whether it is used as a public gateway. A public gateway can only be used normally when an instance has a public IP address and is in a VPC. Valid values:
  • true: It is used as a public gateway.
  • false: It is not used as a public gateway.
  • Default value: false. + AsVpcGateway *bool `json:"AsVpcGateway,omitnil,omitempty" name:"AsVpcGateway"` + + // Array of VPC subnet IPs. You can use this parameter when creating instances or modifying VPC attributes of instances. Currently you can specify multiple IPs in one subnet only when creating multiple instances at the same time. + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitnil,omitempty" name:"PrivateIpAddresses"` + + // Number of IPv6 addresses randomly generated for the ENI. + Ipv6AddressCount *uint64 `json:"Ipv6AddressCount,omitnil,omitempty" name:"Ipv6AddressCount"` +} + +type ZoneInfo struct { + // Availability zone name, for example, ap-guangzhou-3. + // + // The names of availability zones across the network are as follows: + //
  • ap-chongqing-1
  • + //
  • ap-seoul-1
  • + //
  • ap-seoul-2
  • + //
  • ap-chengdu-1
  • + //
  • ap-chengdu-2
  • + //
  • ap-hongkong-1 (sold out)
  • + //
  • ap-hongkong-2
  • + //
  • ap-hongkong-3
  • + //
  • ap-shenzhen-fsi-1
  • + //
  • ap-shenzhen-fsi-2
  • + //
  • ap-shenzhen-fsi-3 (sold out)
  • + //
  • ap-guangzhou-1 (sold out)
  • + //
  • ap-guangzhou-2 (sold out)
  • + //
  • ap-guangzhou-3
  • + //
  • ap-guangzhou-4
  • + //
  • ap-guangzhou-6
  • + //
  • ap-guangzhou-7
  • + //
  • ap-tokyo-1
  • + //
  • ap-tokyo-2
  • + //
  • ap-singapore-1
  • + //
  • ap-singapore-2
  • + //
  • ap-singapore-3
  • + //
  • ap-singapore-4
  • + //
  • ap-shanghai-fsi-1
  • + //
  • ap-shanghai-fsi-2
  • + //
  • ap-shanghai-fsi-3
  • + //
  • ap-bangkok-1
  • + //
  • ap-bangkok-2
  • + //
  • ap-shanghai-1 (sold out)
  • + //
  • ap-shanghai-2
  • + //
  • ap-shanghai-3
  • + //
  • ap-shanghai-4
  • + //
  • ap-shanghai-5
  • + //
  • ap-shanghai-8
  • + //
  • ap-mumbai-1
  • + //
  • ap-mumbai-2
  • + //
  • ap-beijing-1 (sold out)
  • + //
  • ap-beijing-2
  • + //
  • ap-beijing-3
  • + //
  • ap-beijing-4
  • + //
  • ap-beijing-5
  • + //
  • ap-beijing-6
  • + //
  • ap-beijing-7
  • + //
  • na-siliconvalley-1
  • + //
  • na-siliconvalley-2
  • + //
  • eu-frankfurt-1
  • + //
  • eu-frankfurt-2
  • + //
  • na-ashburn-1
  • + //
  • na-ashburn-2
  • + //
  • ap-nanjing-1
  • + //
  • ap-nanjing-2
  • + //
  • ap-nanjing-3
  • + //
  • sa-saopaulo-1
  • + //
  • ap-jakarta-1
  • + //
  • ap-jakarta-2
  • + Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"` + + // Availability zone description, such as Guangzhou Zone 3. + ZoneName *string `json:"ZoneName,omitnil,omitempty" name:"ZoneName"` + + // Availability zone ID. + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` + + // Availability zone status. Valid values: `AVAILABLE`: available; `UNAVAILABLE`: unavailable. + ZoneState *string `json:"ZoneState,omitnil,omitempty" name:"ZoneState"` +} \ No newline at end of file diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index 77f3db2e34..99c98aa5fc 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/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_1.0.1122" + params["RequestClient"] = "SDK_GO_1.0.1126" if requestClient != "" { params["RequestClient"] += ": " + requestClient } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go index cf1f32cd2a..78923f98ee 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go @@ -3094,6 +3094,57 @@ func (c *Client) DescribeInstancesActionTimerWithContext(ctx context.Context, re return } +func NewDescribeInstancesAttributesRequest() (request *DescribeInstancesAttributesRequest) { + request = &DescribeInstancesAttributesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstancesAttributes") + + + return +} + +func NewDescribeInstancesAttributesResponse() (response *DescribeInstancesAttributesResponse) { + response = &DescribeInstancesAttributesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeInstancesAttributes +// 获取指定实例的属性,目前支持查询实例自定义数据User-Data。 +// +// 可能返回的错误码: +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +func (c *Client) DescribeInstancesAttributes(request *DescribeInstancesAttributesRequest) (response *DescribeInstancesAttributesResponse, err error) { + return c.DescribeInstancesAttributesWithContext(context.Background(), request) +} + +// DescribeInstancesAttributes +// 获取指定实例的属性,目前支持查询实例自定义数据User-Data。 +// +// 可能返回的错误码: +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +func (c *Client) DescribeInstancesAttributesWithContext(ctx context.Context, request *DescribeInstancesAttributesRequest) (response *DescribeInstancesAttributesResponse, err error) { + if request == nil { + request = NewDescribeInstancesAttributesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstancesAttributes require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstancesAttributesResponse() + err = c.Send(request, response) + return +} + func NewDescribeInstancesModificationRequest() (request *DescribeInstancesModificationRequest) { request = &DescribeInstancesModificationRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -3642,71 +3693,6 @@ func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *Descri 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 -// 本接口(DescribeReservedInstances)可提供列出用户已购买的预留实例 -// -// 可能返回的错误码: -// 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 -// 本接口(DescribeReservedInstances)可提供列出用户已购买的预留实例 -// -// 可能返回的错误码: -// 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{}, @@ -3782,7 +3768,7 @@ func NewDescribeReservedInstancesOfferingsResponse() (response *DescribeReserved } // DescribeReservedInstancesOfferings -// 本接口(DescribeReservedInstancesOfferings)供用户列出可购买的预留实例配置 +// 本接口(DescribeReservedInstancesOfferings)供用户列出可购买的预留实例配置,预留实例当前只针对国际站白名单用户开放。 // // 可能返回的错误码: // INTERNALSERVERERROR = "InternalServerError" @@ -3799,7 +3785,7 @@ func (c *Client) DescribeReservedInstancesOfferings(request *DescribeReservedIns } // DescribeReservedInstancesOfferings -// 本接口(DescribeReservedInstancesOfferings)供用户列出可购买的预留实例配置 +// 本接口(DescribeReservedInstancesOfferings)供用户列出可购买的预留实例配置,预留实例当前只针对国际站白名单用户开放。 // // 可能返回的错误码: // INTERNALSERVERERROR = "InternalServerError" @@ -5058,6 +5044,7 @@ func NewInquiryPriceResetInstanceResponse() (response *InquiryPriceResetInstance // MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" // RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" // RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" // UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset" // UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported" // UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" @@ -5096,6 +5083,7 @@ func (c *Client) InquiryPriceResetInstance(request *InquiryPriceResetInstanceReq // MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" // RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" // RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" // UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset" // UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported" // UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" @@ -5564,6 +5552,7 @@ func NewInquiryPriceRunInstancesResponse() (response *InquiryPriceRunInstancesRe // RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" // RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" // UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" // UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame" // UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" // UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt" @@ -5654,6 +5643,7 @@ func (c *Client) InquiryPriceRunInstances(request *InquiryPriceRunInstancesReque // RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" // RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" // UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" // UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame" // UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" // UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt" @@ -6371,6 +6361,7 @@ func NewModifyInstancesAttributeResponse() (response *ModifyInstancesAttributeRe // UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" // UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" // UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTHIGHDENSITYMODESETTING = "UnsupportedOperation.InstanceTypeNotSupportHighDensityModeSetting" // UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame" // UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot" // UNSUPPORTEDOPERATION_INVALIDINSTANCENOTSUPPORTEDPROTECTEDINSTANCE = "UnsupportedOperation.InvalidInstanceNotSupportedProtectedInstance" @@ -6436,6 +6427,7 @@ func (c *Client) ModifyInstancesAttribute(request *ModifyInstancesAttributeReque // UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" // UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" // UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTHIGHDENSITYMODESETTING = "UnsupportedOperation.InstanceTypeNotSupportHighDensityModeSetting" // UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame" // UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot" // UNSUPPORTEDOPERATION_INVALIDINSTANCENOTSUPPORTEDPROTECTEDINSTANCE = "UnsupportedOperation.InvalidInstanceNotSupportedProtectedInstance" @@ -6583,6 +6575,105 @@ func (c *Client) ModifyInstancesChargeTypeWithContext(ctx context.Context, reque return } +func NewModifyInstancesDisasterRecoverGroupRequest() (request *ModifyInstancesDisasterRecoverGroupRequest) { + request = &ModifyInstancesDisasterRecoverGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesDisasterRecoverGroup") + + + return +} + +func NewModifyInstancesDisasterRecoverGroupResponse() (response *ModifyInstancesDisasterRecoverGroupResponse) { + response = &ModifyInstancesDisasterRecoverGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyInstancesDisasterRecoverGroup +// 本接口 (ModifyInstancesDisasterRecoverGroup) 用于调整实例所在置放群组。 +// +// * 目前只支持基础网络或私有网络实例。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ALREADYINDISASTERRECOVERGROUP = "FailedOperation.AlreadyInDisasterRecoverGroup" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_DISASTERRECOVERGROUPIDMALFORMED = "InvalidParameterValue.DisasterRecoverGroupIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported" +// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// UNSUPPORTEDOPERATION_CBSREMOTESSDNOTSUPPORT = "UnsupportedOperation.CbsRemoteSsdNotSupport" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_NOVPCNETWORK = "UnsupportedOperation.NoVpcNetwork" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ModifyInstancesDisasterRecoverGroup(request *ModifyInstancesDisasterRecoverGroupRequest) (response *ModifyInstancesDisasterRecoverGroupResponse, err error) { + return c.ModifyInstancesDisasterRecoverGroupWithContext(context.Background(), request) +} + +// ModifyInstancesDisasterRecoverGroup +// 本接口 (ModifyInstancesDisasterRecoverGroup) 用于调整实例所在置放群组。 +// +// * 目前只支持基础网络或私有网络实例。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ALREADYINDISASTERRECOVERGROUP = "FailedOperation.AlreadyInDisasterRecoverGroup" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_DISASTERRECOVERGROUPIDMALFORMED = "InvalidParameterValue.DisasterRecoverGroupIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported" +// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// UNSUPPORTEDOPERATION_CBSREMOTESSDNOTSUPPORT = "UnsupportedOperation.CbsRemoteSsdNotSupport" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_NOVPCNETWORK = "UnsupportedOperation.NoVpcNetwork" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ModifyInstancesDisasterRecoverGroupWithContext(ctx context.Context, request *ModifyInstancesDisasterRecoverGroupRequest) (response *ModifyInstancesDisasterRecoverGroupResponse, err error) { + if request == nil { + request = NewModifyInstancesDisasterRecoverGroupRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyInstancesDisasterRecoverGroup require credential") + } + + request.SetContext(ctx) + + response = NewModifyInstancesDisasterRecoverGroupResponse() + err = c.Send(request, response) + return +} + func NewModifyInstancesProjectRequest() (request *ModifyInstancesProjectRequest) { request = &ModifyInstancesProjectRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -7173,7 +7264,7 @@ func NewPurchaseReservedInstancesOfferingResponse() (response *PurchaseReservedI } // PurchaseReservedInstancesOffering -// 本接口(PurchaseReservedInstancesOffering)用于用户购买一个或者多个指定配置的预留实例 +// 本接口(PurchaseReservedInstancesOffering)用于用户购买一个或者多个指定配置的预留实例,预留实例当前只针对国际站白名单用户开放。 // // 可能返回的错误码: // INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" @@ -7189,7 +7280,7 @@ func (c *Client) PurchaseReservedInstancesOffering(request *PurchaseReservedInst } // PurchaseReservedInstancesOffering -// 本接口(PurchaseReservedInstancesOffering)用于用户购买一个或者多个指定配置的预留实例 +// 本接口(PurchaseReservedInstancesOffering)用于用户购买一个或者多个指定配置的预留实例,预留实例当前只针对国际站白名单用户开放。 // // 可能返回的错误码: // INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" @@ -7824,6 +7915,7 @@ func NewResetInstanceResponse() (response *ResetInstanceResponse) { // UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" // UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" // UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" // UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset" // UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" // UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported" @@ -7910,6 +8002,7 @@ func (c *Client) ResetInstance(request *ResetInstanceRequest) (response *ResetIn // UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" // UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" // UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" // UNSUPPORTEDOPERATION_INVALIDIMAGELICENSETYPEFORRESET = "UnsupportedOperation.InvalidImageLicenseTypeForReset" // UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" // UNSUPPORTEDOPERATION_MODIFYENCRYPTIONNOTSUPPORTED = "UnsupportedOperation.ModifyEncryptionNotSupported" @@ -8255,7 +8348,11 @@ func NewResetInstancesTypeResponse() (response *ResetInstancesTypeResponse) { // INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" // INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" // INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport" +// INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport" +// INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport" // INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport" +// INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // INVALIDPARAMETERVALUE_BASICNETWORKINSTANCEFAMILY = "InvalidParameterValue.BasicNetworkInstanceFamily" // INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily" @@ -8286,6 +8383,7 @@ func NewResetInstancesTypeResponse() (response *ResetInstancesTypeResponse) { // UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" // UNSUPPORTEDOPERATION_DISKSNAPCREATETIMETOOOLD = "UnsupportedOperation.DiskSnapCreateTimeTooOld" // UNSUPPORTEDOPERATION_HETEROGENEOUSCHANGEINSTANCEFAMILY = "UnsupportedOperation.HeterogeneousChangeInstanceFamily" +// UNSUPPORTEDOPERATION_INSTANCEMIXEDRESETINSTANCETYPE = "UnsupportedOperation.InstanceMixedResetInstanceType" // UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed" // UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" // UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" @@ -8341,7 +8439,11 @@ func (c *Client) ResetInstancesType(request *ResetInstancesTypeRequest) (respons // INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" // INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" // INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_HOSTIDCUSTOMIZEDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdCustomizedInstanceTypeNotSupport" +// INVALIDPARAMETER_HOSTIDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdInstanceTypeNotSupport" +// INVALIDPARAMETER_HOSTIDSTANDARDINSTANCETYPENOTSUPPORT = "InvalidParameter.HostIdStandardInstanceTypeNotSupport" // INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport" +// INVALIDPARAMETER_INSTANCETYPESUPPORTEDHOSTNOTFOUND = "InvalidParameter.InstanceTypeSupportedHostNotFound" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // INVALIDPARAMETERVALUE_BASICNETWORKINSTANCEFAMILY = "InvalidParameterValue.BasicNetworkInstanceFamily" // INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily" @@ -8372,6 +8474,7 @@ func (c *Client) ResetInstancesType(request *ResetInstancesTypeRequest) (respons // UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" // UNSUPPORTEDOPERATION_DISKSNAPCREATETIMETOOOLD = "UnsupportedOperation.DiskSnapCreateTimeTooOld" // UNSUPPORTEDOPERATION_HETEROGENEOUSCHANGEINSTANCEFAMILY = "UnsupportedOperation.HeterogeneousChangeInstanceFamily" +// UNSUPPORTEDOPERATION_INSTANCEMIXEDRESETINSTANCETYPE = "UnsupportedOperation.InstanceMixedResetInstanceType" // UNSUPPORTEDOPERATION_INSTANCEREINSTALLFAILED = "UnsupportedOperation.InstanceReinstallFailed" // UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" // UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" @@ -8731,6 +8834,7 @@ func NewRunInstancesResponse() (response *RunInstancesResponse) { // UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" // UNSUPPORTEDOPERATION_HIBERNATIONOSVERSION = "UnsupportedOperation.HibernationOsVersion" // UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" // UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame" // UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot" // UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" @@ -8902,6 +9006,7 @@ func (c *Client) RunInstances(request *RunInstancesRequest) (response *RunInstan // UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" // UNSUPPORTEDOPERATION_HIBERNATIONOSVERSION = "UnsupportedOperation.HibernationOsVersion" // UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" // UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame" // UNSUPPORTEDOPERATION_INSTANCESENABLEJUMBOWITHOUTREBOOT = "UnsupportedOperation.InstancesEnableJumboWithoutReboot" // UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/errors.go index f72310e303..86818a5adc 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/errors.go @@ -32,6 +32,9 @@ const ( // 账号为当前用户 FAILEDOPERATION_ACCOUNTISYOURSELF = "FailedOperation.AccountIsYourSelf" + // 该实例 `ins-xxxxxxx` 已经在 `dgroup-xxxxxx` 置放群组里。 + FAILEDOPERATION_ALREADYINDISASTERRECOVERGROUP = "FailedOperation.AlreadyInDisasterRecoverGroup" + // 自带许可镜像暂时不支持共享。 FAILEDOPERATION_BYOLIMAGESHAREFAILED = "FailedOperation.BYOLImageShareFailed" @@ -872,6 +875,9 @@ const ( // 指定的实例付费模式或者网络付费模式不支持共享带宽包 UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" + // cbs远端ssd盘不支持该操作 + UNSUPPORTEDOPERATION_CBSREMOTESSDNOTSUPPORT = "UnsupportedOperation.CbsRemoteSsdNotSupport" + // 实例创建快照的时间距今不到24小时。 UNSUPPORTEDOPERATION_DISKSNAPCREATETIMETOOOLD = "UnsupportedOperation.DiskSnapCreateTimeTooOld" @@ -908,6 +914,9 @@ const ( // 不支持混合付费模式。 UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel" + // 不支持混合升配和降配实例。 + UNSUPPORTEDOPERATION_INSTANCEMIXEDRESETINSTANCETYPE = "UnsupportedOperation.InstanceMixedResetInstanceType" + // 中心可用区和边缘可用区实例不能混用批量操作。 UNSUPPORTEDOPERATION_INSTANCEMIXEDZONETYPE = "UnsupportedOperation.InstanceMixedZoneType" @@ -983,6 +992,12 @@ const ( // 请求不支持正在销毁的实例 UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" + // 实例类型不支持设置`GridDriverService` 状态 + UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTGRIDLICENCE = "UnsupportedOperation.InstanceTypeNotSupportGridLicence" + + // 实例类型不支持设置 HighDensityMode 状态 + UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTHIGHDENSITYMODESETTING = "UnsupportedOperation.InstanceTypeNotSupportHighDensityModeSetting" + // 实例类型不支持设置`EnableJumboFrame` 状态 UNSUPPORTEDOPERATION_INSTANCETYPENOTSUPPORTJUMBOFRAME = "UnsupportedOperation.InstanceTypeNotSupportJumboFrame" diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go index 0e393dd9d1..fc45997089 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go @@ -47,15 +47,12 @@ type AccountQuotaOverview struct { type ActionTimer struct { // 定时器动作,目前仅支持销毁一个值:TerminateInstances。 - // 注意:此字段可能返回 null,表示取不到有效值。 TimerAction *string `json:"TimerAction,omitnil,omitempty" name:"TimerAction"` // 执行时间,按照ISO8601标准表示,并且使用UTC时间。格式为 YYYY-MM-DDThh:mm:ssZ。例如 2018-05-29T11:26:40Z,执行时间必须大于当前时间5分钟。 - // 注意:此字段可能返回 null,表示取不到有效值。 ActionTime *string `json:"ActionTime,omitnil,omitempty" name:"ActionTime"` // 扩展数据 - // 注意:此字段可能返回 null,表示取不到有效值。 Externals *Externals `json:"Externals,omitnil,omitempty" name:"Externals"` // 定时器ID。 @@ -300,6 +297,11 @@ func (r *AssociateSecurityGroupsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type Attribute struct { + // 实例的自定义数据。 + UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` +} + type ChargePrepaid struct { // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36。 Period *uint64 `json:"Period,omitnil,omitempty" name:"Period"` @@ -309,7 +311,17 @@ type ChargePrepaid struct { } type ChcDeployExtraConfig struct { + // minos类型。是使用腾讯云的minios,还是客户自己的minios。 + MiniOsType *string `json:"MiniOsType,omitnil,omitempty" name:"MiniOsType"` + + // 服务器的架构和启动方式。取值为x86_legacy, arm_uefi。 + BootType *string `json:"BootType,omitnil,omitempty" name:"BootType"` + + // PXE使用的引导文件。默认为pxelinux.0。 + BootFile *string `json:"BootFile,omitnil,omitempty" name:"BootFile"` + // tftp服务器的ip地址。 + NextServerAddress *string `json:"NextServerAddress,omitnil,omitempty" name:"NextServerAddress"` } type ChcHost struct { @@ -334,76 +346,110 @@ type ChcHost struct { InstanceState *string `json:"InstanceState,omitnil,omitempty" name:"InstanceState"` // 设备类型。 - // 注意:此字段可能返回 null,表示取不到有效值。 DeviceType *string `json:"DeviceType,omitnil,omitempty" name:"DeviceType"` // 所属可用区 Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` // 带外网络。 - // 注意:此字段可能返回 null,表示取不到有效值。 BmcVirtualPrivateCloud *VirtualPrivateCloud `json:"BmcVirtualPrivateCloud,omitnil,omitempty" name:"BmcVirtualPrivateCloud"` // 带外网络Ip。 - // 注意:此字段可能返回 null,表示取不到有效值。 BmcIp *string `json:"BmcIp,omitnil,omitempty" name:"BmcIp"` // 带外网络安全组Id。 - // 注意:此字段可能返回 null,表示取不到有效值。 BmcSecurityGroupIds []*string `json:"BmcSecurityGroupIds,omitnil,omitempty" name:"BmcSecurityGroupIds"` // 部署网络。 - // 注意:此字段可能返回 null,表示取不到有效值。 DeployVirtualPrivateCloud *VirtualPrivateCloud `json:"DeployVirtualPrivateCloud,omitnil,omitempty" name:"DeployVirtualPrivateCloud"` // 部署网络Ip。 - // 注意:此字段可能返回 null,表示取不到有效值。 DeployIp *string `json:"DeployIp,omitnil,omitempty" name:"DeployIp"` // 部署网络安全组Id。 - // 注意:此字段可能返回 null,表示取不到有效值。 DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` // 关联的云主机Id。 - // 注意:此字段可能返回 null,表示取不到有效值。 CvmInstanceId *string `json:"CvmInstanceId,omitnil,omitempty" name:"CvmInstanceId"` // 服务器导入的时间。 CreatedTime *string `json:"CreatedTime,omitnil,omitempty" name:"CreatedTime"` // 机型的硬件描述,分别为CPU核数,内存容量和磁盘容量 - // 注意:此字段可能返回 null,表示取不到有效值。 HardwareDescription *string `json:"HardwareDescription,omitnil,omitempty" name:"HardwareDescription"` // CHC物理服务器的CPU核数 - // 注意:此字段可能返回 null,表示取不到有效值。 CPU *int64 `json:"CPU,omitnil,omitempty" name:"CPU"` // CHC物理服务器的内存大小,单位为GB - // 注意:此字段可能返回 null,表示取不到有效值。 Memory *int64 `json:"Memory,omitnil,omitempty" name:"Memory"` // CHC物理服务器的磁盘信息 - // 注意:此字段可能返回 null,表示取不到有效值。 Disk *string `json:"Disk,omitnil,omitempty" name:"Disk"` // 带外网络下分配的MAC地址 - // 注意:此字段可能返回 null,表示取不到有效值。 BmcMAC *string `json:"BmcMAC,omitnil,omitempty" name:"BmcMAC"` // 部署网络下分配的MAC地址 - // 注意:此字段可能返回 null,表示取不到有效值。 DeployMAC *string `json:"DeployMAC,omitnil,omitempty" name:"DeployMAC"` // 设备托管类型。 // HOSTING: 托管 // TENANT: 租赁 - // 注意:此字段可能返回 null,表示取不到有效值。 TenantType *string `json:"TenantType,omitnil,omitempty" name:"TenantType"` - // chc dhcp选项,用于minios调试 - // 注意:此字段可能返回 null,表示取不到有效值。 + // chc dhcp选项,用于minios调试。 DeployExtraConfig *ChcDeployExtraConfig `json:"DeployExtraConfig,omitnil,omitempty" name:"DeployExtraConfig"` + + // GPU型号。 + Gpu *string `json:"Gpu,omitnil,omitempty" name:"Gpu"` + + // 网卡型号。主要指RDMA网卡。 + NetworkCard *string `json:"NetworkCard,omitnil,omitempty" name:"NetworkCard"` + + // 是否是预定义机型。 + IsPredefinedType *bool `json:"IsPredefinedType,omitnil,omitempty" name:"IsPredefinedType"` + + // CHC云主机机型。 + ChcInstanceType *string `json:"ChcInstanceType,omitnil,omitempty" name:"ChcInstanceType"` + + // CHC云主机机型簇。 + ChcInstanceFamily *string `json:"ChcInstanceFamily,omitnil,omitempty" name:"ChcInstanceFamily"` + + // CHC云主机机型簇名称。 + ChcInstanceFamilyName *string `json:"ChcInstanceFamilyName,omitnil,omitempty" name:"ChcInstanceFamilyName"` + + // 转售客户的AppId。 + ResaleAppId *string `json:"ResaleAppId,omitnil,omitempty" name:"ResaleAppId"` + + // 转售客户的账号ID。 + ResaleAccountId *string `json:"ResaleAccountId,omitnil,omitempty" name:"ResaleAccountId"` + + // 售卖状态。
    + // + SaleStatus *string `json:"SaleStatus,omitnil,omitempty" name:"SaleStatus"` + + // CHC物理服务器关联的标签列表。 + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` + + // 最近操作 + LatestOperation *string `json:"LatestOperation,omitnil,omitempty" name:"LatestOperation"` + + // 最近操作错误码 + LatestOperationErrorCode *string `json:"LatestOperationErrorCode,omitnil,omitempty" name:"LatestOperationErrorCode"` + + // 最近操作错误详情和建议项 + LatestOperationErrorMsg *string `json:"LatestOperationErrorMsg,omitnil,omitempty" name:"LatestOperationErrorMsg"` + + // 最近操作名称 + LatestOperationName *string `json:"LatestOperationName,omitnil,omitempty" name:"LatestOperationName"` + + // 最近操作状态 + LatestOperationState *string `json:"LatestOperationState,omitnil,omitempty" name:"LatestOperationState"` } type ChcHostDeniedActions struct { @@ -433,6 +479,9 @@ type ConfigureChcAssistVpcRequestParams struct { // 部署网络的安全组列表 DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` + + // 部署网络的附加参数,用于指定minios类型、bios引导模式等 + ChcDeployExtraConfig *ChcDeployExtraConfig `json:"ChcDeployExtraConfig,omitnil,omitempty" name:"ChcDeployExtraConfig"` } type ConfigureChcAssistVpcRequest struct { @@ -452,6 +501,9 @@ type ConfigureChcAssistVpcRequest struct { // 部署网络的安全组列表 DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` + + // 部署网络的附加参数,用于指定minios类型、bios引导模式等 + ChcDeployExtraConfig *ChcDeployExtraConfig `json:"ChcDeployExtraConfig,omitnil,omitempty" name:"ChcDeployExtraConfig"` } func (r *ConfigureChcAssistVpcRequest) ToJsonString() string { @@ -471,6 +523,7 @@ func (r *ConfigureChcAssistVpcRequest) FromJsonString(s string) error { delete(f, "BmcSecurityGroupIds") delete(f, "DeployVirtualPrivateCloud") delete(f, "DeploySecurityGroupIds") + delete(f, "ChcDeployExtraConfig") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ConfigureChcAssistVpcRequest has unknown keys!", "") } @@ -509,6 +562,9 @@ type ConfigureChcDeployVpcRequestParams struct { // 部署网络的安全组列表。 DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` + + // 部署所需要的dhcp选项参数 + ChcDeployExtraConfig *ChcDeployExtraConfig `json:"ChcDeployExtraConfig,omitnil,omitempty" name:"ChcDeployExtraConfig"` } type ConfigureChcDeployVpcRequest struct { @@ -522,6 +578,9 @@ type ConfigureChcDeployVpcRequest struct { // 部署网络的安全组列表。 DeploySecurityGroupIds []*string `json:"DeploySecurityGroupIds,omitnil,omitempty" name:"DeploySecurityGroupIds"` + + // 部署所需要的dhcp选项参数 + ChcDeployExtraConfig *ChcDeployExtraConfig `json:"ChcDeployExtraConfig,omitnil,omitempty" name:"ChcDeployExtraConfig"` } func (r *ConfigureChcDeployVpcRequest) ToJsonString() string { @@ -539,6 +598,7 @@ func (r *ConfigureChcDeployVpcRequest) FromJsonString(s string) error { delete(f, "ChcIds") delete(f, "DeployVirtualPrivateCloud") delete(f, "DeploySecurityGroupIds") + delete(f, "ChcDeployExtraConfig") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ConfigureChcDeployVpcRequest has unknown keys!", "") } @@ -623,11 +683,9 @@ func (r *ConvertOperatingSystemsRequest) FromJsonString(s string) error { // Predefined struct for user type ConvertOperatingSystemsResponseParams struct { // 转换的目标操系统信息,仅在入参 DryRun 为 true 时返回。 - // 注意:此字段可能返回 null,表示取不到有效值。 SupportTargetOSList []*TargetOS `json:"SupportTargetOSList,omitnil,omitempty" name:"SupportTargetOSList"` // 操作系统转换的任务 ID - // 注意:此字段可能返回 null,表示取不到有效值。 TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 @@ -669,6 +727,12 @@ type CreateDisasterRecoverGroupRequestParams struct { // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
    更多详细信息请参阅:如何保证幂等性。 ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // 置放群组的亲和度,在置放群组的实例会按该亲和度分布,亲和度的取值范围是:1-10,默认为1 + Affinity *int64 `json:"Affinity,omitnil,omitempty" name:"Affinity"` + + // 标签描述列表。通过指定该参数可以绑定标签到置放群组。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` } type CreateDisasterRecoverGroupRequest struct { @@ -682,6 +746,12 @@ type CreateDisasterRecoverGroupRequest struct { // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
    更多详细信息请参阅:如何保证幂等性。 ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` + + // 置放群组的亲和度,在置放群组的实例会按该亲和度分布,亲和度的取值范围是:1-10,默认为1 + Affinity *int64 `json:"Affinity,omitnil,omitempty" name:"Affinity"` + + // 标签描述列表。通过指定该参数可以绑定标签到置放群组。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` } func (r *CreateDisasterRecoverGroupRequest) ToJsonString() string { @@ -699,6 +769,8 @@ func (r *CreateDisasterRecoverGroupRequest) FromJsonString(s string) error { delete(f, "Name") delete(f, "Type") delete(f, "ClientToken") + delete(f, "Affinity") + delete(f, "TagSpecification") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDisasterRecoverGroupRequest has unknown keys!", "") } @@ -761,6 +833,9 @@ type CreateHpcClusterRequestParams struct { // 高性能计算集群对应的业务场景标识,当前只支持CDC。 HpcClusterBusinessId *string `json:"HpcClusterBusinessId,omitnil,omitempty" name:"HpcClusterBusinessId"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的HPC高性能集群。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` } type CreateHpcClusterRequest struct { @@ -780,6 +855,9 @@ type CreateHpcClusterRequest struct { // 高性能计算集群对应的业务场景标识,当前只支持CDC。 HpcClusterBusinessId *string `json:"HpcClusterBusinessId,omitnil,omitempty" name:"HpcClusterBusinessId"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的HPC高性能集群。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` } func (r *CreateHpcClusterRequest) ToJsonString() string { @@ -799,6 +877,7 @@ func (r *CreateHpcClusterRequest) FromJsonString(s string) error { delete(f, "Remark") delete(f, "HpcClusterType") delete(f, "HpcClusterBusinessId") + delete(f, "TagSpecification") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateHpcClusterRequest has unknown keys!", "") } @@ -808,7 +887,6 @@ func (r *CreateHpcClusterRequest) FromJsonString(s string) error { // Predefined struct for user type CreateHpcClusterResponseParams struct { // 高性能计算集群信息。 - // 注意:此字段可能返回 null,表示取不到有效值。 HpcClusterSet []*HpcClusterInfo `json:"HpcClusterSet,omitnil,omitempty" name:"HpcClusterSet"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 @@ -937,7 +1015,6 @@ func (r *CreateImageRequest) FromJsonString(s string) error { // Predefined struct for user type CreateImageResponseParams struct { // 镜像ID - // 注意:此字段可能返回 null,表示取不到有效值。 ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 @@ -1070,10 +1147,10 @@ type CreateLaunchTemplateRequestParams struct { // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持60个字符(包含模式串)。
  • + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持128个字符(包含模式串)。
  • InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` - // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + // 实例登录设置。通过该参数可以设置实例的登录方式为密钥或保持镜像的原始登录设置。 LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 @@ -1124,6 +1201,9 @@ type CreateLaunchTemplateRequestParams struct { // 实例销毁保护标志,表示是否允许通过api接口删除实例。取值范围:
  • TRUE:表示开启实例保护,不允许通过api接口删除实例
  • FALSE:表示关闭实例保护,允许通过api接口删除实例
  • 默认取值:FALSE。 DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` + + // 标签描述列表。通过指定该参数可以绑定标签到实例启动模板。 + LaunchTemplateTagSpecification []*TagSpecification `json:"LaunchTemplateTagSpecification,omitnil,omitempty" name:"LaunchTemplateTagSpecification"` } type CreateLaunchTemplateRequest struct { @@ -1160,10 +1240,10 @@ type CreateLaunchTemplateRequest struct { // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持60个字符(包含模式串)。
  • + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持128个字符(包含模式串)。
  • InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` - // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + // 实例登录设置。通过该参数可以设置实例的登录方式为密钥或保持镜像的原始登录设置。 LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 @@ -1214,6 +1294,9 @@ type CreateLaunchTemplateRequest struct { // 实例销毁保护标志,表示是否允许通过api接口删除实例。取值范围:
  • TRUE:表示开启实例保护,不允许通过api接口删除实例
  • FALSE:表示关闭实例保护,允许通过api接口删除实例
  • 默认取值:FALSE。 DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` + + // 标签描述列表。通过指定该参数可以绑定标签到实例启动模板。 + LaunchTemplateTagSpecification []*TagSpecification `json:"LaunchTemplateTagSpecification,omitnil,omitempty" name:"LaunchTemplateTagSpecification"` } func (r *CreateLaunchTemplateRequest) ToJsonString() string { @@ -1255,6 +1338,7 @@ func (r *CreateLaunchTemplateRequest) FromJsonString(s string) error { delete(f, "InstanceChargeType") delete(f, "InstanceChargePrepaid") delete(f, "DisableApiTermination") + delete(f, "LaunchTemplateTagSpecification") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLaunchTemplateRequest has unknown keys!", "") } @@ -1322,10 +1406,10 @@ type CreateLaunchTemplateVersionRequestParams struct { // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持60个字符(包含模式串)。
  • + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持128个字符(包含模式串)。
  • InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` - // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + // 实例登录设置。通过该参数可以设置实例的登录方式为密钥或保持镜像的原始登录设置。 LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 @@ -1415,10 +1499,10 @@ type CreateLaunchTemplateVersionRequest struct { // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持60个字符(包含模式串)。
  • + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持128个字符(包含模式串)。
  • InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` - // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + // 实例登录设置。通过该参数可以设置实例的登录方式为密钥或保持镜像的原始登录设置。 LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 @@ -1549,7 +1633,7 @@ type DataDisk struct { // 数据盘类型。数据盘类型限制详见[存储概述](https://cloud.tencent.com/document/product/213/4952)。取值范围:
  • LOCAL_BASIC:本地硬盘
  • LOCAL_SSD:本地SSD硬盘
  • LOCAL_NVME:本地NVME硬盘,与InstanceType强相关,不支持指定
  • LOCAL_PRO:本地HDD硬盘,与InstanceType强相关,不支持指定
  • CLOUD_BASIC:普通云硬盘
  • CLOUD_PREMIUM:高性能云硬盘
  • CLOUD_SSD:SSD云硬盘
  • CLOUD_HSSD:增强型SSD云硬盘
  • CLOUD_TSSD:极速型SSD云硬盘
  • CLOUD_BSSD:通用型SSD云硬盘

    默认取值:LOCAL_BASIC。

    该参数对`ResizeInstanceDisk`接口无效。
  • DiskType *string `json:"DiskType,omitnil,omitempty" name:"DiskType"` - // 数据盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID,暂时不支持该参数。 + // 数据盘ID。 // 该参数目前仅用于`DescribeInstances`等查询类接口的返回参数,不可用于`RunInstances`等写接口的入参。 DiskId *string `json:"DiskId,omitnil,omitempty" name:"DiskId"` @@ -1560,11 +1644,9 @@ type DataDisk struct { // 默认取值:true
    // 该参数目前仅用于 `RunInstances` 接口。 // - // 注意:此字段可能返回 null,表示取不到有效值。 DeleteWithInstance *bool `json:"DeleteWithInstance,omitnil,omitempty" name:"DeleteWithInstance"` // 数据盘快照ID。选择的数据盘快照大小需小于数据盘大小。 - // 注意:此字段可能返回 null,表示取不到有效值。 SnapshotId *string `json:"SnapshotId,omitnil,omitempty" name:"SnapshotId"` // 数据盘是加密。取值范围: @@ -1574,27 +1656,22 @@ type DataDisk struct { // 默认取值:false
    // 该参数目前仅用于 `RunInstances` 接口。 // - // 注意:此字段可能返回 null,表示取不到有效值。 Encrypt *bool `json:"Encrypt,omitnil,omitempty" name:"Encrypt"` // 自定义CMK对应的ID,取值为UUID或者类似kms-abcd1234。用于加密云盘。 // // 该参数目前仅用于 `RunInstances` 接口。 - // 注意:此字段可能返回 null,表示取不到有效值。 KmsKeyId *string `json:"KmsKeyId,omitnil,omitempty" name:"KmsKeyId"` // 云硬盘性能,单位:MB/s - // 注意:此字段可能返回 null,表示取不到有效值。 ThroughputPerformance *int64 `json:"ThroughputPerformance,omitnil,omitempty" name:"ThroughputPerformance"` // 所属的独享集群ID。 - // 注意:此字段可能返回 null,表示取不到有效值。 CdcId *string `json:"CdcId,omitnil,omitempty" name:"CdcId"` // 突发性能 // // 注:内测中。 - // 注意:此字段可能返回 null,表示取不到有效值。 BurstPerformance *bool `json:"BurstPerformance,omitnil,omitempty" name:"BurstPerformance"` // 磁盘名称,长度不超过128 个字符。 @@ -1605,14 +1682,14 @@ type DataDisk struct { // Predefined struct for user type DeleteDisasterRecoverGroupsRequestParams struct { - // 分散置放群组ID列表,可通过[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。每次请求允许操作的分散置放群组数量上限是100。 + // 分散置放群组ID列表,可通过[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。每次请求允许操作的分散置放群组数量上限是10。 DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` } type DeleteDisasterRecoverGroupsRequest struct { *tchttp.BaseRequest - // 分散置放群组ID列表,可通过[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。每次请求允许操作的分散置放群组数量上限是100。 + // 分散置放群组ID列表,可通过[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。每次请求允许操作的分散置放群组数量上限是10。 DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` } @@ -2142,6 +2219,8 @@ type DescribeChcHostsRequestParams struct { //

    按照【私有网络唯一ID】进行过滤。

    类型:String

    必选:否

    //
  • subnet-id
  • //

    按照【私有子网唯一ID】进行过滤。

    类型:String

    必选:否

    + //
  • sn
  • + //

    按照【设备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

    必选:否

    //
  • subnet-id
  • //

    按照【私有子网唯一ID】进行过滤。

    类型:String

    必选:否

    + //
  • sn
  • + //

    按照【设备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"` + + //
  • tag-key
  • + //

    按照【标签键】进行过滤。

    类型:String

    必选:否

    + //
  • tag-value
  • 按照【标签值】进行过滤。

    类型:String

    必选:否

    + //
  • tag:tag-key
  • 按照【标签键值对】进行过滤。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"` + + //
  • tag-key
  • + //

    按照【标签键】进行过滤。

    类型:String

    必选:否

    + //
  • tag-value
  • 按照【标签值】进行过滤。

    类型:String

    必选:否

    + //
  • tag:tag-key
  • 按照【标签键值对】进行过滤。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"` + + //
  • tag-key
  • 按照【标签键】进行过滤。

    类型:String

    必选:否

  • tag-value
  • 按照【标签值】进行过滤。

    类型:String

    必选:否

  • tag:tag-key
  • 按照【标签键值对】进行过滤。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"` + + //
  • tag-key
  • 按照【标签键】进行过滤。

    类型:String

    必选:否

  • tag-value
  • 按照【标签值】进行过滤。

    类型:String

    必选:否

  • tag:tag-key
  • 按照【标签键值对】进行过滤。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可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 + // 镜像ID列表 。镜像ID如:`img-gvbnzy6f`。array型参数的格式可以参考[API简介](https://cloud.tencent.com/document/api/213/15688)。镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。
  • ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` // 过滤条件,每次请求的`Filters`的上限为10,`Filters.Values`的上限为5。参数不可以同时指定`ImageIds`和`Filters`。详细的过滤条件如下: @@ -2782,7 +2897,7 @@ type DescribeImagesRequestParams struct { type DescribeImagesRequest struct { *tchttp.BaseRequest - // 镜像ID列表 。镜像ID如:`img-gvbnzy6f`。array型参数的格式可以参考[API简介](https://cloud.tencent.com/document/api/213/15688)。镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 + // 镜像ID列表 。镜像ID如:`img-gvbnzy6f`。array型参数的格式可以参考[API简介](https://cloud.tencent.com/document/api/213/15688)。镜像ID可以通过如下方式获取:
  • 通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。
  • 通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。
  • ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` // 过滤条件,每次请求的`Filters`的上限为10,`Filters.Values`的上限为5。参数不可以同时指定`ImageIds`和`Filters`。详细的过滤条件如下: @@ -3250,6 +3365,72 @@ func (r *DescribeInstancesActionTimerResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DescribeInstancesAttributesRequestParams struct { + // 需要获取的实例属性。可选值: + // UserData: 实例自定义数据 + Attributes []*string `json:"Attributes,omitnil,omitempty" name:"Attributes"` + + // 实例ID列表 + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` +} + +type DescribeInstancesAttributesRequest struct { + *tchttp.BaseRequest + + // 需要获取的实例属性。可选值: + // UserData: 实例自定义数据 + Attributes []*string `json:"Attributes,omitnil,omitempty" name:"Attributes"` + + // 实例ID列表 + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` +} + +func (r *DescribeInstancesAttributesRequest) 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 *DescribeInstancesAttributesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Attributes") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstancesAttributesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancesAttributesResponseParams struct { + // 指定的实例属性列表 + InstanceSet []*InstanceAttribute `json:"InstanceSet,omitnil,omitempty" name:"InstanceSet"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeInstancesAttributesResponse struct { + *tchttp.BaseResponse + Response *DescribeInstancesAttributesResponseParams `json:"Response"` +} + +func (r *DescribeInstancesAttributesResponse) 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 *DescribeInstancesAttributesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DescribeInstancesModificationRequestParams struct { // 一个或多个待查询的实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口返回值中的`InstanceId`获取。每次请求批量实例的上限为20。 @@ -3802,7 +3983,12 @@ type DescribeLaunchTemplatesRequestParams struct { // 启动模板ID,一个或者多个启动模板ID。若未指定,则显示用户所有模板。 LaunchTemplateIds []*string `json:"LaunchTemplateIds,omitnil,omitempty" name:"LaunchTemplateIds"` - //

    按照【LaunchTemplateName】进行过滤。

    类型:String

    必选:否

    + //
  • LaunchTemplateName
  • + //

    按照【实例启动模板名称】进行过滤。

    类型:String

    必选:否

    + //
  • tag-key
  • + //

    按照【标签键】进行过滤。

    类型:String

    必选:否

    + //
  • tag-value
  • 按照【标签值】进行过滤。

    类型:String

    必选:否

    + //
  • tag:tag-key
  • 按照【标签键值对】进行过滤。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

    必选:否

    + //
  • LaunchTemplateName
  • + //

    按照【实例启动模板名称】进行过滤。

    类型:String

    必选:否

    + //
  • tag-key
  • + //

    按照【标签键】进行过滤。

    类型:String

    必选:否

    + //
  • tag-value
  • 按照【标签值】进行过滤。

    类型:String

    必选:否

    + //
  • tag:tag-key
  • 按照【标签键值对】进行过滤。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"` - - //
  • zone
  • - //

    按照预留实例计费可购买的【可用区】进行过滤。形如:ap-guangzhou-1。

    类型:String

    必选:否

    可选项:可用区列表

    - //
  • duration
  • - //

    按照预留实例计费【有效期】即预留实例计费购买时长进行过滤。形如:31536000。

    类型:Integer

    计量单位:秒

    必选:否

    可选项:31536000 (1年) | 94608000(3年)

    - //
  • instance-type
  • - //

    按照【预留实例规格】进行过滤。形如:S3.MEDIUM4。

    类型:String

    必选:否

    可选项:预留实例规格列表

    - //
  • instance-family
  • - //

    按照【预留实例类型】进行过滤。形如:S3。

    类型:String

    必选:否

    可选项:预留实例类型列表

    - //
  • offering-type
  • - //
  • offering-type
  • - //

    按照【付款类型】进行过滤。形如:All Upfront (全预付)。

    类型:String

    必选:否

    可选项:All Upfront (全预付) | Partial Upfront (部分预付) | No Upfront (零预付)

    - //
  • product-description
  • - //

    按照预留实例计费的【平台描述】(即操作系统)进行过滤。形如:linux。

    类型:String

    必选:否

    可选项:linux

    - //
  • reserved-instances-id
  • - //

    按照已购买【预留实例计费ID】进行过滤。形如:650c138f-ae7e-4750-952a-96841d6e9fc1。

    类型:String

    必选:否

    - //
  • state
  • - //

    按照已购买【预留实例计费状态】进行过滤。形如: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"` - - //
  • zone
  • - //

    按照预留实例计费可购买的【可用区】进行过滤。形如:ap-guangzhou-1。

    类型:String

    必选:否

    可选项:可用区列表

    - //
  • duration
  • - //

    按照预留实例计费【有效期】即预留实例计费购买时长进行过滤。形如:31536000。

    类型:Integer

    计量单位:秒

    必选:否

    可选项:31536000 (1年) | 94608000(3年)

    - //
  • instance-type
  • - //

    按照【预留实例规格】进行过滤。形如:S3.MEDIUM4。

    类型:String

    必选:否

    可选项:预留实例规格列表

    - //
  • instance-family
  • - //

    按照【预留实例类型】进行过滤。形如:S3。

    类型:String

    必选:否

    可选项:预留实例类型列表

    - //
  • offering-type
  • - //
  • offering-type
  • - //

    按照【付款类型】进行过滤。形如:All Upfront (全预付)。

    类型:String

    必选:否

    可选项:All Upfront (全预付) | Partial Upfront (部分预付) | No Upfront (零预付)

    - //
  • product-description
  • - //

    按照预留实例计费的【平台描述】(即操作系统)进行过滤。形如:linux。

    类型:String

    必选:否

    可选项:linux

    - //
  • reserved-instances-id
  • - //

    按照已购买【预留实例计费ID】进行过滤。形如:650c138f-ae7e-4750-952a-96841d6e9fc1。

    类型:String

    必选:否

    - //
  • state
  • - //

    按照已购买【预留实例计费状态】进行过滤。形如: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"` + + // 实例的关闭模式。取值范围:
  • SOFT_FIRST:表示在正常关闭失败后进行强制关闭

  • HARD:直接强制关闭

  • SOFT:仅软关机

  • 默认取值:SOFT。 + StopType *string `json:"StopType,omitnil,omitempty" name:"StopType"` } type EnterRescueModeRequest struct { @@ -4834,8 +4913,11 @@ type EnterRescueModeRequest struct { // 救援模式下系统用户名 Username *string `json:"Username,omitnil,omitempty" name:"Username"` - // 是否强制关机 + // 是否强制关机。本参数已弃用,推荐使用StopType,不可以与参数StopType同时使用。 ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` + + // 实例的关闭模式。取值范围:
  • SOFT_FIRST:表示在正常关闭失败后进行强制关闭

  • HARD:直接强制关闭

  • SOFT:仅软关机

  • 默认取值:SOFT。 + StopType *string `json:"StopType,omitnil,omitempty" name:"StopType"` } func (r *EnterRescueModeRequest) ToJsonString() string { @@ -4854,6 +4936,7 @@ func (r *EnterRescueModeRequest) FromJsonString(s string) error { delete(f, "Password") delete(f, "Username") delete(f, "ForceStop") + delete(f, "StopType") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnterRescueModeRequest has unknown keys!", "") } @@ -4941,7 +5024,7 @@ type ExportImagesRequestParams struct { // COS存储桶名称 BucketName *string `json:"BucketName,omitnil,omitempty" name:"BucketName"` - // 镜像ID列表 + // 镜像ID列表。调用 ExportImages 接口时,参数 ImageIds 和 SnapshotIds 为二选一必填参数,目前参数 SnapshotIds 暂未对外开放。 ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` // 镜像文件导出格式。取值范围:RAW,QCOW2,VHD,VMDK。默认为RAW @@ -4966,7 +5049,7 @@ type ExportImagesRequest struct { // COS存储桶名称 BucketName *string `json:"BucketName,omitnil,omitempty" name:"BucketName"` - // 镜像ID列表 + // 镜像ID列表。调用 ExportImages 接口时,参数 ImageIds 和 SnapshotIds 为二选一必填参数,目前参数 SnapshotIds 暂未对外开放。 ImageIds []*string `json:"ImageIds,omitnil,omitempty" name:"ImageIds"` // 镜像文件导出格式。取值范围:RAW,QCOW2,VHD,VMDK。默认为RAW @@ -5040,15 +5123,12 @@ func (r *ExportImagesResponse) FromJsonString(s string) error { type Externals struct { // 释放地址 - // 注意:此字段可能返回 null,表示取不到有效值。 ReleaseAddress *bool `json:"ReleaseAddress,omitnil,omitempty" name:"ReleaseAddress"` - // 不支持的网络类型,取值范围:
  • BASIC:基础网络
  • VPC1.0:私有网络VPC1.0 - // 注意:此字段可能返回 null,表示取不到有效值。 + // 不支持的网络类型,取值范围:
  • BASIC:基础网络
  • VPC1.0:私有网络VPC1.0
  • UnsupportNetworks []*string `json:"UnsupportNetworks,omitnil,omitempty" name:"UnsupportNetworks"` // HDD本地存储属性 - // 注意:此字段可能返回 null,表示取不到有效值。 StorageBlockAttr *StorageBlock `json:"StorageBlockAttr,omitnil,omitempty" name:"StorageBlockAttr"` } @@ -5062,15 +5142,12 @@ type Filter struct { type GPUInfo struct { // 实例GPU个数。值小于1代表VGPU类型,大于1代表GPU直通类型。 - // 注意:此字段可能返回 null,表示取不到有效值。 GPUCount *float64 `json:"GPUCount,omitnil,omitempty" name:"GPUCount"` // 实例GPU地址。 - // 注意:此字段可能返回 null,表示取不到有效值。 GPUId []*string `json:"GPUId,omitnil,omitempty" name:"GPUId"` // 实例GPU类型。 - // 注意:此字段可能返回 null,表示取不到有效值。 GPUType *string `json:"GPUType,omitnil,omitempty" name:"GPUType"` } @@ -5112,11 +5189,9 @@ type HostItem struct { HostResource *HostResource `json:"HostResource,omitnil,omitempty" name:"HostResource"` // 专用宿主机所属的围笼ID。该字段仅对金融专区围笼内的专用宿主机有效。 - // 注意:此字段可能返回 null,表示取不到有效值。 CageId *string `json:"CageId,omitnil,omitempty" name:"CageId"` // 专用宿主机关联的标签列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` } @@ -5154,7 +5229,6 @@ type HostResource struct { GpuAvailable *uint64 `json:"GpuAvailable,omitnil,omitempty" name:"GpuAvailable"` // CDH owner - // 注意:此字段可能返回 null,表示取不到有效值。 ExclusiveOwner *string `json:"ExclusiveOwner,omitnil,omitempty" name:"ExclusiveOwner"` } @@ -5163,11 +5237,9 @@ type HpcClusterInfo struct { HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` // 高性能计算集群名 - // 注意:此字段可能返回 null,表示取不到有效值。 Name *string `json:"Name,omitnil,omitempty" name:"Name"` // 高性能计算集群备注 - // 注意:此字段可能返回 null,表示取不到有效值。 Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` // 集群下设备容量 @@ -5180,20 +5252,22 @@ type HpcClusterInfo struct { CurrentNum *uint64 `json:"CurrentNum,omitnil,omitempty" name:"CurrentNum"` // 集群创建时间 - // 注意:此字段可能返回 null,表示取不到有效值。 CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` // 集群内实例ID列表 - // 注意:此字段可能返回 null,表示取不到有效值。 InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` // 高性能计算集群类型。 - // 注意:此字段可能返回 null,表示取不到有效值。 HpcClusterType *string `json:"HpcClusterType,omitnil,omitempty" name:"HpcClusterType"` // 高性能计算集群对应的业务场景标识,当前只支持CDC。 - // 注意:此字段可能返回 null,表示取不到有效值。 HpcClusterBusinessId *string `json:"HpcClusterBusinessId,omitnil,omitempty" name:"HpcClusterBusinessId"` + + // 高性能计算集群网络模式 + HpcClusterNetMode *uint64 `json:"HpcClusterNetMode,omitnil,omitempty" name:"HpcClusterNetMode"` + + // 高性能计算集群关联的标签列表 + Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` } type Image struct { @@ -5245,22 +5319,18 @@ type Image struct { SyncPercent *int64 `json:"SyncPercent,omitnil,omitempty" name:"SyncPercent"` // 镜像是否支持cloud-init - // 注意:此字段可能返回 null,表示取不到有效值。 IsSupportCloudinit *bool `json:"IsSupportCloudinit,omitnil,omitempty" name:"IsSupportCloudinit"` // 镜像关联的快照信息 - // 注意:此字段可能返回 null,表示取不到有效值。 SnapshotSet []*Snapshot `json:"SnapshotSet,omitnil,omitempty" name:"SnapshotSet"` // 镜像关联的标签列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` // 镜像许可类型 LicenseType *string `json:"LicenseType,omitnil,omitempty" name:"LicenseType"` // 镜像族 - // 注意:此字段可能返回 null,表示取不到有效值。 ImageFamily *string `json:"ImageFamily,omitnil,omitempty" name:"ImageFamily"` // 镜像是否废弃 @@ -5269,11 +5339,9 @@ type Image struct { type ImageOsList struct { // 支持的Windows操作系统。 - // 注意:此字段可能返回 null,表示取不到有效值。 Windows []*string `json:"Windows,omitnil,omitempty" name:"Windows"` // 支持的Linux操作系统 - // 注意:此字段可能返回 null,表示取不到有效值。 Linux []*string `json:"Linux,omitnil,omitempty" name:"Linux"` } @@ -5414,6 +5482,9 @@ func (r *ImportImageRequest) FromJsonString(s string) error { // Predefined struct for user type ImportImageResponseParams struct { + // 镜像 ID + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } @@ -6226,7 +6297,7 @@ type InquiryPriceRunInstancesRequestParams struct { // 购买实例数量。取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持60个字符(包含模式串)。
  • + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持128个字符(包含模式串)。
  • InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 @@ -6295,7 +6366,7 @@ type InquiryPriceRunInstancesRequest struct { // 购买实例数量。取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持60个字符(包含模式串)。
  • + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持128个字符(包含模式串)。
  • InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 @@ -6466,13 +6537,13 @@ type Instance struct { // 实例内存容量,单位:`GB`。 Memory *int64 `json:"Memory,omitnil,omitempty" name:"Memory"` - // 实例业务状态。取值范围:
  • NORMAL:表示正常状态的实例
  • EXPIRED:表示过期的实例
  • PROTECTIVELY_ISOLATED:表示被安全隔离的实例。 + // 实例业务状态。取值范围:
  • NORMAL:表示正常状态的实例
  • EXPIRED:表示过期的实例
  • PROTECTIVELY_ISOLATED:表示被安全隔离的实例。
  • RestrictState *string `json:"RestrictState,omitnil,omitempty" name:"RestrictState"` // 实例名称。 InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` - // 实例计费模式。取值范围:
  • `PREPAID`:表示预付费,即包年包月
  • `POSTPAID_BY_HOUR`:表示后付费,即按量计费
  • `CDHPAID`:`专用宿主机`付费,即只对`专用宿主机`计费,不对`专用宿主机`上的实例计费。
  • `SPOTPAID`:表示竞价实例付费。 + // 实例计费模式。取值范围:
  • `PREPAID`:表示预付费,即包年包月
  • `POSTPAID_BY_HOUR`:表示后付费,即按量计费
  • `CDHPAID`:`专用宿主机`付费,即只对`专用宿主机`计费,不对`专用宿主机`上的实例计费。
  • `SPOTPAID`:表示竞价实例付费。
  • InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` // 实例系统盘信息。 @@ -6497,8 +6568,8 @@ type Instance struct { // 生产实例所使用的镜像`ID`。 ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` - // 自动续费标识。取值范围:
  • `NOTIFY_AND_MANUAL_RENEW`:表示通知即将过期,但不自动续费
  • `NOTIFY_AND_AUTO_RENEW`:表示通知即将过期,而且自动续费
  • `DISABLE_NOTIFY_AND_MANUAL_RENEW`:表示不通知即将过期,也不自动续费。 - //
  • 注意:后付费模式本项为null + // 自动续费标识。取值范围:
  • `NOTIFY_AND_MANUAL_RENEW`:表示通知即将过期,但不自动续费
  • `NOTIFY_AND_AUTO_RENEW`:表示通知即将过期,而且自动续费
  • `DISABLE_NOTIFY_AND_MANUAL_RENEW`:表示不通知即将过期,也不自动续费。 + //
  • 注意:后付费模式本项为null
  • RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 @@ -6523,7 +6594,7 @@ type Instance struct { Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` // 实例的关机计费模式。 - // 取值范围:
  • KEEP_CHARGING:关机继续收费
  • STOP_CHARGING:关机停止收费
  • NOT_APPLICABLE:实例处于非关机状态或者不适用关机停止计费的条件
    + // 取值范围:
  • KEEP_CHARGING:关机继续收费
  • STOP_CHARGING:关机停止收费
  • NOT_APPLICABLE:实例处于非关机状态或者不适用关机停止计费的条件
  • StopChargingMode *string `json:"StopChargingMode,omitnil,omitempty" name:"StopChargingMode"` // 实例全局唯一ID @@ -6533,7 +6604,7 @@ type Instance struct { // 注意:此字段可能返回 null,表示取不到有效值。 LatestOperation *string `json:"LatestOperation,omitnil,omitempty" name:"LatestOperation"` - // 实例的最新操作状态。取值范围:
  • SUCCESS:表示操作成功
  • OPERATING:表示操作执行中
  • FAILED:表示操作失败 + // 实例的最新操作状态。取值范围:
  • SUCCESS:表示操作成功
  • OPERATING:表示操作执行中
  • FAILED:表示操作失败
  • // 注意:此字段可能返回 null,表示取不到有效值。 LatestOperationState *string `json:"LatestOperationState,omitnil,omitempty" name:"LatestOperationState"` @@ -6542,7 +6613,6 @@ type Instance struct { LatestOperationRequestId *string `json:"LatestOperationRequestId,omitnil,omitempty" name:"LatestOperationRequestId"` // 分散置放群组ID。 - // 注意:此字段可能返回 null,表示取不到有效值。 DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitnil,omitempty" name:"DisasterRecoverGroupId"` // 实例的IPv6地址。 @@ -6554,7 +6624,6 @@ type Instance struct { CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` // 高性能计算集群`ID`。 - // 注意:此字段可能返回 null,表示取不到有效值。 HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` // 高性能计算集群`IP`列表。 @@ -6562,21 +6631,18 @@ type Instance struct { RdmaIpAddresses []*string `json:"RdmaIpAddresses,omitnil,omitempty" name:"RdmaIpAddresses"` // 实例所在的专用集群`ID`。 - // 注意:此字段可能返回 null,表示取不到有效值。 DedicatedClusterId *string `json:"DedicatedClusterId,omitnil,omitempty" name:"DedicatedClusterId"` // 实例隔离类型。取值范围:
  • ARREAR:表示欠费隔离
  • EXPIRE:表示到期隔离
  • MANMADE:表示主动退还隔离
  • NOTISOLATED:表示未隔离
  • - // 注意:此字段可能返回 null,表示取不到有效值。 IsolatedSource *string `json:"IsolatedSource,omitnil,omitempty" name:"IsolatedSource"` // GPU信息。如果是gpu类型子机,该值会返回GPU信息,如果是其他类型子机则不返回。 - // 注意:此字段可能返回 null,表示取不到有效值。 GPUInfo *GPUInfo `json:"GPUInfo,omitnil,omitempty" name:"GPUInfo"` // 实例的操作系统许可类型,默认为TencentCloud LicenseType *string `json:"LicenseType,omitnil,omitempty" name:"LicenseType"` - // 实例销毁保护标志,表示是否允许通过api接口删除实例。取值范围:
  • TRUE:表示开启实例保护,不允许通过api接口删除实例
  • FALSE:表示关闭实例保护,允许通过api接口删除实例

    默认取值:FALSE。 + // 实例销毁保护标志,表示是否允许通过api接口删除实例。取值范围:
  • true:表示开启实例保护,不允许通过api接口删除实例
  • false:表示关闭实例保护,允许通过api接口删除实例

  • 默认取值:false。 DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` // 默认登录用户。 @@ -6590,13 +6656,19 @@ type Instance struct { LatestOperationErrorMsg *string `json:"LatestOperationErrorMsg,omitnil,omitempty" name:"LatestOperationErrorMsg"` } +type InstanceAttribute struct { + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 实例属性信息。 + Attributes *Attribute `json:"Attributes,omitnil,omitempty" name:"Attributes"` +} + type InstanceChargePrepaid struct { // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36, 48, 60。 - // 注意:此字段可能返回 null,表示取不到有效值。 Period *int64 `json:"Period,omitnil,omitempty" name:"Period"` // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费

  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费

  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费


  • 默认取值:NOTIFY_AND_MANUAL_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 - // 注意:此字段可能返回 null,表示取不到有效值。 RenewFlag *string `json:"RenewFlag,omitnil,omitempty" name:"RenewFlag"` } @@ -6610,25 +6682,20 @@ type InstanceFamilyConfig struct { type InstanceMarketOptionsRequest struct { // 竞价相关选项 - // 注意:此字段可能返回 null,表示取不到有效值。 SpotOptions *SpotMarketOptions `json:"SpotOptions,omitnil,omitempty" name:"SpotOptions"` // 市场选项类型,当前只支持取值:spot - // 注意:此字段可能返回 null,表示取不到有效值。 MarketType *string `json:"MarketType,omitnil,omitempty" name:"MarketType"` } type InstanceRefund struct { // 实例Id。 - // 注意:此字段可能返回 null,表示取不到有效值。 InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` // 退款数额。 - // 注意:此字段可能返回 null,表示取不到有效值。 Refunds *float64 `json:"Refunds,omitnil,omitempty" name:"Refunds"` // 退款详情。 - // 注意:此字段可能返回 null,表示取不到有效值。 PriceDetail *string `json:"PriceDetail,omitnil,omitempty" name:"PriceDetail"` } @@ -6671,7 +6738,6 @@ type InstanceTypeConfigStatus struct { Status *string `json:"Status,omitnil,omitempty" name:"Status"` // 状态描述信息 - // 注意:此字段可能返回 null,表示取不到有效值。 Message *string `json:"Message,omitnil,omitempty" name:"Message"` // 配置信息 @@ -6692,7 +6758,6 @@ type InstanceTypeQuotaItem struct { NetworkCard *int64 `json:"NetworkCard,omitnil,omitempty" name:"NetworkCard"` // 扩展属性。 - // 注意:此字段可能返回 null,表示取不到有效值。 Externals *Externals `json:"Externals,omitnil,omitempty" name:"Externals"` // 实例的CPU核数,单位:核。 @@ -6717,7 +6782,6 @@ type InstanceTypeQuotaItem struct { Price *ItemPrice `json:"Price,omitnil,omitempty" name:"Price"` // 售罄原因。 - // 注意:此字段可能返回 null,表示取不到有效值。 SoldOutReason *string `json:"SoldOutReason,omitnil,omitempty" name:"SoldOutReason"` // 内网带宽,单位Gbps。 @@ -6752,7 +6816,6 @@ type InstanceTypeQuotaItem struct { //
  • NormalStock:表示对应库存供应有保障
  • //
  • UnderStock:表示对应库存即将售罄
  • //
  • WithoutStock:表示对应库存已经售罄
  • - // 注意:此字段可能返回 null,表示取不到有效值。 StatusCategory *string `json:"StatusCategory,omitnil,omitempty" name:"StatusCategory"` } @@ -6791,88 +6854,69 @@ type InternetChargeTypeConfig struct { type ItemPrice struct { // 后续合计费用的原价,后付费模式使用,单位:元。
  • 如返回了其他时间区间项,如UnitPriceSecondStep,则本项代表时间区间在(0, 96)小时;若未返回其他时间区间项,则本项代表全时段,即(0, ∞)小时
  • - // 注意:此字段可能返回 null,表示取不到有效值。 UnitPrice *float64 `json:"UnitPrice,omitnil,omitempty" name:"UnitPrice"` // 后续计价单元,后付费模式使用,可取值范围:
  • HOUR:表示计价单元是按每小时来计算。当前涉及该计价单元的场景有:实例按小时后付费(POSTPAID_BY_HOUR)、带宽按小时后付费(BANDWIDTH_POSTPAID_BY_HOUR):
  • GB:表示计价单元是按每GB来计算。当前涉及该计价单元的场景有:流量按小时后付费(TRAFFIC_POSTPAID_BY_HOUR)。
  • - // 注意:此字段可能返回 null,表示取不到有效值。 ChargeUnit *string `json:"ChargeUnit,omitnil,omitempty" name:"ChargeUnit"` // 预支合计费用的原价,预付费模式使用,单位:元。 - // 注意:此字段可能返回 null,表示取不到有效值。 OriginalPrice *float64 `json:"OriginalPrice,omitnil,omitempty" name:"OriginalPrice"` // 预支合计费用的折扣价,预付费模式使用,单位:元。 - // 注意:此字段可能返回 null,表示取不到有效值。 DiscountPrice *float64 `json:"DiscountPrice,omitnil,omitempty" name:"DiscountPrice"` // 折扣,如20.0代表2折。 - // 注意:此字段可能返回 null,表示取不到有效值。 Discount *float64 `json:"Discount,omitnil,omitempty" name:"Discount"` // 后续合计费用的折扣价,后付费模式使用,单位:元
  • 如返回了其他时间区间项,如UnitPriceDiscountSecondStep,则本项代表时间区间在(0, 96)小时;若未返回其他时间区间项,则本项代表全时段,即(0, ∞)小时
  • - // 注意:此字段可能返回 null,表示取不到有效值。 UnitPriceDiscount *float64 `json:"UnitPriceDiscount,omitnil,omitempty" name:"UnitPriceDiscount"` // 使用时间区间在(96, 360)小时的后续合计费用的原价,后付费模式使用,单位:元。 - // 注意:此字段可能返回 null,表示取不到有效值。 UnitPriceSecondStep *float64 `json:"UnitPriceSecondStep,omitnil,omitempty" name:"UnitPriceSecondStep"` // 使用时间区间在(96, 360)小时的后续合计费用的折扣价,后付费模式使用,单位:元 - // 注意:此字段可能返回 null,表示取不到有效值。 UnitPriceDiscountSecondStep *float64 `json:"UnitPriceDiscountSecondStep,omitnil,omitempty" name:"UnitPriceDiscountSecondStep"` // 使用时间区间在(360, ∞)小时的后续合计费用的原价,后付费模式使用,单位:元。 - // 注意:此字段可能返回 null,表示取不到有效值。 UnitPriceThirdStep *float64 `json:"UnitPriceThirdStep,omitnil,omitempty" name:"UnitPriceThirdStep"` // 使用时间区间在(360, ∞)小时的后续合计费用的折扣价,后付费模式使用,单位:元 - // 注意:此字段可能返回 null,表示取不到有效值。 UnitPriceDiscountThirdStep *float64 `json:"UnitPriceDiscountThirdStep,omitnil,omitempty" name:"UnitPriceDiscountThirdStep"` // 预支三年合计费用的原价,预付费模式使用,单位:元。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 OriginalPriceThreeYear *float64 `json:"OriginalPriceThreeYear,omitnil,omitempty" name:"OriginalPriceThreeYear"` // 预支三年合计费用的折扣价,预付费模式使用,单位:元。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 DiscountPriceThreeYear *float64 `json:"DiscountPriceThreeYear,omitnil,omitempty" name:"DiscountPriceThreeYear"` // 预支三年应用的折扣,如20.0代表2折。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 DiscountThreeYear *float64 `json:"DiscountThreeYear,omitnil,omitempty" name:"DiscountThreeYear"` // 预支五年合计费用的原价,预付费模式使用,单位:元。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 OriginalPriceFiveYear *float64 `json:"OriginalPriceFiveYear,omitnil,omitempty" name:"OriginalPriceFiveYear"` // 预支五年合计费用的折扣价,预付费模式使用,单位:元。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 DiscountPriceFiveYear *float64 `json:"DiscountPriceFiveYear,omitnil,omitempty" name:"DiscountPriceFiveYear"` // 预支五年应用的折扣,如20.0代表2折。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 DiscountFiveYear *float64 `json:"DiscountFiveYear,omitnil,omitempty" name:"DiscountFiveYear"` // 预支一年合计费用的原价,预付费模式使用,单位:元。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 OriginalPriceOneYear *float64 `json:"OriginalPriceOneYear,omitnil,omitempty" name:"OriginalPriceOneYear"` // 预支一年合计费用的折扣价,预付费模式使用,单位:元。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 DiscountPriceOneYear *float64 `json:"DiscountPriceOneYear,omitnil,omitempty" name:"DiscountPriceOneYear"` // 预支一年应用的折扣,如20.0代表2折。 // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 DiscountOneYear *float64 `json:"DiscountOneYear,omitnil,omitempty" name:"DiscountOneYear"` } @@ -6902,7 +6946,6 @@ type KeyPair struct { CreatedTime *string `json:"CreatedTime,omitnil,omitempty" name:"CreatedTime"` // 密钥关联的标签列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` } @@ -6916,140 +6959,112 @@ type LaunchTemplate struct { type LaunchTemplateInfo struct { // 实例启动模版本号。 - // 注意:此字段可能返回 null,表示取不到有效值。 LatestVersionNumber *uint64 `json:"LatestVersionNumber,omitnil,omitempty" name:"LatestVersionNumber"` // 实例启动模板ID。 - // 注意:此字段可能返回 null,表示取不到有效值。 LaunchTemplateId *string `json:"LaunchTemplateId,omitnil,omitempty" name:"LaunchTemplateId"` // 实例启动模板名。 - // 注意:此字段可能返回 null,表示取不到有效值。 LaunchTemplateName *string `json:"LaunchTemplateName,omitnil,omitempty" name:"LaunchTemplateName"` // 实例启动模板默认版本号。 - // 注意:此字段可能返回 null,表示取不到有效值。 DefaultVersionNumber *uint64 `json:"DefaultVersionNumber,omitnil,omitempty" name:"DefaultVersionNumber"` // 实例启动模板包含的版本总数量。 - // 注意:此字段可能返回 null,表示取不到有效值。 LaunchTemplateVersionCount *uint64 `json:"LaunchTemplateVersionCount,omitnil,omitempty" name:"LaunchTemplateVersionCount"` // 创建该模板的用户UIN。 - // 注意:此字段可能返回 null,表示取不到有效值。 CreatedBy *string `json:"CreatedBy,omitnil,omitempty" name:"CreatedBy"` // 创建该模板的时间。 - // 注意:此字段可能返回 null,表示取不到有效值。 CreationTime *string `json:"CreationTime,omitnil,omitempty" name:"CreationTime"` } type LaunchTemplateVersionData struct { // 实例所在的位置。 - // 注意:此字段可能返回 null,表示取不到有效值。 Placement *Placement `json:"Placement,omitnil,omitempty" name:"Placement"` // 实例机型。 - // 注意:此字段可能返回 null,表示取不到有效值。 InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` // 实例名称。 - // 注意:此字段可能返回 null,表示取不到有效值。 InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` - // 实例计费模式。取值范围:
  • `PREPAID`:表示预付费,即包年包月
  • `POSTPAID_BY_HOUR`:表示后付费,即按量计费
  • `CDHPAID`:`专用宿主机`付费,即只对`专用宿主机`计费,不对`专用宿主机`上的实例计费。
  • `SPOTPAID`:表示竞价实例付费。 - // 注意:此字段可能返回 null,表示取不到有效值。 + // 实例计费模式。取值范围: + //
  • `PREPAID`:表示预付费,即包年包月
  • + //
  • `POSTPAID_BY_HOUR`:表示后付费,即按量计费
  • + //
  • `CDHPAID`:`专用宿主机`付费,即只对`专用宿主机`计费,不对`专用宿主机`上的实例计费。
  • + //
  • `SPOTPAID`:表示竞价实例付费。
  • InstanceChargeType *string `json:"InstanceChargeType,omitnil,omitempty" name:"InstanceChargeType"` // 实例系统盘信息。 - // 注意:此字段可能返回 null,表示取不到有效值。 SystemDisk *SystemDisk `json:"SystemDisk,omitnil,omitempty" name:"SystemDisk"` // 实例数据盘信息。只包含随实例购买的数据盘。 - // 注意:此字段可能返回 null,表示取不到有效值。 DataDisks []*DataDisk `json:"DataDisks,omitnil,omitempty" name:"DataDisks"` // 实例带宽信息。 - // 注意:此字段可能返回 null,表示取不到有效值。 InternetAccessible *InternetAccessible `json:"InternetAccessible,omitnil,omitempty" name:"InternetAccessible"` // 实例所属虚拟私有网络信息。 - // 注意:此字段可能返回 null,表示取不到有效值。 VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` // 生产实例所使用的镜像`ID`。 - // 注意:此字段可能返回 null,表示取不到有效值。 ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。 - // 注意:此字段可能返回 null,表示取不到有效值。 SecurityGroupIds []*string `json:"SecurityGroupIds,omitnil,omitempty" name:"SecurityGroupIds"` // 实例登录设置。目前只返回实例所关联的密钥。 - // 注意:此字段可能返回 null,表示取不到有效值。 LoginSettings *LoginSettings `json:"LoginSettings,omitnil,omitempty" name:"LoginSettings"` // CAM角色名。 - // 注意:此字段可能返回 null,表示取不到有效值。 CamRoleName *string `json:"CamRoleName,omitnil,omitempty" name:"CamRoleName"` // 高性能计算集群`ID`。 - // 注意:此字段可能返回 null,表示取不到有效值。 HpcClusterId *string `json:"HpcClusterId,omitnil,omitempty" name:"HpcClusterId"` // 购买实例数量。 - // 注意:此字段可能返回 null,表示取不到有效值。 InstanceCount *uint64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` // 增强服务。 - // 注意:此字段可能返回 null,表示取不到有效值。 EnhancedService *EnhancedService `json:"EnhancedService,omitnil,omitempty" name:"EnhancedService"` // 提供给实例使用的用户数据,需要以 base64 方式编码,支持的最大数据大小为 16KB。 - // 注意:此字段可能返回 null,表示取不到有效值。 UserData *string `json:"UserData,omitnil,omitempty" name:"UserData"` // 置放群组ID,仅支持指定一个。 - // 注意:此字段可能返回 null,表示取不到有效值。 DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitnil,omitempty" name:"DisasterRecoverGroupIds"` // 定时任务。通过该参数可以为实例指定定时任务,目前仅支持定时销毁。 - // 注意:此字段可能返回 null,表示取不到有效值。 ActionTimer *ActionTimer `json:"ActionTimer,omitnil,omitempty" name:"ActionTimer"` // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 - // 注意:此字段可能返回 null,表示取不到有效值。 InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitnil,omitempty" name:"InstanceMarketOptions"` // 云服务器的主机名。 - // 注意:此字段可能返回 null,表示取不到有效值。 HostName *string `json:"HostName,omitnil,omitempty" name:"HostName"` // 用于保证请求幂等性的字符串。 - // 注意:此字段可能返回 null,表示取不到有效值。 ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"` // 预付费模式,即包年包月相关参数设置。 - // 注意:此字段可能返回 null,表示取不到有效值。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` // 标签描述列表。通过指定该参数可以同时绑定标签到相应的云服务器、云硬盘实例。 - // 注意:此字段可能返回 null,表示取不到有效值。 TagSpecification []*TagSpecification `json:"TagSpecification,omitnil,omitempty" name:"TagSpecification"` // 实例销毁保护标志,表示是否允许通过api接口删除实例。取值范围: // - // TRUE:表示开启实例保护,不允许通过api接口删除实例 - // FALSE:表示关闭实例保护,允许通过api接口删除实例 + // true:表示开启实例保护,不允许通过api接口删除实例 + // false:表示关闭实例保护,允许通过api接口删除实例 // - // 默认取值:FALSE。 - // 注意:此字段可能返回 null,表示取不到有效值。 + // 默认取值:false。 DisableApiTermination *bool `json:"DisableApiTermination,omitnil,omitempty" name:"DisableApiTermination"` } type LaunchTemplateVersionInfo struct { // 实例启动模板版本号。 - // 注意:此字段可能返回 null,表示取不到有效值。 LaunchTemplateVersion *uint64 `json:"LaunchTemplateVersion,omitnil,omitempty" name:"LaunchTemplateVersion"` // 实例启动模板版本数据详情。 @@ -7065,7 +7080,6 @@ type LaunchTemplateVersionInfo struct { IsDefaultVersion *bool `json:"IsDefaultVersion,omitnil,omitempty" name:"IsDefaultVersion"` // 实例启动模板版本描述信息。 - // 注意:此字段可能返回 null,表示取不到有效值。 LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitnil,omitempty" name:"LaunchTemplateVersionDescription"` // 创建者。 @@ -7085,7 +7099,7 @@ type LocalDiskType struct { // 本地磁盘最大值。 MaxSize *int64 `json:"MaxSize,omitnil,omitempty" name:"MaxSize"` - // 购买时本地盘是否为必选。取值范围:
  • REQUIRED:表示必选
  • OPTIONAL:表示可选。 + // 购买时本地盘是否为必选。取值范围:
  • REQUIRED:表示必选
  • OPTIONAL:表示可选。
  • Required *string `json:"Required,omitnil,omitempty" name:"Required"` } @@ -7098,7 +7112,6 @@ type LoginSettings struct { KeyIds []*string `json:"KeyIds,omitnil,omitempty" name:"KeyIds"` // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为true。取值范围:
  • true:表示保持镜像的登录设置
  • false:表示不保持镜像的登录设置
  • 默认取值:false。 - // 注意:此字段可能返回 null,表示取不到有效值。 KeepImageLogin *string `json:"KeepImageLogin,omitnil,omitempty" name:"KeepImageLogin"` } @@ -7810,6 +7823,74 @@ func (r *ModifyInstancesChargeTypeResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type ModifyInstancesDisasterRecoverGroupRequestParams struct { + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为1 + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // 分散置放群组ID,可使用[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitnil,omitempty" name:"DisasterRecoverGroupId"` + + // 是否强制更换实例宿主机。取值范围:
  • true:表示允许实例更换宿主机,允许重启实例。本地盘子机不支持指定此参数。

  • false:不允许实例更换宿主机,只在当前宿主机上加入置放群组。这可能导致更换置放群组失败。


  • 默认取值:false + Force *bool `json:"Force,omitnil,omitempty" name:"Force"` +} + +type ModifyInstancesDisasterRecoverGroupRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为1 + InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` + + // 分散置放群组ID,可使用[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitnil,omitempty" name:"DisasterRecoverGroupId"` + + // 是否强制更换实例宿主机。取值范围:
  • true:表示允许实例更换宿主机,允许重启实例。本地盘子机不支持指定此参数。

  • false:不允许实例更换宿主机,只在当前宿主机上加入置放群组。这可能导致更换置放群组失败。


  • 默认取值:false + Force *bool `json:"Force,omitnil,omitempty" name:"Force"` +} + +func (r *ModifyInstancesDisasterRecoverGroupRequest) 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 *ModifyInstancesDisasterRecoverGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "DisasterRecoverGroupId") + delete(f, "Force") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesDisasterRecoverGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstancesDisasterRecoverGroupResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyInstancesDisasterRecoverGroupResponse struct { + *tchttp.BaseResponse + Response *ModifyInstancesDisasterRecoverGroupResponseParams `json:"Response"` +} + +func (r *ModifyInstancesDisasterRecoverGroupResponse) 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 *ModifyInstancesDisasterRecoverGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type ModifyInstancesProjectRequestParams struct { // 一个或多个待操作的实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 @@ -7937,13 +8018,13 @@ type ModifyInstancesVpcAttributeRequestParams struct { // 待操作的实例ID数组。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口返回值中的`InstanceId`获取。 InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` - // 私有网络相关信息配置,通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。
  • 当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。
  • 可通过`PrivateIpAddresses`指定私有网络子网IP,若需指定则所有已指定的实例均需要指定子网IP,此时`InstanceIds`与`PrivateIpAddresses`一一对应。
  • 不指定`PrivateIpAddresses`时随机分配私有网络子网IP。 + // 私有网络相关信息配置,通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。
  • 当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。
  • 可通过`PrivateIpAddresses`指定私有网络子网IP,若需指定则所有已指定的实例均需要指定子网IP,此时`InstanceIds`与`PrivateIpAddresses`一一对应。
  • 不指定`PrivateIpAddresses`时随机分配私有网络子网IP。
  • VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` - // 是否对运行中的实例选择强制关机。默认为TRUE。 + // 是否对运行中的实例选择强制关机。默认为true。 ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` - // 是否保留主机名。默认为FALSE。 + // 是否保留主机名。默认为false。 ReserveHostName *bool `json:"ReserveHostName,omitnil,omitempty" name:"ReserveHostName"` } @@ -7953,13 +8034,13 @@ type ModifyInstancesVpcAttributeRequest struct { // 待操作的实例ID数组。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口返回值中的`InstanceId`获取。 InstanceIds []*string `json:"InstanceIds,omitnil,omitempty" name:"InstanceIds"` - // 私有网络相关信息配置,通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。
  • 当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。
  • 可通过`PrivateIpAddresses`指定私有网络子网IP,若需指定则所有已指定的实例均需要指定子网IP,此时`InstanceIds`与`PrivateIpAddresses`一一对应。
  • 不指定`PrivateIpAddresses`时随机分配私有网络子网IP。 + // 私有网络相关信息配置,通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。
  • 当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。
  • 可通过`PrivateIpAddresses`指定私有网络子网IP,若需指定则所有已指定的实例均需要指定子网IP,此时`InstanceIds`与`PrivateIpAddresses`一一对应。
  • 不指定`PrivateIpAddresses`时随机分配私有网络子网IP。
  • VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitnil,omitempty" name:"VirtualPrivateCloud"` - // 是否对运行中的实例选择强制关机。默认为TRUE。 + // 是否对运行中的实例选择强制关机。默认为true。 ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` - // 是否保留主机名。默认为FALSE。 + // 是否保留主机名。默认为false。 ReserveHostName *bool `json:"ReserveHostName,omitnil,omitempty" name:"ReserveHostName"` } @@ -8137,7 +8218,7 @@ func (r *ModifyLaunchTemplateDefaultVersionResponse) FromJsonString(s string) er } type OperationCountLimit struct { - // 实例操作。取值范围:
  • `INSTANCE_DEGRADE`:降配操作
  • `INTERNET_CHARGE_TYPE_CHANGE`:修改网络带宽计费模式 + // 实例操作。取值范围:
  • `INSTANCE_DEGRADE`:降配操作
  • `INTERNET_CHARGE_TYPE_CHANGE`:修改网络带宽计费模式
  • Operation *string `json:"Operation,omitnil,omitempty" name:"Operation"` // 实例ID。 @@ -8631,7 +8712,7 @@ type RenewInstancesRequestParams struct { // 包年包月实例该参数为必传参数。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` - // 是否续费弹性数据盘。取值范围:
  • true:表示续费包年包月实例同时续费其挂载的弹性数据盘
  • false:表示续费包年包月实例同时不再续费其挂载的弹性数据盘

    默认取值:true。 + // 是否续费弹性数据盘。取值范围:
  • true:表示续费包年包月实例同时续费其挂载的弹性数据盘
  • false:表示续费包年包月实例同时不再续费其挂载的弹性数据盘

  • 默认取值:true。 RenewPortableDataDisk *bool `json:"RenewPortableDataDisk,omitnil,omitempty" name:"RenewPortableDataDisk"` } @@ -8645,7 +8726,7 @@ type RenewInstancesRequest struct { // 包年包月实例该参数为必传参数。 InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitnil,omitempty" name:"InstanceChargePrepaid"` - // 是否续费弹性数据盘。取值范围:
  • true:表示续费包年包月实例同时续费其挂载的弹性数据盘
  • false:表示续费包年包月实例同时不再续费其挂载的弹性数据盘

    默认取值:true。 + // 是否续费弹性数据盘。取值范围:
  • true:表示续费包年包月实例同时续费其挂载的弹性数据盘
  • false:表示续费包年包月实例同时不再续费其挂载的弹性数据盘

  • 默认取值:true。 RenewPortableDataDisk *bool `json:"RenewPortableDataDisk,omitnil,omitempty" name:"RenewPortableDataDisk"` } @@ -8961,11 +9042,9 @@ type ReservedInstancePrice struct { DiscountUsagePrice *float64 `json:"DiscountUsagePrice,omitnil,omitempty" name:"DiscountUsagePrice"` // 预支费用的折扣,如20.0代表2折。 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 FixedPriceDiscount *float64 `json:"FixedPriceDiscount,omitnil,omitempty" name:"FixedPriceDiscount"` // 后续费用的折扣,如20.0代表2折。 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 UsagePriceDiscount *float64 `json:"UsagePriceDiscount,omitnil,omitempty" name:"UsagePriceDiscount"` } @@ -9044,58 +9123,6 @@ type ReservedInstanceTypeItem struct { Prices []*ReservedInstancePriceItem `json:"Prices,omitnil,omitempty" name:"Prices"` } -type ReservedInstances struct { - // (此字段已废弃,建议使用字段:ReservedInstanceId)已购买的预留实例计费ID。形如:ri-rtbh4han。 - ReservedInstancesId *string `json:"ReservedInstancesId,omitnil,omitempty" name:"ReservedInstancesId"` - - // 预留实例计费的规格。形如:S3.MEDIUM4。 - // 返回项:预留实例计费规格列表 - InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` - - // 预留实例计费可购买的可用区。形如:ap-guangzhou-1。 - // 返回项:可用区列表 - Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"` - - // 预留实例计费开始时间。形如:1949-10-01 00:00:00 - StartTime *string `json:"StartTime,omitnil,omitempty" name:"StartTime"` - - // 预留实例计费到期时间。形如:1949-10-01 00:00:00 - EndTime *string `json:"EndTime,omitnil,omitempty" name:"EndTime"` - - // 预留实例计费【有效期】即预留实例计费购买时长。形如:31536000。 - // 计量单位:秒。 - Duration *int64 `json:"Duration,omitnil,omitempty" name:"Duration"` - - // 已购买的预留实例计费个数。形如:10。 - InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - - // 描述预留实例计费的平台描述(即操作系统)。形如:linux。 - // 返回项: linux 。 - ProductDescription *string `json:"ProductDescription,omitnil,omitempty" name:"ProductDescription"` - - // 预留实例计费购买的状态。形如:active - // 返回项: active (以创建) | pending (等待被创建) | retired (过期)。 - State *string `json:"State,omitnil,omitempty" name:"State"` - - // 可购买的预留实例计费类型的结算货币,使用ISO 4217标准货币代码。形如:USD。 - // 返回项:USD(美元)。 - CurrencyCode *string `json:"CurrencyCode,omitnil,omitempty" name:"CurrencyCode"` - - // 预留实例计费的付款类型。形如:All Upfront。 - // 返回项: All Upfront (预付全部费用)。 - OfferingType *string `json:"OfferingType,omitnil,omitempty" name:"OfferingType"` - - // 预留实例计费的类型。形如:S3。 - // 返回项:预留实例计费类型列表 - InstanceFamily *string `json:"InstanceFamily,omitnil,omitempty" name:"InstanceFamily"` - - // 已购买的预留实例计费ID。形如:ri-rtbh4han。 - ReservedInstanceId *string `json:"ReservedInstanceId,omitnil,omitempty" name:"ReservedInstanceId"` - - // 预留实例显示名称。形如:riname-01 - ReservedInstanceName *string `json:"ReservedInstanceName,omitnil,omitempty" name:"ReservedInstanceName"` -} - type ReservedInstancesOffering struct { // 预留实例计费可购买的可用区。形如:ap-guangzhou-1。 // 返回项:可用区列表 @@ -9394,7 +9421,7 @@ type ResetInstancesTypeRequestParams struct { // 调整后的实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口[`DescribeInstanceTypeConfigs`](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。 InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` - // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机。取值范围:
  • true:表示在正常关机失败后进行强制关机
  • false:表示在正常关机失败后不进行强制关机

    默认取值:false。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机。取值范围:
  • true:表示在正常关机失败后进行强制关机

  • false:表示在正常关机失败后不进行强制关机


  • 默认取值:false。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` } @@ -9407,7 +9434,7 @@ type ResetInstancesTypeRequest struct { // 调整后的实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口[`DescribeInstanceTypeConfigs`](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。 InstanceType *string `json:"InstanceType,omitnil,omitempty" name:"InstanceType"` - // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机。取值范围:
  • true:表示在正常关机失败后进行强制关机
  • false:表示在正常关机失败后不进行强制关机

    默认取值:false。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机。取值范围:
  • true:表示在正常关机失败后进行强制关机

  • false:表示在正常关机失败后不进行强制关机


  • 默认取值:false。

    强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 ForceStop *bool `json:"ForceStop,omitnil,omitempty" name:"ForceStop"` } @@ -9580,7 +9607,7 @@ type RunInstancesRequestParams struct { // 购买实例数量。包年包月实例取值范围:[1,500],按量计费实例取值范围:[1,500]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持60个字符(包含模式串)。
  • + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持128个字符(包含模式串)。
  • InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 @@ -9678,7 +9705,7 @@ type RunInstancesRequest struct { // 购买实例数量。包年包月实例取值范围:[1,500],按量计费实例取值范围:[1,500]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 InstanceCount *int64 `json:"InstanceCount,omitnil,omitempty" name:"InstanceCount"` - // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持60个字符(包含模式串)。
  • + // 实例显示名称。
  • 不指定实例显示名称则默认显示‘未命名’。
  • 购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
  • 购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。
  • 最多支持128个字符(包含模式串)。
  • InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 @@ -9813,8 +9840,7 @@ func (r *RunInstancesResponse) FromJsonString(s string) error { } type RunMonitorServiceEnabled struct { - // 是否开启[云监控](/document/product/248)服务。取值范围:
  • true:表示开启云监控服务
  • false:表示不开启云监控服务

    默认取值:true。 - // 注意:此字段可能返回 null,表示取不到有效值。 + // 是否开启[云监控](/document/product/248)服务。取值范围:
  • true:表示开启云监控服务
  • false:表示不开启云监控服务

  • 默认取值:true。 Enabled *bool `json:"Enabled,omitnil,omitempty" name:"Enabled"` } @@ -9846,11 +9872,9 @@ type Snapshot struct { type SpotMarketOptions struct { // 竞价出价 - // 注意:此字段可能返回 null,表示取不到有效值。 MaxPrice *string `json:"MaxPrice,omitnil,omitempty" name:"MaxPrice"` // 竞价请求类型,当前仅支持类型:one-time - // 注意:此字段可能返回 null,表示取不到有效值。 SpotInstanceType *string `json:"SpotInstanceType,omitnil,omitempty" name:"SpotInstanceType"` } @@ -10003,15 +10027,12 @@ func (r *StopInstancesResponse) FromJsonString(s string) error { type StorageBlock struct { // HDD本地存储类型,值为:LOCAL_PRO. - // 注意:此字段可能返回 null,表示取不到有效值。 Type *string `json:"Type,omitnil,omitempty" name:"Type"` // HDD本地存储的最小容量 - // 注意:此字段可能返回 null,表示取不到有效值。 MinSize *int64 `json:"MinSize,omitnil,omitempty" name:"MinSize"` // HDD本地存储的最大容量 - // 注意:此字段可能返回 null,表示取不到有效值。 MaxSize *int64 `json:"MaxSize,omitnil,omitempty" name:"MaxSize"` } @@ -10141,13 +10162,13 @@ type SystemDisk struct { //
  • CLOUD_BASIC:普通云硬盘
  • //
  • CLOUD_SSD:SSD云硬盘
  • //
  • CLOUD_PREMIUM:高性能云硬盘
  • - //
  • CLOUD_BSSD:通用性SSD云硬盘
  • + //
  • CLOUD_BSSD:通用型SSD云硬盘
  • //
  • CLOUD_HSSD:增强型SSD云硬盘
  • //
  • CLOUD_TSSD:极速型SSD云硬盘

  • // 默认取值:当前有库存的硬盘类型。 DiskType *string `json:"DiskType,omitnil,omitempty" name:"DiskType"` - // 系统盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID。暂时不支持该参数。 + // 系统盘ID。 // 该参数目前仅用于`DescribeInstances`等查询类接口的返回参数,不可用于`RunInstances`等写接口的入参。 DiskId *string `json:"DiskId,omitnil,omitempty" name:"DiskId"` @@ -10155,13 +10176,11 @@ type SystemDisk struct { DiskSize *int64 `json:"DiskSize,omitnil,omitempty" name:"DiskSize"` // 所属的独享集群ID。 - // 注意:此字段可能返回 null,表示取不到有效值。 CdcId *string `json:"CdcId,omitnil,omitempty" name:"CdcId"` // 磁盘名称,长度不超过128 个字符。 // // 该参数正在邀测中,暂未开放使用。 - // 注意:此字段可能返回 null,表示取不到有效值。 DiskName *string `json:"DiskName,omitnil,omitempty" name:"DiskName"` } @@ -10175,11 +10194,9 @@ type Tag struct { type TagSpecification struct { // 标签绑定的资源类型,云服务器为“instance”,专用宿主机为“host”,镜像为“image”,密钥为“keypair” - // 注意:此字段可能返回 null,表示取不到有效值。 ResourceType *string `json:"ResourceType,omitnil,omitempty" name:"ResourceType"` // 标签对列表 - // 注意:此字段可能返回 null,表示取不到有效值。 Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"` } diff --git a/vendor/modules.txt b/vendor/modules.txt index 7c8e06866c..0c5e6ff8fe 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1086,7 +1086,7 @@ github.com/t-yuki/gocover-cobertura # github.com/tdakkota/asciicheck v0.2.0 ## explicit; go 1.18 github.com/tdakkota/asciicheck -# github.com/tencentcloud/tencentcloud-sdk-go-intl-en v3.0.1114+incompatible +# github.com/tencentcloud/tencentcloud-sdk-go-intl-en v3.0.1161+incompatible ## explicit github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/errors @@ -1094,6 +1094,7 @@ github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/profile github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/regions +github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/cvm/v20170312 github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/mdl/v20200326 github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/privatedns/v20201028 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/antiddos v1.0.799 @@ -1165,7 +1166,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.1078 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1122 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1126 ## explicit; go 1.11 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors @@ -1179,7 +1180,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter/v20230110 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip/v20221121 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1053 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1126 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index e3697046a0..d664336cae 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -258,8 +258,8 @@ The following arguments are supported: * `system_disk_size` - (Optional, Int) Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop. * `system_disk_type` - (Optional, String) System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_BASIC`: cloud disk, `CLOUD_SSD`: cloud SSD disk, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_BSSD`: Basic SSD, `CLOUD_HSSD`: Enhanced SSD, `CLOUD_TSSD`: Tremendous SSD. NOTE: If modified, the instance may force stop. * `tags` - (Optional, Map) A mapping of tags to assign to the resource. For tag limits, please refer to [Use Limits](https://intl.cloud.tencent.com/document/product/651/13354). -* `user_data_raw` - (Optional, String, ForceNew) The user data to be injected into this instance, in plain text. Conflicts with `user_data`. Up to 16 KB after base64 encoded. -* `user_data` - (Optional, String, ForceNew) The user data to be injected into this instance. Must be base64 encoded and up to 16 KB. +* `user_data_raw` - (Optional, String) The user data to be injected into this instance, in plain text. Conflicts with `user_data`. Up to 16 KB after base64 encoded. +* `user_data` - (Optional, String) The user data to be injected into this instance. Must be base64 encoded and up to 16 KB. * `vpc_id` - (Optional, String) The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set. The `data_disks` object supports the following: