diff --git a/go.mod b/go.mod index 54c05e3ca1..4ee7a38858 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.283 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.412 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.412 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.413 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.385 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.359 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.335 @@ -41,6 +41,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.383 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.397 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.199 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.413 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.329 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.391 diff --git a/go.sum b/go.sum index 42c6fd81b6..76298c32b6 100644 --- a/go.sum +++ b/go.sum @@ -498,6 +498,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.409 h1:/klI github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.409/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.412 h1:ASERVEdXRfME9KzbVr4aXrEnvTfqr4eZRRsgyWrF6Hw= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.412/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.413 h1:DvydszksqriOr0Zze9OREt8OrIrtMSFcVD8lz3xNAQA= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.413/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.385 h1:8bwloRxRwSADSK48KxaUeO9JHmmgniNGJbA7Or/HUEk= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.385/go.mod h1:PMxA0L4o8Fbx/6+ju1cAMAU7x2bV4C6e/LTqVe745yM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.359 h1:cNKqelPgUxrJkLY0Azd2QHr/UMYOPPnmqs88clt2akk= @@ -517,6 +519,9 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.397/go.mod h1 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.199 h1:rSDQeqvV4khOJUyg6xmMYF26CRd+WtSYvfwP6N72NP0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.199/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.199/go.mod h1:r8txjlw4DjLDZFOpnPC/hOFHr1VckZc0jjBK6XIFLP0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.413 h1:9v95vMBfqvBciwagN+ZqP6Ue3iBFYZRVQga4c1yL5Uc= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.413/go.mod h1:nG/8Iz/MtV4zBxz9ToLJ90O4ocdME9WUKwims/bitr4= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.199 h1:2jsGprrewRIP3smcTsY5GpEuOuJ+qyV/BN3Py0Ivf1o= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.199/go.mod h1:f5GhbJyuYQBzRaDHGe3I4U9utb0Pmx2NlI+XcqSQRp0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.329 h1:T4k3VMXsjYSvXr9SlfZj5tYfpuOOtjMqGoiZhj5i1Sk= @@ -555,6 +560,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.398 h1:1JVKMl+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.398/go.mod h1:+TD/TRnb5WrLcE2SL3db7ROOpwED5gBfbC19gaXnGxs= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 h1:hMBLtiJPnZ9GvA677cTB6ELBR6B68wCR2QY1sNoGQc4= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199/go.mod h1:nnY91/H3j/Gu7V/oCA6Zeg8T5D3q36EUdBh4EjmHwqY= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.413 h1:rGHxpfHTpg3C5xB6qCEG/Kt6gUKiVmxl5z5PudeZbIc= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.413/go.mod h1:73R0XHOGnjm/UkYMa5YQFx+VkBDfRfjl7L06HC4WpFo= github.com/tencentyun/cos-go-sdk-v5 v0.7.33 h1:5jmJU7U/1nf/7ZPDkrUL8KlF1oDUzTHsdtLNY6x0hq4= github.com/tencentyun/cos-go-sdk-v5 v0.7.33/go.mod h1:4E4+bQ2gBVJcgEC9Cufwylio4mXOct2iu05WjgEBx1o= github.com/tetafro/godot v0.3.7 h1:+mecr7RKrUKB5UQ1gwqEMn13sDKTyDR8KNIquB9mm+8= diff --git a/tencentcloud/connectivity/client.go b/tencentcloud/connectivity/client.go index 4617aefea1..c197249452 100644 --- a/tencentcloud/connectivity/client.go +++ b/tencentcloud/connectivity/client.go @@ -37,6 +37,7 @@ import ( es "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es/v20180416" gaap "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap/v20180529" kms "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118" + lighthouse "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324" mongodb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725" monitor "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor/v20180724" postgre "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312" @@ -106,6 +107,7 @@ type TencentCloudClient struct { dnsPodConn *dnspod.Client privateDnsConn *privatedns.Client antiddosConn *antiddos.Client + lighthouseConn *lighthouse.Client } // NewClientProfile returns a new ClientProfile @@ -657,6 +659,18 @@ func (me *TencentCloudClient) UseClsClient() *cls.Client { return me.clsConn } +// UseLighthouseClient return Lighthouse client for service +func (me *TencentCloudClient) UseLighthouseClient() *lighthouse.Client { + if me.lighthouseConn != nil { + return me.lighthouseConn + } + cpf := me.NewClientProfile(300) + me.lighthouseConn, _ = lighthouse.NewClient(me.Credential, me.Region, cpf) + me.lighthouseConn.WithHttpTransport(&LogRoundTripper{}) + + return me.lighthouseConn +} + // UseDnsPodClient return DnsPod client for service func (me *TencentCloudClient) UseDnsPodClient() *dnspod.Client { if me.dnsPodConn != nil { diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 90822c2ec4..b5b51d38c8 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -615,6 +615,11 @@ CLS tencentcloud_cls_machine_group tencentcloud_cls_cos_shipper tencentcloud_cls_index + +Lighthouse + Resource + tencentcloud_lighthouse_instance + */ package tencentcloud @@ -1103,6 +1108,7 @@ func Provider() terraform.ResourceProvider { "tencentcloud_cls_machine_group": resourceTencentCloudClsMachineGroup(), "tencentcloud_cls_cos_shipper": resourceTencentCloudClsCosShipper(), "tencentcloud_cls_index": resourceTencentCloudClsIndex(), + "tencentcloud_lighthouse_instance": resourceTencentCloudLighthouseInstance(), }, ConfigureFunc: providerConfigure, diff --git a/tencentcloud/resource_tc_lighthouse_instance.go b/tencentcloud/resource_tc_lighthouse_instance.go new file mode 100644 index 0000000000..e6297728f8 --- /dev/null +++ b/tencentcloud/resource_tc_lighthouse_instance.go @@ -0,0 +1,606 @@ +/* +Provides a resource to create a lighthouse instance. + +Example Usage + +```hcl +resource "tencentcloud_lighthouse_instance" "lighthouse" { + bundle_id = "bundle2022_gen_01" + blueprint_id = "lhbp-f1lkcd41" + + period = 1 + renew_flag = "NOTIFY_AND_AUTO_RENEW" + + instance_name = "hello world" + zone = "ap-guangzhou-3" + + containers { + container_image = "ccr.ccs.tencentyun.com/qcloud/nginx" + container_name = "nginx" + envs { + key = "key" + value = "value" + } + envs { + key = "key2" + value = "value2" + } + publish_ports { + host_port = 80 + container_port = 80 + ip = "127.0.0.1" + protocol = "tcp" + } + publish_ports { + host_port = 36000 + container_port = 36000 + ip = "127.0.0.1" + protocol = "tcp" + } + volumes { + container_path = "/data" + host_path = "/tmp" + } + volumes { + container_path = "/var" + host_path = "/tmp" + } + command = "ls -l" + } + + containers { + container_image = "ccr.ccs.tencentyun.com/qcloud/resty" + container_name = "resty" + envs { + key = "key2" + value = "value2" + } + publish_ports { + host_port = 80 + container_port = 80 + ip = "127.0.0.1" + protocol = "udp" + } + + volumes { + container_path = "/var" + host_path = "/tmp" + } + command = "echo \"hello\"" + } +} +``` + +*/ +package tencentcloud + +import ( + "context" + "fmt" + "log" + + lighthouse "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func resourceTencentCloudLighthouseInstance() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudLighthouseInstanceCreate, + Read: resourceTencentCloudLighthouseInstanceRead, + Delete: resourceTencentCloudLighthouseInstanceDelete, + Update: resourceTencentCloudLighthouseInstanceUpdate, + Schema: map[string]*schema.Schema{ + "bundle_id": { + Type: schema.TypeString, + Required: true, + Description: "ID of the Lighthouse package.", + }, + "blueprint_id": { + Type: schema.TypeString, + Required: true, + Description: "ID of the Lighthouse image.", + }, + "period": { + Type: schema.TypeInt, + Required: true, + Description: "Subscription period in months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36, 48, 60.", + }, + "renew_flag": { + Type: schema.TypeString, + Required: true, + Description: "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. You need to manually renew DISABLE_NOTIFY_AND_AUTO_RENEW: neither notify upon expiration nor renew automatically. " + + "Default value: NOTIFY_AND_MANUAL_RENEW.", + }, + "instance_name": { + Type: schema.TypeString, + Required: true, + Description: "The display name of the Lighthouse instance.", + }, + "zone": { + Type: schema.TypeString, + Optional: true, + Description: "List of availability zones. A random AZ is selected by default.", + }, + "dry_run": { + Type: schema.TypeBool, + Optional: true, + Description: "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.", + }, + "client_token": { + Type: schema.TypeString, + Optional: true, + Description: "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.", + }, + "login_configuration": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Description: "Login password of the instance. It is only available for Windows instances. If it is not specified, it means that the user choose to set the login password after the instance creation.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auto_generate_password": { + Type: schema.TypeString, + Required: true, + Description: "whether auto generate password. if false, need set password.", + }, + "password": { + Type: schema.TypeString, + Optional: true, + Description: "Login password.", + }, + }, + }, + }, + "containers": { + Type: schema.TypeList, + Optional: true, + Description: "Configuration of the containers to create.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "container_image": { + Type: schema.TypeString, + Optional: true, + Description: "Container image address.", + }, + "container_name": { + Type: schema.TypeString, + Optional: true, + Description: "Container name.", + }, + "envs": { + Type: schema.TypeList, + Optional: true, + Description: "List of environment variables.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key": { + Type: schema.TypeString, + Required: true, + Description: "Environment variable key.", + }, + "value": { + Type: schema.TypeString, + Required: true, + Description: "Environment variable value.", + }, + }, + }, + }, + "publish_ports": { + Type: schema.TypeList, + Optional: true, + Description: "List of mappings of container ports and host ports.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "host_port": { + Type: schema.TypeInt, + Required: true, + Description: "Host port.", + }, + "container_port": { + Type: schema.TypeInt, + Required: true, + Description: "Container port.", + }, + "ip": { + Type: schema.TypeString, + Optional: true, + Description: "External IP. It defaults to 0.0.0.0.", + }, + "protocol": { + Type: schema.TypeString, + Optional: true, + Description: "The protocol defaults to tcp. Valid values: tcp, udp and sctp.", + }, + }, + }, + }, + "volumes": { + Type: schema.TypeList, + Optional: true, + Description: "List of container mount volumes.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "container_path": { + Type: schema.TypeString, + Required: true, + Description: "Container path.", + }, + "host_path": { + Type: schema.TypeString, + Required: true, + Description: "Host path.", + }, + }, + }, + }, + "command": { + Type: schema.TypeString, + Optional: true, + Description: "The command to run.", + }, + }, + }, + }, + }, + } +} + +func resourceTencentCloudLighthouseInstanceCreate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_lighthouse_instance.create")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + var ( + request = lighthouse.NewCreateInstancesRequest() + instanceId string + ) + + if v, ok := d.GetOk("bundle_id"); ok { + request.BundleId = helper.String(v.(string)) + } + + if v, ok := d.GetOk("blueprint_id"); ok { + request.BlueprintId = helper.String(v.(string)) + } + + instanceChargePrepaid := lighthouse.InstanceChargePrepaid{} + if v, ok := d.GetOk("period"); ok { + instanceChargePrepaid.Period = helper.IntInt64(v.(int)) + } + if v, ok := d.GetOk("renew_flag"); ok { + instanceChargePrepaid.RenewFlag = helper.String(v.(string)) + } + request.InstanceChargePrepaid = &instanceChargePrepaid + + if v, ok := d.GetOk("instance_name"); ok { + request.InstanceName = helper.String(v.(string)) + } + + if v, ok := d.GetOk("zone"); ok { + request.Zones = append(request.Zones, helper.String(v.(string))) + } + + if v, ok := d.GetOk("dry_run"); ok { + request.DryRun = helper.Bool(v.(bool)) + } + + if v, ok := d.GetOk("client_token"); ok { + request.ClientToken = helper.String(v.(string)) + } + + if loginConfigurationMap, ok := helper.InterfacesHeadMap(d, "login_configuration"); ok { + loginConfiguration := lighthouse.LoginConfiguration{} + if v, ok := loginConfigurationMap["auto_generate_password"]; ok { + loginConfiguration.AutoGeneratePassword = helper.String(v.(string)) + } + if v, ok := loginConfigurationMap["password"]; ok { + loginConfiguration.Password = helper.String(v.(string)) + } + request.LoginConfiguration = &loginConfiguration + } + + if v, ok := d.GetOk("containers"); ok { + for _, container := range v.([]interface{}) { + dockerContainerConfiguration := lighthouse.DockerContainerConfiguration{} + containerMap := container.(map[string]interface{}) + if v, ok := containerMap["container_image"]; ok { + dockerContainerConfiguration.ContainerImage = helper.String(v.(string)) + } + if v, ok := containerMap["container_name"]; ok { + dockerContainerConfiguration.ContainerName = helper.String(v.(string)) + } + if v, ok := containerMap["envs"]; ok { + for _, env := range v.([]interface{}) { + containerEnv := lighthouse.ContainerEnv{} + envMap := env.(map[string]interface{}) + if v, ok := envMap["key"]; ok { + containerEnv.Key = helper.String(v.(string)) + } + if v, ok := envMap["value"]; ok { + containerEnv.Value = helper.String(v.(string)) + } + dockerContainerConfiguration.Envs = append(dockerContainerConfiguration.Envs, &containerEnv) + } + } + if v, ok := containerMap["publish_ports"]; ok { + for _, publishPort := range v.([]interface{}) { + dockerContainerPublishPort := lighthouse.DockerContainerPublishPort{} + publishPortMap := publishPort.(map[string]interface{}) + if v, ok := publishPortMap["host_port"]; ok { + dockerContainerPublishPort.HostPort = helper.IntInt64(v.(int)) + } + if v, ok := publishPortMap["container_port"]; ok { + dockerContainerPublishPort.ContainerPort = helper.IntInt64(v.(int)) + } + if v, ok := publishPortMap["ip"]; ok { + dockerContainerPublishPort.Ip = helper.String(v.(string)) + } + if v, ok := publishPortMap["protocol"]; ok { + dockerContainerPublishPort.Protocol = helper.String(v.(string)) + } + dockerContainerConfiguration.PublishPorts = append(dockerContainerConfiguration.PublishPorts, &dockerContainerPublishPort) + } + } + if v, ok := containerMap["volumes"]; ok { + for _, volume := range v.([]interface{}) { + dockerContainerVolume := lighthouse.DockerContainerVolume{} + volumeMap := volume.(map[string]interface{}) + if v, ok := volumeMap["container_path"]; ok { + dockerContainerVolume.ContainerPath = helper.String(v.(string)) + } + if v, ok := volumeMap["host_path"]; ok { + dockerContainerVolume.HostPath = helper.String(v.(string)) + } + dockerContainerConfiguration.Volumes = append(dockerContainerConfiguration.Volumes, &dockerContainerVolume) + } + } + if v, ok := containerMap["command"]; ok { + dockerContainerConfiguration.Command = helper.String(v.(string)) + } + request.Containers = append(request.Containers, &dockerContainerConfiguration) + } + } + + result, err := meta.(*TencentCloudClient).apiV3Conn.UseLighthouseClient().CreateInstances(request) + + if err != nil { + log.Printf("[CRITAL]%s create lighthouse instance failed, reason:%+v", logId, err) + return err + } + + instanceId = *result.Response.InstanceIdSet[0] + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + lighthouseService := LightHouseService{client: meta.(*TencentCloudClient).apiV3Conn} + + err = resource.Retry(5*readRetryTimeout, func() *resource.RetryError { + instance, errRet := lighthouseService.DescribeLighthouseInstanceById(ctx, instanceId) + if errRet != nil { + return retryError(errRet, InternalError) + } + if instance != nil && (*instance.InstanceState == "RUNNING") { + return nil + } + return resource.RetryableError(fmt.Errorf("lighthouse instance status is %s, retry...", *instance.InstanceState)) + }) + if err != nil { + return err + } + + d.SetId(instanceId) + + return resourceTencentCloudLighthouseInstanceRead(d, meta) +} + +func resourceTencentCloudLighthouseInstanceRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_lighthouse_instance.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + ctx := context.WithValue(context.TODO(), logIdKey, logId) + lighthouseService := LightHouseService{client: meta.(*TencentCloudClient).apiV3Conn} + + id := d.Id() + + instance, err := lighthouseService.DescribeLighthouseInstanceById(ctx, id) + + if err != nil { + return err + } + + if instance == nil { + d.SetId("") + return fmt.Errorf("resource `lighthouse instance` %s does not exist", id) + } + + if instance.BundleId != nil { + _ = d.Set("bundle_id", instance.BundleId) + } + + if instance.BlueprintId != nil { + _ = d.Set("blueprint_id", instance.BlueprintId) + } + + if instance.InstanceChargeType != nil { + instanceChargePrepaidMap := map[string]interface{}{ + "renew_flag": instance.RenewFlag, + } + _ = d.Set("instance_charge_prepaid", []interface{}{instanceChargePrepaidMap}) + } + + if instance.InstanceName != nil { + _ = d.Set("instance_name", instance.InstanceName) + } + + if instance.Zone != nil { + _ = d.Set("zone", instance.Zone) + } + + return nil +} + +func resourceTencentCloudLighthouseInstanceUpdate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_lighthouse_instance.update")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + var ( + request = lighthouse.NewModifyInstancesAttributeRequest() + ) + id := d.Id() + + request.InstanceIds = append(request.InstanceIds, helper.String(id)) + + if d.HasChange("instance_name") { + if v, ok := d.GetOk("instance_name"); ok { + request.InstanceName = helper.String(v.(string)) + } + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + result, e := meta.(*TencentCloudClient).apiV3Conn.UseLighthouseClient().ModifyInstancesAttribute(request) + if e != nil { + return retryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + return nil + }) + + if err != nil { + return err + } + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + service := LightHouseService{client: meta.(*TencentCloudClient).apiV3Conn} + err = resource.Retry(5*readRetryTimeout, func() *resource.RetryError { + instance, errRet := service.DescribeLighthouseInstanceById(ctx, id) + if errRet != nil { + return retryError(errRet, InternalError) + } + if instance.LatestOperationState == nil { + return resource.RetryableError(fmt.Errorf("waiting for instance operation update")) + } + if *instance.LatestOperationState == "OPERATING" { + return resource.RetryableError(fmt.Errorf("waiting for instance %s operation", id)) + } + if *instance.LatestOperationState == "FAILED" { + return resource.NonRetryableError(fmt.Errorf("failed operation")) + } + return nil + }) + + if err != nil { + return err + } + } + + if d.HasChange("bundle_id") { + old, _ := d.GetChange("bundle_id") + _ = d.Set("bundle_id", old) + return fmt.Errorf("`bundle_id` do not support change now.") + } + + if d.HasChange("blueprint_id") { + old, _ := d.GetChange("blueprint_id") + _ = d.Set("blueprint_id", old) + return fmt.Errorf("`blueprint_id` do not support change now.") + } + + if d.HasChange("period") { + old, _ := d.GetChange("period") + _ = d.Set("period", old) + return fmt.Errorf("`period` do not support change now.") + } + + if d.HasChange("renew_flag") { + old, _ := d.GetChange("renew_flag") + _ = d.Set("renew_flag", old) + return fmt.Errorf("`renew_flag` do not support change now.") + } + + if d.HasChange("zone") { + old, _ := d.GetChange("zone") + _ = d.Set("zone", old) + return fmt.Errorf("`zone` do not support change now.") + } + + if d.HasChange("dry_run") { + old, _ := d.GetChange("dry_run") + _ = d.Set("dry_run", old) + return fmt.Errorf("`dry_run` do not support change now.") + } + + if d.HasChange("client_token") { + old, _ := d.GetChange("client_token") + _ = d.Set("client_token", old) + return fmt.Errorf("`client_token` do not support change now.") + } + + if d.HasChange("login_configuration") { + old, _ := d.GetChange("login_configuration") + _ = d.Set("login_configuration", old) + return fmt.Errorf("`login_configuration` do not support change now.") + } + + if d.HasChange("containers") { + old, _ := d.GetChange("containers") + _ = d.Set("containers", old) + return fmt.Errorf("`containers` do not support change now.") + } + + return resourceTencentCloudLighthouseInstanceRead(d, meta) +} + +func resourceTencentCloudLighthouseInstanceDelete(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_lighthouse_instance.delete")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + ctx := context.WithValue(context.TODO(), logIdKey, logId) + service := LightHouseService{client: meta.(*TencentCloudClient).apiV3Conn} + id := d.Id() + + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + if err := service.IsolateLighthouseInstanceById(ctx, id); err != nil { + return retryError(err) + } + return nil + }) + if err != nil { + return err + } + + err = resource.Retry(5*readRetryTimeout, func() *resource.RetryError { + instance, errRet := service.DescribeLighthouseInstanceById(ctx, id) + if errRet != nil { + return retryError(errRet, InternalError) + } + if instance.LatestOperationState == nil { + return resource.RetryableError(fmt.Errorf("waiting for instance operation update")) + } + if *instance.LatestOperationState == "FAILED" { + return resource.NonRetryableError(fmt.Errorf("failed operation")) + } + if *instance.InstanceState == "SHUTDOWN" && *instance.LatestOperationState != "OPERATING" { + return nil + } + return resource.RetryableError(fmt.Errorf("instance status is %s, retry...", *instance.InstanceState)) + }) + + if err != nil { + return err + } + + if err := service.DeleteLighthouseInstanceById(ctx, id); err != nil { + return err + } + return nil +} diff --git a/tencentcloud/resource_tc_lighthouse_instance_test.go b/tencentcloud/resource_tc_lighthouse_instance_test.go new file mode 100644 index 0000000000..f2b3a75ea0 --- /dev/null +++ b/tencentcloud/resource_tc_lighthouse_instance_test.go @@ -0,0 +1,92 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccTencentCloudLighthouseInstance_basic(t *testing.T) { + t.Parallel() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccLighthouseInstance, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("tencentcloud_lighthouse_instance.instance", "instance_name", "terraform"), + ), + }, + }, + }) +} + +const testAccLighthouseInstance = ` +resource "tencentcloud_lighthouse_instance" "instance" { + bundle_id = "bundle2022_gen_01" + blueprint_id = "lhbp-f1lkcd41" + + period = 1 + renew_flag = "NOTIFY_AND_AUTO_RENEW" + + instance_name = "terraform" + zone = "ap-guangzhou-3" + + containers { + container_image = "ccr.ccs.tencentyun.com/qcloud/nginx" + container_name = "nginx" + envs { + key = "key" + value = "value" + } + envs { + key = "key2" + value = "value2" + } + publish_ports { + host_port = 80 + container_port = 80 + ip = "127.0.0.1" + protocol = "tcp" + } + publish_ports { + host_port = 36000 + container_port = 36000 + ip = "127.0.0.1" + protocol = "tcp" + } + volumes { + container_path = "/data" + host_path = "/tmp" + } + volumes { + container_path = "/var" + host_path = "/tmp" + } + command = "ls -l" + } + + containers { + container_image = "ccr.ccs.tencentyun.com/qcloud/resty" + container_name = "resty" + envs { + key = "key2" + value = "value2" + } + publish_ports { + host_port = 80 + container_port = 80 + ip = "127.0.0.1" + protocol = "udp" + } + + volumes { + container_path = "/var" + host_path = "/tmp" + } + command = "echo \"hello\"" + } +} +` diff --git a/tencentcloud/service_tencentcloud_lighthouse.go b/tencentcloud/service_tencentcloud_lighthouse.go new file mode 100644 index 0000000000..4a0762bdb7 --- /dev/null +++ b/tencentcloud/service_tencentcloud_lighthouse.go @@ -0,0 +1,119 @@ +package tencentcloud + +import ( + "context" + "log" + + lighthouse "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit" +) + +type LightHouseService struct { + client *connectivity.TencentCloudClient +} + +// lighthouse instance + +func (me *LightHouseService) DescribeLighthouseInstanceById(ctx context.Context, instanceId string) (instance *lighthouse.Instance, errRet error) { + var ( + logId = getLogId(ctx) + request = lighthouse.NewDescribeInstancesRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", + logId, "query object", request.ToJsonString(), errRet.Error()) + } + }() + + request.InstanceIds = append(request.InstanceIds, helper.String(instanceId)) + ratelimit.Check(request.GetAction()) + + var offset int64 = 0 + var pageSize int64 = 100 + instances := make([]*lighthouse.Instance, 0) + + for { + request.Offset = &offset + request.Limit = &pageSize + ratelimit.Check(request.GetAction()) + response, err := me.client.UseLighthouseClient().DescribeInstances(request) + if err != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", + logId, request.GetAction(), request.ToJsonString(), err.Error()) + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceSet) < 1 { + break + } + instances = append(instances, response.Response.InstanceSet...) + if len(response.Response.InstanceSet) < int(pageSize) { + break + } + offset += pageSize + } + + if len(instances) < 1 { + return + } + instance = instances[0] + + return +} + +func (me *LightHouseService) DeleteLighthouseInstanceById(ctx context.Context, id string) (errRet error) { + logId := getLogId(ctx) + + request := lighthouse.NewTerminateInstancesRequest() + request.InstanceIds = append(request.InstanceIds, &id) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", + logId, "delete object", request.ToJsonString(), errRet.Error()) + } + }() + + ratelimit.Check(request.GetAction()) + response, err := me.client.UseLighthouseClient().TerminateInstances(request) + if err != nil { + errRet = err + return err + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + return +} + +func (me *LightHouseService) IsolateLighthouseInstanceById(ctx context.Context, id string) (errRet error) { + logId := getLogId(ctx) + + request := lighthouse.NewIsolateInstancesRequest() + request.InstanceIds = append(request.InstanceIds, &id) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", + logId, "delete object", request.ToJsonString(), errRet.Error()) + } + }() + + ratelimit.Check(request.GetAction()) + response, err := me.client.UseLighthouseClient().IsolateInstances(request) + if err != nil { + errRet = err + return err + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + return +} 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 8130befffc..9635eff36b 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 @@ -254,7 +254,7 @@ func CompleteCommonParams(request Request, region 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.412" + params["RequestClient"] = "SDK_GO_1.0.413" } func ConstructParams(req Request) (err error) { diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/LICENSE b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/LICENSE new file mode 100644 index 0000000000..efc75a2253 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2017-2018 Tencent Ltd. + + 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. diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324/client.go new file mode 100644 index 0000000000..286932c8ef --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324/client.go @@ -0,0 +1,4898 @@ +// 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 v20200324 + +import ( + "context" + "errors" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const APIVersion = "2020-03-24" + +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 NewApplyInstanceSnapshotRequest() (request *ApplyInstanceSnapshotRequest) { + request = &ApplyInstanceSnapshotRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ApplyInstanceSnapshot") + + + return +} + +func NewApplyInstanceSnapshotResponse() (response *ApplyInstanceSnapshotResponse) { + response = &ApplyInstanceSnapshotResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ApplyInstanceSnapshot +// 本接口(ApplyInstanceSnapshot)用于回滚指定实例的系统盘快照。 +// +//
  • 仅支持回滚到原系统盘。
  • +// +//
  • 用于回滚的快照必须处于 NORMAL 状态。快照状态可以通 DescribeSnapshots 接口查询,见输出参数中 SnapshotState 字段解释。
  • +// +//
  • 回滚快照时,实例的状态必须为 STOPPED 或 RUNNING,可通过 DescribeInstances 接口查询实例状态。处于 RUNNING 状态的实例会强制关机,然后回滚快照。
  • +// +// 可能返回的错误码: +// FAILEDOPERATION_SNAPSHOTOPERATIONFAILED = "FailedOperation.SnapshotOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DISKSIZENOTMATCH = "InvalidParameterValue.DiskSizeNotMatch" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_SNAPSHOTIDNOTFOUND = "ResourceNotFound.SnapshotIdNotFound" +// RESOURCENOTFOUND_SNAPSHOTNOTFOUND = "ResourceNotFound.SnapshotNotFound" +// UNSUPPORTEDOPERATION_DISKBUSY = "UnsupportedOperation.DiskBusy" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_INVALIDSNAPSHOTSTATE = "UnsupportedOperation.InvalidSnapshotState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +// UNSUPPORTEDOPERATION_SNAPSHOTBUSY = "UnsupportedOperation.SnapshotBusy" +// UNSUPPORTEDOPERATION_SYSTEMBUSY = "UnsupportedOperation.SystemBusy" +func (c *Client) ApplyInstanceSnapshot(request *ApplyInstanceSnapshotRequest) (response *ApplyInstanceSnapshotResponse, err error) { + return c.ApplyInstanceSnapshotWithContext(context.Background(), request) +} + +// ApplyInstanceSnapshot +// 本接口(ApplyInstanceSnapshot)用于回滚指定实例的系统盘快照。 +// +//
  • 仅支持回滚到原系统盘。
  • +// +//
  • 用于回滚的快照必须处于 NORMAL 状态。快照状态可以通 DescribeSnapshots 接口查询,见输出参数中 SnapshotState 字段解释。
  • +// +//
  • 回滚快照时,实例的状态必须为 STOPPED 或 RUNNING,可通过 DescribeInstances 接口查询实例状态。处于 RUNNING 状态的实例会强制关机,然后回滚快照。
  • +// +// 可能返回的错误码: +// FAILEDOPERATION_SNAPSHOTOPERATIONFAILED = "FailedOperation.SnapshotOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DISKSIZENOTMATCH = "InvalidParameterValue.DiskSizeNotMatch" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_SNAPSHOTIDNOTFOUND = "ResourceNotFound.SnapshotIdNotFound" +// RESOURCENOTFOUND_SNAPSHOTNOTFOUND = "ResourceNotFound.SnapshotNotFound" +// UNSUPPORTEDOPERATION_DISKBUSY = "UnsupportedOperation.DiskBusy" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_INVALIDSNAPSHOTSTATE = "UnsupportedOperation.InvalidSnapshotState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +// UNSUPPORTEDOPERATION_SNAPSHOTBUSY = "UnsupportedOperation.SnapshotBusy" +// UNSUPPORTEDOPERATION_SYSTEMBUSY = "UnsupportedOperation.SystemBusy" +func (c *Client) ApplyInstanceSnapshotWithContext(ctx context.Context, request *ApplyInstanceSnapshotRequest) (response *ApplyInstanceSnapshotResponse, err error) { + if request == nil { + request = NewApplyInstanceSnapshotRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ApplyInstanceSnapshot require credential") + } + + request.SetContext(ctx) + + response = NewApplyInstanceSnapshotResponse() + err = c.Send(request, response) + return +} + +func NewAssociateInstancesKeyPairsRequest() (request *AssociateInstancesKeyPairsRequest) { + request = &AssociateInstancesKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "AssociateInstancesKeyPairs") + + + return +} + +func NewAssociateInstancesKeyPairsResponse() (response *AssociateInstancesKeyPairsResponse) { + response = &AssociateInstancesKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateInstancesKeyPairs +// 本接口(AssociateInstancesKeyPairs)用于绑定用户指定密钥对到实例。 +// +// * 只支持 [RUNNING, STOPPED] 状态的 LINUX_UNIX 操作系统的实例。处于 RUNNING 状态的实例会强制关机,然后绑定。 +// +// * 将密钥的公钥写入到实例的 SSH 配置当中,用户就可以通过该密钥的私钥来登录实例。 +// +// * 如果实例原来绑定过密钥,那么原来的密钥将失效。 +// +// * 如果实例原来是通过密码登录,绑定密钥后无法使用密码登录。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// RESOURCENOTFOUND_KEYIDNOTFOUND = "ResourceNotFound.KeyIdNotFound" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_KEYPAIRBINDDUPLICATE = "UnsupportedOperation.KeyPairBindDuplicate" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +// UNSUPPORTEDOPERATION_WINDOWSNOTALLOWTOASSOCIATEKEYPAIR = "UnsupportedOperation.WindowsNotAllowToAssociateKeyPair" +func (c *Client) AssociateInstancesKeyPairs(request *AssociateInstancesKeyPairsRequest) (response *AssociateInstancesKeyPairsResponse, err error) { + return c.AssociateInstancesKeyPairsWithContext(context.Background(), request) +} + +// AssociateInstancesKeyPairs +// 本接口(AssociateInstancesKeyPairs)用于绑定用户指定密钥对到实例。 +// +// * 只支持 [RUNNING, STOPPED] 状态的 LINUX_UNIX 操作系统的实例。处于 RUNNING 状态的实例会强制关机,然后绑定。 +// +// * 将密钥的公钥写入到实例的 SSH 配置当中,用户就可以通过该密钥的私钥来登录实例。 +// +// * 如果实例原来绑定过密钥,那么原来的密钥将失效。 +// +// * 如果实例原来是通过密码登录,绑定密钥后无法使用密码登录。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// RESOURCENOTFOUND_KEYIDNOTFOUND = "ResourceNotFound.KeyIdNotFound" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_KEYPAIRBINDDUPLICATE = "UnsupportedOperation.KeyPairBindDuplicate" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +// UNSUPPORTEDOPERATION_WINDOWSNOTALLOWTOASSOCIATEKEYPAIR = "UnsupportedOperation.WindowsNotAllowToAssociateKeyPair" +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 NewAttachCcnRequest() (request *AttachCcnRequest) { + request = &AttachCcnRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "AttachCcn") + + + return +} + +func NewAttachCcnResponse() (response *AttachCcnResponse) { + response = &AttachCcnResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AttachCcn +// 本接口 (AttachCcn) 用于建立与云联网的关联。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHCCNCONDITIONUNSATISFIED = "UnsupportedOperation.AttachCcnConditionUnsatisfied" +// UNSUPPORTEDOPERATION_ATTACHCCNFAILED = "UnsupportedOperation.AttachCcnFailed" +// UNSUPPORTEDOPERATION_CCNALREADYATTACHED = "UnsupportedOperation.CcnAlreadyAttached" +func (c *Client) AttachCcn(request *AttachCcnRequest) (response *AttachCcnResponse, err error) { + return c.AttachCcnWithContext(context.Background(), request) +} + +// AttachCcn +// 本接口 (AttachCcn) 用于建立与云联网的关联。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHCCNCONDITIONUNSATISFIED = "UnsupportedOperation.AttachCcnConditionUnsatisfied" +// UNSUPPORTEDOPERATION_ATTACHCCNFAILED = "UnsupportedOperation.AttachCcnFailed" +// UNSUPPORTEDOPERATION_CCNALREADYATTACHED = "UnsupportedOperation.CcnAlreadyAttached" +func (c *Client) AttachCcnWithContext(ctx context.Context, request *AttachCcnRequest) (response *AttachCcnResponse, err error) { + if request == nil { + request = NewAttachCcnRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AttachCcn require credential") + } + + request.SetContext(ctx) + + response = NewAttachCcnResponse() + err = c.Send(request, response) + return +} + +func NewAttachDisksRequest() (request *AttachDisksRequest) { + request = &AttachDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "AttachDisks") + + + return +} + +func NewAttachDisksResponse() (response *AttachDisksResponse) { + response = &AttachDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AttachDisks +// 本接口(AttachDisks)用于挂载一个或多个云硬盘。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// LIMITEXCEEDED_ATTACHDATADISKQUOTALIMITEXCEEDED = "LimitExceeded.AttachDataDiskQuotaLimitExceeded" +// OPERATIONDENIED_DISKCREATING = "OperationDenied.DiskCreating" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +// UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) AttachDisks(request *AttachDisksRequest) (response *AttachDisksResponse, err error) { + return c.AttachDisksWithContext(context.Background(), request) +} + +// AttachDisks +// 本接口(AttachDisks)用于挂载一个或多个云硬盘。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// LIMITEXCEEDED_ATTACHDATADISKQUOTALIMITEXCEEDED = "LimitExceeded.AttachDataDiskQuotaLimitExceeded" +// OPERATIONDENIED_DISKCREATING = "OperationDenied.DiskCreating" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +// UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) AttachDisksWithContext(ctx context.Context, request *AttachDisksRequest) (response *AttachDisksResponse, err error) { + if request == nil { + request = NewAttachDisksRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AttachDisks require credential") + } + + request.SetContext(ctx) + + response = NewAttachDisksResponse() + err = c.Send(request, response) + return +} + +func NewCreateBlueprintRequest() (request *CreateBlueprintRequest) { + request = &CreateBlueprintRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "CreateBlueprint") + + + return +} + +func NewCreateBlueprintResponse() (response *CreateBlueprintResponse) { + response = &CreateBlueprintResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateBlueprint +// 本接口 (CreateBlueprint) 用于创建镜像。 +// +// 可能返回的错误码: +// FAILEDOPERATION_CREATEBLUEPRINTFAILED = "FailedOperation.CreateBlueprintFailed" +// FAILEDOPERATION_UNABLETOCREATEBLUEPRINT = "FailedOperation.UnableToCreateBlueprint" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) CreateBlueprint(request *CreateBlueprintRequest) (response *CreateBlueprintResponse, err error) { + return c.CreateBlueprintWithContext(context.Background(), request) +} + +// CreateBlueprint +// 本接口 (CreateBlueprint) 用于创建镜像。 +// +// 可能返回的错误码: +// FAILEDOPERATION_CREATEBLUEPRINTFAILED = "FailedOperation.CreateBlueprintFailed" +// FAILEDOPERATION_UNABLETOCREATEBLUEPRINT = "FailedOperation.UnableToCreateBlueprint" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) CreateBlueprintWithContext(ctx context.Context, request *CreateBlueprintRequest) (response *CreateBlueprintResponse, err error) { + if request == nil { + request = NewCreateBlueprintRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateBlueprint require credential") + } + + request.SetContext(ctx) + + response = NewCreateBlueprintResponse() + err = c.Send(request, response) + return +} + +func NewCreateFirewallRulesRequest() (request *CreateFirewallRulesRequest) { + request = &CreateFirewallRulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "CreateFirewallRules") + + + return +} + +func NewCreateFirewallRulesResponse() (response *CreateFirewallRulesResponse) { + response = &CreateFirewallRulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateFirewallRules +// 本接口(CreateFirewallRules)用于在实例上添加防火墙规则。 +// +// +// +// +// +// * FirewallVersion 为防火墙版本号,用户每次更新防火墙规则版本会自动加1,防止您更新的规则已过期,不填不考虑冲突。 +// +// +// +// 在 FirewallRules 参数中: +// +// * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。 +// +// * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。 +// +// * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。 +// +// * Action 字段只允许输入 ACCEPT 或 DROP。 +// +// * FirewallRuleDescription 字段长度不得超过 64。 +// +// 可能返回的错误码: +// FAILEDOPERATION_FIREWALLRULESOPERATIONFAILED = "FailedOperation.FirewallRulesOperationFailed" +// INVALIDPARAMETER_FIREWALLRULESDUPLICATED = "InvalidParameter.FirewallRulesDuplicated" +// INVALIDPARAMETER_FIREWALLRULESEXIST = "InvalidParameter.FirewallRulesExist" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// LIMITEXCEEDED_FIREWALLRULESLIMITEXCEEDED = "LimitExceeded.FirewallRulesLimitExceeded" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" +// UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" +func (c *Client) CreateFirewallRules(request *CreateFirewallRulesRequest) (response *CreateFirewallRulesResponse, err error) { + return c.CreateFirewallRulesWithContext(context.Background(), request) +} + +// CreateFirewallRules +// 本接口(CreateFirewallRules)用于在实例上添加防火墙规则。 +// +// +// +// +// +// * FirewallVersion 为防火墙版本号,用户每次更新防火墙规则版本会自动加1,防止您更新的规则已过期,不填不考虑冲突。 +// +// +// +// 在 FirewallRules 参数中: +// +// * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。 +// +// * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。 +// +// * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。 +// +// * Action 字段只允许输入 ACCEPT 或 DROP。 +// +// * FirewallRuleDescription 字段长度不得超过 64。 +// +// 可能返回的错误码: +// FAILEDOPERATION_FIREWALLRULESOPERATIONFAILED = "FailedOperation.FirewallRulesOperationFailed" +// INVALIDPARAMETER_FIREWALLRULESDUPLICATED = "InvalidParameter.FirewallRulesDuplicated" +// INVALIDPARAMETER_FIREWALLRULESEXIST = "InvalidParameter.FirewallRulesExist" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// LIMITEXCEEDED_FIREWALLRULESLIMITEXCEEDED = "LimitExceeded.FirewallRulesLimitExceeded" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" +// UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" +func (c *Client) CreateFirewallRulesWithContext(ctx context.Context, request *CreateFirewallRulesRequest) (response *CreateFirewallRulesResponse, err error) { + if request == nil { + request = NewCreateFirewallRulesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateFirewallRules require credential") + } + + request.SetContext(ctx) + + response = NewCreateFirewallRulesResponse() + err = c.Send(request, response) + return +} + +func NewCreateInstanceSnapshotRequest() (request *CreateInstanceSnapshotRequest) { + request = &CreateInstanceSnapshotRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "CreateInstanceSnapshot") + + + return +} + +func NewCreateInstanceSnapshotResponse() (response *CreateInstanceSnapshotResponse) { + response = &CreateInstanceSnapshotResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateInstanceSnapshot +// 本接口(CreateInstanceSnapshot)用于创建指定实例的系统盘快照。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_GETSNAPSHOTALLOCQUOTALOCKERROR = "InternalError.GetSnapshotAllocQuotaLockError" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_SNAPSHOTNAMETOOLONG = "InvalidParameterValue.SnapshotNameTooLong" +// LIMITEXCEEDED_SNAPSHOTQUOTALIMITEXCEEDED = "LimitExceeded.SnapshotQuotaLimitExceeded" +// OPERATIONDENIED_OPERATIONDENIEDCREATESNAPSHOTFORSTORAGEBUNDLE = "OperationDenied.OperationDeniedCreateSnapshotForStorageBundle" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_DISKBUSY = "UnsupportedOperation.DiskBusy" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) CreateInstanceSnapshot(request *CreateInstanceSnapshotRequest) (response *CreateInstanceSnapshotResponse, err error) { + return c.CreateInstanceSnapshotWithContext(context.Background(), request) +} + +// CreateInstanceSnapshot +// 本接口(CreateInstanceSnapshot)用于创建指定实例的系统盘快照。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_GETSNAPSHOTALLOCQUOTALOCKERROR = "InternalError.GetSnapshotAllocQuotaLockError" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_SNAPSHOTNAMETOOLONG = "InvalidParameterValue.SnapshotNameTooLong" +// LIMITEXCEEDED_SNAPSHOTQUOTALIMITEXCEEDED = "LimitExceeded.SnapshotQuotaLimitExceeded" +// OPERATIONDENIED_OPERATIONDENIEDCREATESNAPSHOTFORSTORAGEBUNDLE = "OperationDenied.OperationDeniedCreateSnapshotForStorageBundle" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_DISKBUSY = "UnsupportedOperation.DiskBusy" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) CreateInstanceSnapshotWithContext(ctx context.Context, request *CreateInstanceSnapshotRequest) (response *CreateInstanceSnapshotResponse, err error) { + if request == nil { + request = NewCreateInstanceSnapshotRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateInstanceSnapshot require credential") + } + + request.SetContext(ctx) + + response = NewCreateInstanceSnapshotResponse() + err = c.Send(request, response) + return +} + +func NewCreateInstancesRequest() (request *CreateInstancesRequest) { + request = &CreateInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "CreateInstances") + + + return +} + +func NewCreateInstancesResponse() (response *CreateInstancesResponse) { + response = &CreateInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateInstances +// 本接口(CreateInstances)用于创建一个或多个指定套餐的轻量应用服务器实例。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_UNABLETOCREATEINSTANCES = "FailedOperation.UnableToCreateInstances" +// INTERNALERROR = "InternalError" +// INTERNALERROR_INVALIDACTIONNOTFOUND = "InternalError.InvalidActionNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_BUNDLEANDBLUEPRINTNOTMATCH = "InvalidParameter.BundleAndBlueprintNotMatch" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETERVALUE_BLUEPRINTID = "InvalidParameterValue.BlueprintId" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCENAMETOOLONG = "InvalidParameterValue.InstanceNameTooLong" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTID = "InvalidParameterValue.InvalidBlueprintId" +// INVALIDPARAMETERVALUE_INVALIDBUNDLE = "InvalidParameterValue.InvalidBundle" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERCOMBINATION = "InvalidParameterValue.InvalidParameterCombination" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_INSTANCEQUOTALIMITEXCEEDED = "LimitExceeded.InstanceQuotaLimitExceeded" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// RESOURCENOTFOUND_BLUEPRINTNOTFOUND = "ResourceNotFound.BlueprintNotFound" +// RESOURCEUNAVAILABLE_BUNDLEUNAVAILABLE = "ResourceUnavailable.BundleUnavailable" +// RESOURCESSOLDOUT_PURCHASESOURCEHASNOBUNDLECONFIGS = "ResourcesSoldOut.PurchaseSourceHasNoBundleConfigs" +// RESOURCESSOLDOUT_ZONESHASNOBUNDLECONFIGS = "ResourcesSoldOut.ZonesHasNoBundleConfigs" +// UNSUPPORTEDOPERATION_INSTANCELINUXUNIXCREATINGNOTSUPPORTPASSWORD = "UnsupportedOperation.InstanceLinuxUnixCreatingNotSupportPassword" +func (c *Client) CreateInstances(request *CreateInstancesRequest) (response *CreateInstancesResponse, err error) { + return c.CreateInstancesWithContext(context.Background(), request) +} + +// CreateInstances +// 本接口(CreateInstances)用于创建一个或多个指定套餐的轻量应用服务器实例。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_UNABLETOCREATEINSTANCES = "FailedOperation.UnableToCreateInstances" +// INTERNALERROR = "InternalError" +// INTERNALERROR_INVALIDACTIONNOTFOUND = "InternalError.InvalidActionNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_BUNDLEANDBLUEPRINTNOTMATCH = "InvalidParameter.BundleAndBlueprintNotMatch" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETERVALUE_BLUEPRINTID = "InvalidParameterValue.BlueprintId" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCENAMETOOLONG = "InvalidParameterValue.InstanceNameTooLong" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTID = "InvalidParameterValue.InvalidBlueprintId" +// INVALIDPARAMETERVALUE_INVALIDBUNDLE = "InvalidParameterValue.InvalidBundle" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERCOMBINATION = "InvalidParameterValue.InvalidParameterCombination" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_INSTANCEQUOTALIMITEXCEEDED = "LimitExceeded.InstanceQuotaLimitExceeded" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// RESOURCENOTFOUND_BLUEPRINTNOTFOUND = "ResourceNotFound.BlueprintNotFound" +// RESOURCEUNAVAILABLE_BUNDLEUNAVAILABLE = "ResourceUnavailable.BundleUnavailable" +// RESOURCESSOLDOUT_PURCHASESOURCEHASNOBUNDLECONFIGS = "ResourcesSoldOut.PurchaseSourceHasNoBundleConfigs" +// RESOURCESSOLDOUT_ZONESHASNOBUNDLECONFIGS = "ResourcesSoldOut.ZonesHasNoBundleConfigs" +// UNSUPPORTEDOPERATION_INSTANCELINUXUNIXCREATINGNOTSUPPORTPASSWORD = "UnsupportedOperation.InstanceLinuxUnixCreatingNotSupportPassword" +func (c *Client) CreateInstancesWithContext(ctx context.Context, request *CreateInstancesRequest) (response *CreateInstancesResponse, err error) { + if request == nil { + request = NewCreateInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateInstances require credential") + } + + request.SetContext(ctx) + + response = NewCreateInstancesResponse() + err = c.Send(request, response) + return +} + +func NewCreateKeyPairRequest() (request *CreateKeyPairRequest) { + request = &CreateKeyPairRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "CreateKeyPair") + + + return +} + +func NewCreateKeyPairResponse() (response *CreateKeyPairResponse) { + response = &CreateKeyPairResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateKeyPair +// 本接口(CreateKeyPair)用于创建一个密钥对。 +// +// 可能返回的错误码: +// FAILEDOPERATION_CREATEKEYPAIRFAILED = "FailedOperation.CreateKeyPairFailed" +// INVALIDPARAMETERVALUE_DUPLICATEPARAMETERVALUE = "InvalidParameterValue.DuplicateParameterValue" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMEEMPTY = "InvalidParameterValue.InvalidKeyPairNameEmpty" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidParameterValue.InvalidKeyPairNameIncludeIllegalChar" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMETOOLONG = "InvalidParameterValue.InvalidKeyPairNameTooLong" +// LIMITEXCEEDED_KEYPAIRLIMITEXCEEDED = "LimitExceeded.KeyPairLimitExceeded" +func (c *Client) CreateKeyPair(request *CreateKeyPairRequest) (response *CreateKeyPairResponse, err error) { + return c.CreateKeyPairWithContext(context.Background(), request) +} + +// CreateKeyPair +// 本接口(CreateKeyPair)用于创建一个密钥对。 +// +// 可能返回的错误码: +// FAILEDOPERATION_CREATEKEYPAIRFAILED = "FailedOperation.CreateKeyPairFailed" +// INVALIDPARAMETERVALUE_DUPLICATEPARAMETERVALUE = "InvalidParameterValue.DuplicateParameterValue" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMEEMPTY = "InvalidParameterValue.InvalidKeyPairNameEmpty" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidParameterValue.InvalidKeyPairNameIncludeIllegalChar" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMETOOLONG = "InvalidParameterValue.InvalidKeyPairNameTooLong" +// LIMITEXCEEDED_KEYPAIRLIMITEXCEEDED = "LimitExceeded.KeyPairLimitExceeded" +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 NewDeleteBlueprintsRequest() (request *DeleteBlueprintsRequest) { + request = &DeleteBlueprintsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DeleteBlueprints") + + + return +} + +func NewDeleteBlueprintsResponse() (response *DeleteBlueprintsResponse) { + response = &DeleteBlueprintsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteBlueprints +// 本接口 (DeleteBlueprints) 用于删除镜像。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// RESOURCENOTFOUND_BLUEPRINTNOTFOUND = "ResourceNotFound.BlueprintNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION_BLUEPRINTCURSTATEINVALID = "UnsupportedOperation.BlueprintCurStateInvalid" +// UNSUPPORTEDOPERATION_BLUEPRINTOCCUPIED = "UnsupportedOperation.BlueprintOccupied" +// UNSUPPORTEDOPERATION_NOTSUPPORTSHAREDBLUEPRINT = "UnsupportedOperation.NotSupportSharedBlueprint" +// UNSUPPORTEDOPERATION_POSTDESTROYRESOURCEFAILED = "UnsupportedOperation.PostDestroyResourceFailed" +func (c *Client) DeleteBlueprints(request *DeleteBlueprintsRequest) (response *DeleteBlueprintsResponse, err error) { + return c.DeleteBlueprintsWithContext(context.Background(), request) +} + +// DeleteBlueprints +// 本接口 (DeleteBlueprints) 用于删除镜像。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// RESOURCENOTFOUND_BLUEPRINTNOTFOUND = "ResourceNotFound.BlueprintNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION_BLUEPRINTCURSTATEINVALID = "UnsupportedOperation.BlueprintCurStateInvalid" +// UNSUPPORTEDOPERATION_BLUEPRINTOCCUPIED = "UnsupportedOperation.BlueprintOccupied" +// UNSUPPORTEDOPERATION_NOTSUPPORTSHAREDBLUEPRINT = "UnsupportedOperation.NotSupportSharedBlueprint" +// UNSUPPORTEDOPERATION_POSTDESTROYRESOURCEFAILED = "UnsupportedOperation.PostDestroyResourceFailed" +func (c *Client) DeleteBlueprintsWithContext(ctx context.Context, request *DeleteBlueprintsRequest) (response *DeleteBlueprintsResponse, err error) { + if request == nil { + request = NewDeleteBlueprintsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteBlueprints require credential") + } + + request.SetContext(ctx) + + response = NewDeleteBlueprintsResponse() + err = c.Send(request, response) + return +} + +func NewDeleteFirewallRulesRequest() (request *DeleteFirewallRulesRequest) { + request = &DeleteFirewallRulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DeleteFirewallRules") + + + return +} + +func NewDeleteFirewallRulesResponse() (response *DeleteFirewallRulesResponse) { + response = &DeleteFirewallRulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteFirewallRules +// 本接口(DeleteFirewallRules)用于删除实例的防火墙规则。 +// +// +// +// * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接删除指定的规则。 +// +// +// +// 在 FirewallRules 参数中: +// +// * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。 +// +// * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。 +// +// * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。 +// +// * Action 字段只允许输入 ACCEPT 或 DROP。 +// +// * FirewallRuleDescription 字段长度不得超过 64。 +// +// 可能返回的错误码: +// FAILEDOPERATION_FIREWALLRULESOPERATIONFAILED = "FailedOperation.FirewallRulesOperationFailed" +// INVALIDPARAMETER_FIREWALLRULESDUPLICATED = "InvalidParameter.FirewallRulesDuplicated" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_FIREWALLRULESNOTFOUND = "ResourceNotFound.FirewallRulesNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" +// UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" +func (c *Client) DeleteFirewallRules(request *DeleteFirewallRulesRequest) (response *DeleteFirewallRulesResponse, err error) { + return c.DeleteFirewallRulesWithContext(context.Background(), request) +} + +// DeleteFirewallRules +// 本接口(DeleteFirewallRules)用于删除实例的防火墙规则。 +// +// +// +// * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接删除指定的规则。 +// +// +// +// 在 FirewallRules 参数中: +// +// * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。 +// +// * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。 +// +// * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。 +// +// * Action 字段只允许输入 ACCEPT 或 DROP。 +// +// * FirewallRuleDescription 字段长度不得超过 64。 +// +// 可能返回的错误码: +// FAILEDOPERATION_FIREWALLRULESOPERATIONFAILED = "FailedOperation.FirewallRulesOperationFailed" +// INVALIDPARAMETER_FIREWALLRULESDUPLICATED = "InvalidParameter.FirewallRulesDuplicated" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_FIREWALLRULESNOTFOUND = "ResourceNotFound.FirewallRulesNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" +// UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" +func (c *Client) DeleteFirewallRulesWithContext(ctx context.Context, request *DeleteFirewallRulesRequest) (response *DeleteFirewallRulesResponse, err error) { + if request == nil { + request = NewDeleteFirewallRulesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteFirewallRules require credential") + } + + request.SetContext(ctx) + + response = NewDeleteFirewallRulesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteKeyPairsRequest() (request *DeleteKeyPairsRequest) { + request = &DeleteKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DeleteKeyPairs") + + + return +} + +func NewDeleteKeyPairsResponse() (response *DeleteKeyPairsResponse) { + response = &DeleteKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteKeyPairs +// 本接口(DeleteKeyPairs)用于删除密钥对。 +// +// 可能返回的错误码: +// FAILEDOPERATION_DELETEKEYPAIRFAILED = "FailedOperation.DeleteKeyPairFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" +// RESOURCEINUSE_KEYPAIRINUSE = "ResourceInUse.KeyPairInUse" +// RESOURCENOTFOUND_KEYIDNOTFOUND = "ResourceNotFound.KeyIdNotFound" +// UNSUPPORTEDOPERATION_KEYPAIRBINDTOBLUEPRINTS = "UnsupportedOperation.KeyPairBindToBlueprints" +func (c *Client) DeleteKeyPairs(request *DeleteKeyPairsRequest) (response *DeleteKeyPairsResponse, err error) { + return c.DeleteKeyPairsWithContext(context.Background(), request) +} + +// DeleteKeyPairs +// 本接口(DeleteKeyPairs)用于删除密钥对。 +// +// 可能返回的错误码: +// FAILEDOPERATION_DELETEKEYPAIRFAILED = "FailedOperation.DeleteKeyPairFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" +// RESOURCEINUSE_KEYPAIRINUSE = "ResourceInUse.KeyPairInUse" +// RESOURCENOTFOUND_KEYIDNOTFOUND = "ResourceNotFound.KeyIdNotFound" +// UNSUPPORTEDOPERATION_KEYPAIRBINDTOBLUEPRINTS = "UnsupportedOperation.KeyPairBindToBlueprints" +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 NewDeleteSnapshotsRequest() (request *DeleteSnapshotsRequest) { + request = &DeleteSnapshotsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DeleteSnapshots") + + + return +} + +func NewDeleteSnapshotsResponse() (response *DeleteSnapshotsResponse) { + response = &DeleteSnapshotsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteSnapshots +// 本接口(DeleteSnapshots)用于删除快照。 +// +// 快照必须处于 NORMAL 状态,快照状态可以通过 DescribeSnapshots 接口查询,见输出参数中 SnapshotState 字段解释。 +// +// 可能返回的错误码: +// FAILEDOPERATION_SNAPSHOTOPERATIONFAILED = "FailedOperation.SnapshotOperationFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// RESOURCENOTFOUND_SNAPSHOTIDNOTFOUND = "ResourceNotFound.SnapshotIdNotFound" +// RESOURCENOTFOUND_SNAPSHOTNOTFOUND = "ResourceNotFound.SnapshotNotFound" +// UNSUPPORTEDOPERATION_INVALIDSNAPSHOTSTATE = "UnsupportedOperation.InvalidSnapshotState" +// UNSUPPORTEDOPERATION_SNAPSHOTBUSY = "UnsupportedOperation.SnapshotBusy" +func (c *Client) DeleteSnapshots(request *DeleteSnapshotsRequest) (response *DeleteSnapshotsResponse, err error) { + return c.DeleteSnapshotsWithContext(context.Background(), request) +} + +// DeleteSnapshots +// 本接口(DeleteSnapshots)用于删除快照。 +// +// 快照必须处于 NORMAL 状态,快照状态可以通过 DescribeSnapshots 接口查询,见输出参数中 SnapshotState 字段解释。 +// +// 可能返回的错误码: +// FAILEDOPERATION_SNAPSHOTOPERATIONFAILED = "FailedOperation.SnapshotOperationFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// RESOURCENOTFOUND_SNAPSHOTIDNOTFOUND = "ResourceNotFound.SnapshotIdNotFound" +// RESOURCENOTFOUND_SNAPSHOTNOTFOUND = "ResourceNotFound.SnapshotNotFound" +// UNSUPPORTEDOPERATION_INVALIDSNAPSHOTSTATE = "UnsupportedOperation.InvalidSnapshotState" +// UNSUPPORTEDOPERATION_SNAPSHOTBUSY = "UnsupportedOperation.SnapshotBusy" +func (c *Client) DeleteSnapshotsWithContext(ctx context.Context, request *DeleteSnapshotsRequest) (response *DeleteSnapshotsResponse, err error) { + if request == nil { + request = NewDeleteSnapshotsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteSnapshots require credential") + } + + request.SetContext(ctx) + + response = NewDeleteSnapshotsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeBlueprintInstancesRequest() (request *DescribeBlueprintInstancesRequest) { + request = &DescribeBlueprintInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeBlueprintInstances") + + + return +} + +func NewDescribeBlueprintInstancesResponse() (response *DescribeBlueprintInstancesResponse) { + response = &DescribeBlueprintInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeBlueprintInstances +// 本接口(DescribeBlueprintInstances)用于查询镜像实例信息。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeBlueprintInstances(request *DescribeBlueprintInstancesRequest) (response *DescribeBlueprintInstancesResponse, err error) { + return c.DescribeBlueprintInstancesWithContext(context.Background(), request) +} + +// DescribeBlueprintInstances +// 本接口(DescribeBlueprintInstances)用于查询镜像实例信息。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeBlueprintInstancesWithContext(ctx context.Context, request *DescribeBlueprintInstancesRequest) (response *DescribeBlueprintInstancesResponse, err error) { + if request == nil { + request = NewDescribeBlueprintInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeBlueprintInstances require credential") + } + + request.SetContext(ctx) + + response = NewDescribeBlueprintInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeBlueprintsRequest() (request *DescribeBlueprintsRequest) { + request = &DescribeBlueprintsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeBlueprints") + + + return +} + +func NewDescribeBlueprintsResponse() (response *DescribeBlueprintsResponse) { + response = &DescribeBlueprintsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeBlueprints +// 本接口(DescribeBlueprints)用于查询镜像信息。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTSTATE = "InvalidParameterValue.InvalidBlueprintState" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTTYPE = "InvalidParameterValue.InvalidBlueprintType" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +func (c *Client) DescribeBlueprints(request *DescribeBlueprintsRequest) (response *DescribeBlueprintsResponse, err error) { + return c.DescribeBlueprintsWithContext(context.Background(), request) +} + +// DescribeBlueprints +// 本接口(DescribeBlueprints)用于查询镜像信息。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTSTATE = "InvalidParameterValue.InvalidBlueprintState" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTTYPE = "InvalidParameterValue.InvalidBlueprintType" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +func (c *Client) DescribeBlueprintsWithContext(ctx context.Context, request *DescribeBlueprintsRequest) (response *DescribeBlueprintsResponse, err error) { + if request == nil { + request = NewDescribeBlueprintsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeBlueprints require credential") + } + + request.SetContext(ctx) + + response = NewDescribeBlueprintsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeBundleDiscountRequest() (request *DescribeBundleDiscountRequest) { + request = &DescribeBundleDiscountRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeBundleDiscount") + + + return +} + +func NewDescribeBundleDiscountResponse() (response *DescribeBundleDiscountResponse) { + response = &DescribeBundleDiscountResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeBundleDiscount +// 本接口(DescribeBundleDiscount)用于查询套餐折扣信息。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +func (c *Client) DescribeBundleDiscount(request *DescribeBundleDiscountRequest) (response *DescribeBundleDiscountResponse, err error) { + return c.DescribeBundleDiscountWithContext(context.Background(), request) +} + +// DescribeBundleDiscount +// 本接口(DescribeBundleDiscount)用于查询套餐折扣信息。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +func (c *Client) DescribeBundleDiscountWithContext(ctx context.Context, request *DescribeBundleDiscountRequest) (response *DescribeBundleDiscountResponse, err error) { + if request == nil { + request = NewDescribeBundleDiscountRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeBundleDiscount require credential") + } + + request.SetContext(ctx) + + response = NewDescribeBundleDiscountResponse() + err = c.Send(request, response) + return +} + +func NewDescribeBundlesRequest() (request *DescribeBundlesRequest) { + request = &DescribeBundlesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeBundles") + + + return +} + +func NewDescribeBundlesResponse() (response *DescribeBundlesResponse) { + response = &DescribeBundlesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeBundles +// 本接口(DescribeBundles)用于查询套餐信息。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDCONSOLEDISPLAYTYPES = "InvalidParameterValue.InvalidConsoleDisplayTypes" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" +func (c *Client) DescribeBundles(request *DescribeBundlesRequest) (response *DescribeBundlesResponse, err error) { + return c.DescribeBundlesWithContext(context.Background(), request) +} + +// DescribeBundles +// 本接口(DescribeBundles)用于查询套餐信息。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDCONSOLEDISPLAYTYPES = "InvalidParameterValue.InvalidConsoleDisplayTypes" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" +func (c *Client) DescribeBundlesWithContext(ctx context.Context, request *DescribeBundlesRequest) (response *DescribeBundlesResponse, err error) { + if request == nil { + request = NewDescribeBundlesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeBundles require credential") + } + + request.SetContext(ctx) + + response = NewDescribeBundlesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCcnAttachedInstancesRequest() (request *DescribeCcnAttachedInstancesRequest) { + request = &DescribeCcnAttachedInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeCcnAttachedInstances") + + + return +} + +func NewDescribeCcnAttachedInstancesResponse() (response *DescribeCcnAttachedInstancesResponse) { + response = &DescribeCcnAttachedInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeCcnAttachedInstances +// 本接口 (DescribeCcnAttachedInstances) 用于查询云联网关联的实例信息。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_DESCRIBECCNATTACHEDINSTANCESFAILED = "UnsupportedOperation.DescribeCcnAttachedInstancesFailed" +func (c *Client) DescribeCcnAttachedInstances(request *DescribeCcnAttachedInstancesRequest) (response *DescribeCcnAttachedInstancesResponse, err error) { + return c.DescribeCcnAttachedInstancesWithContext(context.Background(), request) +} + +// DescribeCcnAttachedInstances +// 本接口 (DescribeCcnAttachedInstances) 用于查询云联网关联的实例信息。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_DESCRIBECCNATTACHEDINSTANCESFAILED = "UnsupportedOperation.DescribeCcnAttachedInstancesFailed" +func (c *Client) DescribeCcnAttachedInstancesWithContext(ctx context.Context, request *DescribeCcnAttachedInstancesRequest) (response *DescribeCcnAttachedInstancesResponse, err error) { + if request == nil { + request = NewDescribeCcnAttachedInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeCcnAttachedInstances require credential") + } + + request.SetContext(ctx) + + response = NewDescribeCcnAttachedInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDiskConfigsRequest() (request *DescribeDiskConfigsRequest) { + request = &DescribeDiskConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeDiskConfigs") + + + return +} + +func NewDescribeDiskConfigsResponse() (response *DescribeDiskConfigsResponse) { + response = &DescribeDiskConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDiskConfigs +// 本接口(DescribeDiskConfigs)用于查询云硬盘配置。 +// +// 可能返回的错误码: +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" +func (c *Client) DescribeDiskConfigs(request *DescribeDiskConfigsRequest) (response *DescribeDiskConfigsResponse, err error) { + return c.DescribeDiskConfigsWithContext(context.Background(), request) +} + +// DescribeDiskConfigs +// 本接口(DescribeDiskConfigs)用于查询云硬盘配置。 +// +// 可能返回的错误码: +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" +func (c *Client) DescribeDiskConfigsWithContext(ctx context.Context, request *DescribeDiskConfigsRequest) (response *DescribeDiskConfigsResponse, err error) { + if request == nil { + request = NewDescribeDiskConfigsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDiskConfigs require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDiskConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDiskDiscountRequest() (request *DescribeDiskDiscountRequest) { + request = &DescribeDiskDiscountRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeDiskDiscount") + + + return +} + +func NewDescribeDiskDiscountResponse() (response *DescribeDiskDiscountResponse) { + response = &DescribeDiskDiscountResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDiskDiscount +// 本接口(DescribeDiskDiscount)用于查询云硬盘折扣信息。 +// +// 可能返回的错误码: +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeDiskDiscount(request *DescribeDiskDiscountRequest) (response *DescribeDiskDiscountResponse, err error) { + return c.DescribeDiskDiscountWithContext(context.Background(), request) +} + +// DescribeDiskDiscount +// 本接口(DescribeDiskDiscount)用于查询云硬盘折扣信息。 +// +// 可能返回的错误码: +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeDiskDiscountWithContext(ctx context.Context, request *DescribeDiskDiscountRequest) (response *DescribeDiskDiscountResponse, err error) { + if request == nil { + request = NewDescribeDiskDiscountRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDiskDiscount require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDiskDiscountResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDisksRequest() (request *DescribeDisksRequest) { + request = &DescribeDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeDisks") + + + return +} + +func NewDescribeDisksResponse() (response *DescribeDisksResponse) { + response = &DescribeDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDisks +// 本接口(DescribeDisks)用于查询云硬盘信息。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DISKNAMETOOLONG = "InvalidParameterValue.DiskNameTooLong" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +func (c *Client) DescribeDisks(request *DescribeDisksRequest) (response *DescribeDisksResponse, err error) { + return c.DescribeDisksWithContext(context.Background(), request) +} + +// DescribeDisks +// 本接口(DescribeDisks)用于查询云硬盘信息。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DISKNAMETOOLONG = "InvalidParameterValue.DiskNameTooLong" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +func (c *Client) DescribeDisksWithContext(ctx context.Context, request *DescribeDisksRequest) (response *DescribeDisksResponse, err error) { + if request == nil { + request = NewDescribeDisksRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDisks require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDisksResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDisksDeniedActionsRequest() (request *DescribeDisksDeniedActionsRequest) { + request = &DescribeDisksDeniedActionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeDisksDeniedActions") + + + return +} + +func NewDescribeDisksDeniedActionsResponse() (response *DescribeDisksDeniedActionsResponse) { + response = &DescribeDisksDeniedActionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDisksDeniedActions +// 本接口(DescribeDisksDeniedActions)用于查询一个或多个云硬盘的操作限制列表信息。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +func (c *Client) DescribeDisksDeniedActions(request *DescribeDisksDeniedActionsRequest) (response *DescribeDisksDeniedActionsResponse, err error) { + return c.DescribeDisksDeniedActionsWithContext(context.Background(), request) +} + +// DescribeDisksDeniedActions +// 本接口(DescribeDisksDeniedActions)用于查询一个或多个云硬盘的操作限制列表信息。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +func (c *Client) DescribeDisksDeniedActionsWithContext(ctx context.Context, request *DescribeDisksDeniedActionsRequest) (response *DescribeDisksDeniedActionsResponse, err error) { + if request == nil { + request = NewDescribeDisksDeniedActionsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDisksDeniedActions require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDisksDeniedActionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDisksReturnableRequest() (request *DescribeDisksReturnableRequest) { + request = &DescribeDisksReturnableRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeDisksReturnable") + + + return +} + +func NewDescribeDisksReturnableResponse() (response *DescribeDisksReturnableResponse) { + response = &DescribeDisksReturnableResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDisksReturnable +// 本接口(DescribeDisksReturnable)用于查询云硬盘是否可退还。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEDISKSRETURNABLEERROR = "InternalError.DescribeDisksReturnableError" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +func (c *Client) DescribeDisksReturnable(request *DescribeDisksReturnableRequest) (response *DescribeDisksReturnableResponse, err error) { + return c.DescribeDisksReturnableWithContext(context.Background(), request) +} + +// DescribeDisksReturnable +// 本接口(DescribeDisksReturnable)用于查询云硬盘是否可退还。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEDISKSRETURNABLEERROR = "InternalError.DescribeDisksReturnableError" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +func (c *Client) DescribeDisksReturnableWithContext(ctx context.Context, request *DescribeDisksReturnableRequest) (response *DescribeDisksReturnableResponse, err error) { + if request == nil { + request = NewDescribeDisksReturnableRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDisksReturnable require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDisksReturnableResponse() + err = c.Send(request, response) + return +} + +func NewDescribeFirewallRulesRequest() (request *DescribeFirewallRulesRequest) { + request = &DescribeFirewallRulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeFirewallRules") + + + return +} + +func NewDescribeFirewallRulesResponse() (response *DescribeFirewallRulesResponse) { + response = &DescribeFirewallRulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeFirewallRules +// 本接口(DescribeFirewallRules)用于查询实例的防火墙规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeFirewallRules(request *DescribeFirewallRulesRequest) (response *DescribeFirewallRulesResponse, err error) { + return c.DescribeFirewallRulesWithContext(context.Background(), request) +} + +// DescribeFirewallRules +// 本接口(DescribeFirewallRules)用于查询实例的防火墙规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeFirewallRulesWithContext(ctx context.Context, request *DescribeFirewallRulesRequest) (response *DescribeFirewallRulesResponse, err error) { + if request == nil { + request = NewDescribeFirewallRulesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeFirewallRules require credential") + } + + request.SetContext(ctx) + + response = NewDescribeFirewallRulesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeFirewallRulesTemplateRequest() (request *DescribeFirewallRulesTemplateRequest) { + request = &DescribeFirewallRulesTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeFirewallRulesTemplate") + + + return +} + +func NewDescribeFirewallRulesTemplateResponse() (response *DescribeFirewallRulesTemplateResponse) { + response = &DescribeFirewallRulesTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeFirewallRulesTemplate +// 本接口(DescribeFirewallRulesTemplate)用于查询防火墙规则模板。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeFirewallRulesTemplate(request *DescribeFirewallRulesTemplateRequest) (response *DescribeFirewallRulesTemplateResponse, err error) { + return c.DescribeFirewallRulesTemplateWithContext(context.Background(), request) +} + +// DescribeFirewallRulesTemplate +// 本接口(DescribeFirewallRulesTemplate)用于查询防火墙规则模板。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeFirewallRulesTemplateWithContext(ctx context.Context, request *DescribeFirewallRulesTemplateRequest) (response *DescribeFirewallRulesTemplateResponse, err error) { + if request == nil { + request = NewDescribeFirewallRulesTemplateRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeFirewallRulesTemplate require credential") + } + + request.SetContext(ctx) + + response = NewDescribeFirewallRulesTemplateResponse() + err = c.Send(request, response) + return +} + +func NewDescribeGeneralResourceQuotasRequest() (request *DescribeGeneralResourceQuotasRequest) { + request = &DescribeGeneralResourceQuotasRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeGeneralResourceQuotas") + + + return +} + +func NewDescribeGeneralResourceQuotasResponse() (response *DescribeGeneralResourceQuotasResponse) { + response = &DescribeGeneralResourceQuotasResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeGeneralResourceQuotas +// 本接口(DescribeGeneralResourceQuotas)用于查询通用资源配额信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDRESOURCEQUOTARESOURCENAME = "InvalidParameterValue.InvalidResourceQuotaResourceName" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +func (c *Client) DescribeGeneralResourceQuotas(request *DescribeGeneralResourceQuotasRequest) (response *DescribeGeneralResourceQuotasResponse, err error) { + return c.DescribeGeneralResourceQuotasWithContext(context.Background(), request) +} + +// DescribeGeneralResourceQuotas +// 本接口(DescribeGeneralResourceQuotas)用于查询通用资源配额信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDRESOURCEQUOTARESOURCENAME = "InvalidParameterValue.InvalidResourceQuotaResourceName" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +func (c *Client) DescribeGeneralResourceQuotasWithContext(ctx context.Context, request *DescribeGeneralResourceQuotasRequest) (response *DescribeGeneralResourceQuotasResponse, err error) { + if request == nil { + request = NewDescribeGeneralResourceQuotasRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeGeneralResourceQuotas require credential") + } + + request.SetContext(ctx) + + response = NewDescribeGeneralResourceQuotasResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceLoginKeyPairAttributeRequest() (request *DescribeInstanceLoginKeyPairAttributeRequest) { + request = &DescribeInstanceLoginKeyPairAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeInstanceLoginKeyPairAttribute") + + + return +} + +func NewDescribeInstanceLoginKeyPairAttributeResponse() (response *DescribeInstanceLoginKeyPairAttributeResponse) { + response = &DescribeInstanceLoginKeyPairAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstanceLoginKeyPairAttribute +// 本接口用于查询实例默认登录密钥属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeInstanceLoginKeyPairAttribute(request *DescribeInstanceLoginKeyPairAttributeRequest) (response *DescribeInstanceLoginKeyPairAttributeResponse, err error) { + return c.DescribeInstanceLoginKeyPairAttributeWithContext(context.Background(), request) +} + +// DescribeInstanceLoginKeyPairAttribute +// 本接口用于查询实例默认登录密钥属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeInstanceLoginKeyPairAttributeWithContext(ctx context.Context, request *DescribeInstanceLoginKeyPairAttributeRequest) (response *DescribeInstanceLoginKeyPairAttributeResponse, err error) { + if request == nil { + request = NewDescribeInstanceLoginKeyPairAttributeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstanceLoginKeyPairAttribute require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstanceLoginKeyPairAttributeResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceVncUrlRequest() (request *DescribeInstanceVncUrlRequest) { + request = &DescribeInstanceVncUrlRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeInstanceVncUrl") + + + return +} + +func NewDescribeInstanceVncUrlResponse() (response *DescribeInstanceVncUrlResponse) { + response = &DescribeInstanceVncUrlResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstanceVncUrl +// 本接口 ( DescribeInstanceVncUrl ) 用于查询实例管理终端地址,获取的地址可用于实例的 VNC 登录。 +// +// +// +// * 处于 `STOPPED` 状态的机器无法使用此功能。 +// +// * 管理终端地址的有效期为 15 秒,调用接口成功后如果 15 秒内不使用该链接进行访问,管理终端地址自动失效,您需要重新查询。 +// +// * 管理终端地址一旦被访问,将自动失效,您需要重新查询。 +// +// * 如果连接断开,每分钟内重新连接的次数不能超过 30 次。 +// +// 获取到 `InstanceVncUrl` 后,您需要在链接 `https://img.qcloud.com/qcloud/app/active_vnc/index.html?` 末尾加上参数 `InstanceVncUrl=xxxx`。 +// +// +// +// - 参数 `InstanceVncUrl` :调用接口成功后会返回的 `InstanceVncUrl` 的值。 +// +// +// +// 最后组成的 URL 格式如下: +// +// +// +// ``` +// +// https://img.qcloud.com/qcloud/app/active_vnc/index.html?InstanceVncUrl=wss%3A%2F%2Fbjvnc.qcloud.com%3A26789%2Fvnc%3Fs%3DaHpjWnRVMFNhYmxKdDM5MjRHNlVTSVQwajNUSW0wb2tBbmFtREFCTmFrcy8vUUNPMG0wSHZNOUUxRm5PMmUzWmFDcWlOdDJIbUJxSTZDL0RXcHZxYnZZMmRkWWZWcEZia2lyb09XMzdKNmM9 +// +// ``` +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) DescribeInstanceVncUrl(request *DescribeInstanceVncUrlRequest) (response *DescribeInstanceVncUrlResponse, err error) { + return c.DescribeInstanceVncUrlWithContext(context.Background(), request) +} + +// DescribeInstanceVncUrl +// 本接口 ( DescribeInstanceVncUrl ) 用于查询实例管理终端地址,获取的地址可用于实例的 VNC 登录。 +// +// +// +// * 处于 `STOPPED` 状态的机器无法使用此功能。 +// +// * 管理终端地址的有效期为 15 秒,调用接口成功后如果 15 秒内不使用该链接进行访问,管理终端地址自动失效,您需要重新查询。 +// +// * 管理终端地址一旦被访问,将自动失效,您需要重新查询。 +// +// * 如果连接断开,每分钟内重新连接的次数不能超过 30 次。 +// +// 获取到 `InstanceVncUrl` 后,您需要在链接 `https://img.qcloud.com/qcloud/app/active_vnc/index.html?` 末尾加上参数 `InstanceVncUrl=xxxx`。 +// +// +// +// - 参数 `InstanceVncUrl` :调用接口成功后会返回的 `InstanceVncUrl` 的值。 +// +// +// +// 最后组成的 URL 格式如下: +// +// +// +// ``` +// +// https://img.qcloud.com/qcloud/app/active_vnc/index.html?InstanceVncUrl=wss%3A%2F%2Fbjvnc.qcloud.com%3A26789%2Fvnc%3Fs%3DaHpjWnRVMFNhYmxKdDM5MjRHNlVTSVQwajNUSW0wb2tBbmFtREFCTmFrcy8vUUNPMG0wSHZNOUUxRm5PMmUzWmFDcWlOdDJIbUJxSTZDL0RXcHZxYnZZMmRkWWZWcEZia2lyb09XMzdKNmM9 +// +// ``` +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) DescribeInstanceVncUrlWithContext(ctx context.Context, request *DescribeInstanceVncUrlRequest) (response *DescribeInstanceVncUrlResponse, err error) { + if request == nil { + request = NewDescribeInstanceVncUrlRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstanceVncUrl require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstanceVncUrlResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesRequest() (request *DescribeInstancesRequest) { + request = &DescribeInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeInstances") + + + return +} + +func NewDescribeInstancesResponse() (response *DescribeInstancesResponse) { + response = &DescribeInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstances +// 本接口(DescribeInstances)用于查询一个或多个实例的详细信息。 +// +// +// +// * 可以根据实例 ID、实例名称或者实例的内网 IP 查询实例的详细信息。 +// +// * 过滤信息详细请见过滤器 [Filters](https://cloud.tencent.com/document/product/1207/47576#Filter) 。 +// +// * 如果参数为空,返回当前用户一定数量(Limit 所指定的数量,默认为 20)的实例。 +// +// * 支持查询实例的最新操作(LatestOperation)以及最新操作状态(LatestOperationState)。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERINVALIDVALUESNOTLIST = "InvalidParameter.InvalidFilterInvalidValuesNotList" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCENAMETOOLONG = "InvalidParameterValue.InstanceNameTooLong" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +func (c *Client) DescribeInstances(request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) { + return c.DescribeInstancesWithContext(context.Background(), request) +} + +// DescribeInstances +// 本接口(DescribeInstances)用于查询一个或多个实例的详细信息。 +// +// +// +// * 可以根据实例 ID、实例名称或者实例的内网 IP 查询实例的详细信息。 +// +// * 过滤信息详细请见过滤器 [Filters](https://cloud.tencent.com/document/product/1207/47576#Filter) 。 +// +// * 如果参数为空,返回当前用户一定数量(Limit 所指定的数量,默认为 20)的实例。 +// +// * 支持查询实例的最新操作(LatestOperation)以及最新操作状态(LatestOperationState)。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERINVALIDVALUESNOTLIST = "InvalidParameter.InvalidFilterInvalidValuesNotList" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCENAMETOOLONG = "InvalidParameterValue.InstanceNameTooLong" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +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 NewDescribeInstancesDeniedActionsRequest() (request *DescribeInstancesDeniedActionsRequest) { + request = &DescribeInstancesDeniedActionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeInstancesDeniedActions") + + + return +} + +func NewDescribeInstancesDeniedActionsResponse() (response *DescribeInstancesDeniedActionsResponse) { + response = &DescribeInstancesDeniedActionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstancesDeniedActions +// 本接口(DescribeInstancesDeniedActions)用于查询一个或多个实例的操作限制列表信息。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeInstancesDeniedActions(request *DescribeInstancesDeniedActionsRequest) (response *DescribeInstancesDeniedActionsResponse, err error) { + return c.DescribeInstancesDeniedActionsWithContext(context.Background(), request) +} + +// DescribeInstancesDeniedActions +// 本接口(DescribeInstancesDeniedActions)用于查询一个或多个实例的操作限制列表信息。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeInstancesDeniedActionsWithContext(ctx context.Context, request *DescribeInstancesDeniedActionsRequest) (response *DescribeInstancesDeniedActionsResponse, err error) { + if request == nil { + request = NewDescribeInstancesDeniedActionsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstancesDeniedActions require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstancesDeniedActionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesDiskNumRequest() (request *DescribeInstancesDiskNumRequest) { + request = &DescribeInstancesDiskNumRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeInstancesDiskNum") + + + return +} + +func NewDescribeInstancesDiskNumResponse() (response *DescribeInstancesDiskNumResponse) { + response = &DescribeInstancesDiskNumResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstancesDiskNum +// 本接口(DescribeInstancesDiskNum)用于查询实例挂载云硬盘数量。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +func (c *Client) DescribeInstancesDiskNum(request *DescribeInstancesDiskNumRequest) (response *DescribeInstancesDiskNumResponse, err error) { + return c.DescribeInstancesDiskNumWithContext(context.Background(), request) +} + +// DescribeInstancesDiskNum +// 本接口(DescribeInstancesDiskNum)用于查询实例挂载云硬盘数量。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +func (c *Client) DescribeInstancesDiskNumWithContext(ctx context.Context, request *DescribeInstancesDiskNumRequest) (response *DescribeInstancesDiskNumResponse, err error) { + if request == nil { + request = NewDescribeInstancesDiskNumRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstancesDiskNum require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstancesDiskNumResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesReturnableRequest() (request *DescribeInstancesReturnableRequest) { + request = &DescribeInstancesReturnableRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeInstancesReturnable") + + + return +} + +func NewDescribeInstancesReturnableResponse() (response *DescribeInstancesReturnableResponse) { + response = &DescribeInstancesReturnableResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstancesReturnable +// 本接口(DescribeInstancesReturnable)用于查询实例是否可退还。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_DESCRIBEINSTANCESRETURNABLEERROR = "InternalError.DescribeInstancesReturnableError" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeInstancesReturnable(request *DescribeInstancesReturnableRequest) (response *DescribeInstancesReturnableResponse, err error) { + return c.DescribeInstancesReturnableWithContext(context.Background(), request) +} + +// DescribeInstancesReturnable +// 本接口(DescribeInstancesReturnable)用于查询实例是否可退还。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_DESCRIBEINSTANCESRETURNABLEERROR = "InternalError.DescribeInstancesReturnableError" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeInstancesReturnableWithContext(ctx context.Context, request *DescribeInstancesReturnableRequest) (response *DescribeInstancesReturnableResponse, err error) { + if request == nil { + request = NewDescribeInstancesReturnableRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstancesReturnable require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstancesReturnableResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesTrafficPackagesRequest() (request *DescribeInstancesTrafficPackagesRequest) { + request = &DescribeInstancesTrafficPackagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeInstancesTrafficPackages") + + + return +} + +func NewDescribeInstancesTrafficPackagesResponse() (response *DescribeInstancesTrafficPackagesResponse) { + response = &DescribeInstancesTrafficPackagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstancesTrafficPackages +// 本接口(DescribeInstancesTrafficPackages)用于查询一个或多个实例的流量包详情。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTRAFFICPACKAGESFAILED = "InternalError.DescribeInstancesTrafficPackagesFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +func (c *Client) DescribeInstancesTrafficPackages(request *DescribeInstancesTrafficPackagesRequest) (response *DescribeInstancesTrafficPackagesResponse, err error) { + return c.DescribeInstancesTrafficPackagesWithContext(context.Background(), request) +} + +// DescribeInstancesTrafficPackages +// 本接口(DescribeInstancesTrafficPackages)用于查询一个或多个实例的流量包详情。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTRAFFICPACKAGESFAILED = "InternalError.DescribeInstancesTrafficPackagesFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +func (c *Client) DescribeInstancesTrafficPackagesWithContext(ctx context.Context, request *DescribeInstancesTrafficPackagesRequest) (response *DescribeInstancesTrafficPackagesResponse, err error) { + if request == nil { + request = NewDescribeInstancesTrafficPackagesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstancesTrafficPackages require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstancesTrafficPackagesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeKeyPairsRequest() (request *DescribeKeyPairsRequest) { + request = &DescribeKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeKeyPairs") + + + return +} + +func NewDescribeKeyPairsResponse() (response *DescribeKeyPairsResponse) { + response = &DescribeKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeKeyPairs +// 本接口 (DescribeKeyPairs) 用于查询用户密钥对信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +func (c *Client) DescribeKeyPairs(request *DescribeKeyPairsRequest) (response *DescribeKeyPairsResponse, err error) { + return c.DescribeKeyPairsWithContext(context.Background(), request) +} + +// DescribeKeyPairs +// 本接口 (DescribeKeyPairs) 用于查询用户密钥对信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +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 NewDescribeModifyInstanceBundlesRequest() (request *DescribeModifyInstanceBundlesRequest) { + request = &DescribeModifyInstanceBundlesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeModifyInstanceBundles") + + + return +} + +func NewDescribeModifyInstanceBundlesResponse() (response *DescribeModifyInstanceBundlesResponse) { + response = &DescribeModifyInstanceBundlesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeModifyInstanceBundles +// 本接口(DescribeModifyInstanceBundles)用于查询实例可变更套餐列表。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_DESCRIBEINSTANCESMODIFICATION = "InternalError.DescribeInstancesModification" +// INTERNALERROR_DESCRIBEINSTANCESMODIFICATIONERROR = "InternalError.DescribeInstancesModificationError" +// INTERNALERROR_INVALIDBUNDLEPRICE = "InternalError.InvalidBundlePrice" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDCONSOLEDISPLAYTYPES = "InvalidParameterValue.InvalidConsoleDisplayTypes" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_BUNDLENOTSUPPORTMODIFY = "OperationDenied.BundleNotSupportModify" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_INSTANCEEXPIRED = "UnsupportedOperation.InstanceExpired" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +func (c *Client) DescribeModifyInstanceBundles(request *DescribeModifyInstanceBundlesRequest) (response *DescribeModifyInstanceBundlesResponse, err error) { + return c.DescribeModifyInstanceBundlesWithContext(context.Background(), request) +} + +// DescribeModifyInstanceBundles +// 本接口(DescribeModifyInstanceBundles)用于查询实例可变更套餐列表。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_DESCRIBEINSTANCESMODIFICATION = "InternalError.DescribeInstancesModification" +// INTERNALERROR_DESCRIBEINSTANCESMODIFICATIONERROR = "InternalError.DescribeInstancesModificationError" +// INTERNALERROR_INVALIDBUNDLEPRICE = "InternalError.InvalidBundlePrice" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDCONSOLEDISPLAYTYPES = "InvalidParameterValue.InvalidConsoleDisplayTypes" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_BUNDLENOTSUPPORTMODIFY = "OperationDenied.BundleNotSupportModify" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_INSTANCEEXPIRED = "UnsupportedOperation.InstanceExpired" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +func (c *Client) DescribeModifyInstanceBundlesWithContext(ctx context.Context, request *DescribeModifyInstanceBundlesRequest) (response *DescribeModifyInstanceBundlesResponse, err error) { + if request == nil { + request = NewDescribeModifyInstanceBundlesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeModifyInstanceBundles require credential") + } + + request.SetContext(ctx) + + response = NewDescribeModifyInstanceBundlesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) { + request = &DescribeRegionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeRegions") + + + return +} + +func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) { + response = &DescribeRegionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRegions +// 本接口(DescribeRegions)用于查询地域信息。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_DESCRIBEINSTANCESMODIFICATION = "InternalError.DescribeInstancesModification" +// INTERNALERROR_DESCRIBEINSTANCESMODIFICATIONERROR = "InternalError.DescribeInstancesModificationError" +// INTERNALERROR_INVALIDBUNDLEPRICE = "InternalError.InvalidBundlePrice" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDCONSOLEDISPLAYTYPES = "InvalidParameterValue.InvalidConsoleDisplayTypes" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_BUNDLENOTSUPPORTMODIFY = "OperationDenied.BundleNotSupportModify" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_INSTANCEEXPIRED = "UnsupportedOperation.InstanceExpired" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { + return c.DescribeRegionsWithContext(context.Background(), request) +} + +// DescribeRegions +// 本接口(DescribeRegions)用于查询地域信息。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_DESCRIBEINSTANCESMODIFICATION = "InternalError.DescribeInstancesModification" +// INTERNALERROR_DESCRIBEINSTANCESMODIFICATIONERROR = "InternalError.DescribeInstancesModificationError" +// INTERNALERROR_INVALIDBUNDLEPRICE = "InternalError.InvalidBundlePrice" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDCONSOLEDISPLAYTYPES = "InvalidParameterValue.InvalidConsoleDisplayTypes" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_BUNDLENOTSUPPORTMODIFY = "OperationDenied.BundleNotSupportModify" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_INSTANCEEXPIRED = "UnsupportedOperation.InstanceExpired" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +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 NewDescribeResetInstanceBlueprintsRequest() (request *DescribeResetInstanceBlueprintsRequest) { + request = &DescribeResetInstanceBlueprintsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeResetInstanceBlueprints") + + + return +} + +func NewDescribeResetInstanceBlueprintsResponse() (response *DescribeResetInstanceBlueprintsResponse) { + response = &DescribeResetInstanceBlueprintsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeResetInstanceBlueprints +// 本接口(DescribeResetInstanceBlueprints)查询重置实例的镜像信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTSTATE = "InvalidParameterValue.InvalidBlueprintState" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTTYPE = "InvalidParameterValue.InvalidBlueprintType" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeResetInstanceBlueprints(request *DescribeResetInstanceBlueprintsRequest) (response *DescribeResetInstanceBlueprintsResponse, err error) { + return c.DescribeResetInstanceBlueprintsWithContext(context.Background(), request) +} + +// DescribeResetInstanceBlueprints +// 本接口(DescribeResetInstanceBlueprints)查询重置实例的镜像信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTSTATE = "InvalidParameterValue.InvalidBlueprintState" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTTYPE = "InvalidParameterValue.InvalidBlueprintType" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) DescribeResetInstanceBlueprintsWithContext(ctx context.Context, request *DescribeResetInstanceBlueprintsRequest) (response *DescribeResetInstanceBlueprintsResponse, err error) { + if request == nil { + request = NewDescribeResetInstanceBlueprintsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeResetInstanceBlueprints require credential") + } + + request.SetContext(ctx) + + response = NewDescribeResetInstanceBlueprintsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeSnapshotsRequest() (request *DescribeSnapshotsRequest) { + request = &DescribeSnapshotsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeSnapshots") + + + return +} + +func NewDescribeSnapshotsResponse() (response *DescribeSnapshotsResponse) { + response = &DescribeSnapshotsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeSnapshots +// 本接口(DescribeSnapshots)用于查询快照的详细信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERINVALIDVALUESNOTLIST = "InvalidParameter.InvalidFilterInvalidValuesNotList" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SNAPSHOTNAMETOOLONG = "InvalidParameterValue.SnapshotNameTooLong" +func (c *Client) DescribeSnapshots(request *DescribeSnapshotsRequest) (response *DescribeSnapshotsResponse, err error) { + return c.DescribeSnapshotsWithContext(context.Background(), request) +} + +// DescribeSnapshots +// 本接口(DescribeSnapshots)用于查询快照的详细信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERINVALIDVALUESNOTLIST = "InvalidParameter.InvalidFilterInvalidValuesNotList" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SNAPSHOTNAMETOOLONG = "InvalidParameterValue.SnapshotNameTooLong" +func (c *Client) DescribeSnapshotsWithContext(ctx context.Context, request *DescribeSnapshotsRequest) (response *DescribeSnapshotsResponse, err error) { + if request == nil { + request = NewDescribeSnapshotsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeSnapshots require credential") + } + + request.SetContext(ctx) + + response = NewDescribeSnapshotsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeSnapshotsDeniedActionsRequest() (request *DescribeSnapshotsDeniedActionsRequest) { + request = &DescribeSnapshotsDeniedActionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeSnapshotsDeniedActions") + + + return +} + +func NewDescribeSnapshotsDeniedActionsResponse() (response *DescribeSnapshotsDeniedActionsResponse) { + response = &DescribeSnapshotsDeniedActionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeSnapshotsDeniedActions +// 本接口(DescribeSnapshotsDeniedActions)用于查询一个或多个快照的操作限制列表信息。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +func (c *Client) DescribeSnapshotsDeniedActions(request *DescribeSnapshotsDeniedActionsRequest) (response *DescribeSnapshotsDeniedActionsResponse, err error) { + return c.DescribeSnapshotsDeniedActionsWithContext(context.Background(), request) +} + +// DescribeSnapshotsDeniedActions +// 本接口(DescribeSnapshotsDeniedActions)用于查询一个或多个快照的操作限制列表信息。 +// +// 可能返回的错误码: +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +func (c *Client) DescribeSnapshotsDeniedActionsWithContext(ctx context.Context, request *DescribeSnapshotsDeniedActionsRequest) (response *DescribeSnapshotsDeniedActionsResponse, err error) { + if request == nil { + request = NewDescribeSnapshotsDeniedActionsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeSnapshotsDeniedActions require credential") + } + + request.SetContext(ctx) + + response = NewDescribeSnapshotsDeniedActionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeZonesRequest() (request *DescribeZonesRequest) { + request = &DescribeZonesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DescribeZones") + + + return +} + +func NewDescribeZonesResponse() (response *DescribeZonesResponse) { + response = &DescribeZonesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeZones +// 查询地域下可用区 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DescribeZones(request *DescribeZonesRequest) (response *DescribeZonesResponse, err error) { + return c.DescribeZonesWithContext(context.Background(), request) +} + +// DescribeZones +// 查询地域下可用区 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// UNKNOWNPARAMETER = "UnknownParameter" +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 NewDetachCcnRequest() (request *DetachCcnRequest) { + request = &DetachCcnRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DetachCcn") + + + return +} + +func NewDetachCcnResponse() (response *DetachCcnResponse) { + response = &DetachCcnResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DetachCcn +// 本接口 (AttachCcn) 用于解除与云联网的关联。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_DETACHCCNFAILED = "UnsupportedOperation.DetachCcnFailed" +func (c *Client) DetachCcn(request *DetachCcnRequest) (response *DetachCcnResponse, err error) { + return c.DetachCcnWithContext(context.Background(), request) +} + +// DetachCcn +// 本接口 (AttachCcn) 用于解除与云联网的关联。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_DETACHCCNFAILED = "UnsupportedOperation.DetachCcnFailed" +func (c *Client) DetachCcnWithContext(ctx context.Context, request *DetachCcnRequest) (response *DetachCcnResponse, err error) { + if request == nil { + request = NewDetachCcnRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DetachCcn require credential") + } + + request.SetContext(ctx) + + response = NewDetachCcnResponse() + err = c.Send(request, response) + return +} + +func NewDetachDisksRequest() (request *DetachDisksRequest) { + request = &DetachDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DetachDisks") + + + return +} + +func NewDetachDisksResponse() (response *DetachDisksResponse) { + response = &DetachDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DetachDisks +// 本接口(DetachDisks)用于卸载一个或多个云硬盘。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// OPERATIONDENIED_DISKCREATING = "OperationDenied.DiskCreating" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +// UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) DetachDisks(request *DetachDisksRequest) (response *DetachDisksResponse, err error) { + return c.DetachDisksWithContext(context.Background(), request) +} + +// DetachDisks +// 本接口(DetachDisks)用于卸载一个或多个云硬盘。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// OPERATIONDENIED_DISKCREATING = "OperationDenied.DiskCreating" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +// UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) DetachDisksWithContext(ctx context.Context, request *DetachDisksRequest) (response *DetachDisksResponse, err error) { + if request == nil { + request = NewDetachDisksRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DetachDisks require credential") + } + + request.SetContext(ctx) + + response = NewDetachDisksResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateInstancesKeyPairsRequest() (request *DisassociateInstancesKeyPairsRequest) { + request = &DisassociateInstancesKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "DisassociateInstancesKeyPairs") + + + return +} + +func NewDisassociateInstancesKeyPairsResponse() (response *DisassociateInstancesKeyPairsResponse) { + response = &DisassociateInstancesKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateInstancesKeyPairs +// 本接口(DisassociateInstancesKeyPairs)用于解除实例与指定密钥对的绑定关系。 +// +// +// +// * 只支持 [RUNNING, STOPPED] 状态的 LINUX_UNIX 操作系统的实例。处于 RUNNING 状态的实例会强制关机,然后解绑。 +// +// * 解绑密钥后,实例可以通过原来设置的密码登录。 +// +// * 如果原来没有设置密码,解绑后将无法使用 SSH 登录。可以调用 ResetInstancesPassword 接口来设置登录密码。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// RESOURCENOTFOUND_KEYIDNOTFOUND = "ResourceNotFound.KeyIdNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_KEYPAIRNOTBOUNDTOINSTANCE = "UnsupportedOperation.KeyPairNotBoundToInstance" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) DisassociateInstancesKeyPairs(request *DisassociateInstancesKeyPairsRequest) (response *DisassociateInstancesKeyPairsResponse, err error) { + return c.DisassociateInstancesKeyPairsWithContext(context.Background(), request) +} + +// DisassociateInstancesKeyPairs +// 本接口(DisassociateInstancesKeyPairs)用于解除实例与指定密钥对的绑定关系。 +// +// +// +// * 只支持 [RUNNING, STOPPED] 状态的 LINUX_UNIX 操作系统的实例。处于 RUNNING 状态的实例会强制关机,然后解绑。 +// +// * 解绑密钥后,实例可以通过原来设置的密码登录。 +// +// * 如果原来没有设置密码,解绑后将无法使用 SSH 登录。可以调用 ResetInstancesPassword 接口来设置登录密码。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// RESOURCENOTFOUND_KEYIDNOTFOUND = "ResourceNotFound.KeyIdNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_KEYPAIRNOTBOUNDTOINSTANCE = "UnsupportedOperation.KeyPairNotBoundToInstance" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +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 NewImportKeyPairRequest() (request *ImportKeyPairRequest) { + request = &ImportKeyPairRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ImportKeyPair") + + + return +} + +func NewImportKeyPairResponse() (response *ImportKeyPairResponse) { + response = &ImportKeyPairResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ImportKeyPair +// 本接口(ImportKeyPair)用于导入用户指定密钥对。 +// +// 可能返回的错误码: +// FAILEDOPERATION_CREATEKEYPAIRFAILED = "FailedOperation.CreateKeyPairFailed" +// FAILEDOPERATION_DELETEKEYPAIRFAILED = "FailedOperation.DeleteKeyPairFailed" +// FAILEDOPERATION_IMPORTKEYPAIRFAILED = "FailedOperation.ImportKeyPairFailed" +// INVALIDPARAMETERVALUE_DUPLICATEPARAMETERVALUE = "InvalidParameterValue.DuplicateParameterValue" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMEEMPTY = "InvalidParameterValue.InvalidKeyPairNameEmpty" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMETOOLONG = "InvalidParameterValue.InvalidKeyPairNameTooLong" +// INVALIDPARAMETERVALUE_KEYPAIRPUBLICKEYDUPLICATED = "InvalidParameterValue.KeyPairPublicKeyDuplicated" +// INVALIDPARAMETERVALUE_KEYPAIRPUBLICKEYMALFORMED = "InvalidParameterValue.KeyPairPublicKeyMalformed" +// LIMITEXCEEDED_KEYPAIRLIMITEXCEEDED = "LimitExceeded.KeyPairLimitExceeded" +func (c *Client) ImportKeyPair(request *ImportKeyPairRequest) (response *ImportKeyPairResponse, err error) { + return c.ImportKeyPairWithContext(context.Background(), request) +} + +// ImportKeyPair +// 本接口(ImportKeyPair)用于导入用户指定密钥对。 +// +// 可能返回的错误码: +// FAILEDOPERATION_CREATEKEYPAIRFAILED = "FailedOperation.CreateKeyPairFailed" +// FAILEDOPERATION_DELETEKEYPAIRFAILED = "FailedOperation.DeleteKeyPairFailed" +// FAILEDOPERATION_IMPORTKEYPAIRFAILED = "FailedOperation.ImportKeyPairFailed" +// INVALIDPARAMETERVALUE_DUPLICATEPARAMETERVALUE = "InvalidParameterValue.DuplicateParameterValue" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMEEMPTY = "InvalidParameterValue.InvalidKeyPairNameEmpty" +// INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMETOOLONG = "InvalidParameterValue.InvalidKeyPairNameTooLong" +// INVALIDPARAMETERVALUE_KEYPAIRPUBLICKEYDUPLICATED = "InvalidParameterValue.KeyPairPublicKeyDuplicated" +// INVALIDPARAMETERVALUE_KEYPAIRPUBLICKEYMALFORMED = "InvalidParameterValue.KeyPairPublicKeyMalformed" +// LIMITEXCEEDED_KEYPAIRLIMITEXCEEDED = "LimitExceeded.KeyPairLimitExceeded" +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 NewInquirePriceCreateBlueprintRequest() (request *InquirePriceCreateBlueprintRequest) { + request = &InquirePriceCreateBlueprintRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "InquirePriceCreateBlueprint") + + + return +} + +func NewInquirePriceCreateBlueprintResponse() (response *InquirePriceCreateBlueprintResponse) { + response = &InquirePriceCreateBlueprintResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquirePriceCreateBlueprint +// 本接口 (InquirePriceCreateBlueprint) 用于创建镜像询价。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +func (c *Client) InquirePriceCreateBlueprint(request *InquirePriceCreateBlueprintRequest) (response *InquirePriceCreateBlueprintResponse, err error) { + return c.InquirePriceCreateBlueprintWithContext(context.Background(), request) +} + +// InquirePriceCreateBlueprint +// 本接口 (InquirePriceCreateBlueprint) 用于创建镜像询价。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +func (c *Client) InquirePriceCreateBlueprintWithContext(ctx context.Context, request *InquirePriceCreateBlueprintRequest) (response *InquirePriceCreateBlueprintResponse, err error) { + if request == nil { + request = NewInquirePriceCreateBlueprintRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("InquirePriceCreateBlueprint require credential") + } + + request.SetContext(ctx) + + response = NewInquirePriceCreateBlueprintResponse() + err = c.Send(request, response) + return +} + +func NewInquirePriceCreateDisksRequest() (request *InquirePriceCreateDisksRequest) { + request = &InquirePriceCreateDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "InquirePriceCreateDisks") + + + return +} + +func NewInquirePriceCreateDisksResponse() (response *InquirePriceCreateDisksResponse) { + response = &InquirePriceCreateDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquirePriceCreateDisks +// 本接口(InquirePriceCreateDisks)用于新购云硬盘询价。 +// +// 可能返回的错误码: +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +func (c *Client) InquirePriceCreateDisks(request *InquirePriceCreateDisksRequest) (response *InquirePriceCreateDisksResponse, err error) { + return c.InquirePriceCreateDisksWithContext(context.Background(), request) +} + +// InquirePriceCreateDisks +// 本接口(InquirePriceCreateDisks)用于新购云硬盘询价。 +// +// 可能返回的错误码: +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +func (c *Client) InquirePriceCreateDisksWithContext(ctx context.Context, request *InquirePriceCreateDisksRequest) (response *InquirePriceCreateDisksResponse, err error) { + if request == nil { + request = NewInquirePriceCreateDisksRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("InquirePriceCreateDisks require credential") + } + + request.SetContext(ctx) + + response = NewInquirePriceCreateDisksResponse() + err = c.Send(request, response) + return +} + +func NewInquirePriceCreateInstancesRequest() (request *InquirePriceCreateInstancesRequest) { + request = &InquirePriceCreateInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "InquirePriceCreateInstances") + + + return +} + +func NewInquirePriceCreateInstancesResponse() (response *InquirePriceCreateInstancesResponse) { + response = &InquirePriceCreateInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquirePriceCreateInstances +// 本接口(InquiryPriceCreateInstances)用于创建实例询价。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTID = "InvalidParameterValue.InvalidBlueprintId" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +func (c *Client) InquirePriceCreateInstances(request *InquirePriceCreateInstancesRequest) (response *InquirePriceCreateInstancesResponse, err error) { + return c.InquirePriceCreateInstancesWithContext(context.Background(), request) +} + +// InquirePriceCreateInstances +// 本接口(InquiryPriceCreateInstances)用于创建实例询价。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBLUEPRINTID = "InvalidParameterValue.InvalidBlueprintId" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +func (c *Client) InquirePriceCreateInstancesWithContext(ctx context.Context, request *InquirePriceCreateInstancesRequest) (response *InquirePriceCreateInstancesResponse, err error) { + if request == nil { + request = NewInquirePriceCreateInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("InquirePriceCreateInstances require credential") + } + + request.SetContext(ctx) + + response = NewInquirePriceCreateInstancesResponse() + err = c.Send(request, response) + return +} + +func NewInquirePriceRenewDisksRequest() (request *InquirePriceRenewDisksRequest) { + request = &InquirePriceRenewDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "InquirePriceRenewDisks") + + + return +} + +func NewInquirePriceRenewDisksResponse() (response *InquirePriceRenewDisksResponse) { + response = &InquirePriceRenewDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquirePriceRenewDisks +// 本接口(InquirePriceRenewDisks)用于续费云硬盘询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +func (c *Client) InquirePriceRenewDisks(request *InquirePriceRenewDisksRequest) (response *InquirePriceRenewDisksResponse, err error) { + return c.InquirePriceRenewDisksWithContext(context.Background(), request) +} + +// InquirePriceRenewDisks +// 本接口(InquirePriceRenewDisks)用于续费云硬盘询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +func (c *Client) InquirePriceRenewDisksWithContext(ctx context.Context, request *InquirePriceRenewDisksRequest) (response *InquirePriceRenewDisksResponse, err error) { + if request == nil { + request = NewInquirePriceRenewDisksRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("InquirePriceRenewDisks require credential") + } + + request.SetContext(ctx) + + response = NewInquirePriceRenewDisksResponse() + err = c.Send(request, response) + return +} + +func NewInquirePriceRenewInstancesRequest() (request *InquirePriceRenewInstancesRequest) { + request = &InquirePriceRenewInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "InquirePriceRenewInstances") + + + return +} + +func NewInquirePriceRenewInstancesResponse() (response *InquirePriceRenewInstancesResponse) { + response = &InquirePriceRenewInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquirePriceRenewInstances +// 本接口(InquirePriceRenewInstances)用于续费实例询价。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCENOTFOUND_INSTANCEDATADISKNOTFOUND = "ResourceNotFound.InstanceDataDiskNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) InquirePriceRenewInstances(request *InquirePriceRenewInstancesRequest) (response *InquirePriceRenewInstancesResponse, err error) { + return c.InquirePriceRenewInstancesWithContext(context.Background(), request) +} + +// InquirePriceRenewInstances +// 本接口(InquirePriceRenewInstances)用于续费实例询价。 +// +// 可能返回的错误码: +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCENOTFOUND_INSTANCEDATADISKNOTFOUND = "ResourceNotFound.InstanceDataDiskNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +func (c *Client) InquirePriceRenewInstancesWithContext(ctx context.Context, request *InquirePriceRenewInstancesRequest) (response *InquirePriceRenewInstancesResponse, err error) { + if request == nil { + request = NewInquirePriceRenewInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("InquirePriceRenewInstances require credential") + } + + request.SetContext(ctx) + + response = NewInquirePriceRenewInstancesResponse() + err = c.Send(request, response) + return +} + +func NewIsolateInstancesRequest() (request *IsolateInstancesRequest) { + request = &IsolateInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "IsolateInstances") + + + return +} + +func NewIsolateInstancesResponse() (response *IsolateInstancesResponse) { + response = &IsolateInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// IsolateInstances +// 本接口(IsolateInstances)用于退还一个或多个轻量应用服务器实例。 +// +// * 只有状态为 RUNNING 或 STOPPED 的实例才可以进行此操作。 +// +// * 接口调用成功后,实例会进入SHUTDOWN 状态。 +// +// * 支持批量操作。每次请求批量资源(包括实例与数据盘)的上限为 20。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION_ISOLATERESOURCESFAILED = "FailedOperation.IsolateResourcesFailed" +// INTERNALERROR_DESCRIBERESOURCESRETURNABLEERROR = "InternalError.DescribeResourcesReturnableError" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// LIMITEXCEEDED_ISOLATERESOURCESLIMITEXCEEDED = "LimitExceeded.IsolateResourcesLimitExceeded" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_RESOURCENOTRETURNABLE = "UnsupportedOperation.ResourceNotReturnable" +func (c *Client) IsolateInstances(request *IsolateInstancesRequest) (response *IsolateInstancesResponse, err error) { + return c.IsolateInstancesWithContext(context.Background(), request) +} + +// IsolateInstances +// 本接口(IsolateInstances)用于退还一个或多个轻量应用服务器实例。 +// +// * 只有状态为 RUNNING 或 STOPPED 的实例才可以进行此操作。 +// +// * 接口调用成功后,实例会进入SHUTDOWN 状态。 +// +// * 支持批量操作。每次请求批量资源(包括实例与数据盘)的上限为 20。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION_ISOLATERESOURCESFAILED = "FailedOperation.IsolateResourcesFailed" +// INTERNALERROR_DESCRIBERESOURCESRETURNABLEERROR = "InternalError.DescribeResourcesReturnableError" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// LIMITEXCEEDED_ISOLATERESOURCESLIMITEXCEEDED = "LimitExceeded.IsolateResourcesLimitExceeded" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_RESOURCENOTRETURNABLE = "UnsupportedOperation.ResourceNotReturnable" +func (c *Client) IsolateInstancesWithContext(ctx context.Context, request *IsolateInstancesRequest) (response *IsolateInstancesResponse, err error) { + if request == nil { + request = NewIsolateInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("IsolateInstances require credential") + } + + request.SetContext(ctx) + + response = NewIsolateInstancesResponse() + err = c.Send(request, response) + return +} + +func NewModifyBlueprintAttributeRequest() (request *ModifyBlueprintAttributeRequest) { + request = &ModifyBlueprintAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifyBlueprintAttribute") + + + return +} + +func NewModifyBlueprintAttributeResponse() (response *ModifyBlueprintAttributeResponse) { + response = &ModifyBlueprintAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyBlueprintAttribute +// 本接口 (ModifyBlueprintAttribute) 用于修改镜像属性。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// UNSUPPORTEDOPERATION_BLUEPRINTCURSTATEINVALID = "UnsupportedOperation.BlueprintCurStateInvalid" +// UNSUPPORTEDOPERATION_NOTSUPPORTSHAREDBLUEPRINT = "UnsupportedOperation.NotSupportSharedBlueprint" +func (c *Client) ModifyBlueprintAttribute(request *ModifyBlueprintAttributeRequest) (response *ModifyBlueprintAttributeResponse, err error) { + return c.ModifyBlueprintAttributeWithContext(context.Background(), request) +} + +// ModifyBlueprintAttribute +// 本接口 (ModifyBlueprintAttribute) 用于修改镜像属性。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// UNSUPPORTEDOPERATION_BLUEPRINTCURSTATEINVALID = "UnsupportedOperation.BlueprintCurStateInvalid" +// UNSUPPORTEDOPERATION_NOTSUPPORTSHAREDBLUEPRINT = "UnsupportedOperation.NotSupportSharedBlueprint" +func (c *Client) ModifyBlueprintAttributeWithContext(ctx context.Context, request *ModifyBlueprintAttributeRequest) (response *ModifyBlueprintAttributeResponse, err error) { + if request == nil { + request = NewModifyBlueprintAttributeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyBlueprintAttribute require credential") + } + + request.SetContext(ctx) + + response = NewModifyBlueprintAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyDisksAttributeRequest() (request *ModifyDisksAttributeRequest) { + request = &ModifyDisksAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifyDisksAttribute") + + + return +} + +func NewModifyDisksAttributeResponse() (response *ModifyDisksAttributeResponse) { + response = &ModifyDisksAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyDisksAttribute +// 本接口(ModifyDisksAttribute)用于修改云硬盘属性。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +func (c *Client) ModifyDisksAttribute(request *ModifyDisksAttributeRequest) (response *ModifyDisksAttributeResponse, err error) { + return c.ModifyDisksAttributeWithContext(context.Background(), request) +} + +// ModifyDisksAttribute +// 本接口(ModifyDisksAttribute)用于修改云硬盘属性。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +func (c *Client) ModifyDisksAttributeWithContext(ctx context.Context, request *ModifyDisksAttributeRequest) (response *ModifyDisksAttributeResponse, err error) { + if request == nil { + request = NewModifyDisksAttributeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyDisksAttribute require credential") + } + + request.SetContext(ctx) + + response = NewModifyDisksAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyDisksRenewFlagRequest() (request *ModifyDisksRenewFlagRequest) { + request = &ModifyDisksRenewFlagRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifyDisksRenewFlag") + + + return +} + +func NewModifyDisksRenewFlagResponse() (response *ModifyDisksRenewFlagResponse) { + response = &ModifyDisksRenewFlagResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyDisksRenewFlag +// 本接口(ModifyDisksRenewFlag)用于修改云硬盘续费标识。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// OPERATIONDENIED_DISKCREATING = "OperationDenied.DiskCreating" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +func (c *Client) ModifyDisksRenewFlag(request *ModifyDisksRenewFlagRequest) (response *ModifyDisksRenewFlagResponse, err error) { + return c.ModifyDisksRenewFlagWithContext(context.Background(), request) +} + +// ModifyDisksRenewFlag +// 本接口(ModifyDisksRenewFlag)用于修改云硬盘续费标识。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// OPERATIONDENIED_DISKCREATING = "OperationDenied.DiskCreating" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" +func (c *Client) ModifyDisksRenewFlagWithContext(ctx context.Context, request *ModifyDisksRenewFlagRequest) (response *ModifyDisksRenewFlagResponse, err error) { + if request == nil { + request = NewModifyDisksRenewFlagRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyDisksRenewFlag require credential") + } + + request.SetContext(ctx) + + response = NewModifyDisksRenewFlagResponse() + err = c.Send(request, response) + return +} + +func NewModifyFirewallRuleDescriptionRequest() (request *ModifyFirewallRuleDescriptionRequest) { + request = &ModifyFirewallRuleDescriptionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifyFirewallRuleDescription") + + + return +} + +func NewModifyFirewallRuleDescriptionResponse() (response *ModifyFirewallRuleDescriptionResponse) { + response = &ModifyFirewallRuleDescriptionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyFirewallRuleDescription +// 本接口(ModifyFirewallRuleDescription)用于修改单条防火墙规则描述。 +// +// +// +// * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接修改防火墙规则备注。 +// +// +// +// 在 FirewallRule 参数中: +// +// * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。 +// +// * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。 +// +// * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。 +// +// * Action 字段只允许输入 ACCEPT 或 DROP。 +// +// * FirewallRuleDescription 字段长度不得超过 64。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_FIREWALLRULESNOTFOUND = "ResourceNotFound.FirewallRulesNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" +// UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" +func (c *Client) ModifyFirewallRuleDescription(request *ModifyFirewallRuleDescriptionRequest) (response *ModifyFirewallRuleDescriptionResponse, err error) { + return c.ModifyFirewallRuleDescriptionWithContext(context.Background(), request) +} + +// ModifyFirewallRuleDescription +// 本接口(ModifyFirewallRuleDescription)用于修改单条防火墙规则描述。 +// +// +// +// * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接修改防火墙规则备注。 +// +// +// +// 在 FirewallRule 参数中: +// +// * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。 +// +// * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。 +// +// * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。 +// +// * Action 字段只允许输入 ACCEPT 或 DROP。 +// +// * FirewallRuleDescription 字段长度不得超过 64。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_FIREWALLRULESNOTFOUND = "ResourceNotFound.FirewallRulesNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" +// UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" +func (c *Client) ModifyFirewallRuleDescriptionWithContext(ctx context.Context, request *ModifyFirewallRuleDescriptionRequest) (response *ModifyFirewallRuleDescriptionResponse, err error) { + if request == nil { + request = NewModifyFirewallRuleDescriptionRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyFirewallRuleDescription require credential") + } + + request.SetContext(ctx) + + response = NewModifyFirewallRuleDescriptionResponse() + err = c.Send(request, response) + return +} + +func NewModifyFirewallRulesRequest() (request *ModifyFirewallRulesRequest) { + request = &ModifyFirewallRulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifyFirewallRules") + + + return +} + +func NewModifyFirewallRulesResponse() (response *ModifyFirewallRulesResponse) { + response = &ModifyFirewallRulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyFirewallRules +// 本接口(ModifyFirewallRules)用于重置实例防火墙规则。 +// +// +// +// 本接口先删除当前实例的所有防火墙规则,然后添加新的规则。 +// +// +// +// * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接重置防火墙规则。 +// +// +// +// 在 FirewallRules 参数中: +// +// * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。 +// +// * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。 +// +// * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。 +// +// * Action 字段只允许输入 ACCEPT 或 DROP。 +// +// * FirewallRuleDescription 字段长度不得超过 64。 +// +// 可能返回的错误码: +// FAILEDOPERATION_FIREWALLRULESOPERATIONFAILED = "FailedOperation.FirewallRulesOperationFailed" +// INVALIDPARAMETER_FIREWALLRULESDUPLICATED = "InvalidParameter.FirewallRulesDuplicated" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" +// UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" +func (c *Client) ModifyFirewallRules(request *ModifyFirewallRulesRequest) (response *ModifyFirewallRulesResponse, err error) { + return c.ModifyFirewallRulesWithContext(context.Background(), request) +} + +// ModifyFirewallRules +// 本接口(ModifyFirewallRules)用于重置实例防火墙规则。 +// +// +// +// 本接口先删除当前实例的所有防火墙规则,然后添加新的规则。 +// +// +// +// * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接重置防火墙规则。 +// +// +// +// 在 FirewallRules 参数中: +// +// * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。 +// +// * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。 +// +// * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。 +// +// * Action 字段只允许输入 ACCEPT 或 DROP。 +// +// * FirewallRuleDescription 字段长度不得超过 64。 +// +// 可能返回的错误码: +// FAILEDOPERATION_FIREWALLRULESOPERATIONFAILED = "FailedOperation.FirewallRulesOperationFailed" +// INVALIDPARAMETER_FIREWALLRULESDUPLICATED = "InvalidParameter.FirewallRulesDuplicated" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" +// UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" +func (c *Client) ModifyFirewallRulesWithContext(ctx context.Context, request *ModifyFirewallRulesRequest) (response *ModifyFirewallRulesResponse, err error) { + if request == nil { + request = NewModifyFirewallRulesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyFirewallRules require credential") + } + + request.SetContext(ctx) + + response = NewModifyFirewallRulesResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesAttributeRequest() (request *ModifyInstancesAttributeRequest) { + request = &ModifyInstancesAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifyInstancesAttribute") + + + return +} + +func NewModifyInstancesAttributeResponse() (response *ModifyInstancesAttributeResponse) { + response = &ModifyInstancesAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstancesAttribute +// 本接口(ModifyInstancesAttribute)用于修改实例的属性。 +// +// * “实例名称”仅为方便用户自己管理之用。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETER_ONLYALLOWMODIFYONEATTRIBUTE = "InvalidParameter.OnlyAllowModifyOneAttribute" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCENAMETOOLONG = "InvalidParameterValue.InstanceNameTooLong" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) ModifyInstancesAttribute(request *ModifyInstancesAttributeRequest) (response *ModifyInstancesAttributeResponse, err error) { + return c.ModifyInstancesAttributeWithContext(context.Background(), request) +} + +// ModifyInstancesAttribute +// 本接口(ModifyInstancesAttribute)用于修改实例的属性。 +// +// * “实例名称”仅为方便用户自己管理之用。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETER_ONLYALLOWMODIFYONEATTRIBUTE = "InvalidParameter.OnlyAllowModifyOneAttribute" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INSTANCENAMETOOLONG = "InvalidParameterValue.InstanceNameTooLong" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +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 NewModifyInstancesLoginKeyPairAttributeRequest() (request *ModifyInstancesLoginKeyPairAttributeRequest) { + request = &ModifyInstancesLoginKeyPairAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifyInstancesLoginKeyPairAttribute") + + + return +} + +func NewModifyInstancesLoginKeyPairAttributeResponse() (response *ModifyInstancesLoginKeyPairAttributeResponse) { + response = &ModifyInstancesLoginKeyPairAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstancesLoginKeyPairAttribute +// 本接口用于设置实例默认登录密钥对属性。 +// +// +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDINSTANCELOGINKEYPAIRPERMITLOGIN = "InvalidParameterValue.InvalidInstanceLoginKeyPairPermitLogin" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) ModifyInstancesLoginKeyPairAttribute(request *ModifyInstancesLoginKeyPairAttributeRequest) (response *ModifyInstancesLoginKeyPairAttributeResponse, err error) { + return c.ModifyInstancesLoginKeyPairAttributeWithContext(context.Background(), request) +} + +// ModifyInstancesLoginKeyPairAttribute +// 本接口用于设置实例默认登录密钥对属性。 +// +// +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDINSTANCELOGINKEYPAIRPERMITLOGIN = "InvalidParameterValue.InvalidInstanceLoginKeyPairPermitLogin" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) ModifyInstancesLoginKeyPairAttributeWithContext(ctx context.Context, request *ModifyInstancesLoginKeyPairAttributeRequest) (response *ModifyInstancesLoginKeyPairAttributeResponse, err error) { + if request == nil { + request = NewModifyInstancesLoginKeyPairAttributeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyInstancesLoginKeyPairAttribute require credential") + } + + request.SetContext(ctx) + + response = NewModifyInstancesLoginKeyPairAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesRenewFlagRequest() (request *ModifyInstancesRenewFlagRequest) { + request = &ModifyInstancesRenewFlagRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifyInstancesRenewFlag") + + + return +} + +func NewModifyInstancesRenewFlagResponse() (response *ModifyInstancesRenewFlagResponse) { + response = &ModifyInstancesRenewFlagResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstancesRenewFlag +// 本接口 (ModifyInstancesRenewFlag) 用于修改包年包月实例续费标识。 +// +// +// +// * 实例被标识为自动续费后,每次在实例到期时,会自动续费一个月。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) ModifyInstancesRenewFlag(request *ModifyInstancesRenewFlagRequest) (response *ModifyInstancesRenewFlagResponse, err error) { + return c.ModifyInstancesRenewFlagWithContext(context.Background(), request) +} + +// ModifyInstancesRenewFlag +// 本接口 (ModifyInstancesRenewFlag) 用于修改包年包月实例续费标识。 +// +// +// +// * 实例被标识为自动续费后,每次在实例到期时,会自动续费一个月。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +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 NewModifySnapshotAttributeRequest() (request *ModifySnapshotAttributeRequest) { + request = &ModifySnapshotAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ModifySnapshotAttribute") + + + return +} + +func NewModifySnapshotAttributeResponse() (response *ModifySnapshotAttributeResponse) { + response = &ModifySnapshotAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifySnapshotAttribute +// 本接口(ModifySnapshotAttribute)用于修改指定快照的属性。 +// +//
  • “快照名称”仅为方便用户自己管理之用。
  • +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SNAPSHOTNAMETOOLONG = "InvalidParameterValue.SnapshotNameTooLong" +// RESOURCENOTFOUND_SNAPSHOTIDNOTFOUND = "ResourceNotFound.SnapshotIdNotFound" +func (c *Client) ModifySnapshotAttribute(request *ModifySnapshotAttributeRequest) (response *ModifySnapshotAttributeResponse, err error) { + return c.ModifySnapshotAttributeWithContext(context.Background(), request) +} + +// ModifySnapshotAttribute +// 本接口(ModifySnapshotAttribute)用于修改指定快照的属性。 +// +//
  • “快照名称”仅为方便用户自己管理之用。
  • +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SNAPSHOTNAMETOOLONG = "InvalidParameterValue.SnapshotNameTooLong" +// RESOURCENOTFOUND_SNAPSHOTIDNOTFOUND = "ResourceNotFound.SnapshotIdNotFound" +func (c *Client) ModifySnapshotAttributeWithContext(ctx context.Context, request *ModifySnapshotAttributeRequest) (response *ModifySnapshotAttributeResponse, err error) { + if request == nil { + request = NewModifySnapshotAttributeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifySnapshotAttribute require credential") + } + + request.SetContext(ctx) + + response = NewModifySnapshotAttributeResponse() + err = c.Send(request, response) + return +} + +func NewRebootInstancesRequest() (request *RebootInstancesRequest) { + request = &RebootInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "RebootInstances") + + + return +} + +func NewRebootInstancesResponse() (response *RebootInstancesResponse) { + response = &RebootInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RebootInstances +// 本接口(RebootInstances)用于重启实例。 +// +// +// +// * 只有状态为 RUNNING 的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入 REBOOTING 状态;重启实例成功时,实例会进入 RUNNING 状态。 +// +// * 支持批量操作,每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) RebootInstances(request *RebootInstancesRequest) (response *RebootInstancesResponse, err error) { + return c.RebootInstancesWithContext(context.Background(), request) +} + +// RebootInstances +// 本接口(RebootInstances)用于重启实例。 +// +// +// +// * 只有状态为 RUNNING 的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入 REBOOTING 状态;重启实例成功时,实例会进入 RUNNING 状态。 +// +// * 支持批量操作,每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +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 NewRenewInstancesRequest() (request *RenewInstancesRequest) { + request = &RenewInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "RenewInstances") + + + return +} + +func NewRenewInstancesResponse() (response *RenewInstancesResponse) { + response = &RenewInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RenewInstances +// 本接口(RenewInstances)用于续费一个或多个轻量应用服务器实例。 +// +// * 只有状态为 RUNNING,STOPPED 或 SHUTDOWN 的实例才可以进行此操作。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERINVALIDVALUESNOTLIST = "InvalidParameter.InvalidFilterInvalidValuesNotList" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +// UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" +func (c *Client) RenewInstances(request *RenewInstancesRequest) (response *RenewInstancesResponse, err error) { + return c.RenewInstancesWithContext(context.Background(), request) +} + +// RenewInstances +// 本接口(RenewInstances)用于续费一个或多个轻量应用服务器实例。 +// +// * 只有状态为 RUNNING,STOPPED 或 SHUTDOWN 的实例才可以进行此操作。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" +// INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" +// INVALIDPARAMETER_INVALIDFILTERINVALIDVALUESNOTLIST = "InvalidParameter.InvalidFilterInvalidValuesNotList" +// INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" +// INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" +// UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" +func (c *Client) RenewInstancesWithContext(ctx context.Context, request *RenewInstancesRequest) (response *RenewInstancesResponse, err error) { + if request == nil { + request = NewRenewInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("RenewInstances require credential") + } + + request.SetContext(ctx) + + response = NewRenewInstancesResponse() + err = c.Send(request, response) + return +} + +func NewResetAttachCcnRequest() (request *ResetAttachCcnRequest) { + request = &ResetAttachCcnRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ResetAttachCcn") + + + return +} + +func NewResetAttachCcnResponse() (response *ResetAttachCcnResponse) { + response = &ResetAttachCcnResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetAttachCcn +// 本接口 (ResetAttachCcn) 用于关联云联网实例申请过期时,重新申请关联操作。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_RESETATTACHCCNFAILED = "UnsupportedOperation.ResetAttachCcnFailed" +func (c *Client) ResetAttachCcn(request *ResetAttachCcnRequest) (response *ResetAttachCcnResponse, err error) { + return c.ResetAttachCcnWithContext(context.Background(), request) +} + +// ResetAttachCcn +// 本接口 (ResetAttachCcn) 用于关联云联网实例申请过期时,重新申请关联操作。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_RESETATTACHCCNFAILED = "UnsupportedOperation.ResetAttachCcnFailed" +func (c *Client) ResetAttachCcnWithContext(ctx context.Context, request *ResetAttachCcnRequest) (response *ResetAttachCcnResponse, err error) { + if request == nil { + request = NewResetAttachCcnRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ResetAttachCcn require credential") + } + + request.SetContext(ctx) + + response = NewResetAttachCcnResponse() + err = c.Send(request, response) + return +} + +func NewResetInstanceRequest() (request *ResetInstanceRequest) { + request = &ResetInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ResetInstance") + + + return +} + +func NewResetInstanceResponse() (response *ResetInstanceResponse) { + response = &ResetInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetInstance +// 本接口(ResetInstance)用于重装指定实例上的镜像。 +// +// +// +// * 如果指定了 BlueprintId 参数,则使用指定的镜像重装;否则按照当前实例使用的镜像进行重装。 +// +// * 系统盘将会被格式化,并重置;请确保系统盘中无重要文件。 +// +// * 目前不支持实例使用该接口实现 LINUX_UNIX 和 WINDOWS 操作系统切换。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_BLUEPRINTCONFIGNOTMATCH = "InvalidParameterValue.BlueprintConfigNotMatch" +// INVALIDPARAMETERVALUE_BLUEPRINTID = "InvalidParameterValue.BlueprintId" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTALLOWTOCHANGEPLATFORMTYPE = "InvalidParameterValue.NotAllowToChangePlatformType" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// RESOURCEUNAVAILABLE_BLUEPRINTUNAVAILABLE = "ResourceUnavailable.BlueprintUnavailable" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +// UNSUPPORTEDOPERATION_SYSTEMBUSY = "UnsupportedOperation.SystemBusy" +func (c *Client) ResetInstance(request *ResetInstanceRequest) (response *ResetInstanceResponse, err error) { + return c.ResetInstanceWithContext(context.Background(), request) +} + +// ResetInstance +// 本接口(ResetInstance)用于重装指定实例上的镜像。 +// +// +// +// * 如果指定了 BlueprintId 参数,则使用指定的镜像重装;否则按照当前实例使用的镜像进行重装。 +// +// * 系统盘将会被格式化,并重置;请确保系统盘中无重要文件。 +// +// * 目前不支持实例使用该接口实现 LINUX_UNIX 和 WINDOWS 操作系统切换。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_BLUEPRINTCONFIGNOTMATCH = "InvalidParameterValue.BlueprintConfigNotMatch" +// INVALIDPARAMETERVALUE_BLUEPRINTID = "InvalidParameterValue.BlueprintId" +// INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTALLOWTOCHANGEPLATFORMTYPE = "InvalidParameterValue.NotAllowToChangePlatformType" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// RESOURCEUNAVAILABLE_BLUEPRINTUNAVAILABLE = "ResourceUnavailable.BlueprintUnavailable" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +// UNSUPPORTEDOPERATION_SYSTEMBUSY = "UnsupportedOperation.SystemBusy" +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 NewResetInstancesPasswordRequest() (request *ResetInstancesPasswordRequest) { + request = &ResetInstancesPasswordRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "ResetInstancesPassword") + + + return +} + +func NewResetInstancesPasswordResponse() (response *ResetInstancesPasswordResponse) { + response = &ResetInstancesPasswordResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetInstancesPassword +// 本接口(ResetInstancesPassword)用于将实例操作系统的密码重置为用户指定的密码。 +// +// * 只修改管理员帐号的密码。实例的操作系统不同,管理员帐号也会不一样(Windows 为 Administrator,Ubuntu 为 ubuntu ,其它系统为 root)。 +// +// * 支持批量操作。将多个实例操作系统的密码重置为相同的密码。每次请求批量实例的上限为 100。 +// +// * 建议对运行中的实例先手动关机,然后再进行密码重置。如实例处于运行中状态,本接口操作过程中会对实例进行关机操作,尝试正常关机失败后进行强制关机。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 注意:强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTALLOWTOCHANGEPLATFORMTYPE = "InvalidParameterValue.NotAllowToChangePlatformType" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) ResetInstancesPassword(request *ResetInstancesPasswordRequest) (response *ResetInstancesPasswordResponse, err error) { + return c.ResetInstancesPasswordWithContext(context.Background(), request) +} + +// ResetInstancesPassword +// 本接口(ResetInstancesPassword)用于将实例操作系统的密码重置为用户指定的密码。 +// +// * 只修改管理员帐号的密码。实例的操作系统不同,管理员帐号也会不一样(Windows 为 Administrator,Ubuntu 为 ubuntu ,其它系统为 root)。 +// +// * 支持批量操作。将多个实例操作系统的密码重置为相同的密码。每次请求批量实例的上限为 100。 +// +// * 建议对运行中的实例先手动关机,然后再进行密码重置。如实例处于运行中状态,本接口操作过程中会对实例进行关机操作,尝试正常关机失败后进行强制关机。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 注意:强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTALLOWTOCHANGEPLATFORMTYPE = "InvalidParameterValue.NotAllowToChangePlatformType" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +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 NewStartInstancesRequest() (request *StartInstancesRequest) { + request = &StartInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "StartInstances") + + + return +} + +func NewStartInstancesResponse() (response *StartInstancesResponse) { + response = &StartInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// StartInstances +// 本接口(StartInstances)用于启动一个或多个实例。 +// +// +// +// * 只有状态为 STOPPED 的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入 STARTING 状态;启动实例成功时,实例会进入 RUNNING 状态。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) StartInstances(request *StartInstancesRequest) (response *StartInstancesResponse, err error) { + return c.StartInstancesWithContext(context.Background(), request) +} + +// StartInstances +// 本接口(StartInstances)用于启动一个或多个实例。 +// +// +// +// * 只有状态为 STOPPED 的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入 STARTING 状态;启动实例成功时,实例会进入 RUNNING 状态。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +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("lighthouse", APIVersion, "StopInstances") + + + return +} + +func NewStopInstancesResponse() (response *StopInstancesResponse) { + response = &StopInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// StopInstances +// 本接口(StopInstances)用于关闭一个或多个实例。 +// +// * 只有状态为 RUNNING 的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入 STOPPING 状态;关闭实例成功时,实例会进入 STOPPED 状态。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) StopInstances(request *StopInstancesRequest) (response *StopInstancesResponse, err error) { + return c.StopInstancesWithContext(context.Background(), request) +} + +// StopInstances +// 本接口(StopInstances)用于关闭一个或多个实例。 +// +// * 只有状态为 RUNNING 的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入 STOPPING 状态;关闭实例成功时,实例会进入 STOPPED 状态。 +// +// * 支持批量操作。每次请求批量实例的上限为 100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" +// INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +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 NewTerminateDisksRequest() (request *TerminateDisksRequest) { + request = &TerminateDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "TerminateDisks") + + + return +} + +func NewTerminateDisksResponse() (response *TerminateDisksResponse) { + response = &TerminateDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// TerminateDisks +// 本接口(TerminateDisks)用于销毁一个或多个云硬盘。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" +func (c *Client) TerminateDisks(request *TerminateDisksRequest) (response *TerminateDisksResponse, err error) { + return c.TerminateDisksWithContext(context.Background(), request) +} + +// TerminateDisks +// 本接口(TerminateDisks)用于销毁一个或多个云硬盘。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" +// OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" +// OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" +// RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" +// UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" +func (c *Client) TerminateDisksWithContext(ctx context.Context, request *TerminateDisksRequest) (response *TerminateDisksResponse, err error) { + if request == nil { + request = NewTerminateDisksRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("TerminateDisks require credential") + } + + request.SetContext(ctx) + + response = NewTerminateDisksResponse() + err = c.Send(request, response) + return +} + +func NewTerminateInstancesRequest() (request *TerminateInstancesRequest) { + request = &TerminateInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("lighthouse", APIVersion, "TerminateInstances") + + + return +} + +func NewTerminateInstancesResponse() (response *TerminateInstancesResponse) { + response = &TerminateInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// TerminateInstances +// 本接口 (TerminateInstances) 用于销毁实例。 +// +// +// +// * 处于 SHUTDOWN 状态的实例,可通过本接口销毁,且不可恢复。 +// +// * 支持批量操作,每次请求批量实例的上限为100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态 (LatestOperationState) 为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +func (c *Client) TerminateInstances(request *TerminateInstancesRequest) (response *TerminateInstancesResponse, err error) { + return c.TerminateInstancesWithContext(context.Background(), request) +} + +// TerminateInstances +// 本接口 (TerminateInstances) 用于销毁实例。 +// +// +// +// * 处于 SHUTDOWN 状态的实例,可通过本接口销毁,且不可恢复。 +// +// * 支持批量操作,每次请求批量实例的上限为100。 +// +// * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态 (LatestOperationState) 为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" +// INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" +// INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" +// RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" +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/tencentcloud/lighthouse/v20200324/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324/errors.go new file mode 100644 index 0000000000..3f64ac7dc2 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324/errors.go @@ -0,0 +1,460 @@ +// 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 v20200324 + +const ( + // 此产品的特有错误码 + + // CAM签名/鉴权错误。 + AUTHFAILURE = "AuthFailure" + + // 操作失败。 + FAILEDOPERATION = "FailedOperation" + + // 创建镜像失败。 + FAILEDOPERATION_CREATEBLUEPRINTFAILED = "FailedOperation.CreateBlueprintFailed" + + // 对密钥对的创建操作失败。 + FAILEDOPERATION_CREATEKEYPAIRFAILED = "FailedOperation.CreateKeyPairFailed" + + // 对密钥对的删除操作失败。 + FAILEDOPERATION_DELETEKEYPAIRFAILED = "FailedOperation.DeleteKeyPairFailed" + + // 对防火墙规则的操作失败。 + FAILEDOPERATION_FIREWALLRULESOPERATIONFAILED = "FailedOperation.FirewallRulesOperationFailed" + + // 对密钥对的导入操作失败。 + FAILEDOPERATION_IMPORTKEYPAIRFAILED = "FailedOperation.ImportKeyPairFailed" + + // 对实例的操作失败。 + FAILEDOPERATION_INSTANCEOPERATIONFAILED = "FailedOperation.InstanceOperationFailed" + + // 退还资源失败。 + FAILEDOPERATION_ISOLATERESOURCESFAILED = "FailedOperation.IsolateResourcesFailed" + + // 快照操作失败。 + FAILEDOPERATION_SNAPSHOTOPERATIONFAILED = "FailedOperation.SnapshotOperationFailed" + + // 操作失败,不能创建自定义镜像。 + FAILEDOPERATION_UNABLETOCREATEBLUEPRINT = "FailedOperation.UnableToCreateBlueprint" + + // 无法创建实例。 + FAILEDOPERATION_UNABLETOCREATEINSTANCES = "FailedOperation.UnableToCreateInstances" + + // 内部错误。 + INTERNALERROR = "InternalError" + + // 查询磁盘返回了不合法内容。 + INTERNALERROR_DESCRIBEDISKSRETURNABLEERROR = "InternalError.DescribeDisksReturnableError" + + // 查询实例状态失败,请稍后重试。 + INTERNALERROR_DESCRIBEINSTANCESTATUS = "InternalError.DescribeInstanceStatus" + + // 查询实例是否可变配失败。 + INTERNALERROR_DESCRIBEINSTANCESMODIFICATION = "InternalError.DescribeInstancesModification" + + // 查询实例是否可变配失败。 + INTERNALERROR_DESCRIBEINSTANCESMODIFICATIONERROR = "InternalError.DescribeInstancesModificationError" + + // 查询实例是否可退还失败。 + INTERNALERROR_DESCRIBEINSTANCESRETURNABLEERROR = "InternalError.DescribeInstancesReturnableError" + + // 查询实例流量包错误。 + INTERNALERROR_DESCRIBEINSTANCESTRAFFICPACKAGESFAILED = "InternalError.DescribeInstancesTrafficPackagesFailed" + + // 查询资源返回了不符合要求内容。 + INTERNALERROR_DESCRIBERESOURCESRETURNABLEERROR = "InternalError.DescribeResourcesReturnableError" + + // 快照配额锁获取失败。 + INTERNALERROR_GETSNAPSHOTALLOCQUOTALOCKERROR = "InternalError.GetSnapshotAllocQuotaLockError" + + // 无法找到此接口。 + INTERNALERROR_INVALIDACTIONNOTFOUND = "InternalError.InvalidActionNotFound" + + // 套餐价格错误。 + INTERNALERROR_INVALIDBUNDLEPRICE = "InternalError.InvalidBundlePrice" + + // 命令 `DescribeInstanceLoginKeyPair` 无法找到。 + INTERNALERROR_INVALIDCOMMANDNOTFOUND = "InternalError.InvalidCommandNotFound" + + // 请求出现错误。 + INTERNALERROR_REQUESTERROR = "InternalError.RequestError" + + // 调用计费网关服务失败。 + INTERNALERROR_TRADECALLBILLINGGATEWAYFAILED = "InternalError.TradeCallBillingGatewayFailed" + + // 价格获取失败。 + INTERNALERROR_TRADEGETPRICEFAILED = "InternalError.TradeGetPriceFailed" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + + // 套餐和镜像不匹配。 + INVALIDPARAMETER_BUNDLEANDBLUEPRINTNOTMATCH = "InvalidParameter.BundleAndBlueprintNotMatch" + + // 产品未定义的套餐 ID。 + INVALIDPARAMETER_BUNDLEIDNOTFOUND = "InvalidParameter.BundleIdNotFound" + + // 参数非法,Filter 参数中的 Values 取值数量超过允许的最大数量。 + INVALIDPARAMETER_FILTERVALUELIMITEXCEEDED = "InvalidParameter.FilterValueLimitExceeded" + + // 参数非法,防火墙规则重复。 + INVALIDPARAMETER_FIREWALLRULESDUPLICATED = "InvalidParameter.FirewallRulesDuplicated" + + // 参数非法,防火墙规则已存在。 + INVALIDPARAMETER_FIREWALLRULESEXIST = "InvalidParameter.FirewallRulesExist" + + // 参数非法,Filter 参数非法。 + INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" + + // 参数非法,Filter 参数中的 Name 取值非法。 + INVALIDPARAMETER_INVALIDFILTERINVALIDKEY = "InvalidParameter.InvalidFilterInvalidKey" + + // 参数非法,Filter 参数中的 Name 取值不是字符串。 + INVALIDPARAMETER_INVALIDFILTERINVALIDNAMENOTSTR = "InvalidParameter.InvalidFilterInvalidNameNotStr" + + // 参数非法,Filter 参数中的 Values 不是列表。 + INVALIDPARAMETER_INVALIDFILTERINVALIDVALUESNOTLIST = "InvalidParameter.InvalidFilterInvalidValuesNotList" + + // 参数非法,Filter 参数不是字典。 + INVALIDPARAMETER_INVALIDFILTERNOTDICT = "InvalidParameter.InvalidFilterNotDict" + + // 参数非法,Filter 参数中有不支持的 Name。 + INVALIDPARAMETER_INVALIDFILTERNOTSUPPORTEDNAME = "InvalidParameter.InvalidFilterNotSupportedName" + + // 参数非法,每次只能修改一个属性。 + INVALIDPARAMETER_ONLYALLOWMODIFYONEATTRIBUTE = "InvalidParameter.OnlyAllowModifyOneAttribute" + + // 参数非法,参数冲突。 + INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" + + // 参数取值错误。 + INVALIDPARAMETERVALUE = "InvalidParameterValue" + + // 该实例配置不符合指定镜像的要求。 + INVALIDPARAMETERVALUE_BLUEPRINTCONFIGNOTMATCH = "InvalidParameterValue.BlueprintConfigNotMatch" + + // 镜像 ID 不合法,重装实例不允许切换操作系统类型。 + INVALIDPARAMETERVALUE_BLUEPRINTID = "InvalidParameterValue.BlueprintId" + + // 参数值非法,镜像 ID 格式非法。 + INVALIDPARAMETERVALUE_BLUEPRINTIDMALFORMED = "InvalidParameterValue.BlueprintIdMalformed" + + // 云联网实例ID格式非法。 + INVALIDPARAMETERVALUE_CCNIDMALFORMED = "InvalidParameterValue.CcnIdMalformed" + + // 磁盘名称长度超出限制。 + INVALIDPARAMETERVALUE_DISKNAMETOOLONG = "InvalidParameterValue.DiskNameTooLong" + + // 磁盘大小发生改变。 + INVALIDPARAMETERVALUE_DISKSIZENOTMATCH = "InvalidParameterValue.DiskSizeNotMatch" + + // 参数 `KeyName` 已经存在且重复。 + INVALIDPARAMETERVALUE_DUPLICATEPARAMETERVALUE = "InvalidParameterValue.DuplicateParameterValue" + + // 参数值非法,不允许包含重复的值。 + INVALIDPARAMETERVALUE_DUPLICATED = "InvalidParameterValue.Duplicated" + + // 防火墙规则描述长度超出限制。 + INVALIDPARAMETERVALUE_FIREWALLRULEDESCRIPTIONTOOLONG = "InvalidParameterValue.FirewallRuleDescriptionTooLong" + + // 参数值非法,实例 ID 格式非法。 + INVALIDPARAMETERVALUE_INSTANCEIDMALFORMED = "InvalidParameterValue.InstanceIdMalformed" + + // 参数值非法,实例名称超过允许的最大长度。 + INVALIDPARAMETERVALUE_INSTANCENAMETOOLONG = "InvalidParameterValue.InstanceNameTooLong" + + // 镜像 ID 不合法。 + INVALIDPARAMETERVALUE_INVALIDBLUEPRINTID = "InvalidParameterValue.InvalidBlueprintId" + + // 镜像操作系统类型不合法。 + INVALIDPARAMETERVALUE_INVALIDBLUEPRINTPLATFORMTYPE = "InvalidParameterValue.InvalidBlueprintPlatformType" + + // 镜像状态取值非法。 + INVALIDPARAMETERVALUE_INVALIDBLUEPRINTSTATE = "InvalidParameterValue.InvalidBlueprintState" + + // 镜像类型不合法。 + INVALIDPARAMETERVALUE_INVALIDBLUEPRINTTYPE = "InvalidParameterValue.InvalidBlueprintType" + + // 非法的套餐参数。 + INVALIDPARAMETERVALUE_INVALIDBUNDLE = "InvalidParameterValue.InvalidBundle" + + // 控制台显示类型不合法。 + INVALIDPARAMETERVALUE_INVALIDCONSOLEDISPLAYTYPES = "InvalidParameterValue.InvalidConsoleDisplayTypes" + + // 参数值非法,磁盘 ID 格式非法。 + INVALIDPARAMETERVALUE_INVALIDDISKIDMALFORMED = "InvalidParameterValue.InvalidDiskIdMalformed" + + // 设置是否使用默认密钥对登录的值不正确。 + INVALIDPARAMETERVALUE_INVALIDINSTANCELOGINKEYPAIRPERMITLOGIN = "InvalidParameterValue.InvalidInstanceLoginKeyPairPermitLogin" + + // 参数值非法,IP 地址格式非法。 + INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" + + // 参数值非法。 + INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMEEMPTY = "InvalidParameterValue.InvalidKeyPairNameEmpty" + + // 非法的密钥对名称。 + INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidParameterValue.InvalidKeyPairNameIncludeIllegalChar" + + // 参数长度非法。 + INVALIDPARAMETERVALUE_INVALIDKEYPAIRNAMETOOLONG = "InvalidParameterValue.InvalidKeyPairNameTooLong" + + // 参数组合非法。 + INVALIDPARAMETERVALUE_INVALIDPARAMETERCOMBINATION = "InvalidParameterValue.InvalidParameterCombination" + + // 参数中的密码不合法。 + INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" + + // 不正确的配额资源名称。 + INVALIDPARAMETERVALUE_INVALIDRESOURCEQUOTARESOURCENAME = "InvalidParameterValue.InvalidResourceQuotaResourceName" + + // 参数Zone的取值不合法。 + INVALIDPARAMETERVALUE_INVALIDZONE = "InvalidParameterValue.InvalidZone" + + // 参数值非法,密钥对 ID 格式非法。 + INVALIDPARAMETERVALUE_KEYPAIRIDMALFORMED = "InvalidParameterValue.KeyPairIdMalformed" + + // 该密钥对中的公钥在系统中已存在,无法重复使用 。 + INVALIDPARAMETERVALUE_KEYPAIRPUBLICKEYDUPLICATED = "InvalidParameterValue.KeyPairPublicKeyDuplicated" + + // 指定的公钥格式错误。 + INVALIDPARAMETERVALUE_KEYPAIRPUBLICKEYMALFORMED = "InvalidParameterValue.KeyPairPublicKeyMalformed" + + // 参数值非法,参数值的数量超过最大限制。 + INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" + + // 参数值非法,不能为负值。 + INVALIDPARAMETERVALUE_NEGATIVE = "InvalidParameterValue.Negative" + + // 不允许改变平台类型。 + INVALIDPARAMETERVALUE_NOTALLOWTOCHANGEPLATFORMTYPE = "InvalidParameterValue.NotAllowToChangePlatformType" + + // 参数值非法,不在合法范围内。 + INVALIDPARAMETERVALUE_OUTOFRANGE = "InvalidParameterValue.OutOfRange" + + // 参数值非法,快照 ID 格式非法。 + INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" + + // 参数值非法,快照名称超过允许的最大长度。 + INVALIDPARAMETERVALUE_SNAPSHOTNAMETOOLONG = "InvalidParameterValue.SnapshotNameTooLong" + + // 参数取值过长,超过最大长度。 + INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" + + // 非法的可用区。 + INVALIDPARAMETERVALUE_ZONEINVALID = "InvalidParameterValue.ZoneInvalid" + + // 超过配额限制。 + LIMITEXCEEDED = "LimitExceeded" + + // 实例挂载数据盘配额不足,无法挂载磁盘。 + LIMITEXCEEDED_ATTACHDATADISKQUOTALIMITEXCEEDED = "LimitExceeded.AttachDataDiskQuotaLimitExceeded" + + // 超过防火墙规则配额。 + LIMITEXCEEDED_FIREWALLRULESLIMITEXCEEDED = "LimitExceeded.FirewallRulesLimitExceeded" + + // 超过实例配额。 + LIMITEXCEEDED_INSTANCEQUOTALIMITEXCEEDED = "LimitExceeded.InstanceQuotaLimitExceeded" + + // 退还资源数量超出限制。 + LIMITEXCEEDED_ISOLATERESOURCESLIMITEXCEEDED = "LimitExceeded.IsolateResourcesLimitExceeded" + + // 超过密钥对配额。 + LIMITEXCEEDED_KEYPAIRLIMITEXCEEDED = "LimitExceeded.KeyPairLimitExceeded" + + // 超过快照配额。 + LIMITEXCEEDED_SNAPSHOTQUOTALIMITEXCEEDED = "LimitExceeded.SnapshotQuotaLimitExceeded" + + // 缺少参数错误。 + MISSINGPARAMETER = "MissingParameter" + + // 该实例不支持升级套餐操作。 + OPERATIONDENIED_BUNDLENOTSUPPORTMODIFY = "OperationDenied.BundleNotSupportModify" + + // 磁盘处于创建过程中。 + OPERATIONDENIED_DISKCREATING = "OperationDenied.DiskCreating" + + // 磁盘正在操作过程中,请稍后重试。 + OPERATIONDENIED_DISKOPERATIONINPROGRESS = "OperationDenied.DiskOperationInProgress" + + // 磁盘的云盘类型不支持该操作。 + OPERATIONDENIED_DISKUSAGENOTSUPPORTOPERATION = "OperationDenied.DiskUsageNotSupportOperation" + + // 禁止对实例进行操作,实例在创建中,不允许进行该操作。 + OPERATIONDENIED_INSTANCECREATING = "OperationDenied.InstanceCreating" + + // 禁止对实例进行操作,实例最近一次的操作尚在进行中。 + OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" + + // 使用存储型套餐的实例不支持创建快照。 + OPERATIONDENIED_OPERATIONDENIEDCREATESNAPSHOTFORSTORAGEBUNDLE = "OperationDenied.OperationDeniedCreateSnapshotForStorageBundle" + + // 密钥对正在使用中。 + RESOURCEINUSE_KEYPAIRINUSE = "ResourceInUse.KeyPairInUse" + + // 资源不存在。 + RESOURCENOTFOUND = "ResourceNotFound" + + // 镜像 ID 不存在。 + RESOURCENOTFOUND_BLUEPRINTIDNOTFOUND = "ResourceNotFound.BlueprintIdNotFound" + + // 指定的镜像不存在。请检查镜像的BlueprintId是否正确。 + RESOURCENOTFOUND_BLUEPRINTNOTFOUND = "ResourceNotFound.BlueprintNotFound" + + // 磁盘 ID 不存在。 + RESOURCENOTFOUND_DISKIDNOTFOUND = "ResourceNotFound.DiskIdNotFound" + + // 磁盘不存在。 + RESOURCENOTFOUND_DISKNOTFOUND = "ResourceNotFound.DiskNotFound" + + // 防火墙不存在。 + RESOURCENOTFOUND_FIREWALLNOTFOUND = "ResourceNotFound.FirewallNotFound" + + // 防火墙规则不存在。 + RESOURCENOTFOUND_FIREWALLRULESNOTFOUND = "ResourceNotFound.FirewallRulesNotFound" + + // 实例不存在挂载的数据盘。 + RESOURCENOTFOUND_INSTANCEDATADISKNOTFOUND = "ResourceNotFound.InstanceDataDiskNotFound" + + // 实例 ID 不存在。 + RESOURCENOTFOUND_INSTANCEIDNOTFOUND = "ResourceNotFound.InstanceIdNotFound" + + // 实例不存在。 + RESOURCENOTFOUND_INSTANCENOTFOUND = "ResourceNotFound.InstanceNotFound" + + // 密钥对 ID 不存在。 + RESOURCENOTFOUND_KEYIDNOTFOUND = "ResourceNotFound.KeyIdNotFound" + + // 快照 ID 不存在。 + RESOURCENOTFOUND_SNAPSHOTIDNOTFOUND = "ResourceNotFound.SnapshotIdNotFound" + + // 快照不存在。 + RESOURCENOTFOUND_SNAPSHOTNOTFOUND = "ResourceNotFound.SnapshotNotFound" + + // 资源不可用。 + RESOURCEUNAVAILABLE = "ResourceUnavailable" + + // 镜像资源不可用。 + RESOURCEUNAVAILABLE_BLUEPRINTUNAVAILABLE = "ResourceUnavailable.BlueprintUnavailable" + + // 套餐不可用。 + RESOURCEUNAVAILABLE_BUNDLEUNAVAILABLE = "ResourceUnavailable.BundleUnavailable" + + // 套餐无可用配置。 + RESOURCESSOLDOUT_PURCHASESOURCEHASNOBUNDLECONFIGS = "ResourcesSoldOut.PurchaseSourceHasNoBundleConfigs" + + // 套餐无可用配置。 + RESOURCESSOLDOUT_ZONESHASNOBUNDLECONFIGS = "ResourcesSoldOut.ZonesHasNoBundleConfigs" + + // MFA 已过期。 + UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" + + // MFA 不存在。 + UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" + + // 无权限。 + UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" + + // 未知参数错误。 + UNKNOWNPARAMETER = "UnknownParameter" + + // 操作不支持。 + UNSUPPORTEDOPERATION = "UnsupportedOperation" + + // 没有实例不支持关联到云联网。 + UNSUPPORTEDOPERATION_ATTACHCCNCONDITIONUNSATISFIED = "UnsupportedOperation.AttachCcnConditionUnsatisfied" + + // 关联云联网失败。请检查云联网状态并稍后再试。 + UNSUPPORTEDOPERATION_ATTACHCCNFAILED = "UnsupportedOperation.AttachCcnFailed" + + // 镜像当前状态不支持该操作。 + UNSUPPORTEDOPERATION_BLUEPRINTCURSTATEINVALID = "UnsupportedOperation.BlueprintCurStateInvalid" + + // 镜像被使用中,不支持该操作。 + UNSUPPORTEDOPERATION_BLUEPRINTOCCUPIED = "UnsupportedOperation.BlueprintOccupied" + + // 已经关联云联网,不支持再次关联。 + UNSUPPORTEDOPERATION_CCNALREADYATTACHED = "UnsupportedOperation.CcnAlreadyAttached" + + // 云联网 尚未关联。不支持此操作。 + UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" + + // 查询云联网关联的实例状态失败。请稍后再试。 + UNSUPPORTEDOPERATION_DESCRIBECCNATTACHEDINSTANCESFAILED = "UnsupportedOperation.DescribeCcnAttachedInstancesFailed" + + // 解关联云联网失败。请检查云联网状态并稍后再试。 + UNSUPPORTEDOPERATION_DETACHCCNFAILED = "UnsupportedOperation.DetachCcnFailed" + + // 磁盘忙。 + UNSUPPORTEDOPERATION_DISKBUSY = "UnsupportedOperation.DiskBusy" + + // 不支持的操作,磁盘最近一次的操作尚未完成。 + UNSUPPORTEDOPERATION_DISKLATESTOPERATIONUNFINISHED = "UnsupportedOperation.DiskLatestOperationUnfinished" + + // 防火墙忙。 + UNSUPPORTEDOPERATION_FIREWALLBUSY = "UnsupportedOperation.FirewallBusy" + + // 指定的防火墙版本号和当前版本不一致。 + UNSUPPORTEDOPERATION_FIREWALLVERSIONMISMATCH = "UnsupportedOperation.FirewallVersionMismatch" + + // 实例已到期,不支持该操作。 + UNSUPPORTEDOPERATION_INSTANCEEXPIRED = "UnsupportedOperation.InstanceExpired" + + // LinuxUnix实例在创建时不支持设置密码。 + UNSUPPORTEDOPERATION_INSTANCELINUXUNIXCREATINGNOTSUPPORTPASSWORD = "UnsupportedOperation.InstanceLinuxUnixCreatingNotSupportPassword" + + // 磁盘状态不支持该操作。 + UNSUPPORTEDOPERATION_INVALIDDISKSTATE = "UnsupportedOperation.InvalidDiskState" + + // 不支持的操作,实例状态不合法。 + UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" + + // 不支持的操作,快照状态不合法。 + UNSUPPORTEDOPERATION_INVALIDSNAPSHOTSTATE = "UnsupportedOperation.InvalidSnapshotState" + + // 不支持的操作,不支持将同一个密钥对重复绑定到同一个实例上。 + UNSUPPORTEDOPERATION_KEYPAIRBINDDUPLICATE = "UnsupportedOperation.KeyPairBindDuplicate" + + // 不支持该操作。KeyPair 与镜像存在绑定关系。在进行该操作前请删除与密钥对有绑定关系的自定义镜像。 + UNSUPPORTEDOPERATION_KEYPAIRBINDTOBLUEPRINTS = "UnsupportedOperation.KeyPairBindToBlueprints" + + // 不支持的操作,不支持将未绑定到实例的密钥对从实例解绑。 + UNSUPPORTEDOPERATION_KEYPAIRNOTBOUNDTOINSTANCE = "UnsupportedOperation.KeyPairNotBoundToInstance" + + // 不支持的操作,实例最近一次的操作尚未完成。 + UNSUPPORTEDOPERATION_LATESTOPERATIONUNFINISHED = "UnsupportedOperation.LatestOperationUnfinished" + + // 共享镜像不支持此操作。 + UNSUPPORTEDOPERATION_NOTSUPPORTSHAREDBLUEPRINT = "UnsupportedOperation.NotSupportSharedBlueprint" + + // 计费资源中心删除资源失败。 + UNSUPPORTEDOPERATION_POSTDESTROYRESOURCEFAILED = "UnsupportedOperation.PostDestroyResourceFailed" + + // 重新申请关联云联网失败。请检查云联网状态并稍后再试。 + UNSUPPORTEDOPERATION_RESETATTACHCCNFAILED = "UnsupportedOperation.ResetAttachCcnFailed" + + // 资源不支持退换。 + UNSUPPORTEDOPERATION_RESOURCENOTRETURNABLE = "UnsupportedOperation.ResourceNotReturnable" + + // 快照忙。 + UNSUPPORTEDOPERATION_SNAPSHOTBUSY = "UnsupportedOperation.SnapshotBusy" + + // 系统忙。 + UNSUPPORTEDOPERATION_SYSTEMBUSY = "UnsupportedOperation.SystemBusy" + + // Windows实例不支持绑定密钥对。 + UNSUPPORTEDOPERATION_WINDOWSNOTALLOWTOASSOCIATEKEYPAIR = "UnsupportedOperation.WindowsNotAllowToAssociateKeyPair" +) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324/models.go new file mode 100644 index 0000000000..6ccbfa7b19 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324/models.go @@ -0,0 +1,4753 @@ +// 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 v20200324 + +import ( + "encoding/json" + tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +type ApplyInstanceSnapshotRequest struct { + *tchttp.BaseRequest + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 快照 ID。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` +} + +func (r *ApplyInstanceSnapshotRequest) 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 *ApplyInstanceSnapshotRequest) 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, "SnapshotId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ApplyInstanceSnapshotRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ApplyInstanceSnapshotResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ApplyInstanceSnapshotResponse) 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 *ApplyInstanceSnapshotResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateInstancesKeyPairsRequest struct { + *tchttp.BaseRequest + + // 密钥对 ID 列表。每次请求批量密钥对的上限为 100。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +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, "KeyIds") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateInstancesKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateInstancesKeyPairsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type AttachCcnRequest struct { + *tchttp.BaseRequest + + // 云联网实例ID。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` +} + +func (r *AttachCcnRequest) 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 *AttachCcnRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AttachCcnRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AttachCcnResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AttachCcnResponse) 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 *AttachCcnResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AttachDetail struct { + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例已挂载弹性云盘数量 + AttachedDiskCount *int64 `json:"AttachedDiskCount,omitempty" name:"AttachedDiskCount"` + + // 可挂载弹性云盘数量 + MaxAttachCount *int64 `json:"MaxAttachCount,omitempty" name:"MaxAttachCount"` +} + +type AttachDisksRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` + + // 实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 续费标识。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +func (r *AttachDisksRequest) 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 *AttachDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + delete(f, "InstanceId") + delete(f, "RenewFlag") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AttachDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AttachDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AttachDisksResponse) 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 *AttachDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Blueprint struct { + + // 镜像 ID ,是 Blueprint 的唯一标识。 + BlueprintId *string `json:"BlueprintId,omitempty" name:"BlueprintId"` + + // 镜像对外展示标题。 + DisplayTitle *string `json:"DisplayTitle,omitempty" name:"DisplayTitle"` + + // 镜像对外展示版本。 + DisplayVersion *string `json:"DisplayVersion,omitempty" name:"DisplayVersion"` + + // 镜像描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` + + // 操作系统名称。 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 操作系统平台。 + Platform *string `json:"Platform,omitempty" name:"Platform"` + + // 操作系统平台类型,如 LINUX_UNIX、WINDOWS。 + PlatformType *string `json:"PlatformType,omitempty" name:"PlatformType"` + + // 镜像类型,如 APP_OS、PURE_OS、PRIVATE。 + BlueprintType *string `json:"BlueprintType,omitempty" name:"BlueprintType"` + + // 镜像图片 URL。 + ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"` + + // 镜像所需系统盘大小,单位 GB。 + RequiredSystemDiskSize *int64 `json:"RequiredSystemDiskSize,omitempty" name:"RequiredSystemDiskSize"` + + // 镜像状态。 + BlueprintState *string `json:"BlueprintState,omitempty" name:"BlueprintState"` + + // 创建时间。按照 ISO8601 标准表示,并且使用 UTC 时间。 + // 格式为: YYYY-MM-DDThh:mm:ssZ。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 镜像名称。 + BlueprintName *string `json:"BlueprintName,omitempty" name:"BlueprintName"` + + // 镜像是否支持自动化助手。 + SupportAutomationTools *bool `json:"SupportAutomationTools,omitempty" name:"SupportAutomationTools"` + + // 镜像所需内存大小, 单位: GB + RequiredMemorySize *int64 `json:"RequiredMemorySize,omitempty" name:"RequiredMemorySize"` + + // CVM镜像共享到轻量应用服务器轻量应用服务器后的CVM镜像ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` +} + +type BlueprintInstance struct { + + // 镜像信息。 + Blueprint *Blueprint `json:"Blueprint,omitempty" name:"Blueprint"` + + // 软件列表。 + SoftwareSet []*Software `json:"SoftwareSet,omitempty" name:"SoftwareSet"` + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +type BlueprintPrice struct { + + // 镜像单价,原价。单位元。 + OriginalBlueprintPrice *float64 `json:"OriginalBlueprintPrice,omitempty" name:"OriginalBlueprintPrice"` + + // 镜像总价,原价。单位元。 + OriginalPrice *float64 `json:"OriginalPrice,omitempty" name:"OriginalPrice"` + + // 折扣。 + Discount *int64 `json:"Discount,omitempty" name:"Discount"` + + // 镜像折扣后总价。单位元。 + DiscountPrice *float64 `json:"DiscountPrice,omitempty" name:"DiscountPrice"` +} + +type Bundle struct { + + // 套餐 ID。 + BundleId *string `json:"BundleId,omitempty" name:"BundleId"` + + // 内存大小,单位 GB。 + Memory *int64 `json:"Memory,omitempty" name:"Memory"` + + // 系统盘类型。 + // 取值范围: + //
  • LOCAL_BASIC:本地硬盘
  • LOCAL_SSD:本地 SSD 硬盘
  • CLOUD_BASIC:普通云硬盘
  • CLOUD_SSD:SSD 云硬盘
  • CLOUD_PREMIUM:高性能云硬盘
  • + SystemDiskType *string `json:"SystemDiskType,omitempty" name:"SystemDiskType"` + + // 系统盘大小。 + SystemDiskSize *int64 `json:"SystemDiskSize,omitempty" name:"SystemDiskSize"` + + // 每月网络流量,单位 Gb。 + MonthlyTraffic *int64 `json:"MonthlyTraffic,omitempty" name:"MonthlyTraffic"` + + // 是否支持 Linux/Unix 平台。 + SupportLinuxUnixPlatform *bool `json:"SupportLinuxUnixPlatform,omitempty" name:"SupportLinuxUnixPlatform"` + + // 是否支持 Windows 平台。 + SupportWindowsPlatform *bool `json:"SupportWindowsPlatform,omitempty" name:"SupportWindowsPlatform"` + + // 套餐当前单位价格信息。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // CPU 核数。 + CPU *int64 `json:"CPU,omitempty" name:"CPU"` + + // 峰值带宽,单位 Mbps。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 网络计费类型。 + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 套餐售卖状态,取值:‘AVAILABLE’(可用) , ‘SOLD_OUT’(售罄) + BundleSalesState *string `json:"BundleSalesState,omitempty" name:"BundleSalesState"` + + // 套餐类型。 + // 取值范围: + //
  • GENERAL_BUNDLE:通用型
  • STORAGE_BUNDLE:存储型
  • + BundleType *string `json:"BundleType,omitempty" name:"BundleType"` + + // 套餐展示标签. + // 取值范围: + // "ACTIVITY": 活动套餐, + // "NORMAL": 普通套餐 + // "CAREFREE": 无忧套餐 + BundleDisplayLabel *string `json:"BundleDisplayLabel,omitempty" name:"BundleDisplayLabel"` +} + +type CcnAttachedInstance struct { + + // 云联网ID。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 关联实例CIDR。 + CidrBlock []*string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 关联实例状态: + // + // • PENDING:申请中 + // • ACTIVE:已连接 + // • EXPIRED:已过期 + // • REJECTED:已拒绝 + // • DELETED:已删除 + // • FAILED:失败的(2小时后将异步强制解关联) + // • ATTACHING:关联中 + // • DETACHING:解关联中 + // • DETACHFAILED:解关联失败(2小时后将异步强制解关联) + State *string `json:"State,omitempty" name:"State"` + + // 关联时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AttachedTime *string `json:"AttachedTime,omitempty" name:"AttachedTime"` + + // 备注 + Description *string `json:"Description,omitempty" name:"Description"` +} + +type ContainerEnv struct { + + // 环境变量Key + Key *string `json:"Key,omitempty" name:"Key"` + + // 环境变量值 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type CreateBlueprintRequest struct { + *tchttp.BaseRequest + + // 镜像名称。最大长度60。 + BlueprintName *string `json:"BlueprintName,omitempty" name:"BlueprintName"` + + // 镜像描述。最大长度60。 + Description *string `json:"Description,omitempty" name:"Description"` + + // 需要制作镜像的实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *CreateBlueprintRequest) 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 *CreateBlueprintRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BlueprintName") + delete(f, "Description") + delete(f, "InstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateBlueprintRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateBlueprintResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 自定义镜像ID。 + BlueprintId *string `json:"BlueprintId,omitempty" name:"BlueprintId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateBlueprintResponse) 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 *CreateBlueprintResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateFirewallRulesRequest struct { + *tchttp.BaseRequest + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 防火墙规则列表。 + FirewallRules []*FirewallRule `json:"FirewallRules,omitempty" name:"FirewallRules"` + + // 防火墙当前版本。用户每次更新防火墙规则时版本会自动加1,防止规则已过期,不填不考虑冲突。 + FirewallVersion *uint64 `json:"FirewallVersion,omitempty" name:"FirewallVersion"` +} + +func (r *CreateFirewallRulesRequest) 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 *CreateFirewallRulesRequest) 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, "FirewallRules") + delete(f, "FirewallVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateFirewallRulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateFirewallRulesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateFirewallRulesResponse) 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 *CreateFirewallRulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateInstanceSnapshotRequest struct { + *tchttp.BaseRequest + + // 需要创建快照的实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 快照名称,最长为 60 个字符。 + SnapshotName *string `json:"SnapshotName,omitempty" name:"SnapshotName"` +} + +func (r *CreateInstanceSnapshotRequest) 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 *CreateInstanceSnapshotRequest) 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, "SnapshotName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateInstanceSnapshotRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateInstanceSnapshotResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 快照 ID。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateInstanceSnapshotResponse) 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 *CreateInstanceSnapshotResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateInstancesRequest struct { + *tchttp.BaseRequest + + // 套餐ID。 + BundleId *string `json:"BundleId,omitempty" name:"BundleId"` + + // 镜像ID。 + BlueprintId *string `json:"BlueprintId,omitempty" name:"BlueprintId"` + + // 当前实例仅支持预付费模式,即包年包月相关参数设置,单位(月)。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 实例显示名称。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 购买实例数量。包年包月实例取值范围:[1,30]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量 + InstanceCount *uint64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 可用区列表。默认为随机可用区 + Zones []*string `json:"Zones,omitempty" name:"Zones"` + + // 是否只预检此次请求。 + // true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制和库存。 + // 如果检查不通过,则返回对应错误码; + // 如果检查通过,则返回RequestId. + // false(默认):发送正常请求,通过检查后直接创建实例 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 实例登录密码信息配置。本字段目前仅支持WINDOWS实例进行密码设置。默认缺失情况下代表用户选择实例创建后设置登录密码。 + LoginConfiguration *LoginConfiguration `json:"LoginConfiguration,omitempty" name:"LoginConfiguration"` + + // 要创建的容器配置列表。 + Containers []*DockerContainerConfiguration `json:"Containers,omitempty" name:"Containers"` + + // 是否自动使用代金券。默认不使用。 + AutoVoucher *bool `json:"AutoVoucher,omitempty" name:"AutoVoucher"` +} + +func (r *CreateInstancesRequest) 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 *CreateInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BundleId") + delete(f, "BlueprintId") + delete(f, "InstanceChargePrepaid") + delete(f, "InstanceName") + delete(f, "InstanceCount") + delete(f, "Zones") + delete(f, "DryRun") + delete(f, "ClientToken") + delete(f, "LoginConfiguration") + delete(f, "Containers") + delete(f, "AutoVoucher") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 当通过本接口来创建实例时会返回该参数,表示一个或多个实例ID。返回实例ID列表并不代表实例创建成功。 + // + // 可根据 DescribeInstances 接口查询返回的InstancesSet中对应实例的ID的状态来判断创建是否完成;如果实例状态由“启动中”变为“运行中”,则为创建成功。 + InstanceIdSet []*string `json:"InstanceIdSet,omitempty" name:"InstanceIdSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateInstancesResponse) 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 *CreateInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateKeyPairRequest struct { + *tchttp.BaseRequest + + // 密钥对名称,可由数字,字母和下划线组成,长度不超过 25 个字符。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` +} + +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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateKeyPairRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateKeyPairResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 密钥对信息。 + KeyPair *KeyPair `json:"KeyPair,omitempty" name:"KeyPair"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type DataDiskPrice struct { + + // 云硬盘ID。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 云硬盘单价。 + OriginalDiskPrice *float64 `json:"OriginalDiskPrice,omitempty" name:"OriginalDiskPrice"` + + // 云硬盘总价。 + OriginalPrice *float64 `json:"OriginalPrice,omitempty" name:"OriginalPrice"` + + // 折扣。 + Discount *float64 `json:"Discount,omitempty" name:"Discount"` + + // 折后总价。 + DiscountPrice *float64 `json:"DiscountPrice,omitempty" name:"DiscountPrice"` +} + +type DeleteBlueprintsRequest struct { + *tchttp.BaseRequest + + // 镜像ID列表。镜像ID,可通过[DescribeBlueprints](https://cloud.tencent.com/document/product/1207/47689)接口返回值中的BlueprintId获取。 + BlueprintIds []*string `json:"BlueprintIds,omitempty" name:"BlueprintIds"` +} + +func (r *DeleteBlueprintsRequest) 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 *DeleteBlueprintsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BlueprintIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteBlueprintsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteBlueprintsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteBlueprintsResponse) 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 *DeleteBlueprintsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteFirewallRulesRequest struct { + *tchttp.BaseRequest + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 防火墙规则列表。 + FirewallRules []*FirewallRule `json:"FirewallRules,omitempty" name:"FirewallRules"` + + // 防火墙当前版本。用户每次更新防火墙规则时版本会自动加1,防止规则已过期,不填不考虑冲突。 + FirewallVersion *uint64 `json:"FirewallVersion,omitempty" name:"FirewallVersion"` +} + +func (r *DeleteFirewallRulesRequest) 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 *DeleteFirewallRulesRequest) 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, "FirewallRules") + delete(f, "FirewallVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteFirewallRulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteFirewallRulesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteFirewallRulesResponse) 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 *DeleteFirewallRulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteKeyPairsRequest struct { + *tchttp.BaseRequest + + // 密钥对 ID 列表,每次请求批量密钥对的上限为 10。 + KeyIds []*string `json:"KeyIds,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) +} + +type DeleteKeyPairsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type DeleteSnapshotsRequest struct { + *tchttp.BaseRequest + + // 要删除的快照 ID 列表,可通过 DescribeSnapshots 查询。 + SnapshotIds []*string `json:"SnapshotIds,omitempty" name:"SnapshotIds"` +} + +func (r *DeleteSnapshotsRequest) 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 *DeleteSnapshotsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SnapshotIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteSnapshotsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteSnapshotsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteSnapshotsResponse) 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 *DeleteSnapshotsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeniedAction struct { + + // 限制操作名。 + Action *string `json:"Action,omitempty" name:"Action"` + + // 限制操作消息码。 + Code *string `json:"Code,omitempty" name:"Code"` + + // 限制操作消息。 + Message *string `json:"Message,omitempty" name:"Message"` +} + +type DescribeBlueprintInstancesRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表,当前最多支持 1 个。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *DescribeBlueprintInstancesRequest) 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 *DescribeBlueprintInstancesRequest) 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", "DescribeBlueprintInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBlueprintInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的镜像实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 镜像实例列表信息。 + BlueprintInstanceSet []*BlueprintInstance `json:"BlueprintInstanceSet,omitempty" name:"BlueprintInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeBlueprintInstancesResponse) 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 *DescribeBlueprintInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBlueprintsRequest struct { + *tchttp.BaseRequest + + // 镜像 ID 列表。 + BlueprintIds []*string `json:"BlueprintIds,omitempty" name:"BlueprintIds"` + + // 偏移量,默认为 0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤器列表。 + //
  • blueprint-id
  • 按照【镜像 ID】进行过滤。 + // 类型:String + // 必选:否 + //
  • blueprint-type
  • 按照【镜像类型】进行过滤。 + // 取值:APP_OS(应用镜像 );PURE_OS(系统镜像);PRIVATE(自定义镜像);SHARED(共享镜像)。 + // 类型:String + // 必选:否 + //
  • platform-type
  • 按照【镜像平台类型】进行过滤。 + // 取值: LINUX_UNIX(Linux/Unix系统);WINDOWS(Windows 系统)。 + // 类型:String + // 必选:否 + //
  • blueprint-name
  • 按照【镜像名称】进行过滤。 + // 类型:String + // 必选:否 + //
  • blueprint-state
  • 按照【镜像状态】进行过滤。 + // 类型:String + // 必选:否 + // + // 每次请求的 Filters 的上限为 10,Filter.Values 的上限为 5。参数不支持同时指定 BlueprintIds 和 Filters 。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeBlueprintsRequest) 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 *DescribeBlueprintsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BlueprintIds") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBlueprintsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBlueprintsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的镜像数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 镜像详细信息列表。 + BlueprintSet []*Blueprint `json:"BlueprintSet,omitempty" name:"BlueprintSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeBlueprintsResponse) 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 *DescribeBlueprintsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBundleDiscountRequest struct { + *tchttp.BaseRequest + + // 套餐 ID。 + BundleId *string `json:"BundleId,omitempty" name:"BundleId"` +} + +func (r *DescribeBundleDiscountRequest) 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 *DescribeBundleDiscountRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BundleId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBundleDiscountRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBundleDiscountResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 币种:CNY人民币,USD 美元。 + Currency *string `json:"Currency,omitempty" name:"Currency"` + + // 折扣梯度详情,每个梯度包含的信息有:时长,折扣数,总价,折扣价,折扣详情(用户折扣、官网折扣、最终折扣)。 + DiscountDetail []*DiscountDetail `json:"DiscountDetail,omitempty" name:"DiscountDetail"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeBundleDiscountResponse) 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 *DescribeBundleDiscountResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBundlesRequest struct { + *tchttp.BaseRequest + + // 套餐 ID 列表。 + BundleIds []*string `json:"BundleIds,omitempty" name:"BundleIds"` + + // 偏移量,默认为 0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤器列表。 + //
  • bundle-id
  • 按照【套餐 ID】进行过滤。 + // 类型:String + // 必选:否 + //
  • support-platform-type
  • 按照【系统类型】进行过滤。 + // 取值: LINUX_UNIX(Linux/Unix系统);WINDOWS(Windows 系统) + // 类型:String + // 必选:否 + // 每次请求的 Filters 的上限为 10,Filter.Values 的上限为 5。参数不支持同时指定 BundleIds 和 Filters。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 可用区列表。默认为全部可用区。 + Zones []*string `json:"Zones,omitempty" name:"Zones"` +} + +func (r *DescribeBundlesRequest) 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 *DescribeBundlesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BundleIds") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + delete(f, "Zones") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBundlesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBundlesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 套餐详细信息列表。 + BundleSet []*Bundle `json:"BundleSet,omitempty" name:"BundleSet"` + + // 符合要求的套餐总数,用于分页展示。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeBundlesResponse) 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 *DescribeBundlesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCcnAttachedInstancesRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeCcnAttachedInstancesRequest) 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 *DescribeCcnAttachedInstancesRequest) 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", "DescribeCcnAttachedInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCcnAttachedInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云联网关联的实例列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CcnAttachedInstanceSet []*CcnAttachedInstance `json:"CcnAttachedInstanceSet,omitempty" name:"CcnAttachedInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeCcnAttachedInstancesResponse) 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 *DescribeCcnAttachedInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDiskConfigsRequest struct { + *tchttp.BaseRequest + + // 过滤器列表。 + //
  • zone
  • 按照【可用区】进行过滤。 + // 类型:String + // 必选:否 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeDiskConfigsRequest) 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 *DescribeDiskConfigsRequest) 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", "DescribeDiskConfigsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDiskConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云硬盘配置列表。 + DiskConfigSet []*DiskConfig `json:"DiskConfigSet,omitempty" name:"DiskConfigSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDiskConfigsResponse) 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 *DescribeDiskConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDiskDiscountRequest struct { + *tchttp.BaseRequest + + // 云硬盘类型, 取值: "CLOUD_PREMIUM"。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 云硬盘大小。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` +} + +func (r *DescribeDiskDiscountRequest) 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 *DescribeDiskDiscountRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskType") + delete(f, "DiskSize") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDiskDiscountRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDiskDiscountResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 币种:CNY人民币,USD 美元。 + Currency *string `json:"Currency,omitempty" name:"Currency"` + + // 折扣梯度详情,每个梯度包含的信息有:时长,折扣数,总价,折扣价,折扣详情(用户折扣、官网折扣、最终折扣)。 + DiscountDetail []*DiscountDetail `json:"DiscountDetail,omitempty" name:"DiscountDetail"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDiskDiscountResponse) 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 *DescribeDiskDiscountResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisksDeniedActionsRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` +} + +func (r *DescribeDisksDeniedActionsRequest) 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 *DescribeDisksDeniedActionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDisksDeniedActionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisksDeniedActionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云硬盘操作限制列表详细信息。 + DiskDeniedActionSet []*DiskDeniedActions `json:"DiskDeniedActionSet,omitempty" name:"DiskDeniedActionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDisksDeniedActionsResponse) 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 *DescribeDisksDeniedActionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisksRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` + + // 过滤器列表。 + // disk-id + // 按照【云硬盘 ID】进行过滤。 + // 类型:String + // 必选:否 + // instance-id + // 按照【实例ID】进行过滤。 + // 类型:String + // 必选:否 + // disk-name + // 按照【云硬盘名称】进行过滤。 + // 类型:String + // 必选:否 + // zone + // 按照【可用区】进行过滤。 + // 类型:String + // 必选:否 + // disk-usage + // 按照【云硬盘类型】进行过滤。 + // 类型:String + // 必选:否 + // disk-state + // 按照【云硬盘状态】进行过滤。 + // 类型:String + // 必选:否 + // 每次请求的 Filters 的上限为 10,Filter.Values 的上限为 5。参数不支持同时指定 DiskIds 和 Filters。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 返回数量,默认为20,最大值为100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 云硬盘列表排序的依据字段。取值范围:"CREATED_TIME":依据云硬盘的创建时间排序。 "EXPIRED_TIME":依据云硬盘的到期时间排序。"DISK_SIZE":依据云硬盘的大小排序。默认按云硬盘创建时间排序。 + OrderField *string `json:"OrderField,omitempty" name:"OrderField"` + + // 输出云硬盘列表的排列顺序。取值范围:"ASC":升序排列。 "DESC":降序排列。默认按降序排列。 + Order *string `json:"Order,omitempty" name:"Order"` +} + +func (r *DescribeDisksRequest) 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 *DescribeDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + delete(f, "Filters") + delete(f, "Limit") + delete(f, "Offset") + delete(f, "OrderField") + delete(f, "Order") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云硬盘信息列表。 + DiskSet []*Disk `json:"DiskSet,omitempty" name:"DiskSet"` + + // 符合条件的云硬盘信息数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDisksResponse) 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 *DescribeDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisksReturnableRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` + + // 返回数量,默认为20,最大值为100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *DescribeDisksReturnableRequest) 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 *DescribeDisksReturnableRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDisksReturnableRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisksReturnableResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可退还云硬盘详细信息列表。 + DiskReturnableSet []*DiskReturnable `json:"DiskReturnableSet,omitempty" name:"DiskReturnableSet"` + + // 符合条件的云硬盘数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDisksReturnableResponse) 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 *DescribeDisksReturnableResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeFirewallRulesRequest struct { + *tchttp.BaseRequest + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 偏移量,默认为 0。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeFirewallRulesRequest) 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 *DescribeFirewallRulesRequest) 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, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeFirewallRulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeFirewallRulesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的防火墙规则数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 防火墙规则详细信息列表。 + FirewallRuleSet []*FirewallRuleInfo `json:"FirewallRuleSet,omitempty" name:"FirewallRuleSet"` + + // 防火墙版本号。 + FirewallVersion *uint64 `json:"FirewallVersion,omitempty" name:"FirewallVersion"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeFirewallRulesResponse) 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 *DescribeFirewallRulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeFirewallRulesTemplateRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeFirewallRulesTemplateRequest) 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 *DescribeFirewallRulesTemplateRequest) 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", "DescribeFirewallRulesTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeFirewallRulesTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的防火墙规则数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 防火墙规则详细信息列表。 + FirewallRuleSet []*FirewallRuleInfo `json:"FirewallRuleSet,omitempty" name:"FirewallRuleSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeFirewallRulesTemplateResponse) 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 *DescribeFirewallRulesTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeGeneralResourceQuotasRequest struct { + *tchttp.BaseRequest + + // 资源名列表,可取值: + // - GENERAL_BUNDLE_INSTANCE 通用型套餐实例 + // - STORAGE_BUNDLE_INSTANCE 存储型套餐实例 + // - ENTERPRISE_BUNDLE_INSTANCE 企业型套餐实例 + // - EXCLUSIVE_BUNDLE_INSTANCE 专属型套餐实例 + // - BEFAST_BUNDLE_INSTANCE 蜂驰型套餐实例 + // - USER_KEY_PAIR 密钥对 + // - SNAPSHOT 快照 + // - BLUEPRINT 自定义镜像 + // - FREE_BLUEPRINT 免费自定义镜像 + // - DATA_DISK 数据盘 + // - FIREWALL_RULE 防火墙规则 + ResourceNames []*string `json:"ResourceNames,omitempty" name:"ResourceNames"` +} + +func (r *DescribeGeneralResourceQuotasRequest) 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 *DescribeGeneralResourceQuotasRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ResourceNames") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeGeneralResourceQuotasRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeGeneralResourceQuotasResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 通用资源配额详细信息列表。 + GeneralResourceQuotaSet []*GeneralResourceQuota `json:"GeneralResourceQuotaSet,omitempty" name:"GeneralResourceQuotaSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeGeneralResourceQuotasResponse) 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 *DescribeGeneralResourceQuotasResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceLoginKeyPairAttributeRequest struct { + *tchttp.BaseRequest + + // 实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribeInstanceLoginKeyPairAttributeRequest) 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 *DescribeInstanceLoginKeyPairAttributeRequest) 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", "DescribeInstanceLoginKeyPairAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceLoginKeyPairAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 是否允许使用默认密钥对登录,YES:允许登录 NO:禁止登录。 + PermitLogin *string `json:"PermitLogin,omitempty" name:"PermitLogin"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceLoginKeyPairAttributeResponse) 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 *DescribeInstanceLoginKeyPairAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceVncUrlRequest struct { + *tchttp.BaseRequest + + // 实例 ID。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribeInstanceVncUrlRequest) 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 *DescribeInstanceVncUrlRequest) 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", "DescribeInstanceVncUrlRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceVncUrlResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例的管理终端地址。 + InstanceVncUrl *string `json:"InstanceVncUrl,omitempty" name:"InstanceVncUrl"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceVncUrlResponse) 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 *DescribeInstanceVncUrlResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesDeniedActionsRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *DescribeInstancesDeniedActionsRequest) 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 *DescribeInstancesDeniedActionsRequest) 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", "DescribeInstancesDeniedActionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesDeniedActionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例操作限制列表详细信息。 + InstanceDeniedActionSet []*InstanceDeniedActions `json:"InstanceDeniedActionSet,omitempty" name:"InstanceDeniedActionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesDeniedActionsResponse) 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 *DescribeInstancesDeniedActionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesDiskNumRequest struct { + *tchttp.BaseRequest + + // 实例ID列表。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *DescribeInstancesDiskNumRequest) 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 *DescribeInstancesDiskNumRequest) 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", "DescribeInstancesDiskNumRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesDiskNumResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 挂载信息列表 + AttachDetailSet []*AttachDetail `json:"AttachDetailSet,omitempty" name:"AttachDetailSet"` + + // 挂载信息数量 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesDiskNumResponse) 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 *DescribeInstancesDiskNumResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 过滤器列表。 + //
  • instance-name
  • 按照【实例名称】进行过滤。 + // 类型:String + // 必选:否 + //
  • private-ip-address
  • 按照【实例主网卡的内网 IP】进行过滤。 + // 类型:String + // 必选:否 + //
  • public-ip-address
  • 按照【实例主网卡的公网 IP】进行过滤。 + // 类型:String + // 必选:否 + //
  • zone
  • 按照【可用区】进行过滤。 + // 类型:String + // 必选:否 + //
  • instance-state
  • 按照【实例状态】进行过滤。 + // 类型:String + // 必选:否 + // 每次请求的 Filters 的上限为 10,Filter.Values 的上限为 100。参数不支持同时指定 InstanceIds 和 Filters。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为 0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Limit *int64 `json:"Limit,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) +} + +type DescribeInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 实例详细信息列表。 + InstanceSet []*Instance `json:"InstanceSet,omitempty" name:"InstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type DescribeInstancesReturnableRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 偏移量,默认为 0。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeInstancesReturnableRequest) 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 *DescribeInstancesReturnableRequest) 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", "DescribeInstancesReturnableRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesReturnableResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 可退还实例详细信息列表。 + InstanceReturnableSet []*InstanceReturnable `json:"InstanceReturnableSet,omitempty" name:"InstanceReturnableSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesReturnableResponse) 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 *DescribeInstancesReturnableResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesTrafficPackagesRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 偏移量,默认为 0。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeInstancesTrafficPackagesRequest) 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 *DescribeInstancesTrafficPackagesRequest) 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", "DescribeInstancesTrafficPackagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesTrafficPackagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例流量包详情数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 实例流量包详情列表。 + InstanceTrafficPackageSet []*InstanceTrafficPackage `json:"InstanceTrafficPackageSet,omitempty" name:"InstanceTrafficPackageSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesTrafficPackagesResponse) 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 *DescribeInstancesTrafficPackagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeKeyPairsRequest struct { + *tchttp.BaseRequest + + // 密钥对 ID 列表。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 偏移量,默认为 0。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤器列表。 + //
  • key-id
  • 按照【密钥对ID】进行过滤。 + // 类型:String + // 必选:否 + //
  • key-name
  • 按照【密钥对名称】进行过滤。 + // 类型:String + // 必选:否 + // 每次请求的 Filters 的上限为 10,Filter.Values 的上限为 5。参数不支持同时指定 KeyIds 和 Filters。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +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, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeKeyPairsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的密钥对数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 密钥对详细信息列表。 + KeyPairSet []*KeyPair `json:"KeyPairSet,omitempty" name:"KeyPairSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type DescribeModifyInstanceBundlesRequest struct { + *tchttp.BaseRequest + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 过滤器列表。 + //
  • bundle-id
  • 按照【套餐 ID】进行过滤。 + // 类型:String + // 必选:否 + //
  • support-platform-type
  • 按照【系统类型】进行过滤。 + // 取值: LINUX_UNIX(Linux/Unix系统);WINDOWS(Windows 系统) + // 类型:String + // 必选:否 + // 每次请求的 Filters 的上限为 10,Filter.Values 的上限为 5。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为 0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeModifyInstanceBundlesRequest) 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 *DescribeModifyInstanceBundlesRequest) 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, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeModifyInstanceBundlesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeModifyInstanceBundlesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的套餐数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 变更套餐详细信息。 + ModifyBundleSet []*ModifyBundle `json:"ModifyBundleSet,omitempty" name:"ModifyBundleSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeModifyInstanceBundlesResponse) 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 *DescribeModifyInstanceBundlesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +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) +} + +type DescribeRegionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 地域数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 地域信息列表。 + RegionSet []*RegionInfo `json:"RegionSet,omitempty" name:"RegionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type DescribeResetInstanceBlueprintsRequest struct { + *tchttp.BaseRequest + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 偏移量,默认为 0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/product/1207/47578)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤器列表。 + //
  • blueprint-id
  • 按照【镜像 ID】进行过滤。 + // 类型:String + // 必选:否 + //
  • blueprint-type
  • 按照【镜像类型】进行过滤。 + // 取值: APP_OS(应用镜像 );PURE_OS( 系统镜像);PRIVATE(自定义镜像)。 + // 类型:String + // 必选:否 + //
  • platform-type
  • 按照【镜像平台类型】进行过滤。 + // 取值: LINUX_UNIX(Linux/Unix系统);WINDOWS(Windows 系统)。 + // 类型:String + // 必选:否 + //
  • blueprint-name
  • 按照【镜像名称】进行过滤。 + // 类型:String + // 必选:否 + //
  • blueprint-state
  • 按照【镜像状态】进行过滤。 + // 类型:String + // 必选:否 + // + // 每次请求的 Filters 的上限为 10,Filter.Values 的上限为 5。参数不支持同时指定 BlueprintIds 和 Filters 。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeResetInstanceBlueprintsRequest) 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 *DescribeResetInstanceBlueprintsRequest) 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, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeResetInstanceBlueprintsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeResetInstanceBlueprintsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的镜像数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 镜像重置信息列表 + ResetInstanceBlueprintSet []*ResetInstanceBlueprint `json:"ResetInstanceBlueprintSet,omitempty" name:"ResetInstanceBlueprintSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeResetInstanceBlueprintsResponse) 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 *DescribeResetInstanceBlueprintsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSnapshotsDeniedActionsRequest struct { + *tchttp.BaseRequest + + // 快照 ID 列表, 可通过 DescribeSnapshots 查询。 + SnapshotIds []*string `json:"SnapshotIds,omitempty" name:"SnapshotIds"` +} + +func (r *DescribeSnapshotsDeniedActionsRequest) 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 *DescribeSnapshotsDeniedActionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SnapshotIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSnapshotsDeniedActionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSnapshotsDeniedActionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 快照操作限制列表详细信息。 + SnapshotDeniedActionSet []*SnapshotDeniedActions `json:"SnapshotDeniedActionSet,omitempty" name:"SnapshotDeniedActionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSnapshotsDeniedActionsResponse) 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 *DescribeSnapshotsDeniedActionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSnapshotsRequest struct { + *tchttp.BaseRequest + + // 要查询快照的 ID 列表。 + // 参数不支持同时指定 SnapshotIds 和 Filters。 + SnapshotIds []*string `json:"SnapshotIds,omitempty" name:"SnapshotIds"` + + // 过滤器列表。 + //
  • snapshot-id
  • 按照【快照 ID】进行过滤。 + // 类型:String + // 必选:否 + //
  • disk-id
  • 按照【磁盘 ID】进行过滤。 + // 类型:String + // 必选:否 + //
  • snapshot-name
  • 按照【快照名称】进行过滤。 + // 类型:String + // 必选:否 + //
  • instance-id
  • 按照【实例 ID 】进行过滤。 + // 类型:String + // 必选:否 + // 每次请求的 Filters 的上限为 10,Filter.Values 的上限为 5。参数不支持同时指定 SnapshotIds 和 Filters。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为 0。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为 20,最大值为 100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeSnapshotsRequest) 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 *DescribeSnapshotsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SnapshotIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSnapshotsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSnapshotsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 快照的数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 快照的详情列表。 + SnapshotSet []*Snapshot `json:"SnapshotSet,omitempty" name:"SnapshotSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSnapshotsResponse) 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 *DescribeSnapshotsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZonesRequest struct { + *tchttp.BaseRequest + + // 可用区列表排序的依据字段。取值范围: + //
  • ZONE:依据可用区排序。 + //
  • INSTANCE_DISPLAY_LABEL:依据可用区展示标签排序,可用区展示标签包括:HIDDEN(隐藏)、NORMAL(普通)、SELECTED(默认选中),默认采用的升序排列为:['HIDDEN', 'NORMAL', 'SELECTED']。 + // 默认按可用区排序。 + OrderField *string `json:"OrderField,omitempty" name:"OrderField"` + + // 输出可用区列表的排列顺序。取值范围: + //
  • ASC:升序排列。 + //
  • DESC:降序排列。 + // 默认按升序排列。 + Order *string `json:"Order,omitempty" name:"Order"` +} + +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 + } + delete(f, "OrderField") + delete(f, "Order") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeZonesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZonesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可用区数量 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 可用区详细信息列表 + ZoneInfoSet []*ZoneInfo `json:"ZoneInfoSet,omitempty" name:"ZoneInfoSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type DetachCcnRequest struct { + *tchttp.BaseRequest + + // 云联网实例ID。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` +} + +func (r *DetachCcnRequest) 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 *DetachCcnRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DetachCcnRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DetachCcnResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DetachCcnResponse) 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 *DetachCcnResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DetachDisksRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` +} + +func (r *DetachDisksRequest) 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 *DetachDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DetachDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DetachDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DetachDisksResponse) 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 *DetachDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateInstancesKeyPairsRequest struct { + *tchttp.BaseRequest + + // 密钥对 ID 列表。每次请求批量密钥对的上限为 100。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +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, "KeyIds") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateInstancesKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateInstancesKeyPairsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type DiscountDetail struct { + + // 计费时长。 + TimeSpan *int64 `json:"TimeSpan,omitempty" name:"TimeSpan"` + + // 计费单元。 + TimeUnit *string `json:"TimeUnit,omitempty" name:"TimeUnit"` + + // 总价。 + TotalCost *float64 `json:"TotalCost,omitempty" name:"TotalCost"` + + // 折后总价。 + RealTotalCost *float64 `json:"RealTotalCost,omitempty" name:"RealTotalCost"` + + // 折扣。 + Discount *int64 `json:"Discount,omitempty" name:"Discount"` + + // 具体折扣详情。 + PolicyDetail *PolicyDetail `json:"PolicyDetail,omitempty" name:"PolicyDetail"` +} + +type Disk struct { + + // 磁盘ID + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 磁盘名称 + DiskName *string `json:"DiskName,omitempty" name:"DiskName"` + + // 磁盘类型 + DiskUsage *string `json:"DiskUsage,omitempty" name:"DiskUsage"` + + // 磁盘介质类型 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 磁盘付费类型 + DiskChargeType *string `json:"DiskChargeType,omitempty" name:"DiskChargeType"` + + // 磁盘大小 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 续费标识 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 磁盘状态 + DiskState *string `json:"DiskState,omitempty" name:"DiskState"` + + // 磁盘挂载状态 + Attached *bool `json:"Attached,omitempty" name:"Attached"` + + // 是否随实例释放 + DeleteWithInstance *bool `json:"DeleteWithInstance,omitempty" name:"DeleteWithInstance"` + + // 上一次操作 + LatestOperation *string `json:"LatestOperation,omitempty" name:"LatestOperation"` + + // 上一次操作状态 + LatestOperationState *string `json:"LatestOperationState,omitempty" name:"LatestOperationState"` + + // 上一次请求ID + LatestOperationRequestId *string `json:"LatestOperationRequestId,omitempty" name:"LatestOperationRequestId"` + + // 创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 到期时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExpiredTime *string `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + + // 隔离时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsolatedTime *string `json:"IsolatedTime,omitempty" name:"IsolatedTime"` +} + +type DiskChargePrepaid struct { + + // 新购周期。 + Period *int64 `json:"Period,omitempty" name:"Period"` + + // 续费标识。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 新购单位. 默认值: "m"。 + TimeUnit *string `json:"TimeUnit,omitempty" name:"TimeUnit"` +} + +type DiskConfig struct { + + // 可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 云硬盘类型。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 云硬盘可售卖状态。 + DiskSalesState *string `json:"DiskSalesState,omitempty" name:"DiskSalesState"` + + // 最大云硬盘大小。 + MaxDiskSize *int64 `json:"MaxDiskSize,omitempty" name:"MaxDiskSize"` + + // 最小云硬盘大小。 + MinDiskSize *int64 `json:"MinDiskSize,omitempty" name:"MinDiskSize"` + + // 云硬盘步长。 + DiskStepSize *int64 `json:"DiskStepSize,omitempty" name:"DiskStepSize"` +} + +type DiskDeniedActions struct { + + // 云硬盘ID。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 操作限制列表。 + DeniedActions []*DeniedAction `json:"DeniedActions,omitempty" name:"DeniedActions"` +} + +type DiskPrice struct { + + // 云硬盘单价。 + OriginalDiskPrice *float64 `json:"OriginalDiskPrice,omitempty" name:"OriginalDiskPrice"` + + // 云硬盘总价。 + OriginalPrice *float64 `json:"OriginalPrice,omitempty" name:"OriginalPrice"` + + // 折扣。 + Discount *float64 `json:"Discount,omitempty" name:"Discount"` + + // 折后总价。 + DiscountPrice *float64 `json:"DiscountPrice,omitempty" name:"DiscountPrice"` +} + +type DiskReturnable struct { + + // 云硬盘ID。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 云硬盘是否可退还。 + IsReturnable *bool `json:"IsReturnable,omitempty" name:"IsReturnable"` + + // 云硬盘退还失败错误码。 + ReturnFailCode *int64 `json:"ReturnFailCode,omitempty" name:"ReturnFailCode"` + + // 云硬盘退还失败错误信息。 + ReturnFailMessage *string `json:"ReturnFailMessage,omitempty" name:"ReturnFailMessage"` +} + +type DockerContainerConfiguration struct { + + // 容器镜像地址 + ContainerImage *string `json:"ContainerImage,omitempty" name:"ContainerImage"` + + // 容器名称 + ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` + + // 环境变量列表 + Envs []*ContainerEnv `json:"Envs,omitempty" name:"Envs"` + + // 容器端口主机端口映射列表 + PublishPorts []*DockerContainerPublishPort `json:"PublishPorts,omitempty" name:"PublishPorts"` + + // 容器加载本地卷列表 + Volumes []*DockerContainerVolume `json:"Volumes,omitempty" name:"Volumes"` + + // 运行的命令 + Command *string `json:"Command,omitempty" name:"Command"` +} + +type DockerContainerPublishPort struct { + + // 主机端口 + HostPort *int64 `json:"HostPort,omitempty" name:"HostPort"` + + // 容器端口 + ContainerPort *int64 `json:"ContainerPort,omitempty" name:"ContainerPort"` + + // 对外绑定IP,默认0.0.0.0 + // 注意:此字段可能返回 null,表示取不到有效值。 + Ip *string `json:"Ip,omitempty" name:"Ip"` + + // 协议,默认tcp,支持tcp/udp/sctp + // 注意:此字段可能返回 null,表示取不到有效值。 + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` +} + +type DockerContainerVolume struct { + + // 容器路径 + ContainerPath *string `json:"ContainerPath,omitempty" name:"ContainerPath"` + + // 主机路径 + HostPath *string `json:"HostPath,omitempty" name:"HostPath"` +} + +type Filter struct { + + // 需要过滤的字段。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 字段的过滤值。 + Values []*string `json:"Values,omitempty" name:"Values"` +} + +type FirewallRule struct { + + // 协议,取值:TCP,UDP,ICMP,ALL。 + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` + + // 端口,取值:ALL,单独的端口,逗号分隔的离散端口,减号分隔的端口范围。 + Port *string `json:"Port,omitempty" name:"Port"` + + // 网段或 IP (互斥)。默认为 0.0.0.0/0,表示所有来源。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 取值:ACCEPT,DROP。默认为 ACCEPT。 + Action *string `json:"Action,omitempty" name:"Action"` + + // 防火墙规则描述。 + FirewallRuleDescription *string `json:"FirewallRuleDescription,omitempty" name:"FirewallRuleDescription"` +} + +type FirewallRuleInfo struct { + + // 应用类型,取值:自定义,HTTP(80),HTTPS(443),Linux登录(22),Windows登录(3389),MySQL(3306),SQL Server(1433),全部TCP,全部UDP,Ping-ICMP,ALL。 + AppType *string `json:"AppType,omitempty" name:"AppType"` + + // 协议,取值:TCP,UDP,ICMP,ALL。 + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` + + // 端口,取值:ALL,单独的端口,逗号分隔的离散端口,减号分隔的端口范围。 + Port *string `json:"Port,omitempty" name:"Port"` + + // 网段或 IP (互斥)。默认为 0.0.0.0/0,表示所有来源。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 取值:ACCEPT,DROP。默认为 ACCEPT。 + Action *string `json:"Action,omitempty" name:"Action"` + + // 防火墙规则描述。 + FirewallRuleDescription *string `json:"FirewallRuleDescription,omitempty" name:"FirewallRuleDescription"` +} + +type GeneralResourceQuota struct { + + // 资源名称。 + ResourceName *string `json:"ResourceName,omitempty" name:"ResourceName"` + + // 资源当前可用数量。 + ResourceQuotaAvailable *int64 `json:"ResourceQuotaAvailable,omitempty" name:"ResourceQuotaAvailable"` + + // 资源总数量。 + ResourceQuotaTotal *int64 `json:"ResourceQuotaTotal,omitempty" name:"ResourceQuotaTotal"` +} + +type ImportKeyPairRequest struct { + *tchttp.BaseRequest + + // 密钥对名称,可由数字,字母和下划线组成,长度不超过 25 个字符。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 密钥对的公钥内容, OpenSSH RSA 格式。 + PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"` +} + +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, "PublicKey") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ImportKeyPairRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ImportKeyPairResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 密钥对 ID。 + KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type InquirePriceCreateBlueprintRequest struct { + *tchttp.BaseRequest + + // 自定义镜像的个数。默认值为1。 + BlueprintCount *int64 `json:"BlueprintCount,omitempty" name:"BlueprintCount"` +} + +func (r *InquirePriceCreateBlueprintRequest) 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 *InquirePriceCreateBlueprintRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BlueprintCount") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquirePriceCreateBlueprintRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceCreateBlueprintResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 自定义镜像的价格参数。 + BlueprintPrice *BlueprintPrice `json:"BlueprintPrice,omitempty" name:"BlueprintPrice"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquirePriceCreateBlueprintResponse) 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 *InquirePriceCreateBlueprintResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceCreateDisksRequest struct { + *tchttp.BaseRequest + + // 云硬盘大小, 单位: GB。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 云硬盘介质类型。取值: "CLOUD_PREMIUM"(高性能云盘), "CLOUD_SSD"(SSD云硬盘)。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 新购云硬盘包年包月相关参数设置。 + DiskChargePrepaid *DiskChargePrepaid `json:"DiskChargePrepaid,omitempty" name:"DiskChargePrepaid"` + + // 云硬盘个数, 默认值: 1。 + DiskCount *int64 `json:"DiskCount,omitempty" name:"DiskCount"` +} + +func (r *InquirePriceCreateDisksRequest) 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 *InquirePriceCreateDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskSize") + delete(f, "DiskType") + delete(f, "DiskChargePrepaid") + delete(f, "DiskCount") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquirePriceCreateDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceCreateDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云硬盘价格。 + DiskPrice *DiskPrice `json:"DiskPrice,omitempty" name:"DiskPrice"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquirePriceCreateDisksResponse) 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 *InquirePriceCreateDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceCreateInstancesRequest struct { + *tchttp.BaseRequest + + // 实例的套餐 ID。 + BundleId *string `json:"BundleId,omitempty" name:"BundleId"` + + // 创建数量,默认为 1。 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 应用镜像 ID,使用收费应用镜像时必填。可通过[DescribeBlueprints](https://cloud.tencent.com/document/product/1207/47689)接口返回值中的BlueprintId获取。 + BlueprintId *string `json:"BlueprintId,omitempty" name:"BlueprintId"` +} + +func (r *InquirePriceCreateInstancesRequest) 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 *InquirePriceCreateInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BundleId") + delete(f, "InstanceCount") + delete(f, "InstanceChargePrepaid") + delete(f, "BlueprintId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquirePriceCreateInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceCreateInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 询价信息。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquirePriceCreateInstancesResponse) 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 *InquirePriceCreateInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceRenewDisksRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` + + // 续费云硬盘包年包月相关参数设置。 + RenewDiskChargePrepaid *RenewDiskChargePrepaid `json:"RenewDiskChargePrepaid,omitempty" name:"RenewDiskChargePrepaid"` +} + +func (r *InquirePriceRenewDisksRequest) 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 *InquirePriceRenewDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + delete(f, "RenewDiskChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquirePriceRenewDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceRenewDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云硬盘价格。 + DiskPrice *DiskPrice `json:"DiskPrice,omitempty" name:"DiskPrice"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquirePriceRenewDisksResponse) 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 *InquirePriceRenewDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceRenewInstancesRequest struct { + *tchttp.BaseRequest + + // 待续费的实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 是否续费数据盘 + RenewDataDisk *bool `json:"RenewDataDisk,omitempty" name:"RenewDataDisk"` + + // 数据盘是否对齐实例到期时间 + AlignInstanceExpiredTime *bool `json:"AlignInstanceExpiredTime,omitempty" name:"AlignInstanceExpiredTime"` +} + +func (r *InquirePriceRenewInstancesRequest) 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 *InquirePriceRenewInstancesRequest) 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, "InstanceChargePrepaid") + delete(f, "RenewDataDisk") + delete(f, "AlignInstanceExpiredTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquirePriceRenewInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceRenewInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 询价信息。 + Price *Price `json:"Price,omitempty" name:"Price"` + + // 数据盘价格信息列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DataDiskPriceSet []*DataDiskPrice `json:"DataDiskPriceSet,omitempty" name:"DataDiskPriceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquirePriceRenewInstancesResponse) 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 *InquirePriceRenewInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Instance struct { + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 套餐 ID。 + BundleId *string `json:"BundleId,omitempty" name:"BundleId"` + + // 镜像 ID。 + BlueprintId *string `json:"BlueprintId,omitempty" name:"BlueprintId"` + + // 实例的 CPU 核数,单位:核。 + CPU *int64 `json:"CPU,omitempty" name:"CPU"` + + // 实例内存容量,单位:GB 。 + Memory *int64 `json:"Memory,omitempty" name:"Memory"` + + // 实例名称。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例计费模式。取值范围: + // PREPAID:表示预付费,即包年包月。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 实例系统盘信息。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例主网卡的内网 IP。 + // 注意:此字段可能返回 空,表示取不到有效值。 + PrivateAddresses []*string `json:"PrivateAddresses,omitempty" name:"PrivateAddresses"` + + // 实例主网卡的公网 IP。 + // 注意:此字段可能返回 空,表示取不到有效值。 + PublicAddresses []*string `json:"PublicAddresses,omitempty" name:"PublicAddresses"` + + // 实例带宽信息。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 自动续费标识。取值范围: + // NOTIFY_AND_MANUAL_RENEW:表示通知即将过期,但不自动续费 + // NOTIFY_AND_AUTO_RENEW:表示通知即将过期,而且自动续费 。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 实例登录设置。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例状态。取值范围: + //
  • PENDING:表示创建中
  • LAUNCH_FAILED:表示创建失败
  • RUNNING:表示运行中
  • STOPPED:表示关机
  • STARTING:表示开机中
  • STOPPING:表示关机中
  • REBOOTING:表示重启中
  • SHUTDOWN:表示停止待销毁
  • TERMINATING:表示销毁中
  • DELETING:表示删除中
  • FREEZING:表示冻结中
  • + InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` + + // 实例全局唯一 ID。 + Uuid *string `json:"Uuid,omitempty" name:"Uuid"` + + // 实例的最新操作。例:StopInstances、ResetInstance。注意:此字段可能返回 空值,表示取不到有效值。 + LatestOperation *string `json:"LatestOperation,omitempty" name:"LatestOperation"` + + // 实例的最新操作状态。取值范围: + // SUCCESS:表示操作成功 + // OPERATING:表示操作执行中 + // FAILED:表示操作失败 + // 注意:此字段可能返回 空值,表示取不到有效值。 + LatestOperationState *string `json:"LatestOperationState,omitempty" name:"LatestOperationState"` + + // 实例最新操作的唯一请求 ID。 + // 注意:此字段可能返回 空值,表示取不到有效值。 + LatestOperationRequestId *string `json:"LatestOperationRequestId,omitempty" name:"LatestOperationRequestId"` + + // 隔离时间。按照 ISO8601 标准表示,并且使用 UTC 时间。 + // 格式为: YYYY-MM-DDThh:mm:ssZ。 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsolatedTime *string `json:"IsolatedTime,omitempty" name:"IsolatedTime"` + + // 创建时间。按照 ISO8601 标准表示,并且使用 UTC 时间。 + // 格式为: YYYY-MM-DDThh:mm:ssZ。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 到期时间。按照 ISO8601 标准表示,并且使用 UTC 时间。 + // 格式为: YYYY-MM-DDThh:mm:ssZ 。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExpiredTime *string `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + + // 操作系统平台类型,如 LINUX_UNIX、WINDOWS。 + PlatformType *string `json:"PlatformType,omitempty" name:"PlatformType"` + + // 操作系统平台。 + Platform *string `json:"Platform,omitempty" name:"Platform"` + + // 操作系统名称。 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例绑定的标签列表。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 实例封禁状态。取值范围: + //
  • NORMAL实例正常。
  • NETWORK_RESTRICT:网络封禁。
  • + InstanceRestrictState *string `json:"InstanceRestrictState,omitempty" name:"InstanceRestrictState"` +} + +type InstanceChargePrepaid struct { + + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36, 48, 60。 + Period *int64 `json:"Period,omitempty" name:"Period"` + + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费,用户需要手动续费
  • DISABLE_NOTIFY_AND_AUTO_RENEW:不自动续费,且不通知

    默认取值:NOTIFY_AND_MANUAL_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +type InstanceDeniedActions struct { + + // 实例 ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 操作限制列表。 + DeniedActions []*DeniedAction `json:"DeniedActions,omitempty" name:"DeniedActions"` +} + +type InstancePrice struct { + + // 套餐单价原价。 + OriginalBundlePrice *float64 `json:"OriginalBundlePrice,omitempty" name:"OriginalBundlePrice"` + + // 原价。 + OriginalPrice *float64 `json:"OriginalPrice,omitempty" name:"OriginalPrice"` + + // 折扣。 + Discount *int64 `json:"Discount,omitempty" name:"Discount"` + + // 折后价。 + DiscountPrice *float64 `json:"DiscountPrice,omitempty" name:"DiscountPrice"` +} + +type InstanceReturnable struct { + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例是否可退还。 + IsReturnable *bool `json:"IsReturnable,omitempty" name:"IsReturnable"` + + // 实例退还失败错误码。 + ReturnFailCode *int64 `json:"ReturnFailCode,omitempty" name:"ReturnFailCode"` + + // 实例退还失败错误信息。 + ReturnFailMessage *string `json:"ReturnFailMessage,omitempty" name:"ReturnFailMessage"` +} + +type InstanceTrafficPackage struct { + + // 实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 流量包详情列表。 + TrafficPackageSet []*TrafficPackage `json:"TrafficPackageSet,omitempty" name:"TrafficPackageSet"` +} + +type InternetAccessible struct { + + // 网络计费类型,取值范围: + //
  • 按流量包付费:TRAFFIC_POSTPAID_BY_HOUR
  • + //
  • 按带宽付费: BANDWIDTH_POSTPAID_BY_HOUR
  • + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 公网出带宽上限,单位:Mbps。 + InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 是否分配公网 IP。 + PublicIpAssigned *bool `json:"PublicIpAssigned,omitempty" name:"PublicIpAssigned"` +} + +type IsolateInstancesRequest struct { + *tchttp.BaseRequest + + // 实例ID列表。一个或多个待操作的实例ID。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。每次请求退还实例和数据盘数量总计上限为20。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 是否退还挂载的数据盘。取值范围: + // TRUE:表示退还实例同时退还其挂载的数据盘。 + // FALSE:表示退还实例同时不再退还其挂载的数据盘。 + // 默认取值:TRUE。 + IsolateDataDisk *bool `json:"IsolateDataDisk,omitempty" name:"IsolateDataDisk"` +} + +func (r *IsolateInstancesRequest) 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 *IsolateInstancesRequest) 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, "IsolateDataDisk") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "IsolateInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type IsolateInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *IsolateInstancesResponse) 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 *IsolateInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type KeyPair struct { + + // 密钥对 ID ,是密钥对的唯一标识。 + KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + + // 密钥对名称。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 密钥对的纯文本公钥。 + PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"` + + // 密钥对关联的实例 ID 列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AssociatedInstanceIds []*string `json:"AssociatedInstanceIds,omitempty" name:"AssociatedInstanceIds"` + + // 创建时间。按照 ISO8601 标准表示,并且使用 UTC 时间。格式为:YYYY-MM-DDThh:mm:ssZ + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 密钥对私钥。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PrivateKey *string `json:"PrivateKey,omitempty" name:"PrivateKey"` +} + +type LoginConfiguration struct { + + //
  • "YES"代表选择自动生成密码,这时不指定Password字段。
  • + //
  • "NO"代表选择自定义密码,这时要指定Password字段。
  • + AutoGeneratePassword *string `json:"AutoGeneratePassword,omitempty" name:"AutoGeneratePassword"` + + // 实例登录密码。具体按照操作系统的复杂度要求。 + // WINDOWS 实例密码必须 12-30 位,不能以“/”开头且不包括用户名,至少包含以下字符中的三种不同字符 + //
  • 小写字母:[a-z]
  • + //
  • 大写字母:[A-Z]
  • + //
  • 数字: 0-9
  • + //
  • 特殊字符:()`~!@#$%^&*-+=_|{}[]:;' <>,.?/
  • + Password *string `json:"Password,omitempty" name:"Password"` +} + +type LoginSettings struct { + + // 密钥 ID 列表。关联密钥后,就可以通过对应的私钥来访问实例。注意:此字段可能返回 [],表示取不到有效值。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` +} + +type ModifyBlueprintAttributeRequest struct { + *tchttp.BaseRequest + + // 镜像 ID。可通过[DescribeBlueprints](https://cloud.tencent.com/document/product/1207/47689)接口返回值中的BlueprintId获取。 + BlueprintId *string `json:"BlueprintId,omitempty" name:"BlueprintId"` + + // 设置新的镜像名称。最大长度60。 + BlueprintName *string `json:"BlueprintName,omitempty" name:"BlueprintName"` + + // 设置新的镜像描述。最大长度60。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +func (r *ModifyBlueprintAttributeRequest) 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 *ModifyBlueprintAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BlueprintId") + delete(f, "BlueprintName") + delete(f, "Description") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyBlueprintAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyBlueprintAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyBlueprintAttributeResponse) 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 *ModifyBlueprintAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyBundle struct { + + // 更改实例套餐后需要补的差价。 + ModifyPrice *Price `json:"ModifyPrice,omitempty" name:"ModifyPrice"` + + // 变更套餐状态。取值: + //
  • SOLD_OUT:套餐售罄
  • + //
  • AVAILABLE:支持套餐变更
  • + //
  • UNAVAILABLE:暂不支持套餐变更
  • + ModifyBundleState *string `json:"ModifyBundleState,omitempty" name:"ModifyBundleState"` + + // 套餐信息。 + Bundle *Bundle `json:"Bundle,omitempty" name:"Bundle"` + + // 不支持套餐变更原因信息。变更套餐状态为"AVAILABLE"时, 该信息为空 + // 注意:此字段可能返回 null,表示取不到有效值。 + NotSupportModifyMessage *string `json:"NotSupportModifyMessage,omitempty" name:"NotSupportModifyMessage"` +} + +type ModifyDisksAttributeRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` + + // 云硬盘名称。 + DiskName *string `json:"DiskName,omitempty" name:"DiskName"` +} + +func (r *ModifyDisksAttributeRequest) 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 *ModifyDisksAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + delete(f, "DiskName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDisksAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDisksAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyDisksAttributeResponse) 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 *ModifyDisksAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDisksRenewFlagRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` + + // 续费标识。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +func (r *ModifyDisksRenewFlagRequest) 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 *ModifyDisksRenewFlagRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + delete(f, "RenewFlag") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDisksRenewFlagRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDisksRenewFlagResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyDisksRenewFlagResponse) 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 *ModifyDisksRenewFlagResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyFirewallRuleDescriptionRequest struct { + *tchttp.BaseRequest + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 防火墙规则。 + FirewallRule *FirewallRule `json:"FirewallRule,omitempty" name:"FirewallRule"` + + // 防火墙当前版本。用户每次更新防火墙规则时版本会自动加1,防止规则已过期,不填不考虑冲突。 + FirewallVersion *uint64 `json:"FirewallVersion,omitempty" name:"FirewallVersion"` +} + +func (r *ModifyFirewallRuleDescriptionRequest) 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 *ModifyFirewallRuleDescriptionRequest) 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, "FirewallRule") + delete(f, "FirewallVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyFirewallRuleDescriptionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyFirewallRuleDescriptionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyFirewallRuleDescriptionResponse) 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 *ModifyFirewallRuleDescriptionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyFirewallRulesRequest struct { + *tchttp.BaseRequest + + // 实例 ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 防火墙规则列表。 + FirewallRules []*FirewallRule `json:"FirewallRules,omitempty" name:"FirewallRules"` + + // 防火墙当前版本。用户每次更新防火墙规则时版本会自动加1,防止规则已过期,不填不考虑冲突。 + FirewallVersion *uint64 `json:"FirewallVersion,omitempty" name:"FirewallVersion"` +} + +func (r *ModifyFirewallRulesRequest) 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 *ModifyFirewallRulesRequest) 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, "FirewallRules") + delete(f, "FirewallVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyFirewallRulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyFirewallRulesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyFirewallRulesResponse) 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 *ModifyFirewallRulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesAttributeRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例名称。可任意命名,但不得超过 60 个字符。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` +} + +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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type ModifyInstancesLoginKeyPairAttributeRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 是否允许使用默认密钥对登录,YES:允许登录;NO:禁止登录 + PermitLogin *string `json:"PermitLogin,omitempty" name:"PermitLogin"` +} + +func (r *ModifyInstancesLoginKeyPairAttributeRequest) 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 *ModifyInstancesLoginKeyPairAttributeRequest) 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, "PermitLogin") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesLoginKeyPairAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesLoginKeyPairAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesLoginKeyPairAttributeResponse) 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 *ModifyInstancesLoginKeyPairAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesRenewFlagRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 自动续费标识。取值范围:
  • NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
  • NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
  • DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费

    若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,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) +} + +type ModifyInstancesRenewFlagResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type ModifySnapshotAttributeRequest struct { + *tchttp.BaseRequest + + // 快照 ID, 可通过 DescribeSnapshots 查询。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` + + // 新的快照名称,最长为 60 个字符。 + SnapshotName *string `json:"SnapshotName,omitempty" name:"SnapshotName"` +} + +func (r *ModifySnapshotAttributeRequest) 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 *ModifySnapshotAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SnapshotId") + delete(f, "SnapshotName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifySnapshotAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifySnapshotAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifySnapshotAttributeResponse) 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 *ModifySnapshotAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type PolicyDetail struct { + + // 用户折扣。 + UserDiscount *int64 `json:"UserDiscount,omitempty" name:"UserDiscount"` + + // 公共折扣。 + CommonDiscount *int64 `json:"CommonDiscount,omitempty" name:"CommonDiscount"` + + // 最终折扣。 + FinalDiscount *int64 `json:"FinalDiscount,omitempty" name:"FinalDiscount"` +} + +type Price struct { + + // 实例价格。 + InstancePrice *InstancePrice `json:"InstancePrice,omitempty" name:"InstancePrice"` +} + +type RebootInstancesRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RebootInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RebootInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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 { + + // 地域名称,例如,ap-guangzhou。 + Region *string `json:"Region,omitempty" name:"Region"` + + // 地域描述,例如,华南地区(广州)。 + RegionName *string `json:"RegionName,omitempty" name:"RegionName"` + + // 地域是否可用状态,取值仅为AVAILABLE。 + RegionState *string `json:"RegionState,omitempty" name:"RegionState"` + + // 是否中国大陆地域 + IsChinaMainland *bool `json:"IsChinaMainland,omitempty" name:"IsChinaMainland"` +} + +type RenewDiskChargePrepaid struct { + + // 新购周期。 + Period *int64 `json:"Period,omitempty" name:"Period"` + + // 续费标识。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 周期单位. 默认值: "m"。 + TimeUnit *string `json:"TimeUnit,omitempty" name:"TimeUnit"` + + // 当前实例到期时间。 + CurInstanceDeadline *string `json:"CurInstanceDeadline,omitempty" name:"CurInstanceDeadline"` +} + +type RenewInstancesRequest struct { + *tchttp.BaseRequest + + // 实例ID列表。一个或多个待操作的实例ID。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 是否续费弹性数据盘。取值范围: + // TRUE:表示续费实例同时续费其挂载的数据盘 + // FALSE:表示续费实例同时不再续费其挂载的数据盘 + // 默认取值:TRUE。 + RenewDataDisk *bool `json:"RenewDataDisk,omitempty" name:"RenewDataDisk"` + + // 是否自动抵扣代金券。取值范围: + // TRUE:表示自动抵扣代金券 + // FALSE:表示不自动抵扣代金券 + // 默认取值:FALSE。 + AutoVoucher *bool `json:"AutoVoucher,omitempty" name:"AutoVoucher"` +} + +func (r *RenewInstancesRequest) 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 *RenewInstancesRequest) 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, "InstanceChargePrepaid") + delete(f, "RenewDataDisk") + delete(f, "AutoVoucher") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RenewInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RenewInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RenewInstancesResponse) 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 *RenewInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetAttachCcnRequest struct { + *tchttp.BaseRequest + + // 云联网实例ID。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` +} + +func (r *ResetAttachCcnRequest) 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 *ResetAttachCcnRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetAttachCcnRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetAttachCcnResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetAttachCcnResponse) 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 *ResetAttachCcnResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstanceBlueprint struct { + + // 镜像详细信息 + BlueprintInfo *Blueprint `json:"BlueprintInfo,omitempty" name:"BlueprintInfo"` + + // 实例镜像是否可重置为目标镜像 + IsResettable *bool `json:"IsResettable,omitempty" name:"IsResettable"` + + // 不可重置信息.当镜像可重置时为"" + NonResettableMessage *string `json:"NonResettableMessage,omitempty" name:"NonResettableMessage"` +} + +type ResetInstanceRequest struct { + *tchttp.BaseRequest + + // 实例 ID。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 镜像 ID。可通过[DescribeBlueprints](https://cloud.tencent.com/document/product/1207/47689)接口返回值中的BlueprintId获取。 + BlueprintId *string `json:"BlueprintId,omitempty" name:"BlueprintId"` +} + +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, "BlueprintId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type ResetInstancesPasswordRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下: + // `LINUX_UNIX` 实例密码必须 8-30 位,推荐使用 12 位以上密码,不能以“/”开头,至少包含以下字符中的三种不同字符,字符种类:
  • 小写字母:[a-z]
  • 大写字母:[A-Z]
  • 数字:0-9
  • 特殊字符: ()\`~!@#$%^&\*-+=\_|{}[]:;'<>,.?/
  • + // `WINDOWS` 实例密码必须 12-30 位,不能以“/”开头且不包括用户名,至少包含以下字符中的三种不同字符
  • 小写字母:[a-z]
  • 大写字母:[A-Z]
  • 数字: 0-9
  • 特殊字符:()\`~!@#$%^&\*-+=\_|{}[]:;' <>,.?/
  • 如果实例即包含 `LINUX_UNIX` 实例又包含 `WINDOWS` 实例,则密码复杂度限制按照 `WINDOWS` 实例的限制。 + Password *string `json:"Password,omitempty" name:"Password"` + + // 待重置密码的实例操作系统用户名。不得超过 64 个字符。 + UserName *string `json:"UserName,omitempty" name:"UserName"` +} + +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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstancesPasswordRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesPasswordResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type Snapshot struct { + + // 快照 ID。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` + + // 创建此快照的磁盘类型。取值:
  • SYSTEM_DISK:系统盘
  • + DiskUsage *string `json:"DiskUsage,omitempty" name:"DiskUsage"` + + // 创建此快照的磁盘 ID。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 创建此快照的磁盘大小,单位 GB。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 快照名称,用户自定义的快照别名。 + SnapshotName *string `json:"SnapshotName,omitempty" name:"SnapshotName"` + + // 快照的状态。取值范围: + //
  • NORMAL:正常
  • + //
  • CREATING:创建中
  • + //
  • ROLLBACKING:回滚中。
  • + SnapshotState *string `json:"SnapshotState,omitempty" name:"SnapshotState"` + + // 创建或回滚快照进度百分比,成功后此字段取值为 100。 + Percent *int64 `json:"Percent,omitempty" name:"Percent"` + + // 快照的最新操作,只有创建、回滚快照时记录。 + // 取值如 CreateInstanceSnapshot,RollbackInstanceSnapshot。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperation *string `json:"LatestOperation,omitempty" name:"LatestOperation"` + + // 快照的最新操作状态,只有创建、回滚快照时记录。 + // 取值范围: + //
  • SUCCESS:表示操作成功
  • + //
  • OPERATING:表示操作执行中
  • + //
  • FAILED:表示操作失败
  • + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperationState *string `json:"LatestOperationState,omitempty" name:"LatestOperationState"` + + // 快照最新操作的唯一请求 ID,只有创建、回滚快照时记录。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperationRequestId *string `json:"LatestOperationRequestId,omitempty" name:"LatestOperationRequestId"` + + // 快照的创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type SnapshotDeniedActions struct { + + // 快照 ID。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` + + // 操作限制列表。 + DeniedActions []*DeniedAction `json:"DeniedActions,omitempty" name:"DeniedActions"` +} + +type Software struct { + + // 软件名称。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 软件版本。 + Version *string `json:"Version,omitempty" name:"Version"` + + // 软件图片 URL。 + ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"` + + // 软件安装目录。 + InstallDir *string `json:"InstallDir,omitempty" name:"InstallDir"` + + // 软件详情列表。 + DetailSet []*SoftwareDetail `json:"DetailSet,omitempty" name:"DetailSet"` +} + +type SoftwareDetail struct { + + // 详情唯一键。 + Key *string `json:"Key,omitempty" name:"Key"` + + // 详情标题。 + Title *string `json:"Title,omitempty" name:"Title"` + + // 详情值。 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type StartInstancesRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,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) +} + +type StartInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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) +} + +type StopInstancesRequest struct { + *tchttp.BaseRequest + + // 实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "StopInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type StopInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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 SystemDisk struct { + + // 系统盘类型。 + // 取值范围: + //
  • LOCAL_BASIC:本地硬盘
  • LOCAL_SSD:本地 SSD 硬盘
  • CLOUD_BASIC:普通云硬盘
  • CLOUD_SSD:SSD 云硬盘
  • CLOUD_PREMIUM:高性能云硬盘
  • + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 系统盘大小,单位:GB。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 系统盘ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` +} + +type Tag struct { + + // 标签键 + Key *string `json:"Key,omitempty" name:"Key"` + + // 标签值 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type TerminateDisksRequest struct { + *tchttp.BaseRequest + + // 云硬盘ID列表。 + DiskIds []*string `json:"DiskIds,omitempty" name:"DiskIds"` +} + +func (r *TerminateDisksRequest) 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 *TerminateDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DiskIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "TerminateDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type TerminateDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *TerminateDisksResponse) 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 *TerminateDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type TerminateInstancesRequest struct { + *tchttp.BaseRequest + + // 实例ID列表。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "TerminateInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type TerminateInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `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 TrafficPackage struct { + + // 流量包ID。 + TrafficPackageId *string `json:"TrafficPackageId,omitempty" name:"TrafficPackageId"` + + // 流量包生效周期内已使用流量,单位字节。 + TrafficUsed *int64 `json:"TrafficUsed,omitempty" name:"TrafficUsed"` + + // 流量包生效周期内的总流量,单位字节。 + TrafficPackageTotal *int64 `json:"TrafficPackageTotal,omitempty" name:"TrafficPackageTotal"` + + // 流量包生效周期内的剩余流量,单位字节。 + TrafficPackageRemaining *int64 `json:"TrafficPackageRemaining,omitempty" name:"TrafficPackageRemaining"` + + // 流量包生效周期内超出流量包额度的流量,单位字节。 + TrafficOverflow *int64 `json:"TrafficOverflow,omitempty" name:"TrafficOverflow"` + + // 流量包生效周期开始时间。按照 ISO8601 标准表示,并且使用 UTC 时间。 + // 格式为: YYYY-MM-DDThh:mm:ssZ。 + // 注意:此字段可能返回 null,表示取不到有效值。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 流量包生效周期结束时间。按照 ISO8601 标准表示,并且使用 UTC 时间。 + // 格式为: YYYY-MM-DDThh:mm:ssZ。 + // 注意:此字段可能返回 null,表示取不到有效值。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // 流量包到期时间。按照 ISO8601 标准表示,并且使用 UTC 时间。 + // 格式为: YYYY-MM-DDThh:mm:ssZ。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Deadline *string `json:"Deadline,omitempty" name:"Deadline"` + + // 流量包状态: + //
  • NETWORK_NORMAL:正常
  • + //
  • OVERDUE_NETWORK_DISABLED:欠费断网
  • + Status *string `json:"Status,omitempty" name:"Status"` +} + +type ZoneInfo struct { + + // 可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 可用区中文名称 + ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"` + + // 实例购买页可用区展示标签 + InstanceDisplayLabel *string `json:"InstanceDisplayLabel,omitempty" name:"InstanceDisplayLabel"` +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 3c53d13372..100bb6b2f4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -555,7 +555,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.412 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.412 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.413 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http @@ -579,6 +579,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es/v20180416 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap/v20180529 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.413 +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.329 diff --git a/website/docs/r/lighthouse_instance.html.markdown b/website/docs/r/lighthouse_instance.html.markdown new file mode 100644 index 0000000000..4ca9cc66a2 --- /dev/null +++ b/website/docs/r/lighthouse_instance.html.markdown @@ -0,0 +1,137 @@ +--- +subcategory: "Lighthouse" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_lighthouse_instance" +sidebar_current: "docs-tencentcloud-resource-lighthouse_instance" +description: |- + Provides a resource to create a lighthouse instance. +--- + +# tencentcloud_lighthouse_instance + +Provides a resource to create a lighthouse instance. + +## Example Usage + +```hcl +resource "tencentcloud_lighthouse_instance" "lighthouse" { + bundle_id = "bundle2022_gen_01" + blueprint_id = "lhbp-f1lkcd41" + + period = 1 + renew_flag = "NOTIFY_AND_AUTO_RENEW" + + instance_name = "hello world" + zone = "ap-guangzhou-3" + + containers { + container_image = "ccr.ccs.tencentyun.com/qcloud/nginx" + container_name = "nginx" + envs { + key = "key" + value = "value" + } + envs { + key = "key2" + value = "value2" + } + publish_ports { + host_port = 80 + container_port = 80 + ip = "127.0.0.1" + protocol = "tcp" + } + publish_ports { + host_port = 36000 + container_port = 36000 + ip = "127.0.0.1" + protocol = "tcp" + } + volumes { + container_path = "/data" + host_path = "/tmp" + } + volumes { + container_path = "/var" + host_path = "/tmp" + } + command = "ls -l" + } + + containers { + container_image = "ccr.ccs.tencentyun.com/qcloud/resty" + container_name = "resty" + envs { + key = "key2" + value = "value2" + } + publish_ports { + host_port = 80 + container_port = 80 + ip = "127.0.0.1" + protocol = "udp" + } + + volumes { + container_path = "/var" + host_path = "/tmp" + } + command = "echo \"hello\"" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `blueprint_id` - (Required) ID of the Lighthouse image. +* `bundle_id` - (Required) ID of the Lighthouse package. +* `instance_name` - (Required) The display name of the Lighthouse instance. +* `period` - (Required) Subscription period in months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36, 48, 60. +* `renew_flag` - (Required) 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. You need to manually renew DISABLE_NOTIFY_AND_AUTO_RENEW: neither notify upon expiration nor renew automatically. Default value: NOTIFY_AND_MANUAL_RENEW. +* `client_token` - (Optional) 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. +* `containers` - (Optional) Configuration of the containers to create. +* `dry_run` - (Optional) 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. +* `login_configuration` - (Optional) Login password of the instance. It is only available for Windows instances. If it is not specified, it means that the user choose to set the login password after the instance creation. +* `zone` - (Optional) List of availability zones. A random AZ is selected by default. + +The `containers` object supports the following: + +* `command` - (Optional) The command to run. +* `container_image` - (Optional) Container image address. +* `container_name` - (Optional) Container name. +* `envs` - (Optional) List of environment variables. +* `publish_ports` - (Optional) List of mappings of container ports and host ports. +* `volumes` - (Optional) List of container mount volumes. + +The `envs` object supports the following: + +* `key` - (Required) Environment variable key. +* `value` - (Required) Environment variable value. + +The `login_configuration` object supports the following: + +* `auto_generate_password` - (Required) whether auto generate password. if false, need set password. +* `password` - (Optional) Login password. + +The `publish_ports` object supports the following: + +* `container_port` - (Required) Container port. +* `host_port` - (Required) Host port. +* `ip` - (Optional) External IP. It defaults to 0.0.0.0. +* `protocol` - (Optional) The protocol defaults to tcp. Valid values: tcp, udp and sctp. + +The `volumes` object supports the following: + +* `container_path` - (Required) Container path. +* `host_path` - (Required) Host path. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index d03759b32f..4a84ff1a4f 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -272,28 +272,28 @@ Resources @@ -991,6 +991,20 @@ +
  • + Lighthouse + +
  • MongoDB