diff --git a/cluster-autoscaler/README.md b/cluster-autoscaler/README.md index 530120e8fb6a9ad1ef696ebc2e90cdb402c89ad3..66f31e7628f588e9a3905b11da8c8633484160ca 100644 --- a/cluster-autoscaler/README.md +++ b/cluster-autoscaler/README.md @@ -29,6 +29,7 @@ You should also take a look at the notes and "gotchas" for your specific cloud p * [ClusterAPI](./cloudprovider/clusterapi/README.md) * [BizflyCloud](./cloudprovider/bizflycloud/README.md) * [Vultr](./cloudprovider/vultr/README.md) +* [TencentCloud](./cloudprovider/tencentcloud/README.md) # Releases @@ -171,3 +172,4 @@ Supported cloud providers: * Hetzner https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/hetzner/README.md * Cluster API https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/README.md * Vultr https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/vultr/README.md +* TencentCloud https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/tencentcloud/README.md diff --git a/cluster-autoscaler/cloudprovider/builder/builder_all.go b/cluster-autoscaler/cloudprovider/builder/builder_all.go index 2e985d1f1bbc22dacf14d110d5f0df20a2e7e0dd..62d5ec69faa608ebf220384a8aa7c6ab68e5e920 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_all.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_all.go @@ -1,5 +1,5 @@ -//go:build !gce && !aws && !azure && !kubemark && !alicloud && !magnum && !digitalocean && !clusterapi && !huaweicloud && !ionoscloud && !linode && !hetzner && !bizflycloud && !brightbox && !packet && !oci && !vultr -// +build !gce,!aws,!azure,!kubemark,!alicloud,!magnum,!digitalocean,!clusterapi,!huaweicloud,!ionoscloud,!linode,!hetzner,!bizflycloud,!brightbox,!packet,!oci,!vultr +//go:build !gce && !aws && !azure && !kubemark && !alicloud && !magnum && !digitalocean && !clusterapi && !huaweicloud && !ionoscloud && !linode && !hetzner && !bizflycloud && !brightbox && !packet && !oci && !vultr && !tencentcloud +// +build !gce,!aws,!azure,!kubemark,!alicloud,!magnum,!digitalocean,!clusterapi,!huaweicloud,!ionoscloud,!linode,!hetzner,!bizflycloud,!brightbox,!packet,!oci,!vultr,!tencentcloud /* Copyright 2018 The Kubernetes Authors. @@ -40,6 +40,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ovhcloud" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/packet" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/vultr" "k8s.io/autoscaler/cluster-autoscaler/config" ) @@ -66,6 +67,7 @@ var AvailableCloudProviders = []string{ cloudprovider.BrightboxProviderName, cloudprovider.PacketProviderName, cloudprovider.VultrProviderName, + cloudprovider.TencentcloudProviderName, } // DefaultCloudProvider is GCE. @@ -113,6 +115,8 @@ func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGro return oci.BuildOCI(opts, do, rl) case cloudprovider.VultrProviderName: return vultr.BuildVultr(opts, do, rl) + case cloudprovider.TencentcloudProviderName: + return tencentcloud.BuildTencentcloud(opts, do, rl) } return nil } diff --git a/cluster-autoscaler/cloudprovider/builder/builder_tencentcloud.go b/cluster-autoscaler/cloudprovider/builder/builder_tencentcloud.go new file mode 100644 index 0000000000000000000000000000000000000000..f8c8e9f19a3f63e7fcb6ff8681d890e908945146 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/builder/builder_tencentcloud.go @@ -0,0 +1,43 @@ +//go:build tencentcloud +// +build tencentcloud + +/* +Copyright 2021 The Kubernetes Authors. + +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 builder + +import ( + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud" + "k8s.io/autoscaler/cluster-autoscaler/config" +) + +// AvailableCloudProviders supported by the cloud provider builder. +var AvailableCloudProviders = []string{ + cloudprovider.TencentcloudProviderName, +} + +// DefaultCloudProvider is TKE. +const DefaultCloudProvider = cloudprovider.TkeProviderName + +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { + switch opts.CloudProviderName { + case cloudprovider.TencentcloudProviderName: + return tencentcloud.BuildTencentcloud(opts, do, rl) + } + + return nil +} diff --git a/cluster-autoscaler/cloudprovider/cloud_provider.go b/cluster-autoscaler/cloudprovider/cloud_provider.go index 64796c2516ecbea8409322d4f33c67634072270a..8f2539d3d5b4e64e24f20f1ef7912c428eaa7c60 100644 --- a/cluster-autoscaler/cloudprovider/cloud_provider.go +++ b/cluster-autoscaler/cloudprovider/cloud_provider.go @@ -70,6 +70,8 @@ const ( VultrProviderName = "vultr" // PacketProviderName gets the provider name of packet PacketProviderName = "packet" + // TencentcloudProviderName gets the provider name of tencentcloud + TencentcloudProviderName = "tencentcloud" ) // CloudProvider contains configuration info and functions for interacting with diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/OWNERS b/cluster-autoscaler/cloudprovider/tencentcloud/OWNERS new file mode 100644 index 0000000000000000000000000000000000000000..88f18c24ec68e15120e54e3c7ac8942089b12aa7 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/OWNERS @@ -0,0 +1,4 @@ +approvers: +# - alphajc +reviewers: +# - alphajc diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/README.md b/cluster-autoscaler/cloudprovider/tencentcloud/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ebaa0d86b836193951d77af0edb06cba5879f293 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/README.md @@ -0,0 +1,181 @@ +# Cluster Autoscaler on TencentCloud + +On TencentCloud, Cluster Autoscaler utilizes CVM Auto Scaling Groups to manage node +groups. Cluster Autoscaler typically runs as a `Deployment` in your cluster. + +## Requirements + +Cluster Autoscaler requires [TKE](https://intl.cloud.tencent.com/document/product/457) v1.10.x or greater. + +## Permissions + +### CAM Policy + +The following policy provides the minimum privileges necessary for Cluster Autoscaler to run: + +```json +{ + "version": "2.0", + "statement": [ + { + "effect": "allow", + "action": [ + "tke:DeleteClusterInstances", + "tke:DescribeClusterAsGroups", + "as:ModifyAutoScalingGroup", + "as:RemoveInstances", + "as:StopAutoScalingInstances", + "as:DescribeAutoScalingGroups", + "as:DescribeAutoScalingInstances", + "as:DescribeLaunchConfigurations", + "as:DescribeAutoScalingActivities" + ], + "resource": [ + "*" + ] + } + ] +} +``` + +### Using TencentCloud Credentials + +> NOTICE: Make sure the [access key](https://intl.cloud.tencent.com/document/product/598/32675) you will be using has all the above permissions + + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: tencentcloud-secret +type: Opaque +data: + tencentcloud_secret_id: BASE64_OF_YOUR_TENCENTCLOUD_SECRET_ID + tencentcloud_secret_key: BASE64_OF_YOUR_TENCENTCLOUD_SECRET_KEY +``` + +Please refer to the [relevant Kubernetes +documentation](https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-manually) +for creating a secret manually. + +```yaml +env: + - name: SECRET_ID + valueFrom: + secretKeyRef: + name: tencentcloud-secret + key: tencentcloud_secret_id + - name: SECRET_KEY + valueFrom: + secretKeyRef: + name: tencentcloud-secret + key: tencentcloud_secret_key + - name: REGION + value: YOUR_TENCENCLOUD_REGION + - name: REGION_NAME + value: YOUR_TENCENCLOUD_REGION_NAME + - name: CLUSTER_ID + value: YOUR_TKE_CLUSTER_ID +``` + +## Setup + +### cluster-autoscaler deployment + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cluster-autoscaler + namespace: kube-system +spec: + selector: + matchLabels: + qcloud-app: cluster-autoscaler + template: + metadata: + labels: + qcloud-app: cluster-autoscaler + spec: + containers: + - args: + - --cloud-provider=tencentcloud + - --v=4 + - --ok-total-unready-count=3 + - --cloud-config=/etc/kubernetes/qcloud.conf + - --scale-down-utilization-threshold=0.8 + - --scale-down-enabled=true + - --max-total-unready-percentage=33 + - --nodes=[min]:[max]:[ASG_ID] + - --logtostderr + - --kubeconfig=/kubeconfig/config + command: + - /cluster-autoscaler + env: + - name: SECRET_ID + valueFrom: + secretKeyRef: + name: tencentcloud-secret + key: tencentcloud_secret_id + - name: SECRET_KEY + valueFrom: + secretKeyRef: + name: tencentcloud-secret + key: tencentcloud_secret_key + - name: REGION + value: YOUR_TENCENCLOUD_REGION + - name: REGION_NAME + value: YOUR_TENCENCLOUD_REGION_NAME + - name: CLUSTER_ID + value: YOUR_TKE_CLUSTER_ID + image: ccr.ccs.tencentyun.com/tkeimages/cluster-autoscaler:v1.18.4-49692187a + imagePullPolicy: Always + name: cluster-autoscaler + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 250m + memory: 256Mi + volumeMounts: + - mountPath: /etc/localtime + name: tz-config + hostAliases: + - hostnames: + - cbs.api.qcloud.com + - cvm.api.qcloud.com + - lb.api.qcloud.com + - tag.api.qcloud.com + - snapshot.api.qcloud.com + - monitor.api.qcloud.com + - scaling.api.qcloud.com + - ccs.api.qcloud.com + ip: 169.254.0.28 + - hostnames: + - tke.internal.tencentcloudapi.com + - clb.internal.tencentcloudapi.com + - cvm.internal.tencentcloudapi.com + - tag.internal.tencentcloudapi.com + - as.tencentcloudapi.com + - cbs.tencentcloudapi.com + - cvm.tencentcloudapi.com + - vpc.tencentcloudapi.com + - tke.tencentcloudapi.com + ip: 169.254.0.95 + restartPolicy: Always + serviceAccount: kube-admin + serviceAccountName: kube-admin + tolerations: + - effect: NoSchedule + key: node-role.kubernetes.io/master + volumes: + - hostPath: + path: /etc/localtime + type: "" + name: tz-config +``` + +### Auto-Discovery Setup + +Auto Discovery is not supported in TencentCloud currently. \ No newline at end of file diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/metrics/metrics.go b/cluster-autoscaler/cloudprovider/tencentcloud/metrics/metrics.go new file mode 100644 index 0000000000000000000000000000000000000000..2eb0a69325a2acda1442c656cc0464fb9d636516 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/metrics/metrics.go @@ -0,0 +1,66 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 metrics + +import ( + tencent_errors "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + k8smetrics "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +const ( + caNamespace = "cluster_autoscaler" +) + +var ( + cloudAPIInvokedCount = k8smetrics.NewCounterVec( + &k8smetrics.CounterOpts{ + Namespace: caNamespace, + Name: "invoked_cloudapi_total", + Help: "Number of cloudapi invoked by Node Autoprovisioning.", + }, []string{"service", "ops"}, + ) + + cloudAPIInvokedErrorCount = k8smetrics.NewCounterVec( + &k8smetrics.CounterOpts{ + Namespace: caNamespace, + Name: "invoked_cloudapi_error_total", + Help: "Number of errors that cloudapi invoked by Node Autoprovisioning.", + }, []string{"service", "ops", "code"}, + ) +) + +func init() { + legacyregistry.MustRegister(cloudAPIInvokedCount) + legacyregistry.MustRegister(cloudAPIInvokedErrorCount) +} + +// RegisterCloudAPIInvoked registers cloudapi invoked +func RegisterCloudAPIInvoked(service string, ops string, err error) { + cloudAPIInvokedCount.WithLabelValues(service, ops).Inc() + + if err != nil { + if e, ok := err.(*tencent_errors.TencentCloudSDKError); ok { + RegisterCloudAPIInvokedError("as", "DescribeAutoScalingGroups", e.Code) + } + } +} + +// RegisterCloudAPIInvokedError registers error in cloudapi invoked +func RegisterCloudAPIInvokedError(service string, ops string, code string) { + cloudAPIInvokedErrorCount.WithLabelValues(service, ops, code).Inc() +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/LICENSE b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..efc75a2253eac0053be445ee5f529090466b9faf --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/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/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/client.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/client.go new file mode 100644 index 0000000000000000000000000000000000000000..00a4c94f0fdd5a4faf866e8f1776b3426ab8c6b6 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/client.go @@ -0,0 +1,3860 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 v20180419 + +import ( + "context" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const APIVersion = "2018-04-19" + +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 NewAttachInstancesRequest() (request *AttachInstancesRequest) { + request = &AttachInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "AttachInstances") + + return +} + +func NewAttachInstancesResponse() (response *AttachInstancesResponse) { + response = &AttachInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AttachInstances +// 本接口(AttachInstances)用于将 CVM 实例添加到伸缩组。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR = "InternalError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPABOVEMAXSIZE = "ResourceInsufficient.AutoScalingGroupAboveMaxSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEABOVEMAXSIZE = "ResourceInsufficient.InServiceInstanceAboveMaxSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTFOUND = "ResourceNotFound.InstancesNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_CVMVPCINCONSISTENT = "ResourceUnavailable.CvmVpcInconsistent" +// RESOURCEUNAVAILABLE_INSTANCESALREADYINAUTOSCALINGGROUP = "ResourceUnavailable.InstancesAlreadyInAutoScalingGroup" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) AttachInstances(request *AttachInstancesRequest) (response *AttachInstancesResponse, err error) { + if request == nil { + request = NewAttachInstancesRequest() + } + + response = NewAttachInstancesResponse() + err = c.Send(request, response) + return +} + +// AttachInstances +// 本接口(AttachInstances)用于将 CVM 实例添加到伸缩组。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR = "InternalError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPABOVEMAXSIZE = "ResourceInsufficient.AutoScalingGroupAboveMaxSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEABOVEMAXSIZE = "ResourceInsufficient.InServiceInstanceAboveMaxSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTFOUND = "ResourceNotFound.InstancesNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_CVMVPCINCONSISTENT = "ResourceUnavailable.CvmVpcInconsistent" +// RESOURCEUNAVAILABLE_INSTANCESALREADYINAUTOSCALINGGROUP = "ResourceUnavailable.InstancesAlreadyInAutoScalingGroup" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) AttachInstancesWithContext(ctx context.Context, request *AttachInstancesRequest) (response *AttachInstancesResponse, err error) { + if request == nil { + request = NewAttachInstancesRequest() + } + request.SetContext(ctx) + + response = NewAttachInstancesResponse() + err = c.Send(request, response) + return +} + +func NewAttachLoadBalancersRequest() (request *AttachLoadBalancersRequest) { + request = &AttachLoadBalancersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "AttachLoadBalancers") + + return +} + +func NewAttachLoadBalancersResponse() (response *AttachLoadBalancersResponse) { + response = &AttachLoadBalancersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AttachLoadBalancers +// 此接口(AttachLoadBalancers)用于将负载均衡器添加到伸缩组。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// INVALIDPARAMETERVALUE_TARGETPORTDUPLICATED = "InvalidParameterValue.TargetPortDuplicated" +// LIMITEXCEEDED_AFTERATTACHLBLIMITEXCEEDED = "LimitExceeded.AfterAttachLbLimitExceeded" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBPROJECTINCONSISTENT = "ResourceUnavailable.LbProjectInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) AttachLoadBalancers(request *AttachLoadBalancersRequest) (response *AttachLoadBalancersResponse, err error) { + if request == nil { + request = NewAttachLoadBalancersRequest() + } + + response = NewAttachLoadBalancersResponse() + err = c.Send(request, response) + return +} + +// AttachLoadBalancers +// 此接口(AttachLoadBalancers)用于将负载均衡器添加到伸缩组。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// INVALIDPARAMETERVALUE_TARGETPORTDUPLICATED = "InvalidParameterValue.TargetPortDuplicated" +// LIMITEXCEEDED_AFTERATTACHLBLIMITEXCEEDED = "LimitExceeded.AfterAttachLbLimitExceeded" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBPROJECTINCONSISTENT = "ResourceUnavailable.LbProjectInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) AttachLoadBalancersWithContext(ctx context.Context, request *AttachLoadBalancersRequest) (response *AttachLoadBalancersResponse, err error) { + if request == nil { + request = NewAttachLoadBalancersRequest() + } + request.SetContext(ctx) + + response = NewAttachLoadBalancersResponse() + err = c.Send(request, response) + return +} + +func NewClearLaunchConfigurationAttributesRequest() (request *ClearLaunchConfigurationAttributesRequest) { + request = &ClearLaunchConfigurationAttributesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ClearLaunchConfigurationAttributes") + + return +} + +func NewClearLaunchConfigurationAttributesResponse() (response *ClearLaunchConfigurationAttributesResponse) { + response = &ClearLaunchConfigurationAttributesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ClearLaunchConfigurationAttributes +// 本接口(ClearLaunchConfigurationAttributes)用于将启动配置内的特定属性完全清空。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +func (c *Client) ClearLaunchConfigurationAttributes(request *ClearLaunchConfigurationAttributesRequest) (response *ClearLaunchConfigurationAttributesResponse, err error) { + if request == nil { + request = NewClearLaunchConfigurationAttributesRequest() + } + + response = NewClearLaunchConfigurationAttributesResponse() + err = c.Send(request, response) + return +} + +// ClearLaunchConfigurationAttributes +// 本接口(ClearLaunchConfigurationAttributes)用于将启动配置内的特定属性完全清空。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +func (c *Client) ClearLaunchConfigurationAttributesWithContext(ctx context.Context, request *ClearLaunchConfigurationAttributesRequest) (response *ClearLaunchConfigurationAttributesResponse, err error) { + if request == nil { + request = NewClearLaunchConfigurationAttributesRequest() + } + request.SetContext(ctx) + + response = NewClearLaunchConfigurationAttributesResponse() + err = c.Send(request, response) + return +} + +func NewCompleteLifecycleActionRequest() (request *CompleteLifecycleActionRequest) { + request = &CompleteLifecycleActionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "CompleteLifecycleAction") + + return +} + +func NewCompleteLifecycleActionResponse() (response *CompleteLifecycleActionResponse) { + response = &CompleteLifecycleActionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CompleteLifecycleAction +// 本接口(CompleteLifecycleAction)用于完成生命周期动作。 +// +// +// +// * 用户通过调用本接口,指定一个具体的生命周期挂钩的结果(“CONITNUE”或者“ABANDON”)。如果一直不调用本接口,则生命周期挂钩会在超时后按照“DefaultResult”进行处理。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" +// RESOURCENOTFOUND_LIFECYCLEHOOKINSTANCENOTFOUND = "ResourceNotFound.LifecycleHookInstanceNotFound" +// RESOURCENOTFOUND_LIFECYCLEHOOKNOTFOUND = "ResourceNotFound.LifecycleHookNotFound" +// RESOURCEUNAVAILABLE_LIFECYCLEACTIONRESULTHASSET = "ResourceUnavailable.LifecycleActionResultHasSet" +func (c *Client) CompleteLifecycleAction(request *CompleteLifecycleActionRequest) (response *CompleteLifecycleActionResponse, err error) { + if request == nil { + request = NewCompleteLifecycleActionRequest() + } + + response = NewCompleteLifecycleActionResponse() + err = c.Send(request, response) + return +} + +// CompleteLifecycleAction +// 本接口(CompleteLifecycleAction)用于完成生命周期动作。 +// +// +// +// * 用户通过调用本接口,指定一个具体的生命周期挂钩的结果(“CONITNUE”或者“ABANDON”)。如果一直不调用本接口,则生命周期挂钩会在超时后按照“DefaultResult”进行处理。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" +// RESOURCENOTFOUND_LIFECYCLEHOOKINSTANCENOTFOUND = "ResourceNotFound.LifecycleHookInstanceNotFound" +// RESOURCENOTFOUND_LIFECYCLEHOOKNOTFOUND = "ResourceNotFound.LifecycleHookNotFound" +// RESOURCEUNAVAILABLE_LIFECYCLEACTIONRESULTHASSET = "ResourceUnavailable.LifecycleActionResultHasSet" +func (c *Client) CompleteLifecycleActionWithContext(ctx context.Context, request *CompleteLifecycleActionRequest) (response *CompleteLifecycleActionResponse, err error) { + if request == nil { + request = NewCompleteLifecycleActionRequest() + } + request.SetContext(ctx) + + response = NewCompleteLifecycleActionResponse() + err = c.Send(request, response) + return +} + +func NewCreateAutoScalingGroupRequest() (request *CreateAutoScalingGroupRequest) { + request = &CreateAutoScalingGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "CreateAutoScalingGroup") + + return +} + +func NewCreateAutoScalingGroupResponse() (response *CreateAutoScalingGroupResponse) { + response = &CreateAutoScalingGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateAutoScalingGroup +// 本接口(CreateAutoScalingGroup)用于创建伸缩组 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLLBERROR = "InternalError.CallLbError" +// INTERNALERROR_CALLTAGERROR = "InternalError.CallTagError" +// INTERNALERROR_CALLTVPCERROR = "InternalError.CallTvpcError" +// INTERNALERROR_CALLVPCERROR = "InternalError.CallVpcError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETERVALUE_BASECAPACITYTOOLARGE = "InvalidParameterValue.BaseCapacityTooLarge" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" +// INVALIDPARAMETERVALUE_DUPLICATEDFORWARDLB = "InvalidParameterValue.DuplicatedForwardLb" +// INVALIDPARAMETERVALUE_DUPLICATEDSUBNET = "InvalidParameterValue.DuplicatedSubnet" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_GROUPNAMEDUPLICATED = "InvalidParameterValue.GroupNameDuplicated" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_INVALIDSUBNETID = "InvalidParameterValue.InvalidSubnetId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNOTFOUND = "InvalidParameterValue.LaunchConfigurationNotFound" +// INVALIDPARAMETERVALUE_LBPROJECTINCONSISTENT = "InvalidParameterValue.LbProjectInconsistent" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ONLYVPC = "InvalidParameterValue.OnlyVpc" +// INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_SUBNETIDS = "InvalidParameterValue.SubnetIds" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_ZONEMISMATCHREGION = "InvalidParameterValue.ZoneMismatchRegion" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_AUTOSCALINGGROUPLIMITEXCEEDED = "LimitExceeded.AutoScalingGroupLimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_LAUNCHCONFIGURATIONSTATUSABNORMAL = "ResourceUnavailable.LaunchConfigurationStatusAbnormal" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_PROJECTINCONSISTENT = "ResourceUnavailable.ProjectInconsistent" +// RESOURCEUNAVAILABLE_ZONEUNAVAILABLE = "ResourceUnavailable.ZoneUnavailable" +func (c *Client) CreateAutoScalingGroup(request *CreateAutoScalingGroupRequest) (response *CreateAutoScalingGroupResponse, err error) { + if request == nil { + request = NewCreateAutoScalingGroupRequest() + } + + response = NewCreateAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +// CreateAutoScalingGroup +// 本接口(CreateAutoScalingGroup)用于创建伸缩组 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLLBERROR = "InternalError.CallLbError" +// INTERNALERROR_CALLTAGERROR = "InternalError.CallTagError" +// INTERNALERROR_CALLTVPCERROR = "InternalError.CallTvpcError" +// INTERNALERROR_CALLVPCERROR = "InternalError.CallVpcError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETERVALUE_BASECAPACITYTOOLARGE = "InvalidParameterValue.BaseCapacityTooLarge" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" +// INVALIDPARAMETERVALUE_DUPLICATEDFORWARDLB = "InvalidParameterValue.DuplicatedForwardLb" +// INVALIDPARAMETERVALUE_DUPLICATEDSUBNET = "InvalidParameterValue.DuplicatedSubnet" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_GROUPNAMEDUPLICATED = "InvalidParameterValue.GroupNameDuplicated" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_INVALIDSUBNETID = "InvalidParameterValue.InvalidSubnetId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNOTFOUND = "InvalidParameterValue.LaunchConfigurationNotFound" +// INVALIDPARAMETERVALUE_LBPROJECTINCONSISTENT = "InvalidParameterValue.LbProjectInconsistent" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ONLYVPC = "InvalidParameterValue.OnlyVpc" +// INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_SUBNETIDS = "InvalidParameterValue.SubnetIds" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_ZONEMISMATCHREGION = "InvalidParameterValue.ZoneMismatchRegion" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_AUTOSCALINGGROUPLIMITEXCEEDED = "LimitExceeded.AutoScalingGroupLimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_LAUNCHCONFIGURATIONSTATUSABNORMAL = "ResourceUnavailable.LaunchConfigurationStatusAbnormal" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_PROJECTINCONSISTENT = "ResourceUnavailable.ProjectInconsistent" +// RESOURCEUNAVAILABLE_ZONEUNAVAILABLE = "ResourceUnavailable.ZoneUnavailable" +func (c *Client) CreateAutoScalingGroupWithContext(ctx context.Context, request *CreateAutoScalingGroupRequest) (response *CreateAutoScalingGroupResponse, err error) { + if request == nil { + request = NewCreateAutoScalingGroupRequest() + } + request.SetContext(ctx) + + response = NewCreateAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateAutoScalingGroupFromInstanceRequest() (request *CreateAutoScalingGroupFromInstanceRequest) { + request = &CreateAutoScalingGroupFromInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "CreateAutoScalingGroupFromInstance") + + return +} + +func NewCreateAutoScalingGroupFromInstanceResponse() (response *CreateAutoScalingGroupFromInstanceResponse) { + response = &CreateAutoScalingGroupFromInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateAutoScalingGroupFromInstance +// 本接口(CreateAutoScalingGroupFromInstance)用于根据实例创建启动配置及伸缩组。 +// +// +// +// 说明:根据按包年包月计费的实例所创建的伸缩组,其扩容的实例为按量计费实例。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// CALLCVMERROR = "CallCvmError" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLVPCERROR = "InternalError.CallVpcError" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" +// INVALIDPARAMETERVALUE_DUPLICATEDSUBNET = "InvalidParameterValue.DuplicatedSubnet" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED_AUTOSCALINGGROUPLIMITEXCEEDED = "LimitExceeded.AutoScalingGroupLimitExceeded" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_INSTANCESNOTFOUND = "ResourceNotFound.InstancesNotFound" +// RESOURCEUNAVAILABLE_LAUNCHCONFIGURATIONSTATUSABNORMAL = "ResourceUnavailable.LaunchConfigurationStatusAbnormal" +// RESOURCEUNAVAILABLE_PROJECTINCONSISTENT = "ResourceUnavailable.ProjectInconsistent" +// RESOURCEUNAVAILABLE_STOPPEDINSTANCENOTALLOWATTACH = "ResourceUnavailable.StoppedInstanceNotAllowAttach" +func (c *Client) CreateAutoScalingGroupFromInstance(request *CreateAutoScalingGroupFromInstanceRequest) (response *CreateAutoScalingGroupFromInstanceResponse, err error) { + if request == nil { + request = NewCreateAutoScalingGroupFromInstanceRequest() + } + + response = NewCreateAutoScalingGroupFromInstanceResponse() + err = c.Send(request, response) + return +} + +// CreateAutoScalingGroupFromInstance +// 本接口(CreateAutoScalingGroupFromInstance)用于根据实例创建启动配置及伸缩组。 +// +// +// +// 说明:根据按包年包月计费的实例所创建的伸缩组,其扩容的实例为按量计费实例。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// CALLCVMERROR = "CallCvmError" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLVPCERROR = "InternalError.CallVpcError" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" +// INVALIDPARAMETERVALUE_DUPLICATEDSUBNET = "InvalidParameterValue.DuplicatedSubnet" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED_AUTOSCALINGGROUPLIMITEXCEEDED = "LimitExceeded.AutoScalingGroupLimitExceeded" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_INSTANCESNOTFOUND = "ResourceNotFound.InstancesNotFound" +// RESOURCEUNAVAILABLE_LAUNCHCONFIGURATIONSTATUSABNORMAL = "ResourceUnavailable.LaunchConfigurationStatusAbnormal" +// RESOURCEUNAVAILABLE_PROJECTINCONSISTENT = "ResourceUnavailable.ProjectInconsistent" +// RESOURCEUNAVAILABLE_STOPPEDINSTANCENOTALLOWATTACH = "ResourceUnavailable.StoppedInstanceNotAllowAttach" +func (c *Client) CreateAutoScalingGroupFromInstanceWithContext(ctx context.Context, request *CreateAutoScalingGroupFromInstanceRequest) (response *CreateAutoScalingGroupFromInstanceResponse, err error) { + if request == nil { + request = NewCreateAutoScalingGroupFromInstanceRequest() + } + request.SetContext(ctx) + + response = NewCreateAutoScalingGroupFromInstanceResponse() + err = c.Send(request, response) + return +} + +func NewCreateLaunchConfigurationRequest() (request *CreateLaunchConfigurationRequest) { + request = &CreateLaunchConfigurationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "CreateLaunchConfiguration") + + return +} + +func NewCreateLaunchConfigurationResponse() (response *CreateLaunchConfigurationResponse) { + response = &CreateLaunchConfigurationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateLaunchConfiguration +// 本接口(CreateLaunchConfiguration)用于创建新的启动配置。 +// +// +// +// * 启动配置,可以通过 `ModifyLaunchConfigurationAttributes` 修改少量字段。如需使用新的启动配置,建议重新创建启动配置。 +// +// +// +// * 每个项目最多只能创建20个启动配置,详见[使用限制](https://cloud.tencent.com/document/product/377/3120)。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_HOSTNAMEUNAVAILABLE = "InvalidParameter.HostNameUnavailable" +// INVALIDPARAMETER_INVALIDCOMBINATION = "InvalidParameter.InvalidCombination" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETER_PARAMETERMUSTBEDELETED = "InvalidParameter.ParameterMustBeDeleted" +// INVALIDPARAMETERVALUE_CVMCONFIGURATIONERROR = "InvalidParameterValue.CvmConfigurationError" +// INVALIDPARAMETERVALUE_HOSTNAMEILLEGAL = "InvalidParameterValue.HostNameIllegal" +// INVALIDPARAMETERVALUE_INSTANCENAMEILLEGAL = "InvalidParameterValue.InstanceNameIllegal" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTED = "InvalidParameterValue.InstanceTypeNotSupported" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCETYPE = "InvalidParameterValue.InvalidInstanceType" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATION = "InvalidParameterValue.InvalidLaunchConfiguration" +// INVALIDPARAMETERVALUE_INVALIDSNAPSHOTID = "InvalidParameterValue.InvalidSnapshotId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTSTRINGTYPEFLOAT = "InvalidParameterValue.NotStringTypeFloat" +// INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_TOOSHORT = "InvalidParameterValue.TooShort" +// INVALIDPARAMETERVALUE_USERDATAFORMATERROR = "InvalidParameterValue.UserDataFormatError" +// INVALIDPARAMETERVALUE_USERDATASIZEEXCEEDED = "InvalidParameterValue.UserDataSizeExceeded" +// INVALIDPERMISSION = "InvalidPermission" +// LIMITEXCEEDED_LAUNCHCONFIGURATIONQUOTANOTENOUGH = "LimitExceeded.LaunchConfigurationQuotaNotEnough" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_INSTANCEMARKETOPTIONS = "MissingParameter.InstanceMarketOptions" +func (c *Client) CreateLaunchConfiguration(request *CreateLaunchConfigurationRequest) (response *CreateLaunchConfigurationResponse, err error) { + if request == nil { + request = NewCreateLaunchConfigurationRequest() + } + + response = NewCreateLaunchConfigurationResponse() + err = c.Send(request, response) + return +} + +// CreateLaunchConfiguration +// 本接口(CreateLaunchConfiguration)用于创建新的启动配置。 +// +// +// +// * 启动配置,可以通过 `ModifyLaunchConfigurationAttributes` 修改少量字段。如需使用新的启动配置,建议重新创建启动配置。 +// +// +// +// * 每个项目最多只能创建20个启动配置,详见[使用限制](https://cloud.tencent.com/document/product/377/3120)。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_HOSTNAMEUNAVAILABLE = "InvalidParameter.HostNameUnavailable" +// INVALIDPARAMETER_INVALIDCOMBINATION = "InvalidParameter.InvalidCombination" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETER_PARAMETERMUSTBEDELETED = "InvalidParameter.ParameterMustBeDeleted" +// INVALIDPARAMETERVALUE_CVMCONFIGURATIONERROR = "InvalidParameterValue.CvmConfigurationError" +// INVALIDPARAMETERVALUE_HOSTNAMEILLEGAL = "InvalidParameterValue.HostNameIllegal" +// INVALIDPARAMETERVALUE_INSTANCENAMEILLEGAL = "InvalidParameterValue.InstanceNameIllegal" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTED = "InvalidParameterValue.InstanceTypeNotSupported" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCETYPE = "InvalidParameterValue.InvalidInstanceType" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATION = "InvalidParameterValue.InvalidLaunchConfiguration" +// INVALIDPARAMETERVALUE_INVALIDSNAPSHOTID = "InvalidParameterValue.InvalidSnapshotId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTSTRINGTYPEFLOAT = "InvalidParameterValue.NotStringTypeFloat" +// INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_TOOSHORT = "InvalidParameterValue.TooShort" +// INVALIDPARAMETERVALUE_USERDATAFORMATERROR = "InvalidParameterValue.UserDataFormatError" +// INVALIDPARAMETERVALUE_USERDATASIZEEXCEEDED = "InvalidParameterValue.UserDataSizeExceeded" +// INVALIDPERMISSION = "InvalidPermission" +// LIMITEXCEEDED_LAUNCHCONFIGURATIONQUOTANOTENOUGH = "LimitExceeded.LaunchConfigurationQuotaNotEnough" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_INSTANCEMARKETOPTIONS = "MissingParameter.InstanceMarketOptions" +func (c *Client) CreateLaunchConfigurationWithContext(ctx context.Context, request *CreateLaunchConfigurationRequest) (response *CreateLaunchConfigurationResponse, err error) { + if request == nil { + request = NewCreateLaunchConfigurationRequest() + } + request.SetContext(ctx) + + response = NewCreateLaunchConfigurationResponse() + err = c.Send(request, response) + return +} + +func NewCreateLifecycleHookRequest() (request *CreateLifecycleHookRequest) { + request = &CreateLifecycleHookRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "CreateLifecycleHook") + + return +} + +func NewCreateLifecycleHookResponse() (response *CreateLifecycleHookResponse) { + response = &CreateLifecycleHookResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateLifecycleHook +// 本接口(CreateLifecycleHook)用于创建生命周期挂钩。 +// +// +// +// * 您可以为生命周期挂钩配置消息通知,弹性伸缩会通知您的CMQ消息队列,通知内容形如: +// +// +// +// ``` +// +// { +// +// "Service": "Tencent Cloud Auto Scaling", +// +// "Time": "2019-03-14T10:15:11Z", +// +// "AppId": "1251783334", +// +// "ActivityId": "asa-fznnvrja", +// +// "AutoScalingGroupId": "asg-rrrrtttt", +// +// "LifecycleHookId": "ash-xxxxyyyy", +// +// "LifecycleHookName": "my-hook", +// +// "LifecycleActionToken": "3080e1c9-0efe-4dd7-ad3b-90cd6618298f", +// +// "InstanceId": "ins-aaaabbbb", +// +// "LifecycleTransition": "INSTANCE_LAUNCHING", +// +// "NotificationMetadata": "" +// +// } +// +// ``` +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLEEERROR = "InternalError.CalleeError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_LIFECYCLEHOOKNAMEDUPLICATED = "InvalidParameterValue.LifecycleHookNameDuplicated" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_CMQQUEUENOTFOUND = "ResourceNotFound.CmqQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQQUEUENOTFOUND = "ResourceNotFound.TDMQCMQQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQTOPICNOTFOUND = "ResourceNotFound.TDMQCMQTopicNotFound" +// RESOURCEUNAVAILABLE_CMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.CmqTopicHasNoSubscriber" +// RESOURCEUNAVAILABLE_TDMQCMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.TDMQCMQTopicHasNoSubscriber" +func (c *Client) CreateLifecycleHook(request *CreateLifecycleHookRequest) (response *CreateLifecycleHookResponse, err error) { + if request == nil { + request = NewCreateLifecycleHookRequest() + } + + response = NewCreateLifecycleHookResponse() + err = c.Send(request, response) + return +} + +// CreateLifecycleHook +// 本接口(CreateLifecycleHook)用于创建生命周期挂钩。 +// +// +// +// * 您可以为生命周期挂钩配置消息通知,弹性伸缩会通知您的CMQ消息队列,通知内容形如: +// +// +// +// ``` +// +// { +// +// "Service": "Tencent Cloud Auto Scaling", +// +// "Time": "2019-03-14T10:15:11Z", +// +// "AppId": "1251783334", +// +// "ActivityId": "asa-fznnvrja", +// +// "AutoScalingGroupId": "asg-rrrrtttt", +// +// "LifecycleHookId": "ash-xxxxyyyy", +// +// "LifecycleHookName": "my-hook", +// +// "LifecycleActionToken": "3080e1c9-0efe-4dd7-ad3b-90cd6618298f", +// +// "InstanceId": "ins-aaaabbbb", +// +// "LifecycleTransition": "INSTANCE_LAUNCHING", +// +// "NotificationMetadata": "" +// +// } +// +// ``` +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLEEERROR = "InternalError.CalleeError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_LIFECYCLEHOOKNAMEDUPLICATED = "InvalidParameterValue.LifecycleHookNameDuplicated" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_CMQQUEUENOTFOUND = "ResourceNotFound.CmqQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQQUEUENOTFOUND = "ResourceNotFound.TDMQCMQQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQTOPICNOTFOUND = "ResourceNotFound.TDMQCMQTopicNotFound" +// RESOURCEUNAVAILABLE_CMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.CmqTopicHasNoSubscriber" +// RESOURCEUNAVAILABLE_TDMQCMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.TDMQCMQTopicHasNoSubscriber" +func (c *Client) CreateLifecycleHookWithContext(ctx context.Context, request *CreateLifecycleHookRequest) (response *CreateLifecycleHookResponse, err error) { + if request == nil { + request = NewCreateLifecycleHookRequest() + } + request.SetContext(ctx) + + response = NewCreateLifecycleHookResponse() + err = c.Send(request, response) + return +} + +func NewCreateNotificationConfigurationRequest() (request *CreateNotificationConfigurationRequest) { + request = &CreateNotificationConfigurationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "CreateNotificationConfiguration") + + return +} + +func NewCreateNotificationConfigurationResponse() (response *CreateNotificationConfigurationResponse) { + response = &CreateNotificationConfigurationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateNotificationConfiguration +// 本接口(CreateNotificationConfiguration)用于创建通知。 +// +// 通知到 CMQ 主题或队列时,消息内容如下: +// +// ``` +// +// { +// +// "Service": "Tencent Cloud Auto Scaling", +// +// "CreatedTime": "2021-10-11T10:15:11Z", // 活动创建时间 +// +// "AppId": "100000000", +// +// "ActivityId": "asa-fznnvrja", // 伸缩活动ID +// +// "AutoScalingGroupId": "asg-pc2oqu2z", // 伸缩组ID +// +// "ActivityType": "SCALE_OUT", // 伸缩活动类型 +// +// "StatusCode": "SUCCESSFUL", // 伸缩活动结果 +// +// "Description": "Activity was launched in response to a difference between desired capacity and actual capacity, +// +// scale out 1 instance(s).", // 伸缩活动描述 +// +// "StartTime": "2021-10-11T10:15:11Z", // 活动开始时间 +// +// "EndTime": "2021-10-11T10:15:32Z", // 活动结束时间 +// +// "DetailedStatusMessageSet": [ // 活动内部错误集合(非空不代表活动失败) +// +// { +// +// "Code": "InvalidInstanceType", +// +// "Zone": "ap-guangzhou-2", +// +// "InstanceId": "", +// +// "InstanceChargeType": "POSTPAID_BY_HOUR", +// +// "SubnetId": "subnet-4t5mgeuu", +// +// "Message": "The specified instance type `S5.LARGE8` is invalid in `subnet-4t5mgeuu`, `ap-guangzhou-2`.", +// +// "InstanceType": "S5.LARGE8" +// +// } +// +// ] +// +// } +// +// ``` +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_CONFLICTNOTIFICATIONTARGET = "InvalidParameterValue.ConflictNotificationTarget" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" +// INVALIDPARAMETERVALUE_USERGROUPIDNOTFOUND = "InvalidParameterValue.UserGroupIdNotFound" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_CMQQUEUENOTFOUND = "ResourceNotFound.CmqQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQQUEUENOTFOUND = "ResourceNotFound.TDMQCMQQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQTOPICNOTFOUND = "ResourceNotFound.TDMQCMQTopicNotFound" +// RESOURCEUNAVAILABLE_CMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.CmqTopicHasNoSubscriber" +// RESOURCEUNAVAILABLE_TDMQCMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.TDMQCMQTopicHasNoSubscriber" +func (c *Client) CreateNotificationConfiguration(request *CreateNotificationConfigurationRequest) (response *CreateNotificationConfigurationResponse, err error) { + if request == nil { + request = NewCreateNotificationConfigurationRequest() + } + + response = NewCreateNotificationConfigurationResponse() + err = c.Send(request, response) + return +} + +// CreateNotificationConfiguration +// 本接口(CreateNotificationConfiguration)用于创建通知。 +// +// 通知到 CMQ 主题或队列时,消息内容如下: +// +// ``` +// +// { +// +// "Service": "Tencent Cloud Auto Scaling", +// +// "CreatedTime": "2021-10-11T10:15:11Z", // 活动创建时间 +// +// "AppId": "100000000", +// +// "ActivityId": "asa-fznnvrja", // 伸缩活动ID +// +// "AutoScalingGroupId": "asg-pc2oqu2z", // 伸缩组ID +// +// "ActivityType": "SCALE_OUT", // 伸缩活动类型 +// +// "StatusCode": "SUCCESSFUL", // 伸缩活动结果 +// +// "Description": "Activity was launched in response to a difference between desired capacity and actual capacity, +// +// scale out 1 instance(s).", // 伸缩活动描述 +// +// "StartTime": "2021-10-11T10:15:11Z", // 活动开始时间 +// +// "EndTime": "2021-10-11T10:15:32Z", // 活动结束时间 +// +// "DetailedStatusMessageSet": [ // 活动内部错误集合(非空不代表活动失败) +// +// { +// +// "Code": "InvalidInstanceType", +// +// "Zone": "ap-guangzhou-2", +// +// "InstanceId": "", +// +// "InstanceChargeType": "POSTPAID_BY_HOUR", +// +// "SubnetId": "subnet-4t5mgeuu", +// +// "Message": "The specified instance type `S5.LARGE8` is invalid in `subnet-4t5mgeuu`, `ap-guangzhou-2`.", +// +// "InstanceType": "S5.LARGE8" +// +// } +// +// ] +// +// } +// +// ``` +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_CONFLICTNOTIFICATIONTARGET = "InvalidParameterValue.ConflictNotificationTarget" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" +// INVALIDPARAMETERVALUE_USERGROUPIDNOTFOUND = "InvalidParameterValue.UserGroupIdNotFound" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_CMQQUEUENOTFOUND = "ResourceNotFound.CmqQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQQUEUENOTFOUND = "ResourceNotFound.TDMQCMQQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQTOPICNOTFOUND = "ResourceNotFound.TDMQCMQTopicNotFound" +// RESOURCEUNAVAILABLE_CMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.CmqTopicHasNoSubscriber" +// RESOURCEUNAVAILABLE_TDMQCMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.TDMQCMQTopicHasNoSubscriber" +func (c *Client) CreateNotificationConfigurationWithContext(ctx context.Context, request *CreateNotificationConfigurationRequest) (response *CreateNotificationConfigurationResponse, err error) { + if request == nil { + request = NewCreateNotificationConfigurationRequest() + } + request.SetContext(ctx) + + response = NewCreateNotificationConfigurationResponse() + err = c.Send(request, response) + return +} + +func NewCreateScalingPolicyRequest() (request *CreateScalingPolicyRequest) { + request = &CreateScalingPolicyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "CreateScalingPolicy") + + return +} + +func NewCreateScalingPolicyResponse() (response *CreateScalingPolicyResponse) { + response = &CreateScalingPolicyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateScalingPolicy +// 本接口(CreateScalingPolicy)用于创建告警触发策略。 +// +// 可能返回的错误码: +// INTERNALERROR_CALLNOTIFICATIONERROR = "InternalError.CallNotificationError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SCALINGPOLICYNAMEDUPLICATE = "InvalidParameterValue.ScalingPolicyNameDuplicate" +// INVALIDPARAMETERVALUE_THRESHOLDOUTOFRANGE = "InvalidParameterValue.ThresholdOutOfRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_USERGROUPIDNOTFOUND = "InvalidParameterValue.UserGroupIdNotFound" +// LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) CreateScalingPolicy(request *CreateScalingPolicyRequest) (response *CreateScalingPolicyResponse, err error) { + if request == nil { + request = NewCreateScalingPolicyRequest() + } + + response = NewCreateScalingPolicyResponse() + err = c.Send(request, response) + return +} + +// CreateScalingPolicy +// 本接口(CreateScalingPolicy)用于创建告警触发策略。 +// +// 可能返回的错误码: +// INTERNALERROR_CALLNOTIFICATIONERROR = "InternalError.CallNotificationError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SCALINGPOLICYNAMEDUPLICATE = "InvalidParameterValue.ScalingPolicyNameDuplicate" +// INVALIDPARAMETERVALUE_THRESHOLDOUTOFRANGE = "InvalidParameterValue.ThresholdOutOfRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_USERGROUPIDNOTFOUND = "InvalidParameterValue.UserGroupIdNotFound" +// LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) CreateScalingPolicyWithContext(ctx context.Context, request *CreateScalingPolicyRequest) (response *CreateScalingPolicyResponse, err error) { + if request == nil { + request = NewCreateScalingPolicyRequest() + } + request.SetContext(ctx) + + response = NewCreateScalingPolicyResponse() + err = c.Send(request, response) + return +} + +func NewCreateScheduledActionRequest() (request *CreateScheduledActionRequest) { + request = &CreateScheduledActionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "CreateScheduledAction") + + return +} + +func NewCreateScheduledActionResponse() (response *CreateScheduledActionResponse) { + response = &CreateScheduledActionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateScheduledAction +// 本接口(CreateScheduledAction)用于创建定时任务。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CRONEXPRESSIONILLEGAL = "InvalidParameterValue.CronExpressionIllegal" +// INVALIDPARAMETERVALUE_ENDTIMEBEFORESTARTTIME = "InvalidParameterValue.EndTimeBeforeStartTime" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONNAMEINCLUDEILLEGALCHAR = "InvalidParameterValue.InvalidScheduledActionNameIncludeIllegalChar" +// INVALIDPARAMETERVALUE_SCHEDULEDACTIONNAMEDUPLICATE = "InvalidParameterValue.ScheduledActionNameDuplicate" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_STARTTIMEBEFORECURRENTTIME = "InvalidParameterValue.StartTimeBeforeCurrentTime" +// INVALIDPARAMETERVALUE_TIMEFORMAT = "InvalidParameterValue.TimeFormat" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" +// LIMITEXCEEDED_SCHEDULEDACTIONLIMITEXCEEDED = "LimitExceeded.ScheduledActionLimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) CreateScheduledAction(request *CreateScheduledActionRequest) (response *CreateScheduledActionResponse, err error) { + if request == nil { + request = NewCreateScheduledActionRequest() + } + + response = NewCreateScheduledActionResponse() + err = c.Send(request, response) + return +} + +// CreateScheduledAction +// 本接口(CreateScheduledAction)用于创建定时任务。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CRONEXPRESSIONILLEGAL = "InvalidParameterValue.CronExpressionIllegal" +// INVALIDPARAMETERVALUE_ENDTIMEBEFORESTARTTIME = "InvalidParameterValue.EndTimeBeforeStartTime" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONNAMEINCLUDEILLEGALCHAR = "InvalidParameterValue.InvalidScheduledActionNameIncludeIllegalChar" +// INVALIDPARAMETERVALUE_SCHEDULEDACTIONNAMEDUPLICATE = "InvalidParameterValue.ScheduledActionNameDuplicate" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_STARTTIMEBEFORECURRENTTIME = "InvalidParameterValue.StartTimeBeforeCurrentTime" +// INVALIDPARAMETERVALUE_TIMEFORMAT = "InvalidParameterValue.TimeFormat" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" +// LIMITEXCEEDED_SCHEDULEDACTIONLIMITEXCEEDED = "LimitExceeded.ScheduledActionLimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) CreateScheduledActionWithContext(ctx context.Context, request *CreateScheduledActionRequest) (response *CreateScheduledActionResponse, err error) { + if request == nil { + request = NewCreateScheduledActionRequest() + } + request.SetContext(ctx) + + response = NewCreateScheduledActionResponse() + err = c.Send(request, response) + return +} + +func NewDeleteAutoScalingGroupRequest() (request *DeleteAutoScalingGroupRequest) { + request = &DeleteAutoScalingGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DeleteAutoScalingGroup") + + return +} + +func NewDeleteAutoScalingGroupResponse() (response *DeleteAutoScalingGroupResponse) { + response = &DeleteAutoScalingGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteAutoScalingGroup +// 本接口(DeleteAutoScalingGroup)用于删除指定伸缩组,删除前提是伸缩组内无实例且当前未在执行伸缩活动。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLERROR = "InternalError.CallError" +// INTERNALERROR_CALLMONITORERROR = "InternalError.CallMonitorError" +// INTERNALERROR_CALLTAGERROR = "InternalError.CallTagError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// RESOURCEINUSE_ACTIVITYINPROGRESS = "ResourceInUse.ActivityInProgress" +// RESOURCEINUSE_INSTANCEINGROUP = "ResourceInUse.InstanceInGroup" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) DeleteAutoScalingGroup(request *DeleteAutoScalingGroupRequest) (response *DeleteAutoScalingGroupResponse, err error) { + if request == nil { + request = NewDeleteAutoScalingGroupRequest() + } + + response = NewDeleteAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +// DeleteAutoScalingGroup +// 本接口(DeleteAutoScalingGroup)用于删除指定伸缩组,删除前提是伸缩组内无实例且当前未在执行伸缩活动。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLERROR = "InternalError.CallError" +// INTERNALERROR_CALLMONITORERROR = "InternalError.CallMonitorError" +// INTERNALERROR_CALLTAGERROR = "InternalError.CallTagError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// RESOURCEINUSE_ACTIVITYINPROGRESS = "ResourceInUse.ActivityInProgress" +// RESOURCEINUSE_INSTANCEINGROUP = "ResourceInUse.InstanceInGroup" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) DeleteAutoScalingGroupWithContext(ctx context.Context, request *DeleteAutoScalingGroupRequest) (response *DeleteAutoScalingGroupResponse, err error) { + if request == nil { + request = NewDeleteAutoScalingGroupRequest() + } + request.SetContext(ctx) + + response = NewDeleteAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +func NewDeleteLaunchConfigurationRequest() (request *DeleteLaunchConfigurationRequest) { + request = &DeleteLaunchConfigurationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DeleteLaunchConfiguration") + + return +} + +func NewDeleteLaunchConfigurationResponse() (response *DeleteLaunchConfigurationResponse) { + response = &DeleteLaunchConfigurationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteLaunchConfiguration +// 本接口(DeleteLaunchConfiguration)用于删除启动配置。 +// +// +// +// * 若启动配置在伸缩组中属于生效状态,则该启动配置不允许删除。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// RESOURCEINUSE_LAUNCHCONFIGURATIONIDINUSE = "ResourceInUse.LaunchConfigurationIdInUse" +// RESOURCENOTFOUND_LAUNCHCONFIGURATIONIDNOTFOUND = "ResourceNotFound.LaunchConfigurationIdNotFound" +func (c *Client) DeleteLaunchConfiguration(request *DeleteLaunchConfigurationRequest) (response *DeleteLaunchConfigurationResponse, err error) { + if request == nil { + request = NewDeleteLaunchConfigurationRequest() + } + + response = NewDeleteLaunchConfigurationResponse() + err = c.Send(request, response) + return +} + +// DeleteLaunchConfiguration +// 本接口(DeleteLaunchConfiguration)用于删除启动配置。 +// +// +// +// * 若启动配置在伸缩组中属于生效状态,则该启动配置不允许删除。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// RESOURCEINUSE_LAUNCHCONFIGURATIONIDINUSE = "ResourceInUse.LaunchConfigurationIdInUse" +// RESOURCENOTFOUND_LAUNCHCONFIGURATIONIDNOTFOUND = "ResourceNotFound.LaunchConfigurationIdNotFound" +func (c *Client) DeleteLaunchConfigurationWithContext(ctx context.Context, request *DeleteLaunchConfigurationRequest) (response *DeleteLaunchConfigurationResponse, err error) { + if request == nil { + request = NewDeleteLaunchConfigurationRequest() + } + request.SetContext(ctx) + + response = NewDeleteLaunchConfigurationResponse() + err = c.Send(request, response) + return +} + +func NewDeleteLifecycleHookRequest() (request *DeleteLifecycleHookRequest) { + request = &DeleteLifecycleHookRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DeleteLifecycleHook") + + return +} + +func NewDeleteLifecycleHookResponse() (response *DeleteLifecycleHookResponse) { + response = &DeleteLifecycleHookResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteLifecycleHook +// 本接口(DeleteLifecycleHook)用于删除生命周期挂钩。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_LIFECYCLEHOOKNOTFOUND = "ResourceNotFound.LifecycleHookNotFound" +func (c *Client) DeleteLifecycleHook(request *DeleteLifecycleHookRequest) (response *DeleteLifecycleHookResponse, err error) { + if request == nil { + request = NewDeleteLifecycleHookRequest() + } + + response = NewDeleteLifecycleHookResponse() + err = c.Send(request, response) + return +} + +// DeleteLifecycleHook +// 本接口(DeleteLifecycleHook)用于删除生命周期挂钩。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_LIFECYCLEHOOKNOTFOUND = "ResourceNotFound.LifecycleHookNotFound" +func (c *Client) DeleteLifecycleHookWithContext(ctx context.Context, request *DeleteLifecycleHookRequest) (response *DeleteLifecycleHookResponse, err error) { + if request == nil { + request = NewDeleteLifecycleHookRequest() + } + request.SetContext(ctx) + + response = NewDeleteLifecycleHookResponse() + err = c.Send(request, response) + return +} + +func NewDeleteNotificationConfigurationRequest() (request *DeleteNotificationConfigurationRequest) { + request = &DeleteNotificationConfigurationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DeleteNotificationConfiguration") + + return +} + +func NewDeleteNotificationConfigurationResponse() (response *DeleteNotificationConfigurationResponse) { + response = &DeleteNotificationConfigurationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteNotificationConfiguration +// 本接口(DeleteNotificationConfiguration)用于删除特定的通知。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGNOTIFICATIONID = "InvalidParameterValue.InvalidAutoScalingNotificationId" +// RESOURCENOTFOUND_AUTOSCALINGNOTIFICATIONNOTFOUND = "ResourceNotFound.AutoScalingNotificationNotFound" +func (c *Client) DeleteNotificationConfiguration(request *DeleteNotificationConfigurationRequest) (response *DeleteNotificationConfigurationResponse, err error) { + if request == nil { + request = NewDeleteNotificationConfigurationRequest() + } + + response = NewDeleteNotificationConfigurationResponse() + err = c.Send(request, response) + return +} + +// DeleteNotificationConfiguration +// 本接口(DeleteNotificationConfiguration)用于删除特定的通知。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGNOTIFICATIONID = "InvalidParameterValue.InvalidAutoScalingNotificationId" +// RESOURCENOTFOUND_AUTOSCALINGNOTIFICATIONNOTFOUND = "ResourceNotFound.AutoScalingNotificationNotFound" +func (c *Client) DeleteNotificationConfigurationWithContext(ctx context.Context, request *DeleteNotificationConfigurationRequest) (response *DeleteNotificationConfigurationResponse, err error) { + if request == nil { + request = NewDeleteNotificationConfigurationRequest() + } + request.SetContext(ctx) + + response = NewDeleteNotificationConfigurationResponse() + err = c.Send(request, response) + return +} + +func NewDeleteScalingPolicyRequest() (request *DeleteScalingPolicyRequest) { + request = &DeleteScalingPolicyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DeleteScalingPolicy") + + return +} + +func NewDeleteScalingPolicyResponse() (response *DeleteScalingPolicyResponse) { + response = &DeleteScalingPolicyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteScalingPolicy +// 本接口(DeleteScalingPolicy)用于删除告警触发策略。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" +// RESOURCENOTFOUND_SCALINGPOLICYNOTFOUND = "ResourceNotFound.ScalingPolicyNotFound" +func (c *Client) DeleteScalingPolicy(request *DeleteScalingPolicyRequest) (response *DeleteScalingPolicyResponse, err error) { + if request == nil { + request = NewDeleteScalingPolicyRequest() + } + + response = NewDeleteScalingPolicyResponse() + err = c.Send(request, response) + return +} + +// DeleteScalingPolicy +// 本接口(DeleteScalingPolicy)用于删除告警触发策略。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" +// RESOURCENOTFOUND_SCALINGPOLICYNOTFOUND = "ResourceNotFound.ScalingPolicyNotFound" +func (c *Client) DeleteScalingPolicyWithContext(ctx context.Context, request *DeleteScalingPolicyRequest) (response *DeleteScalingPolicyResponse, err error) { + if request == nil { + request = NewDeleteScalingPolicyRequest() + } + request.SetContext(ctx) + + response = NewDeleteScalingPolicyResponse() + err = c.Send(request, response) + return +} + +func NewDeleteScheduledActionRequest() (request *DeleteScheduledActionRequest) { + request = &DeleteScheduledActionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DeleteScheduledAction") + + return +} + +func NewDeleteScheduledActionResponse() (response *DeleteScheduledActionResponse) { + response = &DeleteScheduledActionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteScheduledAction +// 本接口(DeleteScheduledAction)用于删除特定的定时任务。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONID = "InvalidParameterValue.InvalidScheduledActionId" +// RESOURCENOTFOUND_SCHEDULEDACTIONNOTFOUND = "ResourceNotFound.ScheduledActionNotFound" +func (c *Client) DeleteScheduledAction(request *DeleteScheduledActionRequest) (response *DeleteScheduledActionResponse, err error) { + if request == nil { + request = NewDeleteScheduledActionRequest() + } + + response = NewDeleteScheduledActionResponse() + err = c.Send(request, response) + return +} + +// DeleteScheduledAction +// 本接口(DeleteScheduledAction)用于删除特定的定时任务。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONID = "InvalidParameterValue.InvalidScheduledActionId" +// RESOURCENOTFOUND_SCHEDULEDACTIONNOTFOUND = "ResourceNotFound.ScheduledActionNotFound" +func (c *Client) DeleteScheduledActionWithContext(ctx context.Context, request *DeleteScheduledActionRequest) (response *DeleteScheduledActionResponse, err error) { + if request == nil { + request = NewDeleteScheduledActionRequest() + } + request.SetContext(ctx) + + response = NewDeleteScheduledActionResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAccountLimitsRequest() (request *DescribeAccountLimitsRequest) { + request = &DescribeAccountLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeAccountLimits") + + return +} + +func NewDescribeAccountLimitsResponse() (response *DescribeAccountLimitsResponse) { + response = &DescribeAccountLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAccountLimits +// 本接口(DescribeAccountLimits)用于查询用户账户在弹性伸缩中的资源限制。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +func (c *Client) DescribeAccountLimits(request *DescribeAccountLimitsRequest) (response *DescribeAccountLimitsResponse, err error) { + if request == nil { + request = NewDescribeAccountLimitsRequest() + } + + response = NewDescribeAccountLimitsResponse() + err = c.Send(request, response) + return +} + +// DescribeAccountLimits +// 本接口(DescribeAccountLimits)用于查询用户账户在弹性伸缩中的资源限制。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +func (c *Client) DescribeAccountLimitsWithContext(ctx context.Context, request *DescribeAccountLimitsRequest) (response *DescribeAccountLimitsResponse, err error) { + if request == nil { + request = NewDescribeAccountLimitsRequest() + } + request.SetContext(ctx) + + response = NewDescribeAccountLimitsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAutoScalingActivitiesRequest() (request *DescribeAutoScalingActivitiesRequest) { + request = &DescribeAutoScalingActivitiesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeAutoScalingActivities") + + return +} + +func NewDescribeAutoScalingActivitiesResponse() (response *DescribeAutoScalingActivitiesResponse) { + response = &DescribeAutoScalingActivitiesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAutoScalingActivities +// 本接口(DescribeAutoScalingActivities)用于查询伸缩组的伸缩活动记录。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDACTIVITYID = "InvalidParameterValue.InvalidActivityId" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// LIMITEXCEEDED_FILTERVALUESTOOLONG = "LimitExceeded.FilterValuesTooLong" +func (c *Client) DescribeAutoScalingActivities(request *DescribeAutoScalingActivitiesRequest) (response *DescribeAutoScalingActivitiesResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingActivitiesRequest() + } + + response = NewDescribeAutoScalingActivitiesResponse() + err = c.Send(request, response) + return +} + +// DescribeAutoScalingActivities +// 本接口(DescribeAutoScalingActivities)用于查询伸缩组的伸缩活动记录。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDACTIVITYID = "InvalidParameterValue.InvalidActivityId" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// LIMITEXCEEDED_FILTERVALUESTOOLONG = "LimitExceeded.FilterValuesTooLong" +func (c *Client) DescribeAutoScalingActivitiesWithContext(ctx context.Context, request *DescribeAutoScalingActivitiesRequest) (response *DescribeAutoScalingActivitiesResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingActivitiesRequest() + } + request.SetContext(ctx) + + response = NewDescribeAutoScalingActivitiesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAutoScalingAdvicesRequest() (request *DescribeAutoScalingAdvicesRequest) { + request = &DescribeAutoScalingAdvicesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeAutoScalingAdvices") + + return +} + +func NewDescribeAutoScalingAdvicesResponse() (response *DescribeAutoScalingAdvicesResponse) { + response = &DescribeAutoScalingAdvicesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAutoScalingAdvices +// 此接口用于查询伸缩组配置建议。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +func (c *Client) DescribeAutoScalingAdvices(request *DescribeAutoScalingAdvicesRequest) (response *DescribeAutoScalingAdvicesResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingAdvicesRequest() + } + + response = NewDescribeAutoScalingAdvicesResponse() + err = c.Send(request, response) + return +} + +// DescribeAutoScalingAdvices +// 此接口用于查询伸缩组配置建议。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +func (c *Client) DescribeAutoScalingAdvicesWithContext(ctx context.Context, request *DescribeAutoScalingAdvicesRequest) (response *DescribeAutoScalingAdvicesResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingAdvicesRequest() + } + request.SetContext(ctx) + + response = NewDescribeAutoScalingAdvicesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAutoScalingGroupLastActivitiesRequest() (request *DescribeAutoScalingGroupLastActivitiesRequest) { + request = &DescribeAutoScalingGroupLastActivitiesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeAutoScalingGroupLastActivities") + + return +} + +func NewDescribeAutoScalingGroupLastActivitiesResponse() (response *DescribeAutoScalingGroupLastActivitiesResponse) { + response = &DescribeAutoScalingGroupLastActivitiesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAutoScalingGroupLastActivities +// 本接口(DescribeAutoScalingGroupLastActivities)用于查询伸缩组的最新一次伸缩活动记录。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NORESOURCEPERMISSION = "InvalidParameterValue.NoResourcePermission" +func (c *Client) DescribeAutoScalingGroupLastActivities(request *DescribeAutoScalingGroupLastActivitiesRequest) (response *DescribeAutoScalingGroupLastActivitiesResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingGroupLastActivitiesRequest() + } + + response = NewDescribeAutoScalingGroupLastActivitiesResponse() + err = c.Send(request, response) + return +} + +// DescribeAutoScalingGroupLastActivities +// 本接口(DescribeAutoScalingGroupLastActivities)用于查询伸缩组的最新一次伸缩活动记录。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NORESOURCEPERMISSION = "InvalidParameterValue.NoResourcePermission" +func (c *Client) DescribeAutoScalingGroupLastActivitiesWithContext(ctx context.Context, request *DescribeAutoScalingGroupLastActivitiesRequest) (response *DescribeAutoScalingGroupLastActivitiesResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingGroupLastActivitiesRequest() + } + request.SetContext(ctx) + + response = NewDescribeAutoScalingGroupLastActivitiesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAutoScalingGroupsRequest() (request *DescribeAutoScalingGroupsRequest) { + request = &DescribeAutoScalingGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeAutoScalingGroups") + + return +} + +func NewDescribeAutoScalingGroupsResponse() (response *DescribeAutoScalingGroupsResponse) { + response = &DescribeAutoScalingGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAutoScalingGroups +// 本接口(DescribeAutoScalingGroups)用于查询伸缩组信息。 +// +// +// +// * 可以根据伸缩组ID、伸缩组名称或者启动配置ID等信息来查询伸缩组的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的伸缩组。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPERMISSION = "InvalidPermission" +func (c *Client) DescribeAutoScalingGroups(request *DescribeAutoScalingGroupsRequest) (response *DescribeAutoScalingGroupsResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingGroupsRequest() + } + + response = NewDescribeAutoScalingGroupsResponse() + err = c.Send(request, response) + return +} + +// DescribeAutoScalingGroups +// 本接口(DescribeAutoScalingGroups)用于查询伸缩组信息。 +// +// +// +// * 可以根据伸缩组ID、伸缩组名称或者启动配置ID等信息来查询伸缩组的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的伸缩组。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPERMISSION = "InvalidPermission" +func (c *Client) DescribeAutoScalingGroupsWithContext(ctx context.Context, request *DescribeAutoScalingGroupsRequest) (response *DescribeAutoScalingGroupsResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingGroupsRequest() + } + request.SetContext(ctx) + + response = NewDescribeAutoScalingGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAutoScalingInstancesRequest() (request *DescribeAutoScalingInstancesRequest) { + request = &DescribeAutoScalingInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeAutoScalingInstances") + + return +} + +func NewDescribeAutoScalingInstancesResponse() (response *DescribeAutoScalingInstancesResponse) { + response = &DescribeAutoScalingInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAutoScalingInstances +// 本接口(DescribeAutoScalingInstances)用于查询弹性伸缩关联实例的信息。 +// +// +// +// * 可以根据实例ID、伸缩组ID等信息来查询实例的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的实例。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// LIMITEXCEEDED_FILTERVALUESTOOLONG = "LimitExceeded.FilterValuesTooLong" +func (c *Client) DescribeAutoScalingInstances(request *DescribeAutoScalingInstancesRequest) (response *DescribeAutoScalingInstancesResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingInstancesRequest() + } + + response = NewDescribeAutoScalingInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeAutoScalingInstances +// 本接口(DescribeAutoScalingInstances)用于查询弹性伸缩关联实例的信息。 +// +// +// +// * 可以根据实例ID、伸缩组ID等信息来查询实例的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的实例。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// LIMITEXCEEDED_FILTERVALUESTOOLONG = "LimitExceeded.FilterValuesTooLong" +func (c *Client) DescribeAutoScalingInstancesWithContext(ctx context.Context, request *DescribeAutoScalingInstancesRequest) (response *DescribeAutoScalingInstancesResponse, err error) { + if request == nil { + request = NewDescribeAutoScalingInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeAutoScalingInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeLaunchConfigurationsRequest() (request *DescribeLaunchConfigurationsRequest) { + request = &DescribeLaunchConfigurationsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeLaunchConfigurations") + + return +} + +func NewDescribeLaunchConfigurationsResponse() (response *DescribeLaunchConfigurationsResponse) { + response = &DescribeLaunchConfigurationsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeLaunchConfigurations +// 本接口(DescribeLaunchConfigurations)用于查询启动配置的信息。 +// +// +// +// * 可以根据启动配置ID、启动配置名称等信息来查询启动配置的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的启动配置。 +// +// 可能返回的错误码: +// INVALIDLAUNCHCONFIGURATION = "InvalidLaunchConfiguration" +// INVALIDLAUNCHCONFIGURATIONID = "InvalidLaunchConfigurationId" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPERMISSION = "InvalidPermission" +func (c *Client) DescribeLaunchConfigurations(request *DescribeLaunchConfigurationsRequest) (response *DescribeLaunchConfigurationsResponse, err error) { + if request == nil { + request = NewDescribeLaunchConfigurationsRequest() + } + + response = NewDescribeLaunchConfigurationsResponse() + err = c.Send(request, response) + return +} + +// DescribeLaunchConfigurations +// 本接口(DescribeLaunchConfigurations)用于查询启动配置的信息。 +// +// +// +// * 可以根据启动配置ID、启动配置名称等信息来查询启动配置的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的启动配置。 +// +// 可能返回的错误码: +// INVALIDLAUNCHCONFIGURATION = "InvalidLaunchConfiguration" +// INVALIDLAUNCHCONFIGURATIONID = "InvalidLaunchConfigurationId" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPERMISSION = "InvalidPermission" +func (c *Client) DescribeLaunchConfigurationsWithContext(ctx context.Context, request *DescribeLaunchConfigurationsRequest) (response *DescribeLaunchConfigurationsResponse, err error) { + if request == nil { + request = NewDescribeLaunchConfigurationsRequest() + } + request.SetContext(ctx) + + response = NewDescribeLaunchConfigurationsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeLifecycleHooksRequest() (request *DescribeLifecycleHooksRequest) { + request = &DescribeLifecycleHooksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeLifecycleHooks") + + return +} + +func NewDescribeLifecycleHooksResponse() (response *DescribeLifecycleHooksResponse) { + response = &DescribeLifecycleHooksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeLifecycleHooks +// 本接口(DescribeLifecycleHooks)用于查询生命周期挂钩信息。 +// +// +// +// * 可以根据伸缩组ID、生命周期挂钩ID或者生命周期挂钩名称等信息来查询生命周期挂钩的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的生命周期挂钩。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeLifecycleHooks(request *DescribeLifecycleHooksRequest) (response *DescribeLifecycleHooksResponse, err error) { + if request == nil { + request = NewDescribeLifecycleHooksRequest() + } + + response = NewDescribeLifecycleHooksResponse() + err = c.Send(request, response) + return +} + +// DescribeLifecycleHooks +// 本接口(DescribeLifecycleHooks)用于查询生命周期挂钩信息。 +// +// +// +// * 可以根据伸缩组ID、生命周期挂钩ID或者生命周期挂钩名称等信息来查询生命周期挂钩的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的生命周期挂钩。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeLifecycleHooksWithContext(ctx context.Context, request *DescribeLifecycleHooksRequest) (response *DescribeLifecycleHooksResponse, err error) { + if request == nil { + request = NewDescribeLifecycleHooksRequest() + } + request.SetContext(ctx) + + response = NewDescribeLifecycleHooksResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNotificationConfigurationsRequest() (request *DescribeNotificationConfigurationsRequest) { + request = &DescribeNotificationConfigurationsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeNotificationConfigurations") + + return +} + +func NewDescribeNotificationConfigurationsResponse() (response *DescribeNotificationConfigurationsResponse) { + response = &DescribeNotificationConfigurationsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNotificationConfigurations +// 本接口 (DescribeNotificationConfigurations) 用于查询一个或多个通知的详细信息。 +// +// +// +// 可以根据通知ID、伸缩组ID等信息来查询通知的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的通知。 +// +// 可能返回的错误码: +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGNOTIFICATIONID = "InvalidParameterValue.InvalidAutoScalingNotificationId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +func (c *Client) DescribeNotificationConfigurations(request *DescribeNotificationConfigurationsRequest) (response *DescribeNotificationConfigurationsResponse, err error) { + if request == nil { + request = NewDescribeNotificationConfigurationsRequest() + } + + response = NewDescribeNotificationConfigurationsResponse() + err = c.Send(request, response) + return +} + +// DescribeNotificationConfigurations +// 本接口 (DescribeNotificationConfigurations) 用于查询一个或多个通知的详细信息。 +// +// +// +// 可以根据通知ID、伸缩组ID等信息来查询通知的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的通知。 +// +// 可能返回的错误码: +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGNOTIFICATIONID = "InvalidParameterValue.InvalidAutoScalingNotificationId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +func (c *Client) DescribeNotificationConfigurationsWithContext(ctx context.Context, request *DescribeNotificationConfigurationsRequest) (response *DescribeNotificationConfigurationsResponse, err error) { + if request == nil { + request = NewDescribeNotificationConfigurationsRequest() + } + request.SetContext(ctx) + + response = NewDescribeNotificationConfigurationsResponse() + err = c.Send(request, response) + return +} + +func NewDescribePaiInstancesRequest() (request *DescribePaiInstancesRequest) { + request = &DescribePaiInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribePaiInstances") + + return +} + +func NewDescribePaiInstancesResponse() (response *DescribePaiInstancesResponse) { + response = &DescribePaiInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePaiInstances +// 本接口(DescribePaiInstances)用于查询PAI实例信息。 +// +// +// +// * 可以根据实例ID、实例域名等信息来查询PAI实例的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的PAI实例。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +func (c *Client) DescribePaiInstances(request *DescribePaiInstancesRequest) (response *DescribePaiInstancesResponse, err error) { + if request == nil { + request = NewDescribePaiInstancesRequest() + } + + response = NewDescribePaiInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribePaiInstances +// 本接口(DescribePaiInstances)用于查询PAI实例信息。 +// +// +// +// * 可以根据实例ID、实例域名等信息来查询PAI实例的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的PAI实例。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +func (c *Client) DescribePaiInstancesWithContext(ctx context.Context, request *DescribePaiInstancesRequest) (response *DescribePaiInstancesResponse, err error) { + if request == nil { + request = NewDescribePaiInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribePaiInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeScalingPoliciesRequest() (request *DescribeScalingPoliciesRequest) { + request = &DescribeScalingPoliciesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeScalingPolicies") + + return +} + +func NewDescribeScalingPoliciesResponse() (response *DescribeScalingPoliciesResponse) { + response = &DescribeScalingPoliciesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeScalingPolicies +// 本接口(DescribeScalingPolicies)用于查询告警触发策略。 +// +// 可能返回的错误码: +// INTERNALERROR_CALLMONITORERROR = "InternalError.CallMonitorError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) DescribeScalingPolicies(request *DescribeScalingPoliciesRequest) (response *DescribeScalingPoliciesResponse, err error) { + if request == nil { + request = NewDescribeScalingPoliciesRequest() + } + + response = NewDescribeScalingPoliciesResponse() + err = c.Send(request, response) + return +} + +// DescribeScalingPolicies +// 本接口(DescribeScalingPolicies)用于查询告警触发策略。 +// +// 可能返回的错误码: +// INTERNALERROR_CALLMONITORERROR = "InternalError.CallMonitorError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) DescribeScalingPoliciesWithContext(ctx context.Context, request *DescribeScalingPoliciesRequest) (response *DescribeScalingPoliciesResponse, err error) { + if request == nil { + request = NewDescribeScalingPoliciesRequest() + } + request.SetContext(ctx) + + response = NewDescribeScalingPoliciesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeScheduledActionsRequest() (request *DescribeScheduledActionsRequest) { + request = &DescribeScheduledActionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DescribeScheduledActions") + + return +} + +func NewDescribeScheduledActionsResponse() (response *DescribeScheduledActionsResponse) { + response = &DescribeScheduledActionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeScheduledActions +// 本接口 (DescribeScheduledActions) 用于查询一个或多个定时任务的详细信息。 +// +// +// +// * 可以根据定时任务ID、定时任务名称或者伸缩组ID等信息来查询定时任务的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的定时任务。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONID = "InvalidParameterValue.InvalidScheduledActionId" +// RESOURCENOTFOUND_SCHEDULEDACTIONNOTFOUND = "ResourceNotFound.ScheduledActionNotFound" +func (c *Client) DescribeScheduledActions(request *DescribeScheduledActionsRequest) (response *DescribeScheduledActionsResponse, err error) { + if request == nil { + request = NewDescribeScheduledActionsRequest() + } + + response = NewDescribeScheduledActionsResponse() + err = c.Send(request, response) + return +} + +// DescribeScheduledActions +// 本接口 (DescribeScheduledActions) 用于查询一个或多个定时任务的详细信息。 +// +// +// +// * 可以根据定时任务ID、定时任务名称或者伸缩组ID等信息来查询定时任务的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的定时任务。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONID = "InvalidParameterValue.InvalidScheduledActionId" +// RESOURCENOTFOUND_SCHEDULEDACTIONNOTFOUND = "ResourceNotFound.ScheduledActionNotFound" +func (c *Client) DescribeScheduledActionsWithContext(ctx context.Context, request *DescribeScheduledActionsRequest) (response *DescribeScheduledActionsResponse, err error) { + if request == nil { + request = NewDescribeScheduledActionsRequest() + } + request.SetContext(ctx) + + response = NewDescribeScheduledActionsResponse() + err = c.Send(request, response) + return +} + +func NewDetachInstancesRequest() (request *DetachInstancesRequest) { + request = &DetachInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DetachInstances") + + return +} + +func NewDetachInstancesResponse() (response *DetachInstancesResponse) { + response = &DetachInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DetachInstances +// 本接口(DetachInstances)用于从伸缩组移出 CVM 实例,本接口不会销毁实例。 +// +// * 如果移出指定实例后,伸缩组内处于`IN_SERVICE`状态的实例数量小于伸缩组最小值,接口将报错 +// +// * 如果伸缩组处于`DISABLED`状态,移出操作不校验`IN_SERVICE`实例数量和最小值的关系 +// +// * 对于伸缩组配置的 CLB,实例在离开伸缩组时,AS 会进行解挂载动作 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEBELOWMINSIZE = "ResourceInsufficient.InServiceInstanceBelowMinSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_INSTANCEINOPERATION = "ResourceUnavailable.InstanceInOperation" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) DetachInstances(request *DetachInstancesRequest) (response *DetachInstancesResponse, err error) { + if request == nil { + request = NewDetachInstancesRequest() + } + + response = NewDetachInstancesResponse() + err = c.Send(request, response) + return +} + +// DetachInstances +// 本接口(DetachInstances)用于从伸缩组移出 CVM 实例,本接口不会销毁实例。 +// +// * 如果移出指定实例后,伸缩组内处于`IN_SERVICE`状态的实例数量小于伸缩组最小值,接口将报错 +// +// * 如果伸缩组处于`DISABLED`状态,移出操作不校验`IN_SERVICE`实例数量和最小值的关系 +// +// * 对于伸缩组配置的 CLB,实例在离开伸缩组时,AS 会进行解挂载动作 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEBELOWMINSIZE = "ResourceInsufficient.InServiceInstanceBelowMinSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_INSTANCEINOPERATION = "ResourceUnavailable.InstanceInOperation" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) DetachInstancesWithContext(ctx context.Context, request *DetachInstancesRequest) (response *DetachInstancesResponse, err error) { + if request == nil { + request = NewDetachInstancesRequest() + } + request.SetContext(ctx) + + response = NewDetachInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDetachLoadBalancersRequest() (request *DetachLoadBalancersRequest) { + request = &DetachLoadBalancersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DetachLoadBalancers") + + return +} + +func NewDetachLoadBalancersResponse() (response *DetachLoadBalancersResponse) { + response = &DetachLoadBalancersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DetachLoadBalancers +// 本接口(DetachLoadBalancers)用于从伸缩组移出负载均衡器,本接口不会销毁负载均衡器。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETER_LOADBALANCERNOTINAUTOSCALINGGROUP = "InvalidParameter.LoadBalancerNotInAutoScalingGroup" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// LIMITEXCEEDED_AFTERATTACHLBLIMITEXCEEDED = "LimitExceeded.AfterAttachLbLimitExceeded" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBPROJECTINCONSISTENT = "ResourceUnavailable.LbProjectInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) DetachLoadBalancers(request *DetachLoadBalancersRequest) (response *DetachLoadBalancersResponse, err error) { + if request == nil { + request = NewDetachLoadBalancersRequest() + } + + response = NewDetachLoadBalancersResponse() + err = c.Send(request, response) + return +} + +// DetachLoadBalancers +// 本接口(DetachLoadBalancers)用于从伸缩组移出负载均衡器,本接口不会销毁负载均衡器。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETER_LOADBALANCERNOTINAUTOSCALINGGROUP = "InvalidParameter.LoadBalancerNotInAutoScalingGroup" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// LIMITEXCEEDED_AFTERATTACHLBLIMITEXCEEDED = "LimitExceeded.AfterAttachLbLimitExceeded" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBPROJECTINCONSISTENT = "ResourceUnavailable.LbProjectInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) DetachLoadBalancersWithContext(ctx context.Context, request *DetachLoadBalancersRequest) (response *DetachLoadBalancersResponse, err error) { + if request == nil { + request = NewDetachLoadBalancersRequest() + } + request.SetContext(ctx) + + response = NewDetachLoadBalancersResponse() + err = c.Send(request, response) + return +} + +func NewDisableAutoScalingGroupRequest() (request *DisableAutoScalingGroupRequest) { + request = &DisableAutoScalingGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "DisableAutoScalingGroup") + + return +} + +func NewDisableAutoScalingGroupResponse() (response *DisableAutoScalingGroupResponse) { + response = &DisableAutoScalingGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisableAutoScalingGroup +// 本接口(DisableAutoScalingGroup)用于停用指定伸缩组。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) DisableAutoScalingGroup(request *DisableAutoScalingGroupRequest) (response *DisableAutoScalingGroupResponse, err error) { + if request == nil { + request = NewDisableAutoScalingGroupRequest() + } + + response = NewDisableAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +// DisableAutoScalingGroup +// 本接口(DisableAutoScalingGroup)用于停用指定伸缩组。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) DisableAutoScalingGroupWithContext(ctx context.Context, request *DisableAutoScalingGroupRequest) (response *DisableAutoScalingGroupResponse, err error) { + if request == nil { + request = NewDisableAutoScalingGroupRequest() + } + request.SetContext(ctx) + + response = NewDisableAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +func NewEnableAutoScalingGroupRequest() (request *EnableAutoScalingGroupRequest) { + request = &EnableAutoScalingGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "EnableAutoScalingGroup") + + return +} + +func NewEnableAutoScalingGroupResponse() (response *EnableAutoScalingGroupResponse) { + response = &EnableAutoScalingGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableAutoScalingGroup +// 本接口(EnableAutoScalingGroup)用于启用指定伸缩组。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) EnableAutoScalingGroup(request *EnableAutoScalingGroupRequest) (response *EnableAutoScalingGroupResponse, err error) { + if request == nil { + request = NewEnableAutoScalingGroupRequest() + } + + response = NewEnableAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +// EnableAutoScalingGroup +// 本接口(EnableAutoScalingGroup)用于启用指定伸缩组。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +func (c *Client) EnableAutoScalingGroupWithContext(ctx context.Context, request *EnableAutoScalingGroupRequest) (response *EnableAutoScalingGroupResponse, err error) { + if request == nil { + request = NewEnableAutoScalingGroupRequest() + } + request.SetContext(ctx) + + response = NewEnableAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +func NewExecuteScalingPolicyRequest() (request *ExecuteScalingPolicyRequest) { + request = &ExecuteScalingPolicyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ExecuteScalingPolicy") + + return +} + +func NewExecuteScalingPolicyResponse() (response *ExecuteScalingPolicyResponse) { + response = &ExecuteScalingPolicyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ExecuteScalingPolicy +// 本接口(ExecuteScalingPolicy)用于执行伸缩策略。 +// +// +// +// * 可以根据伸缩策略ID执行伸缩策略。 +// +// * 伸缩策略所属伸缩组处于伸缩活动时,会拒绝执行伸缩策略。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" +// RESOURCEINUSE_AUTOSCALINGGROUPNOTACTIVE = "ResourceInUse.AutoScalingGroupNotActive" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_SCALINGPOLICYNOTFOUND = "ResourceNotFound.ScalingPolicyNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPABNORMALSTATUS = "ResourceUnavailable.AutoScalingGroupAbnormalStatus" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +func (c *Client) ExecuteScalingPolicy(request *ExecuteScalingPolicyRequest) (response *ExecuteScalingPolicyResponse, err error) { + if request == nil { + request = NewExecuteScalingPolicyRequest() + } + + response = NewExecuteScalingPolicyResponse() + err = c.Send(request, response) + return +} + +// ExecuteScalingPolicy +// 本接口(ExecuteScalingPolicy)用于执行伸缩策略。 +// +// +// +// * 可以根据伸缩策略ID执行伸缩策略。 +// +// * 伸缩策略所属伸缩组处于伸缩活动时,会拒绝执行伸缩策略。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" +// RESOURCEINUSE_AUTOSCALINGGROUPNOTACTIVE = "ResourceInUse.AutoScalingGroupNotActive" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_SCALINGPOLICYNOTFOUND = "ResourceNotFound.ScalingPolicyNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPABNORMALSTATUS = "ResourceUnavailable.AutoScalingGroupAbnormalStatus" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +func (c *Client) ExecuteScalingPolicyWithContext(ctx context.Context, request *ExecuteScalingPolicyRequest) (response *ExecuteScalingPolicyResponse, err error) { + if request == nil { + request = NewExecuteScalingPolicyRequest() + } + request.SetContext(ctx) + + response = NewExecuteScalingPolicyResponse() + err = c.Send(request, response) + return +} + +func NewModifyAutoScalingGroupRequest() (request *ModifyAutoScalingGroupRequest) { + request = &ModifyAutoScalingGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ModifyAutoScalingGroup") + + return +} + +func NewModifyAutoScalingGroupResponse() (response *ModifyAutoScalingGroupResponse) { + response = &ModifyAutoScalingGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyAutoScalingGroup +// 本接口(ModifyAutoScalingGroup)用于修改伸缩组。 +// +// 可能返回的错误码: +// INTERNALERROR_CALLVPCERROR = "InternalError.CallVpcError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETERVALUE_BASECAPACITYTOOLARGE = "InvalidParameterValue.BaseCapacityTooLarge" +// INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" +// INVALIDPARAMETERVALUE_DUPLICATEDSUBNET = "InvalidParameterValue.DuplicatedSubnet" +// INVALIDPARAMETERVALUE_GROUPNAMEDUPLICATED = "InvalidParameterValue.GroupNameDuplicated" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_INVALIDSUBNETID = "InvalidParameterValue.InvalidSubnetId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNOTFOUND = "InvalidParameterValue.LaunchConfigurationNotFound" +// INVALIDPARAMETERVALUE_LBPROJECTINCONSISTENT = "InvalidParameterValue.LbProjectInconsistent" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ONLYVPC = "InvalidParameterValue.OnlyVpc" +// INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_SUBNETIDS = "InvalidParameterValue.SubnetIds" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCEUNAVAILABLE_LAUNCHCONFIGURATIONSTATUSABNORMAL = "ResourceUnavailable.LaunchConfigurationStatusAbnormal" +// RESOURCEUNAVAILABLE_PROJECTINCONSISTENT = "ResourceUnavailable.ProjectInconsistent" +func (c *Client) ModifyAutoScalingGroup(request *ModifyAutoScalingGroupRequest) (response *ModifyAutoScalingGroupResponse, err error) { + if request == nil { + request = NewModifyAutoScalingGroupRequest() + } + + response = NewModifyAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +// ModifyAutoScalingGroup +// 本接口(ModifyAutoScalingGroup)用于修改伸缩组。 +// +// 可能返回的错误码: +// INTERNALERROR_CALLVPCERROR = "InternalError.CallVpcError" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETERVALUE_BASECAPACITYTOOLARGE = "InvalidParameterValue.BaseCapacityTooLarge" +// INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" +// INVALIDPARAMETERVALUE_DUPLICATEDSUBNET = "InvalidParameterValue.DuplicatedSubnet" +// INVALIDPARAMETERVALUE_GROUPNAMEDUPLICATED = "InvalidParameterValue.GroupNameDuplicated" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_INVALIDSUBNETID = "InvalidParameterValue.InvalidSubnetId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNOTFOUND = "InvalidParameterValue.LaunchConfigurationNotFound" +// INVALIDPARAMETERVALUE_LBPROJECTINCONSISTENT = "InvalidParameterValue.LbProjectInconsistent" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ONLYVPC = "InvalidParameterValue.OnlyVpc" +// INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_SUBNETIDS = "InvalidParameterValue.SubnetIds" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCEUNAVAILABLE_LAUNCHCONFIGURATIONSTATUSABNORMAL = "ResourceUnavailable.LaunchConfigurationStatusAbnormal" +// RESOURCEUNAVAILABLE_PROJECTINCONSISTENT = "ResourceUnavailable.ProjectInconsistent" +func (c *Client) ModifyAutoScalingGroupWithContext(ctx context.Context, request *ModifyAutoScalingGroupRequest) (response *ModifyAutoScalingGroupResponse, err error) { + if request == nil { + request = NewModifyAutoScalingGroupRequest() + } + request.SetContext(ctx) + + response = NewModifyAutoScalingGroupResponse() + err = c.Send(request, response) + return +} + +func NewModifyDesiredCapacityRequest() (request *ModifyDesiredCapacityRequest) { + request = &ModifyDesiredCapacityRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ModifyDesiredCapacity") + + return +} + +func NewModifyDesiredCapacityResponse() (response *ModifyDesiredCapacityResponse) { + response = &ModifyDesiredCapacityResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyDesiredCapacity +// 本接口(ModifyDesiredCapacity)用于修改指定伸缩组的期望实例数 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPABNORMALSTATUS = "ResourceUnavailable.AutoScalingGroupAbnormalStatus" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPDISABLED = "ResourceUnavailable.AutoScalingGroupDisabled" +func (c *Client) ModifyDesiredCapacity(request *ModifyDesiredCapacityRequest) (response *ModifyDesiredCapacityResponse, err error) { + if request == nil { + request = NewModifyDesiredCapacityRequest() + } + + response = NewModifyDesiredCapacityResponse() + err = c.Send(request, response) + return +} + +// ModifyDesiredCapacity +// 本接口(ModifyDesiredCapacity)用于修改指定伸缩组的期望实例数 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPABNORMALSTATUS = "ResourceUnavailable.AutoScalingGroupAbnormalStatus" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPDISABLED = "ResourceUnavailable.AutoScalingGroupDisabled" +func (c *Client) ModifyDesiredCapacityWithContext(ctx context.Context, request *ModifyDesiredCapacityRequest) (response *ModifyDesiredCapacityResponse, err error) { + if request == nil { + request = NewModifyDesiredCapacityRequest() + } + request.SetContext(ctx) + + response = NewModifyDesiredCapacityResponse() + err = c.Send(request, response) + return +} + +func NewModifyLaunchConfigurationAttributesRequest() (request *ModifyLaunchConfigurationAttributesRequest) { + request = &ModifyLaunchConfigurationAttributesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ModifyLaunchConfigurationAttributes") + + return +} + +func NewModifyLaunchConfigurationAttributesResponse() (response *ModifyLaunchConfigurationAttributesResponse) { + response = &ModifyLaunchConfigurationAttributesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyLaunchConfigurationAttributes +// 本接口(ModifyLaunchConfigurationAttributes)用于修改启动配置部分属性。 +// +// +// +// * 修改启动配置后,已经使用该启动配置扩容的存量实例不会发生变更,此后使用该启动配置的新增实例会按照新的配置进行扩容。 +// +// * 本接口支持修改部分简单类型。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_HOSTNAMEUNAVAILABLE = "InvalidParameter.HostNameUnavailable" +// INVALIDPARAMETER_INVALIDCOMBINATION = "InvalidParameter.InvalidCombination" +// INVALIDPARAMETER_PARAMETERMUSTBEDELETED = "InvalidParameter.ParameterMustBeDeleted" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CVMCONFIGURATIONERROR = "InvalidParameterValue.CvmConfigurationError" +// INVALIDPARAMETERVALUE_HOSTNAMEILLEGAL = "InvalidParameterValue.HostNameIllegal" +// INVALIDPARAMETERVALUE_IMAGENOTFOUND = "InvalidParameterValue.ImageNotFound" +// INVALIDPARAMETERVALUE_INSTANCENAMEILLEGAL = "InvalidParameterValue.InstanceNameIllegal" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTED = "InvalidParameterValue.InstanceTypeNotSupported" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCETYPE = "InvalidParameterValue.InvalidInstanceType" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" +// INVALIDPARAMETERVALUE_NOTSTRINGTYPEFLOAT = "InvalidParameterValue.NotStringTypeFloat" +// INVALIDPARAMETERVALUE_USERDATAFORMATERROR = "InvalidParameterValue.UserDataFormatError" +// INVALIDPARAMETERVALUE_USERDATASIZEEXCEEDED = "InvalidParameterValue.UserDataSizeExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_LAUNCHCONFIGURATIONIDNOTFOUND = "ResourceNotFound.LaunchConfigurationIdNotFound" +func (c *Client) ModifyLaunchConfigurationAttributes(request *ModifyLaunchConfigurationAttributesRequest) (response *ModifyLaunchConfigurationAttributesResponse, err error) { + if request == nil { + request = NewModifyLaunchConfigurationAttributesRequest() + } + + response = NewModifyLaunchConfigurationAttributesResponse() + err = c.Send(request, response) + return +} + +// ModifyLaunchConfigurationAttributes +// 本接口(ModifyLaunchConfigurationAttributes)用于修改启动配置部分属性。 +// +// +// +// * 修改启动配置后,已经使用该启动配置扩容的存量实例不会发生变更,此后使用该启动配置的新增实例会按照新的配置进行扩容。 +// +// * 本接口支持修改部分简单类型。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_HOSTNAMEUNAVAILABLE = "InvalidParameter.HostNameUnavailable" +// INVALIDPARAMETER_INVALIDCOMBINATION = "InvalidParameter.InvalidCombination" +// INVALIDPARAMETER_PARAMETERMUSTBEDELETED = "InvalidParameter.ParameterMustBeDeleted" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CVMCONFIGURATIONERROR = "InvalidParameterValue.CvmConfigurationError" +// INVALIDPARAMETERVALUE_HOSTNAMEILLEGAL = "InvalidParameterValue.HostNameIllegal" +// INVALIDPARAMETERVALUE_IMAGENOTFOUND = "InvalidParameterValue.ImageNotFound" +// INVALIDPARAMETERVALUE_INSTANCENAMEILLEGAL = "InvalidParameterValue.InstanceNameIllegal" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTED = "InvalidParameterValue.InstanceTypeNotSupported" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCETYPE = "InvalidParameterValue.InvalidInstanceType" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" +// INVALIDPARAMETERVALUE_NOTSTRINGTYPEFLOAT = "InvalidParameterValue.NotStringTypeFloat" +// INVALIDPARAMETERVALUE_USERDATAFORMATERROR = "InvalidParameterValue.UserDataFormatError" +// INVALIDPARAMETERVALUE_USERDATASIZEEXCEEDED = "InvalidParameterValue.UserDataSizeExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_LAUNCHCONFIGURATIONIDNOTFOUND = "ResourceNotFound.LaunchConfigurationIdNotFound" +func (c *Client) ModifyLaunchConfigurationAttributesWithContext(ctx context.Context, request *ModifyLaunchConfigurationAttributesRequest) (response *ModifyLaunchConfigurationAttributesResponse, err error) { + if request == nil { + request = NewModifyLaunchConfigurationAttributesRequest() + } + request.SetContext(ctx) + + response = NewModifyLaunchConfigurationAttributesResponse() + err = c.Send(request, response) + return +} + +func NewModifyLoadBalancerTargetAttributesRequest() (request *ModifyLoadBalancerTargetAttributesRequest) { + request = &ModifyLoadBalancerTargetAttributesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ModifyLoadBalancerTargetAttributes") + + return +} + +func NewModifyLoadBalancerTargetAttributesResponse() (response *ModifyLoadBalancerTargetAttributesResponse) { + response = &ModifyLoadBalancerTargetAttributesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyLoadBalancerTargetAttributes +// 本接口(ModifyLoadBalancerTargetAttributes)用于修改伸缩组内负载均衡器的目标规则属性。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETER_LOADBALANCERNOTINAUTOSCALINGGROUP = "InvalidParameter.LoadBalancerNotInAutoScalingGroup" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// INVALIDPARAMETERVALUE_TARGETPORTDUPLICATED = "InvalidParameterValue.TargetPortDuplicated" +// LIMITEXCEEDED_AFTERATTACHLBLIMITEXCEEDED = "LimitExceeded.AfterAttachLbLimitExceeded" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBPROJECTINCONSISTENT = "ResourceUnavailable.LbProjectInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) ModifyLoadBalancerTargetAttributes(request *ModifyLoadBalancerTargetAttributesRequest) (response *ModifyLoadBalancerTargetAttributesResponse, err error) { + if request == nil { + request = NewModifyLoadBalancerTargetAttributesRequest() + } + + response = NewModifyLoadBalancerTargetAttributesResponse() + err = c.Send(request, response) + return +} + +// ModifyLoadBalancerTargetAttributes +// 本接口(ModifyLoadBalancerTargetAttributes)用于修改伸缩组内负载均衡器的目标规则属性。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETER_LOADBALANCERNOTINAUTOSCALINGGROUP = "InvalidParameter.LoadBalancerNotInAutoScalingGroup" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// INVALIDPARAMETERVALUE_TARGETPORTDUPLICATED = "InvalidParameterValue.TargetPortDuplicated" +// LIMITEXCEEDED_AFTERATTACHLBLIMITEXCEEDED = "LimitExceeded.AfterAttachLbLimitExceeded" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBPROJECTINCONSISTENT = "ResourceUnavailable.LbProjectInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) ModifyLoadBalancerTargetAttributesWithContext(ctx context.Context, request *ModifyLoadBalancerTargetAttributesRequest) (response *ModifyLoadBalancerTargetAttributesResponse, err error) { + if request == nil { + request = NewModifyLoadBalancerTargetAttributesRequest() + } + request.SetContext(ctx) + + response = NewModifyLoadBalancerTargetAttributesResponse() + err = c.Send(request, response) + return +} + +func NewModifyLoadBalancersRequest() (request *ModifyLoadBalancersRequest) { + request = &ModifyLoadBalancersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ModifyLoadBalancers") + + return +} + +func NewModifyLoadBalancersResponse() (response *ModifyLoadBalancersResponse) { + response = &ModifyLoadBalancersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyLoadBalancers +// 本接口(ModifyLoadBalancers)用于修改伸缩组的负载均衡器。 +// +// +// +// * 本接口用于为伸缩组指定新的负载均衡器配置,采用`完全覆盖`风格,无论之前配置如何,`统一按照接口参数配置为新的负载均衡器`。 +// +// * 如果要为伸缩组清空负载均衡器,则在调用本接口时仅指定伸缩组ID,不指定具体负载均衡器。 +// +// * 本接口会立即修改伸缩组的负载均衡器,并生成一个伸缩活动,异步修改存量实例的负载均衡器。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// INVALIDPARAMETERVALUE_LBPROJECTINCONSISTENT = "InvalidParameterValue.LbProjectInconsistent" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) ModifyLoadBalancers(request *ModifyLoadBalancersRequest) (response *ModifyLoadBalancersResponse, err error) { + if request == nil { + request = NewModifyLoadBalancersRequest() + } + + response = NewModifyLoadBalancersResponse() + err = c.Send(request, response) + return +} + +// ModifyLoadBalancers +// 本接口(ModifyLoadBalancers)用于修改伸缩组的负载均衡器。 +// +// +// +// * 本接口用于为伸缩组指定新的负载均衡器配置,采用`完全覆盖`风格,无论之前配置如何,`统一按照接口参数配置为新的负载均衡器`。 +// +// * 如果要为伸缩组清空负载均衡器,则在调用本接口时仅指定伸缩组ID,不指定具体负载均衡器。 +// +// * 本接口会立即修改伸缩组的负载均衡器,并生成一个伸缩活动,异步修改存量实例的负载均衡器。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" +// INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" +// INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" +// INVALIDPARAMETERVALUE_LBPROJECTINCONSISTENT = "InvalidParameterValue.LbProjectInconsistent" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" +// RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" +// RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" +// RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) ModifyLoadBalancersWithContext(ctx context.Context, request *ModifyLoadBalancersRequest) (response *ModifyLoadBalancersResponse, err error) { + if request == nil { + request = NewModifyLoadBalancersRequest() + } + request.SetContext(ctx) + + response = NewModifyLoadBalancersResponse() + err = c.Send(request, response) + return +} + +func NewModifyNotificationConfigurationRequest() (request *ModifyNotificationConfigurationRequest) { + request = &ModifyNotificationConfigurationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ModifyNotificationConfiguration") + + return +} + +func NewModifyNotificationConfigurationResponse() (response *ModifyNotificationConfigurationResponse) { + response = &ModifyNotificationConfigurationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNotificationConfiguration +// 本接口(ModifyNotificationConfiguration)用于修改通知。 +// +// * 通知的接收端类型不支持修改。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_CONFLICTNOTIFICATIONTARGET = "InvalidParameterValue.ConflictNotificationTarget" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGNOTIFICATIONID = "InvalidParameterValue.InvalidAutoScalingNotificationId" +// INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" +// INVALIDPARAMETERVALUE_USERGROUPIDNOTFOUND = "InvalidParameterValue.UserGroupIdNotFound" +// RESOURCENOTFOUND_AUTOSCALINGNOTIFICATIONNOTFOUND = "ResourceNotFound.AutoScalingNotificationNotFound" +// RESOURCENOTFOUND_CMQQUEUENOTFOUND = "ResourceNotFound.CmqQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQQUEUENOTFOUND = "ResourceNotFound.TDMQCMQQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQTOPICNOTFOUND = "ResourceNotFound.TDMQCMQTopicNotFound" +// RESOURCEUNAVAILABLE_TDMQCMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.TDMQCMQTopicHasNoSubscriber" +func (c *Client) ModifyNotificationConfiguration(request *ModifyNotificationConfigurationRequest) (response *ModifyNotificationConfigurationResponse, err error) { + if request == nil { + request = NewModifyNotificationConfigurationRequest() + } + + response = NewModifyNotificationConfigurationResponse() + err = c.Send(request, response) + return +} + +// ModifyNotificationConfiguration +// 本接口(ModifyNotificationConfiguration)用于修改通知。 +// +// * 通知的接收端类型不支持修改。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_CONFLICTNOTIFICATIONTARGET = "InvalidParameterValue.ConflictNotificationTarget" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGNOTIFICATIONID = "InvalidParameterValue.InvalidAutoScalingNotificationId" +// INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" +// INVALIDPARAMETERVALUE_USERGROUPIDNOTFOUND = "InvalidParameterValue.UserGroupIdNotFound" +// RESOURCENOTFOUND_AUTOSCALINGNOTIFICATIONNOTFOUND = "ResourceNotFound.AutoScalingNotificationNotFound" +// RESOURCENOTFOUND_CMQQUEUENOTFOUND = "ResourceNotFound.CmqQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQQUEUENOTFOUND = "ResourceNotFound.TDMQCMQQueueNotFound" +// RESOURCENOTFOUND_TDMQCMQTOPICNOTFOUND = "ResourceNotFound.TDMQCMQTopicNotFound" +// RESOURCEUNAVAILABLE_TDMQCMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.TDMQCMQTopicHasNoSubscriber" +func (c *Client) ModifyNotificationConfigurationWithContext(ctx context.Context, request *ModifyNotificationConfigurationRequest) (response *ModifyNotificationConfigurationResponse, err error) { + if request == nil { + request = NewModifyNotificationConfigurationRequest() + } + request.SetContext(ctx) + + response = NewModifyNotificationConfigurationResponse() + err = c.Send(request, response) + return +} + +func NewModifyScalingPolicyRequest() (request *ModifyScalingPolicyRequest) { + request = &ModifyScalingPolicyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ModifyScalingPolicy") + + return +} + +func NewModifyScalingPolicyResponse() (response *ModifyScalingPolicyResponse) { + response = &ModifyScalingPolicyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyScalingPolicy +// 本接口(ModifyScalingPolicy)用于修改告警触发策略。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" +// INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SCALINGPOLICYNAMEDUPLICATE = "InvalidParameterValue.ScalingPolicyNameDuplicate" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_SCALINGPOLICYNOTFOUND = "ResourceNotFound.ScalingPolicyNotFound" +func (c *Client) ModifyScalingPolicy(request *ModifyScalingPolicyRequest) (response *ModifyScalingPolicyResponse, err error) { + if request == nil { + request = NewModifyScalingPolicyRequest() + } + + response = NewModifyScalingPolicyResponse() + err = c.Send(request, response) + return +} + +// ModifyScalingPolicy +// 本接口(ModifyScalingPolicy)用于修改告警触发策略。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" +// INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SCALINGPOLICYNAMEDUPLICATE = "InvalidParameterValue.ScalingPolicyNameDuplicate" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_SCALINGPOLICYNOTFOUND = "ResourceNotFound.ScalingPolicyNotFound" +func (c *Client) ModifyScalingPolicyWithContext(ctx context.Context, request *ModifyScalingPolicyRequest) (response *ModifyScalingPolicyResponse, err error) { + if request == nil { + request = NewModifyScalingPolicyRequest() + } + request.SetContext(ctx) + + response = NewModifyScalingPolicyResponse() + err = c.Send(request, response) + return +} + +func NewModifyScheduledActionRequest() (request *ModifyScheduledActionRequest) { + request = &ModifyScheduledActionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ModifyScheduledAction") + + return +} + +func NewModifyScheduledActionResponse() (response *ModifyScheduledActionResponse) { + response = &ModifyScheduledActionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyScheduledAction +// 本接口(ModifyScheduledAction)用于修改定时任务。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CRONEXPRESSIONILLEGAL = "InvalidParameterValue.CronExpressionIllegal" +// INVALIDPARAMETERVALUE_ENDTIMEBEFORESTARTTIME = "InvalidParameterValue.EndTimeBeforeStartTime" +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONID = "InvalidParameterValue.InvalidScheduledActionId" +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONNAMEINCLUDEILLEGALCHAR = "InvalidParameterValue.InvalidScheduledActionNameIncludeIllegalChar" +// INVALIDPARAMETERVALUE_SCHEDULEDACTIONNAMEDUPLICATE = "InvalidParameterValue.ScheduledActionNameDuplicate" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_STARTTIMEBEFORECURRENTTIME = "InvalidParameterValue.StartTimeBeforeCurrentTime" +// INVALIDPARAMETERVALUE_TIMEFORMAT = "InvalidParameterValue.TimeFormat" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// LIMITEXCEEDED_SCHEDULEDACTIONLIMITEXCEEDED = "LimitExceeded.ScheduledActionLimitExceeded" +// RESOURCENOTFOUND_SCHEDULEDACTIONNOTFOUND = "ResourceNotFound.ScheduledActionNotFound" +func (c *Client) ModifyScheduledAction(request *ModifyScheduledActionRequest) (response *ModifyScheduledActionResponse, err error) { + if request == nil { + request = NewModifyScheduledActionRequest() + } + + response = NewModifyScheduledActionResponse() + err = c.Send(request, response) + return +} + +// ModifyScheduledAction +// 本接口(ModifyScheduledAction)用于修改定时任务。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_CRONEXPRESSIONILLEGAL = "InvalidParameterValue.CronExpressionIllegal" +// INVALIDPARAMETERVALUE_ENDTIMEBEFORESTARTTIME = "InvalidParameterValue.EndTimeBeforeStartTime" +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONID = "InvalidParameterValue.InvalidScheduledActionId" +// INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONNAMEINCLUDEILLEGALCHAR = "InvalidParameterValue.InvalidScheduledActionNameIncludeIllegalChar" +// INVALIDPARAMETERVALUE_SCHEDULEDACTIONNAMEDUPLICATE = "InvalidParameterValue.ScheduledActionNameDuplicate" +// INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" +// INVALIDPARAMETERVALUE_STARTTIMEBEFORECURRENTTIME = "InvalidParameterValue.StartTimeBeforeCurrentTime" +// INVALIDPARAMETERVALUE_TIMEFORMAT = "InvalidParameterValue.TimeFormat" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" +// LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" +// LIMITEXCEEDED_SCHEDULEDACTIONLIMITEXCEEDED = "LimitExceeded.ScheduledActionLimitExceeded" +// RESOURCENOTFOUND_SCHEDULEDACTIONNOTFOUND = "ResourceNotFound.ScheduledActionNotFound" +func (c *Client) ModifyScheduledActionWithContext(ctx context.Context, request *ModifyScheduledActionRequest) (response *ModifyScheduledActionResponse, err error) { + if request == nil { + request = NewModifyScheduledActionRequest() + } + request.SetContext(ctx) + + response = NewModifyScheduledActionResponse() + err = c.Send(request, response) + return +} + +func NewPreviewPaiDomainNameRequest() (request *PreviewPaiDomainNameRequest) { + request = &PreviewPaiDomainNameRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "PreviewPaiDomainName") + + return +} + +func NewPreviewPaiDomainNameResponse() (response *PreviewPaiDomainNameResponse) { + response = &PreviewPaiDomainNameResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// PreviewPaiDomainName +// 本接口(PreviewPaiDomainName)用于预览PAI实例域名。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDPAIDOMAINNAMETYPE = "InvalidParameterValue.InvalidPaiDomainNameType" +func (c *Client) PreviewPaiDomainName(request *PreviewPaiDomainNameRequest) (response *PreviewPaiDomainNameResponse, err error) { + if request == nil { + request = NewPreviewPaiDomainNameRequest() + } + + response = NewPreviewPaiDomainNameResponse() + err = c.Send(request, response) + return +} + +// PreviewPaiDomainName +// 本接口(PreviewPaiDomainName)用于预览PAI实例域名。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDPAIDOMAINNAMETYPE = "InvalidParameterValue.InvalidPaiDomainNameType" +func (c *Client) PreviewPaiDomainNameWithContext(ctx context.Context, request *PreviewPaiDomainNameRequest) (response *PreviewPaiDomainNameResponse, err error) { + if request == nil { + request = NewPreviewPaiDomainNameRequest() + } + request.SetContext(ctx) + + response = NewPreviewPaiDomainNameResponse() + err = c.Send(request, response) + return +} + +func NewRemoveInstancesRequest() (request *RemoveInstancesRequest) { + request = &RemoveInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "RemoveInstances") + + return +} + +func NewRemoveInstancesResponse() (response *RemoveInstancesResponse) { + response = &RemoveInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RemoveInstances +// 本接口(RemoveInstances)用于从伸缩组删除 CVM 实例。根据当前的产品逻辑,如果实例由弹性伸缩自动创建,则实例会被销毁;如果实例系创建后加入伸缩组的,则会从伸缩组中移除,保留实例。 +// +// * 如果删除指定实例后,伸缩组内处于`IN_SERVICE`状态的实例数量小于伸缩组最小值,接口将报错 +// +// * 如果伸缩组处于`DISABLED`状态,删除操作不校验`IN_SERVICE`实例数量和最小值的关系 +// +// * 对于伸缩组配置的 CLB,实例在离开伸缩组时,AS 会进行解挂载动作 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEBELOWMINSIZE = "ResourceInsufficient.InServiceInstanceBelowMinSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_INSTANCEINOPERATION = "ResourceUnavailable.InstanceInOperation" +func (c *Client) RemoveInstances(request *RemoveInstancesRequest) (response *RemoveInstancesResponse, err error) { + if request == nil { + request = NewRemoveInstancesRequest() + } + + response = NewRemoveInstancesResponse() + err = c.Send(request, response) + return +} + +// RemoveInstances +// 本接口(RemoveInstances)用于从伸缩组删除 CVM 实例。根据当前的产品逻辑,如果实例由弹性伸缩自动创建,则实例会被销毁;如果实例系创建后加入伸缩组的,则会从伸缩组中移除,保留实例。 +// +// * 如果删除指定实例后,伸缩组内处于`IN_SERVICE`状态的实例数量小于伸缩组最小值,接口将报错 +// +// * 如果伸缩组处于`DISABLED`状态,删除操作不校验`IN_SERVICE`实例数量和最小值的关系 +// +// * 对于伸缩组配置的 CLB,实例在离开伸缩组时,AS 会进行解挂载动作 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEBELOWMINSIZE = "ResourceInsufficient.InServiceInstanceBelowMinSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_INSTANCEINOPERATION = "ResourceUnavailable.InstanceInOperation" +func (c *Client) RemoveInstancesWithContext(ctx context.Context, request *RemoveInstancesRequest) (response *RemoveInstancesResponse, err error) { + if request == nil { + request = NewRemoveInstancesRequest() + } + request.SetContext(ctx) + + response = NewRemoveInstancesResponse() + err = c.Send(request, response) + return +} + +func NewScaleInInstancesRequest() (request *ScaleInInstancesRequest) { + request = &ScaleInInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ScaleInInstances") + + return +} + +func NewScaleInInstancesResponse() (response *ScaleInInstancesResponse) { + response = &ScaleInInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ScaleInInstances +// 为伸缩组指定数量缩容实例,返回缩容活动的 ActivityId。 +// +// * 伸缩组需要未处于活动中 +// +// * 根据伸缩组的`TerminationPolicies`策略,选择被缩容的实例,可参考[缩容处理](https://cloud.tencent.com/document/product/377/8563) +// +// * 接口只会选择`IN_SERVICE`实例缩容,如果需要缩容其他状态实例,可以使用 [DetachInstances](https://cloud.tencent.com/document/api/377/20436) 或 [RemoveInstances](https://cloud.tencent.com/document/api/377/20431) 接口 +// +// * 接口会减少期望实例数,新的期望实例数需要大于等于最小实例数 +// +// * 缩容如果失败或者部分成功,最后期望实例数只会扣减实际缩容成功的实例数量 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +func (c *Client) ScaleInInstances(request *ScaleInInstancesRequest) (response *ScaleInInstancesResponse, err error) { + if request == nil { + request = NewScaleInInstancesRequest() + } + + response = NewScaleInInstancesResponse() + err = c.Send(request, response) + return +} + +// ScaleInInstances +// 为伸缩组指定数量缩容实例,返回缩容活动的 ActivityId。 +// +// * 伸缩组需要未处于活动中 +// +// * 根据伸缩组的`TerminationPolicies`策略,选择被缩容的实例,可参考[缩容处理](https://cloud.tencent.com/document/product/377/8563) +// +// * 接口只会选择`IN_SERVICE`实例缩容,如果需要缩容其他状态实例,可以使用 [DetachInstances](https://cloud.tencent.com/document/api/377/20436) 或 [RemoveInstances](https://cloud.tencent.com/document/api/377/20431) 接口 +// +// * 接口会减少期望实例数,新的期望实例数需要大于等于最小实例数 +// +// * 缩容如果失败或者部分成功,最后期望实例数只会扣减实际缩容成功的实例数量 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +func (c *Client) ScaleInInstancesWithContext(ctx context.Context, request *ScaleInInstancesRequest) (response *ScaleInInstancesResponse, err error) { + if request == nil { + request = NewScaleInInstancesRequest() + } + request.SetContext(ctx) + + response = NewScaleInInstancesResponse() + err = c.Send(request, response) + return +} + +func NewScaleOutInstancesRequest() (request *ScaleOutInstancesRequest) { + request = &ScaleOutInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "ScaleOutInstances") + + return +} + +func NewScaleOutInstancesResponse() (response *ScaleOutInstancesResponse) { + response = &ScaleOutInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ScaleOutInstances +// 为伸缩组指定数量扩容实例,返回扩容活动的 ActivityId。 +// +// * 伸缩组需要未处于活动中 +// +// * 接口会增加期望实例数,新的期望实例数需要小于等于最大实例数 +// +// * 扩容如果失败或者部分成功,最后期望实例数只会增加实际成功的实例数量 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPABOVEMAXSIZE = "ResourceInsufficient.AutoScalingGroupAboveMaxSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +func (c *Client) ScaleOutInstances(request *ScaleOutInstancesRequest) (response *ScaleOutInstancesResponse, err error) { + if request == nil { + request = NewScaleOutInstancesRequest() + } + + response = NewScaleOutInstancesResponse() + err = c.Send(request, response) + return +} + +// ScaleOutInstances +// 为伸缩组指定数量扩容实例,返回扩容活动的 ActivityId。 +// +// * 伸缩组需要未处于活动中 +// +// * 接口会增加期望实例数,新的期望实例数需要小于等于最大实例数 +// +// * 扩容如果失败或者部分成功,最后期望实例数只会增加实际成功的实例数量 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPABOVEMAXSIZE = "ResourceInsufficient.AutoScalingGroupAboveMaxSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +func (c *Client) ScaleOutInstancesWithContext(ctx context.Context, request *ScaleOutInstancesRequest) (response *ScaleOutInstancesResponse, err error) { + if request == nil { + request = NewScaleOutInstancesRequest() + } + request.SetContext(ctx) + + response = NewScaleOutInstancesResponse() + err = c.Send(request, response) + return +} + +func NewSetInstancesProtectionRequest() (request *SetInstancesProtectionRequest) { + request = &SetInstancesProtectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "SetInstancesProtection") + + return +} + +func NewSetInstancesProtectionResponse() (response *SetInstancesProtectionResponse) { + response = &SetInstancesProtectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// SetInstancesProtection +// 本接口(SetInstancesProtection)用于设置实例保护。 +// +// 实例设置保护之后,当发生不健康替换、报警策略、期望值变更等触发缩容时,将不对此实例缩容操作。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +func (c *Client) SetInstancesProtection(request *SetInstancesProtectionRequest) (response *SetInstancesProtectionResponse, err error) { + if request == nil { + request = NewSetInstancesProtectionRequest() + } + + response = NewSetInstancesProtectionResponse() + err = c.Send(request, response) + return +} + +// SetInstancesProtection +// 本接口(SetInstancesProtection)用于设置实例保护。 +// +// 实例设置保护之后,当发生不健康替换、报警策略、期望值变更等触发缩容时,将不对此实例缩容操作。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +func (c *Client) SetInstancesProtectionWithContext(ctx context.Context, request *SetInstancesProtectionRequest) (response *SetInstancesProtectionResponse, err error) { + if request == nil { + request = NewSetInstancesProtectionRequest() + } + request.SetContext(ctx) + + response = NewSetInstancesProtectionResponse() + err = c.Send(request, response) + return +} + +func NewStartAutoScalingInstancesRequest() (request *StartAutoScalingInstancesRequest) { + request = &StartAutoScalingInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "StartAutoScalingInstances") + + return +} + +func NewStartAutoScalingInstancesResponse() (response *StartAutoScalingInstancesResponse) { + response = &StartAutoScalingInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// StartAutoScalingInstances +// 本接口(StartAutoScalingInstances)用于开启伸缩组内 CVM 实例。 +// +// * 开机成功,实例转为`IN_SERVICE`状态后,会增加期望实例数,期望实例数不可超过设置的最大值 +// +// * 本接口支持批量操作,每次请求开机实例的上限为100 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPABOVEMAXSIZE = "ResourceInsufficient.AutoScalingGroupAboveMaxSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEABOVEMAXSIZE = "ResourceInsufficient.InServiceInstanceAboveMaxSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) StartAutoScalingInstances(request *StartAutoScalingInstancesRequest) (response *StartAutoScalingInstancesResponse, err error) { + if request == nil { + request = NewStartAutoScalingInstancesRequest() + } + + response = NewStartAutoScalingInstancesResponse() + err = c.Send(request, response) + return +} + +// StartAutoScalingInstances +// 本接口(StartAutoScalingInstances)用于开启伸缩组内 CVM 实例。 +// +// * 开机成功,实例转为`IN_SERVICE`状态后,会增加期望实例数,期望实例数不可超过设置的最大值 +// +// * 本接口支持批量操作,每次请求开机实例的上限为100 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPABOVEMAXSIZE = "ResourceInsufficient.AutoScalingGroupAboveMaxSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEABOVEMAXSIZE = "ResourceInsufficient.InServiceInstanceAboveMaxSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) StartAutoScalingInstancesWithContext(ctx context.Context, request *StartAutoScalingInstancesRequest) (response *StartAutoScalingInstancesResponse, err error) { + if request == nil { + request = NewStartAutoScalingInstancesRequest() + } + request.SetContext(ctx) + + response = NewStartAutoScalingInstancesResponse() + err = c.Send(request, response) + return +} + +func NewStopAutoScalingInstancesRequest() (request *StopAutoScalingInstancesRequest) { + request = &StopAutoScalingInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "StopAutoScalingInstances") + + return +} + +func NewStopAutoScalingInstancesResponse() (response *StopAutoScalingInstancesResponse) { + response = &StopAutoScalingInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// StopAutoScalingInstances +// 本接口(StopAutoScalingInstances)用于关闭伸缩组内 CVM 实例。 +// +// * 关机方式采用`SOFT_FIRST`方式,表示在正常关闭失败后进行强制关闭 +// +// * 关闭`IN_SERVICE`状态的实例,会减少期望实例数,期望实例数不可低于设置的最小值 +// +// * 使用`STOP_CHARGING`选项关机,待关机的实例需要满足[关机不收费条件](https://cloud.tencent.com/document/product/213/19918) +// +// * 本接口支持批量操作,每次请求关机实例的上限为100 +// +// 可能返回的错误码: +// CALLCVMERROR = "CallCvmError" +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEBELOWMINSIZE = "ResourceInsufficient.InServiceInstanceBelowMinSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_INSTANCEINOPERATION = "ResourceUnavailable.InstanceInOperation" +// RESOURCEUNAVAILABLE_INSTANCENOTSUPPORTSTOPCHARGING = "ResourceUnavailable.InstanceNotSupportStopCharging" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) StopAutoScalingInstances(request *StopAutoScalingInstancesRequest) (response *StopAutoScalingInstancesResponse, err error) { + if request == nil { + request = NewStopAutoScalingInstancesRequest() + } + + response = NewStopAutoScalingInstancesResponse() + err = c.Send(request, response) + return +} + +// StopAutoScalingInstances +// 本接口(StopAutoScalingInstances)用于关闭伸缩组内 CVM 实例。 +// +// * 关机方式采用`SOFT_FIRST`方式,表示在正常关闭失败后进行强制关闭 +// +// * 关闭`IN_SERVICE`状态的实例,会减少期望实例数,期望实例数不可低于设置的最小值 +// +// * 使用`STOP_CHARGING`选项关机,待关机的实例需要满足[关机不收费条件](https://cloud.tencent.com/document/product/213/19918) +// +// * 本接口支持批量操作,每次请求关机实例的上限为100 +// +// 可能返回的错误码: +// CALLCVMERROR = "CallCvmError" +// FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" +// INTERNALERROR_REQUESTERROR = "InternalError.RequestError" +// INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" +// RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" +// RESOURCEINSUFFICIENT_INSERVICEINSTANCEBELOWMINSIZE = "ResourceInsufficient.InServiceInstanceBelowMinSize" +// RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" +// RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" +// RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" +// RESOURCEUNAVAILABLE_INSTANCEINOPERATION = "ResourceUnavailable.InstanceInOperation" +// RESOURCEUNAVAILABLE_INSTANCENOTSUPPORTSTOPCHARGING = "ResourceUnavailable.InstanceNotSupportStopCharging" +// RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" +func (c *Client) StopAutoScalingInstancesWithContext(ctx context.Context, request *StopAutoScalingInstancesRequest) (response *StopAutoScalingInstancesResponse, err error) { + if request == nil { + request = NewStopAutoScalingInstancesRequest() + } + request.SetContext(ctx) + + response = NewStopAutoScalingInstancesResponse() + err = c.Send(request, response) + return +} + +func NewUpgradeLaunchConfigurationRequest() (request *UpgradeLaunchConfigurationRequest) { + request = &UpgradeLaunchConfigurationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "UpgradeLaunchConfiguration") + + return +} + +func NewUpgradeLaunchConfigurationResponse() (response *UpgradeLaunchConfigurationResponse) { + response = &UpgradeLaunchConfigurationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpgradeLaunchConfiguration +// 本接口(UpgradeLaunchConfiguration)用于升级启动配置。 +// +// +// +// * 本接口用于升级启动配置,采用“完全覆盖”风格,无论之前参数如何,统一按照接口参数设置为新的配置。对于非必填字段,不填写则按照默认值赋值。 +// +// * 升级修改启动配置后,已经使用该启动配置扩容的存量实例不会发生变更,此后使用该启动配置的新增实例会按照新的配置进行扩容。 +// +// 可能返回的错误码: +// CALLCVMERROR = "CallCvmError" +// INTERNALERROR = "InternalError" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INVALIDCOMBINATION = "InvalidParameter.InvalidCombination" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETER_PARAMETERMUSTBEDELETED = "InvalidParameter.ParameterMustBeDeleted" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CVMCONFIGURATIONERROR = "InvalidParameterValue.CvmConfigurationError" +// INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" +// INVALIDPARAMETERVALUE_HOSTNAMEILLEGAL = "InvalidParameterValue.HostNameIllegal" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTED = "InvalidParameterValue.InstanceTypeNotSupported" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCETYPE = "InvalidParameterValue.InvalidInstanceType" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" +// INVALIDPARAMETERVALUE_NOTSTRINGTYPEFLOAT = "InvalidParameterValue.NotStringTypeFloat" +// INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_USERDATAFORMATERROR = "InvalidParameterValue.UserDataFormatError" +// INVALIDPARAMETERVALUE_USERDATASIZEEXCEEDED = "InvalidParameterValue.UserDataSizeExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_LAUNCHCONFIGURATIONIDNOTFOUND = "ResourceNotFound.LaunchConfigurationIdNotFound" +func (c *Client) UpgradeLaunchConfiguration(request *UpgradeLaunchConfigurationRequest) (response *UpgradeLaunchConfigurationResponse, err error) { + if request == nil { + request = NewUpgradeLaunchConfigurationRequest() + } + + response = NewUpgradeLaunchConfigurationResponse() + err = c.Send(request, response) + return +} + +// UpgradeLaunchConfiguration +// 本接口(UpgradeLaunchConfiguration)用于升级启动配置。 +// +// +// +// * 本接口用于升级启动配置,采用“完全覆盖”风格,无论之前参数如何,统一按照接口参数设置为新的配置。对于非必填字段,不填写则按照默认值赋值。 +// +// * 升级修改启动配置后,已经使用该启动配置扩容的存量实例不会发生变更,此后使用该启动配置的新增实例会按照新的配置进行扩容。 +// +// 可能返回的错误码: +// CALLCVMERROR = "CallCvmError" +// INTERNALERROR = "InternalError" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETER_INVALIDCOMBINATION = "InvalidParameter.InvalidCombination" +// INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" +// INVALIDPARAMETER_PARAMETERMUSTBEDELETED = "InvalidParameter.ParameterMustBeDeleted" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CVMCONFIGURATIONERROR = "InvalidParameterValue.CvmConfigurationError" +// INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" +// INVALIDPARAMETERVALUE_HOSTNAMEILLEGAL = "InvalidParameterValue.HostNameIllegal" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTED = "InvalidParameterValue.InstanceTypeNotSupported" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDINSTANCETYPE = "InvalidParameterValue.InvalidInstanceType" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" +// INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" +// INVALIDPARAMETERVALUE_NOTSTRINGTYPEFLOAT = "InvalidParameterValue.NotStringTypeFloat" +// INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_USERDATAFORMATERROR = "InvalidParameterValue.UserDataFormatError" +// INVALIDPARAMETERVALUE_USERDATASIZEEXCEEDED = "InvalidParameterValue.UserDataSizeExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_LAUNCHCONFIGURATIONIDNOTFOUND = "ResourceNotFound.LaunchConfigurationIdNotFound" +func (c *Client) UpgradeLaunchConfigurationWithContext(ctx context.Context, request *UpgradeLaunchConfigurationRequest) (response *UpgradeLaunchConfigurationResponse, err error) { + if request == nil { + request = NewUpgradeLaunchConfigurationRequest() + } + request.SetContext(ctx) + + response = NewUpgradeLaunchConfigurationResponse() + err = c.Send(request, response) + return +} + +func NewUpgradeLifecycleHookRequest() (request *UpgradeLifecycleHookRequest) { + request = &UpgradeLifecycleHookRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("as", APIVersion, "UpgradeLifecycleHook") + + return +} + +func NewUpgradeLifecycleHookResponse() (response *UpgradeLifecycleHookResponse) { + response = &UpgradeLifecycleHookResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpgradeLifecycleHook +// 本接口(UpgradeLifecycleHook)用于升级生命周期挂钩。 +// +// +// +// * 本接口用于升级生命周期挂钩,采用“完全覆盖”风格,无论之前参数如何,统一按照接口参数设置为新的配置。对于非必填字段,不填写则按照默认值赋值。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLCMQERROR = "InternalError.CallCmqError" +// INTERNALERROR_CALLSTSERROR = "InternalError.CallStsError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" +// INVALIDPARAMETERVALUE_LIFECYCLEHOOKNAMEDUPLICATED = "InvalidParameterValue.LifecycleHookNameDuplicated" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_LIFECYCLEHOOKNOTFOUND = "ResourceNotFound.LifecycleHookNotFound" +// RESOURCEUNAVAILABLE_CMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.CmqTopicHasNoSubscriber" +func (c *Client) UpgradeLifecycleHook(request *UpgradeLifecycleHookRequest) (response *UpgradeLifecycleHookResponse, err error) { + if request == nil { + request = NewUpgradeLifecycleHookRequest() + } + + response = NewUpgradeLifecycleHookResponse() + err = c.Send(request, response) + return +} + +// UpgradeLifecycleHook +// 本接口(UpgradeLifecycleHook)用于升级生命周期挂钩。 +// +// +// +// * 本接口用于升级生命周期挂钩,采用“完全覆盖”风格,无论之前参数如何,统一按照接口参数设置为新的配置。对于非必填字段,不填写则按照默认值赋值。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CALLCMQERROR = "InternalError.CallCmqError" +// INTERNALERROR_CALLSTSERROR = "InternalError.CallStsError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" +// INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" +// INVALIDPARAMETERVALUE_LIFECYCLEHOOKNAMEDUPLICATED = "InvalidParameterValue.LifecycleHookNameDuplicated" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_LIFECYCLEHOOKNOTFOUND = "ResourceNotFound.LifecycleHookNotFound" +// RESOURCEUNAVAILABLE_CMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.CmqTopicHasNoSubscriber" +func (c *Client) UpgradeLifecycleHookWithContext(ctx context.Context, request *UpgradeLifecycleHookRequest) (response *UpgradeLifecycleHookResponse, err error) { + if request == nil { + request = NewUpgradeLifecycleHookRequest() + } + request.SetContext(ctx) + + response = NewUpgradeLifecycleHookResponse() + err = c.Send(request, response) + return +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/errors.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/errors.go new file mode 100644 index 0000000000000000000000000000000000000000..602d64be807fa5e787485791be0df0665ff2d0c5 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/errors.go @@ -0,0 +1,444 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 v20180419 + +const ( + // 此产品的特有错误码 + + // 该请求账户未通过资格审计。 + ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" + + // CVM接口调用失败。 + CALLCVMERROR = "CallCvmError" + + // 未生成伸缩活动。 + FAILEDOPERATION_NOACTIVITYTOGENERATE = "FailedOperation.NoActivityToGenerate" + + // 内部错误。 + INTERNALERROR = "InternalError" + + // Cmq 接口调用失败。 + INTERNALERROR_CALLCMQERROR = "InternalError.CallCmqError" + + // 内部接口调用失败。 + INTERNALERROR_CALLERROR = "InternalError.CallError" + + // LB 接口调用失败。 + INTERNALERROR_CALLLBERROR = "InternalError.CallLbError" + + // Monitor接口调用失败。 + INTERNALERROR_CALLMONITORERROR = "InternalError.CallMonitorError" + + // 通知服务接口调用失败。 + INTERNALERROR_CALLNOTIFICATIONERROR = "InternalError.CallNotificationError" + + // STS 接口调用失败。 + INTERNALERROR_CALLSTSERROR = "InternalError.CallStsError" + + // Tag 接口调用失败。 + INTERNALERROR_CALLTAGERROR = "InternalError.CallTagError" + + // Tvpc 接口调用失败。 + INTERNALERROR_CALLTVPCERROR = "InternalError.CallTvpcError" + + // VPC接口调用失败。 + INTERNALERROR_CALLVPCERROR = "InternalError.CallVpcError" + + // 调用其他服务异常。 + INTERNALERROR_CALLEEERROR = "InternalError.CalleeError" + + // 内部请求错误。 + INTERNALERROR_REQUESTERROR = "InternalError.RequestError" + + // 未找到该镜像。 + INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" + + // 无效的启动配置。 + INVALIDLAUNCHCONFIGURATION = "InvalidLaunchConfiguration" + + // 启动配置ID无效。 + INVALIDLAUNCHCONFIGURATIONID = "InvalidLaunchConfigurationId" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + + // 参数冲突,指定的多个参数冲突,不能同时存在。 + INVALIDPARAMETER_CONFLICT = "InvalidParameter.Conflict" + + // 主机名参数不适用于该镜像。 + INVALIDPARAMETER_HOSTNAMEUNAVAILABLE = "InvalidParameter.HostNameUnavailable" + + // 在特定场景下的不合法参数。 + INVALIDPARAMETER_INSCENARIO = "InvalidParameter.InScenario" + + // 无效的参数组合。 + INVALIDPARAMETER_INVALIDCOMBINATION = "InvalidParameter.InvalidCombination" + + // 指定的负载均衡器在当前伸缩组中没有找到。 + INVALIDPARAMETER_LOADBALANCERNOTINAUTOSCALINGGROUP = "InvalidParameter.LoadBalancerNotInAutoScalingGroup" + + // 参数缺失,两种参数之中必须指定其中一个。 + INVALIDPARAMETER_MUSTONEPARAMETER = "InvalidParameter.MustOneParameter" + + // 部分参数存在互斥应该删掉。 + INVALIDPARAMETER_PARAMETERMUSTBEDELETED = "InvalidParameter.ParameterMustBeDeleted" + + // 指定的两个参数冲突,不能同时存在。 + INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" + + // 参数取值错误。 + INVALIDPARAMETERVALUE = "InvalidParameterValue" + + // 指定的基础容量过大,需小于等于最大实例数。 + INVALIDPARAMETERVALUE_BASECAPACITYTOOLARGE = "InvalidParameterValue.BaseCapacityTooLarge" + + // 在应当指定传统型负载均衡器的参数中,错误地指定了一个非传统型的负载均衡器。 + INVALIDPARAMETERVALUE_CLASSICLB = "InvalidParameterValue.ClassicLb" + + // 通知接收端类型冲突。 + INVALIDPARAMETERVALUE_CONFLICTNOTIFICATIONTARGET = "InvalidParameterValue.ConflictNotificationTarget" + + // 定时任务指定的Cron表达式无效。 + INVALIDPARAMETERVALUE_CRONEXPRESSIONILLEGAL = "InvalidParameterValue.CronExpressionIllegal" + + // CVM参数校验异常。 + INVALIDPARAMETERVALUE_CVMCONFIGURATIONERROR = "InvalidParameterValue.CvmConfigurationError" + + // CVM参数校验异常。 + INVALIDPARAMETERVALUE_CVMERROR = "InvalidParameterValue.CvmError" + + // 提供的应用型负载均衡器重复。 + INVALIDPARAMETERVALUE_DUPLICATEDFORWARDLB = "InvalidParameterValue.DuplicatedForwardLb" + + // 指定的子网重复。 + INVALIDPARAMETERVALUE_DUPLICATEDSUBNET = "InvalidParameterValue.DuplicatedSubnet" + + // 定时任务设置的结束时间在开始时间。 + INVALIDPARAMETERVALUE_ENDTIMEBEFORESTARTTIME = "InvalidParameterValue.EndTimeBeforeStartTime" + + // 无效的过滤器。 + INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter" + + // 在应当指定应用型负载均衡器的参数中,错误地指定了一个非应用型的负载均衡器。 + INVALIDPARAMETERVALUE_FORWARDLB = "InvalidParameterValue.ForwardLb" + + // 伸缩组名称重复。 + INVALIDPARAMETERVALUE_GROUPNAMEDUPLICATED = "InvalidParameterValue.GroupNameDuplicated" + + // 主机名不合法。 + INVALIDPARAMETERVALUE_HOSTNAMEILLEGAL = "InvalidParameterValue.HostNameIllegal" + + // 指定的镜像不存在。 + INVALIDPARAMETERVALUE_IMAGENOTFOUND = "InvalidParameterValue.ImageNotFound" + + // 设置的实例名称不合法。 + INVALIDPARAMETERVALUE_INSTANCENAMEILLEGAL = "InvalidParameterValue.InstanceNameIllegal" + + // 实例机型不支持。 + INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTED = "InvalidParameterValue.InstanceTypeNotSupported" + + // 伸缩活动ID无效。 + INVALIDPARAMETERVALUE_INVALIDACTIVITYID = "InvalidParameterValue.InvalidActivityId" + + // 伸缩组ID无效。 + INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGGROUPID = "InvalidParameterValue.InvalidAutoScalingGroupId" + + // 通知ID无效。 + INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGNOTIFICATIONID = "InvalidParameterValue.InvalidAutoScalingNotificationId" + + // 告警策略ID无效。 + INVALIDPARAMETERVALUE_INVALIDAUTOSCALINGPOLICYID = "InvalidParameterValue.InvalidAutoScalingPolicyId" + + // 为CLB指定的地域不合法。 + INVALIDPARAMETERVALUE_INVALIDCLBREGION = "InvalidParameterValue.InvalidClbRegion" + + // 过滤条件无效。 + INVALIDPARAMETERVALUE_INVALIDFILTER = "InvalidParameterValue.InvalidFilter" + + // 镜像ID无效。 + INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" + + // 实例ID无效。 + INVALIDPARAMETERVALUE_INVALIDINSTANCEID = "InvalidParameterValue.InvalidInstanceId" + + // 实例机型无效。 + INVALIDPARAMETERVALUE_INVALIDINSTANCETYPE = "InvalidParameterValue.InvalidInstanceType" + + // 输入的启动配置无效。 + INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATION = "InvalidParameterValue.InvalidLaunchConfiguration" + + // 启动配置ID无效。 + INVALIDPARAMETERVALUE_INVALIDLAUNCHCONFIGURATIONID = "InvalidParameterValue.InvalidLaunchConfigurationId" + + // 生命周期挂钩ID无效。 + INVALIDPARAMETERVALUE_INVALIDLIFECYCLEHOOKID = "InvalidParameterValue.InvalidLifecycleHookId" + + // 指定的通知组 ID 不是数值字符串格式。 + INVALIDPARAMETERVALUE_INVALIDNOTIFICATIONUSERGROUPID = "InvalidParameterValue.InvalidNotificationUserGroupId" + + // 指定的PAI域名类型不支持。 + INVALIDPARAMETERVALUE_INVALIDPAIDOMAINNAMETYPE = "InvalidParameterValue.InvalidPaiDomainNameType" + + // 定时任务ID无效。 + INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONID = "InvalidParameterValue.InvalidScheduledActionId" + + // 定时任务名称包含无效字符。 + INVALIDPARAMETERVALUE_INVALIDSCHEDULEDACTIONNAMEINCLUDEILLEGALCHAR = "InvalidParameterValue.InvalidScheduledActionNameIncludeIllegalChar" + + // 快照ID无效。 + INVALIDPARAMETERVALUE_INVALIDSNAPSHOTID = "InvalidParameterValue.InvalidSnapshotId" + + // 子网ID无效。 + INVALIDPARAMETERVALUE_INVALIDSUBNETID = "InvalidParameterValue.InvalidSubnetId" + + // 启动配置名称重复。 + INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNAMEDUPLICATED = "InvalidParameterValue.LaunchConfigurationNameDuplicated" + + // 找不到指定启动配置。 + INVALIDPARAMETERVALUE_LAUNCHCONFIGURATIONNOTFOUND = "InvalidParameterValue.LaunchConfigurationNotFound" + + // 负载均衡器项目不一致。 + INVALIDPARAMETERVALUE_LBPROJECTINCONSISTENT = "InvalidParameterValue.LbProjectInconsistent" + + // 生命周期挂钩名称重复。 + INVALIDPARAMETERVALUE_LIFECYCLEHOOKNAMEDUPLICATED = "InvalidParameterValue.LifecycleHookNameDuplicated" + + // 取值超出限制。 + INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" + + // 无资源权限。 + INVALIDPARAMETERVALUE_NORESOURCEPERMISSION = "InvalidParameterValue.NoResourcePermission" + + // 提供的值不是浮点字符串格式。 + INVALIDPARAMETERVALUE_NOTSTRINGTYPEFLOAT = "InvalidParameterValue.NotStringTypeFloat" + + // 账号仅支持VPC网络。 + INVALIDPARAMETERVALUE_ONLYVPC = "InvalidParameterValue.OnlyVpc" + + // 项目ID不存在。 + INVALIDPARAMETERVALUE_PROJECTIDNOTFOUND = "InvalidParameterValue.ProjectIdNotFound" + + // 取值超出指定范围。 + INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" + + // 告警策略名称重复。 + INVALIDPARAMETERVALUE_SCALINGPOLICYNAMEDUPLICATE = "InvalidParameterValue.ScalingPolicyNameDuplicate" + + // 定时任务名称重复。 + INVALIDPARAMETERVALUE_SCHEDULEDACTIONNAMEDUPLICATE = "InvalidParameterValue.ScheduledActionNameDuplicate" + + // 伸缩组最大数量、最小数量、期望实例数取值不合法。 + INVALIDPARAMETERVALUE_SIZE = "InvalidParameterValue.Size" + + // 定时任务设置的开始时间在当前时间之前。 + INVALIDPARAMETERVALUE_STARTTIMEBEFORECURRENTTIME = "InvalidParameterValue.StartTimeBeforeCurrentTime" + + // 子网信息不合法。 + INVALIDPARAMETERVALUE_SUBNETIDS = "InvalidParameterValue.SubnetIds" + + // 负载均衡器四层监听器的后端端口重复。 + INVALIDPARAMETERVALUE_TARGETPORTDUPLICATED = "InvalidParameterValue.TargetPortDuplicated" + + // 指定的阈值不在有效范围。 + INVALIDPARAMETERVALUE_THRESHOLDOUTOFRANGE = "InvalidParameterValue.ThresholdOutOfRange" + + // 时间格式错误。 + INVALIDPARAMETERVALUE_TIMEFORMAT = "InvalidParameterValue.TimeFormat" + + // 取值过多。 + INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" + + // 输入参数值的长度小于最小值。 + INVALIDPARAMETERVALUE_TOOSHORT = "InvalidParameterValue.TooShort" + + // UserData格式错误。 + INVALIDPARAMETERVALUE_USERDATAFORMATERROR = "InvalidParameterValue.UserDataFormatError" + + // UserData长度过长。 + INVALIDPARAMETERVALUE_USERDATASIZEEXCEEDED = "InvalidParameterValue.UserDataSizeExceeded" + + // 用户组不存在。 + INVALIDPARAMETERVALUE_USERGROUPIDNOTFOUND = "InvalidParameterValue.UserGroupIdNotFound" + + // 指定的可用区与地域不匹配。 + INVALIDPARAMETERVALUE_ZONEMISMATCHREGION = "InvalidParameterValue.ZoneMismatchRegion" + + // 账户不支持该操作。 + INVALIDPERMISSION = "InvalidPermission" + + // 超过配额限制。 + LIMITEXCEEDED = "LimitExceeded" + + // 绑定指定的负载均衡器后,伸缩组绑定的负载均衡器总数超过了最大值。 + LIMITEXCEEDED_AFTERATTACHLBLIMITEXCEEDED = "LimitExceeded.AfterAttachLbLimitExceeded" + + // 伸缩组数量超过限制。 + LIMITEXCEEDED_AUTOSCALINGGROUPLIMITEXCEEDED = "LimitExceeded.AutoScalingGroupLimitExceeded" + + // 期望实例数超出限制。 + LIMITEXCEEDED_DESIREDCAPACITYLIMITEXCEEDED = "LimitExceeded.DesiredCapacityLimitExceeded" + + // 特定过滤器的值过多。 + LIMITEXCEEDED_FILTERVALUESTOOLONG = "LimitExceeded.FilterValuesTooLong" + + // 启动配置配额不足。 + LIMITEXCEEDED_LAUNCHCONFIGURATIONQUOTANOTENOUGH = "LimitExceeded.LaunchConfigurationQuotaNotEnough" + + // 最大实例数大于限制。 + LIMITEXCEEDED_MAXSIZELIMITEXCEEDED = "LimitExceeded.MaxSizeLimitExceeded" + + // 最小实例数低于限制。 + LIMITEXCEEDED_MINSIZELIMITEXCEEDED = "LimitExceeded.MinSizeLimitExceeded" + + // 当前剩余配额不足。 + LIMITEXCEEDED_QUOTANOTENOUGH = "LimitExceeded.QuotaNotEnough" + + // 定时任务数量超过限制。 + LIMITEXCEEDED_SCHEDULEDACTIONLIMITEXCEEDED = "LimitExceeded.ScheduledActionLimitExceeded" + + // 缺少参数错误。 + MISSINGPARAMETER = "MissingParameter" + + // 在特定场景下缺少参数。 + MISSINGPARAMETER_INSCENARIO = "MissingParameter.InScenario" + + // 竞价计费类型缺少对应的 InstanceMarketOptions 参数。 + MISSINGPARAMETER_INSTANCEMARKETOPTIONS = "MissingParameter.InstanceMarketOptions" + + // 伸缩组正在执行伸缩活动。 + RESOURCEINUSE_ACTIVITYINPROGRESS = "ResourceInUse.ActivityInProgress" + + // 伸缩组处于禁用状态。 + RESOURCEINUSE_AUTOSCALINGGROUPNOTACTIVE = "ResourceInUse.AutoScalingGroupNotActive" + + // 伸缩组内尚有正常实例。 + RESOURCEINUSE_INSTANCEINGROUP = "ResourceInUse.InstanceInGroup" + + // 指定的启动配置仍在伸缩组中使用。 + RESOURCEINUSE_LAUNCHCONFIGURATIONIDINUSE = "ResourceInUse.LaunchConfigurationIdInUse" + + // 超过伸缩组最大实例数。 + RESOURCEINSUFFICIENT_AUTOSCALINGGROUPABOVEMAXSIZE = "ResourceInsufficient.AutoScalingGroupAboveMaxSize" + + // 少于伸缩组最小实例数。 + RESOURCEINSUFFICIENT_AUTOSCALINGGROUPBELOWMINSIZE = "ResourceInsufficient.AutoScalingGroupBelowMinSize" + + // 伸缩组内实例数超过最大实例数。 + RESOURCEINSUFFICIENT_INSERVICEINSTANCEABOVEMAXSIZE = "ResourceInsufficient.InServiceInstanceAboveMaxSize" + + // 伸缩组内实例数低于最小实例数。 + RESOURCEINSUFFICIENT_INSERVICEINSTANCEBELOWMINSIZE = "ResourceInsufficient.InServiceInstanceBelowMinSize" + + // 伸缩组不存在。 + RESOURCENOTFOUND_AUTOSCALINGGROUPNOTFOUND = "ResourceNotFound.AutoScalingGroupNotFound" + + // 通知不存在。 + RESOURCENOTFOUND_AUTOSCALINGNOTIFICATIONNOTFOUND = "ResourceNotFound.AutoScalingNotificationNotFound" + + // 指定的 CMQ queue 不存在。 + RESOURCENOTFOUND_CMQQUEUENOTFOUND = "ResourceNotFound.CmqQueueNotFound" + + // 指定的实例不存在。 + RESOURCENOTFOUND_INSTANCESNOTFOUND = "ResourceNotFound.InstancesNotFound" + + // 目标实例不在伸缩组内。 + RESOURCENOTFOUND_INSTANCESNOTINAUTOSCALINGGROUP = "ResourceNotFound.InstancesNotInAutoScalingGroup" + + // 指定的启动配置不存在。 + RESOURCENOTFOUND_LAUNCHCONFIGURATIONIDNOTFOUND = "ResourceNotFound.LaunchConfigurationIdNotFound" + + // 生命周期挂钩对应实例不存在。 + RESOURCENOTFOUND_LIFECYCLEHOOKINSTANCENOTFOUND = "ResourceNotFound.LifecycleHookInstanceNotFound" + + // 无法找到指定生命周期挂钩。 + RESOURCENOTFOUND_LIFECYCLEHOOKNOTFOUND = "ResourceNotFound.LifecycleHookNotFound" + + // 指定的Listener不存在。 + RESOURCENOTFOUND_LISTENERNOTFOUND = "ResourceNotFound.ListenerNotFound" + + // 找不到指定负载均衡器。 + RESOURCENOTFOUND_LOADBALANCERNOTFOUND = "ResourceNotFound.LoadBalancerNotFound" + + // 指定的Location不存在。 + RESOURCENOTFOUND_LOCATIONNOTFOUND = "ResourceNotFound.LocationNotFound" + + // 告警策略不存在。 + RESOURCENOTFOUND_SCALINGPOLICYNOTFOUND = "ResourceNotFound.ScalingPolicyNotFound" + + // 指定的定时任务不存在。 + RESOURCENOTFOUND_SCHEDULEDACTIONNOTFOUND = "ResourceNotFound.ScheduledActionNotFound" + + // TDMQ-CMQ 队列不存在。 + RESOURCENOTFOUND_TDMQCMQQUEUENOTFOUND = "ResourceNotFound.TDMQCMQQueueNotFound" + + // TDMQ-CMQ 主题不存在。 + RESOURCENOTFOUND_TDMQCMQTOPICNOTFOUND = "ResourceNotFound.TDMQCMQTopicNotFound" + + // 伸缩组状态异常。 + RESOURCEUNAVAILABLE_AUTOSCALINGGROUPABNORMALSTATUS = "ResourceUnavailable.AutoScalingGroupAbnormalStatus" + + // 伸缩组被停用。 + RESOURCEUNAVAILABLE_AUTOSCALINGGROUPDISABLED = "ResourceUnavailable.AutoScalingGroupDisabled" + + // 伸缩组正在活动中。 + RESOURCEUNAVAILABLE_AUTOSCALINGGROUPINACTIVITY = "ResourceUnavailable.AutoScalingGroupInActivity" + + // 指定的 CMQ Topic 无订阅者。 + RESOURCEUNAVAILABLE_CMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.CmqTopicHasNoSubscriber" + + // 实例和伸缩组Vpc不一致。 + RESOURCEUNAVAILABLE_CVMVPCINCONSISTENT = "ResourceUnavailable.CvmVpcInconsistent" + + // 指定的实例正在活动中。 + RESOURCEUNAVAILABLE_INSTANCEINOPERATION = "ResourceUnavailable.InstanceInOperation" + + // 实例不支持关机不收费。 + RESOURCEUNAVAILABLE_INSTANCENOTSUPPORTSTOPCHARGING = "ResourceUnavailable.InstanceNotSupportStopCharging" + + // 实例已存在于伸缩组中。 + RESOURCEUNAVAILABLE_INSTANCESALREADYINAUTOSCALINGGROUP = "ResourceUnavailable.InstancesAlreadyInAutoScalingGroup" + + // 启动配置状态异常。 + RESOURCEUNAVAILABLE_LAUNCHCONFIGURATIONSTATUSABNORMAL = "ResourceUnavailable.LaunchConfigurationStatusAbnormal" + + // CLB实例的后端地域与AS服务所在地域不一致。 + RESOURCEUNAVAILABLE_LBBACKENDREGIONINCONSISTENT = "ResourceUnavailable.LbBackendRegionInconsistent" + + // 负载均衡器项目不一致。 + RESOURCEUNAVAILABLE_LBPROJECTINCONSISTENT = "ResourceUnavailable.LbProjectInconsistent" + + // 负载均衡器VPC与伸缩组不一致。 + RESOURCEUNAVAILABLE_LBVPCINCONSISTENT = "ResourceUnavailable.LbVpcInconsistent" + + // 生命周期动作已经被设置。 + RESOURCEUNAVAILABLE_LIFECYCLEACTIONRESULTHASSET = "ResourceUnavailable.LifecycleActionResultHasSet" + + // LB 在指定的伸缩组内处于活动中。 + RESOURCEUNAVAILABLE_LOADBALANCERINOPERATION = "ResourceUnavailable.LoadBalancerInOperation" + + // 项目不一致。 + RESOURCEUNAVAILABLE_PROJECTINCONSISTENT = "ResourceUnavailable.ProjectInconsistent" + + // 关机实例不允许添加到伸缩组。 + RESOURCEUNAVAILABLE_STOPPEDINSTANCENOTALLOWATTACH = "ResourceUnavailable.StoppedInstanceNotAllowAttach" + + // TDMQ-CMQ 主题无订阅者。 + RESOURCEUNAVAILABLE_TDMQCMQTOPICHASNOSUBSCRIBER = "ResourceUnavailable.TDMQCMQTopicHasNoSubscriber" + + // 指定的可用区不可用。 + RESOURCEUNAVAILABLE_ZONEUNAVAILABLE = "ResourceUnavailable.ZoneUnavailable" +) diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/models.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/models.go new file mode 100644 index 0000000000000000000000000000000000000000..b0cccbd2f9e383930ce1f0e8a5eff49bbc6f4a4d --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/models.go @@ -0,0 +1,4312 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 v20180419 + +import ( + "encoding/json" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +type Activity struct { + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 伸缩活动ID。 + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 伸缩活动类型。取值如下:<br> + // <li>SCALE_OUT:扩容活动<li>SCALE_IN:缩容活动<li>ATTACH_INSTANCES:添加实例<li>REMOVE_INSTANCES:销毁实例<li>DETACH_INSTANCES:移出实例<li>TERMINATE_INSTANCES_UNEXPECTEDLY:实例在CVM控制台被销毁<li>REPLACE_UNHEALTHY_INSTANCE:替换不健康实例 + // <li>START_INSTANCES:开启实例 + // <li>STOP_INSTANCES:关闭实例 + ActivityType *string `json:"ActivityType,omitempty" name:"ActivityType"` + + // 伸缩活动状态。取值如下:<br> + // <li>INIT:初始化中 + // <li>RUNNING:运行中 + // <li>SUCCESSFUL:活动成功 + // <li>PARTIALLY_SUCCESSFUL:活动部分成功 + // <li>FAILED:活动失败 + // <li>CANCELLED:活动取消 + StatusCode *string `json:"StatusCode,omitempty" name:"StatusCode"` + + // 伸缩活动状态描述。 + StatusMessage *string `json:"StatusMessage,omitempty" name:"StatusMessage"` + + // 伸缩活动起因。 + Cause *string `json:"Cause,omitempty" name:"Cause"` + + // 伸缩活动描述。 + Description *string `json:"Description,omitempty" name:"Description"` + + // 伸缩活动开始时间。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 伸缩活动结束时间。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // 伸缩活动创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 伸缩活动相关实例信息集合。 + ActivityRelatedInstanceSet []*ActivtyRelatedInstance `json:"ActivityRelatedInstanceSet,omitempty" name:"ActivityRelatedInstanceSet"` + + // 伸缩活动状态简要描述。 + StatusMessageSimplified *string `json:"StatusMessageSimplified,omitempty" name:"StatusMessageSimplified"` + + // 伸缩活动中生命周期挂钩的执行结果。 + LifecycleActionResultSet []*LifecycleActionResultInfo `json:"LifecycleActionResultSet,omitempty" name:"LifecycleActionResultSet"` + + // 伸缩活动状态详细描述。 + DetailedStatusMessageSet []*DetailedStatusMessage `json:"DetailedStatusMessageSet,omitempty" name:"DetailedStatusMessageSet"` +} + +type ActivtyRelatedInstance struct { + + // 实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例在伸缩活动中的状态。取值如下: + // <li>INIT:初始化中 + // <li>RUNNING:实例操作中 + // <li>SUCCESSFUL:活动成功 + // <li>FAILED:活动失败 + InstanceStatus *string `json:"InstanceStatus,omitempty" name:"InstanceStatus"` +} + +type Advice struct { + + // 问题描述。 + Problem *string `json:"Problem,omitempty" name:"Problem"` + + // 问题详情。 + Detail *string `json:"Detail,omitempty" name:"Detail"` + + // 建议解决方案。 + Solution *string `json:"Solution,omitempty" name:"Solution"` +} + +type AttachInstancesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // CVM实例ID列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *AttachInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AttachInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AttachInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AttachInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AttachLoadBalancersRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 传统型负载均衡器ID列表,每个伸缩组绑定传统型负载均衡器数量上限为20,LoadBalancerIds 和 ForwardLoadBalancers 二者同时最多只能指定一个 + LoadBalancerIds []*string `json:"LoadBalancerIds,omitempty" name:"LoadBalancerIds"` + + // 应用型负载均衡器列表,每个伸缩组绑定应用型负载均衡器数量上限为50,LoadBalancerIds 和 ForwardLoadBalancers 二者同时最多只能指定一个 + ForwardLoadBalancers []*ForwardLoadBalancer `json:"ForwardLoadBalancers,omitempty" name:"ForwardLoadBalancers"` +} + +func (r *AttachLoadBalancersRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachLoadBalancersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "LoadBalancerIds") + delete(f, "ForwardLoadBalancers") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AttachLoadBalancersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AttachLoadBalancersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AttachLoadBalancersResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachLoadBalancersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AutoScalingAdvice struct { + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 伸缩组配置建议集合。 + Advices []*Advice `json:"Advices,omitempty" name:"Advices"` +} + +type AutoScalingGroup struct { + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 伸缩组名称 + AutoScalingGroupName *string `json:"AutoScalingGroupName,omitempty" name:"AutoScalingGroupName"` + + // 伸缩组当前状态。取值范围:<br><li>NORMAL:正常<br><li>CVM_ABNORMAL:启动配置异常<br><li>LB_ABNORMAL:负载均衡器异常<br><li>VPC_ABNORMAL:VPC网络异常<br><li>INSUFFICIENT_BALANCE:余额不足<br><li>LB_BACKEND_REGION_NOT_MATCH:CLB实例后端地域与AS服务所在地域不匹配<br> + AutoScalingGroupStatus *string `json:"AutoScalingGroupStatus,omitempty" name:"AutoScalingGroupStatus"` + + // 创建时间,采用UTC标准计时 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 默认冷却时间,单位秒 + DefaultCooldown *int64 `json:"DefaultCooldown,omitempty" name:"DefaultCooldown"` + + // 期望实例数 + DesiredCapacity *int64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` + + // 启用状态,取值包括`ENABLED`和`DISABLED` + EnabledStatus *string `json:"EnabledStatus,omitempty" name:"EnabledStatus"` + + // 应用型负载均衡器列表 + ForwardLoadBalancerSet []*ForwardLoadBalancer `json:"ForwardLoadBalancerSet,omitempty" name:"ForwardLoadBalancerSet"` + + // 实例数量 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 状态为`IN_SERVICE`实例的数量 + InServiceInstanceCount *int64 `json:"InServiceInstanceCount,omitempty" name:"InServiceInstanceCount"` + + // 启动配置ID + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 启动配置名称 + LaunchConfigurationName *string `json:"LaunchConfigurationName,omitempty" name:"LaunchConfigurationName"` + + // 传统型负载均衡器ID列表 + LoadBalancerIdSet []*string `json:"LoadBalancerIdSet,omitempty" name:"LoadBalancerIdSet"` + + // 最大实例数 + MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` + + // 最小实例数 + MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` + + // 项目ID + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 子网ID列表 + SubnetIdSet []*string `json:"SubnetIdSet,omitempty" name:"SubnetIdSet"` + + // 销毁策略 + TerminationPolicySet []*string `json:"TerminationPolicySet,omitempty" name:"TerminationPolicySet"` + + // VPC标识 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 可用区列表 + ZoneSet []*string `json:"ZoneSet,omitempty" name:"ZoneSet"` + + // 重试策略 + RetryPolicy *string `json:"RetryPolicy,omitempty" name:"RetryPolicy"` + + // 伸缩组是否处于伸缩活动中,`IN_ACTIVITY`表示处于伸缩活动中,`NOT_IN_ACTIVITY`表示不处于伸缩活动中。 + InActivityStatus *string `json:"InActivityStatus,omitempty" name:"InActivityStatus"` + + // 伸缩组标签列表 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 服务设置 + ServiceSettings *ServiceSettings `json:"ServiceSettings,omitempty" name:"ServiceSettings"` + + // 实例具有IPv6地址数量的配置 + Ipv6AddressCount *int64 `json:"Ipv6AddressCount,omitempty" name:"Ipv6AddressCount"` + + // 多可用区/子网策略。 + // <br><li> PRIORITY,按照可用区/子网列表的顺序,作为优先级来尝试创建实例,如果优先级最高的可用区/子网可以创建成功,则总在该可用区/子网创建。 + // <br><li> EQUALITY:每次选择当前实例数最少的可用区/子网进行扩容,使得每个可用区/子网都有机会发生扩容,多次扩容出的实例会打散到多个可用区/子网。 + MultiZoneSubnetPolicy *string `json:"MultiZoneSubnetPolicy,omitempty" name:"MultiZoneSubnetPolicy"` + + // 伸缩组实例健康检查类型,取值如下:<br><li>CVM:根据实例网络状态判断实例是否处于不健康状态,不健康的网络状态即发生实例 PING 不可达事件,详细判断标准可参考[实例健康检查](https://cloud.tencent.com/document/product/377/8553)<br><li>CLB:根据 CLB 的健康检查状态判断实例是否处于不健康状态,CLB健康检查原理可参考[健康检查](https://cloud.tencent.com/document/product/214/6097) + HealthCheckType *string `json:"HealthCheckType,omitempty" name:"HealthCheckType"` + + // CLB健康检查宽限期 + LoadBalancerHealthCheckGracePeriod *uint64 `json:"LoadBalancerHealthCheckGracePeriod,omitempty" name:"LoadBalancerHealthCheckGracePeriod"` + + // 实例分配策略,取值包括 LAUNCH_CONFIGURATION 和 SPOT_MIXED。 + // <br><li> LAUNCH_CONFIGURATION,代表传统的按照启动配置模式。 + // <br><li> SPOT_MIXED,代表竞价混合模式。目前仅支持启动配置为按量计费模式时使用混合模式,混合模式下,伸缩组将根据设定扩容按量或竞价机型。使用混合模式时,关联的启动配置的计费类型不可被修改。 + InstanceAllocationPolicy *string `json:"InstanceAllocationPolicy,omitempty" name:"InstanceAllocationPolicy"` + + // 竞价混合模式下,各计费类型实例的分配策略。 + // 仅当 InstanceAllocationPolicy 取 SPOT_MIXED 时才会返回有效值。 + SpotMixedAllocationPolicy *SpotMixedAllocationPolicy `json:"SpotMixedAllocationPolicy,omitempty" name:"SpotMixedAllocationPolicy"` + + // 容量重平衡功能,仅对伸缩组内的竞价实例有效。取值范围: + // <br><li> TRUE,开启该功能,当伸缩组内的竞价实例即将被竞价实例服务自动回收前,AS 主动发起竞价实例销毁流程,如果有配置过缩容 hook,则销毁前 hook 会生效。销毁流程启动后,AS 会异步开启一个扩容活动,用于补齐期望实例数。 + // <br><li> FALSE,不开启该功能,则 AS 等待竞价实例被销毁后才会去扩容补齐伸缩组期望实例数。 + CapacityRebalance *bool `json:"CapacityRebalance,omitempty" name:"CapacityRebalance"` +} + +type AutoScalingGroupAbstract struct { + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 伸缩组名称。 + AutoScalingGroupName *string `json:"AutoScalingGroupName,omitempty" name:"AutoScalingGroupName"` +} + +type AutoScalingNotification struct { + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 用户组ID列表。 + NotificationUserGroupIds []*string `json:"NotificationUserGroupIds,omitempty" name:"NotificationUserGroupIds"` + + // 通知事件列表。 + NotificationTypes []*string `json:"NotificationTypes,omitempty" name:"NotificationTypes"` + + // 事件通知ID。 + AutoScalingNotificationId *string `json:"AutoScalingNotificationId,omitempty" name:"AutoScalingNotificationId"` + + // 通知接收端类型。 + TargetType *string `json:"TargetType,omitempty" name:"TargetType"` + + // CMQ 队列名。 + QueueName *string `json:"QueueName,omitempty" name:"QueueName"` + + // CMQ 主题名。 + TopicName *string `json:"TopicName,omitempty" name:"TopicName"` +} + +type ClearLaunchConfigurationAttributesRequest struct { + *tchttp.BaseRequest + + // 启动配置ID。 + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 是否清空数据盘信息,非必填,默认为 false。 + // 填 true 代表清空“数据盘”信息,清空后基于此新创建的云主机将不含有任何数据盘。 + ClearDataDisks *bool `json:"ClearDataDisks,omitempty" name:"ClearDataDisks"` + + // 是否清空云服务器主机名相关设置信息,非必填,默认为 false。 + // 填 true 代表清空主机名设置信息,清空后基于此新创建的云主机将不设置主机名。 + ClearHostNameSettings *bool `json:"ClearHostNameSettings,omitempty" name:"ClearHostNameSettings"` + + // 是否清空云服务器实例名相关设置信息,非必填,默认为 false。 + // 填 true 代表清空主机名设置信息,清空后基于此新创建的云主机将按照“as-{{ 伸缩组AutoScalingGroupName }}”进行设置。 + ClearInstanceNameSettings *bool `json:"ClearInstanceNameSettings,omitempty" name:"ClearInstanceNameSettings"` +} + +func (r *ClearLaunchConfigurationAttributesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ClearLaunchConfigurationAttributesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchConfigurationId") + delete(f, "ClearDataDisks") + delete(f, "ClearHostNameSettings") + delete(f, "ClearInstanceNameSettings") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ClearLaunchConfigurationAttributesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ClearLaunchConfigurationAttributesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ClearLaunchConfigurationAttributesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ClearLaunchConfigurationAttributesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CompleteLifecycleActionRequest struct { + *tchttp.BaseRequest + + // 生命周期挂钩ID + LifecycleHookId *string `json:"LifecycleHookId,omitempty" name:"LifecycleHookId"` + + // 生命周期动作的结果,取值范围为“CONTINUE”或“ABANDON” + LifecycleActionResult *string `json:"LifecycleActionResult,omitempty" name:"LifecycleActionResult"` + + // 实例ID,“InstanceId”和“LifecycleActionToken”必须填充其中一个 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // “InstanceId”和“LifecycleActionToken”必须填充其中一个 + LifecycleActionToken *string `json:"LifecycleActionToken,omitempty" name:"LifecycleActionToken"` +} + +func (r *CompleteLifecycleActionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CompleteLifecycleActionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LifecycleHookId") + delete(f, "LifecycleActionResult") + delete(f, "InstanceId") + delete(f, "LifecycleActionToken") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CompleteLifecycleActionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CompleteLifecycleActionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CompleteLifecycleActionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CompleteLifecycleActionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateAutoScalingGroupFromInstanceRequest struct { + *tchttp.BaseRequest + + // 伸缩组名称,在您账号中必须唯一。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超55个字节。 + AutoScalingGroupName *string `json:"AutoScalingGroupName,omitempty" name:"AutoScalingGroupName"` + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 最小实例数,取值范围为0-2000。 + MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` + + // 最大实例数,取值范围为0-2000。 + MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` + + // 期望实例数,大小介于最小实例数和最大实例数之间。 + DesiredCapacity *int64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` + + // 是否继承实例标签,默认值为False + InheritInstanceTag *bool `json:"InheritInstanceTag,omitempty" name:"InheritInstanceTag"` +} + +func (r *CreateAutoScalingGroupFromInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAutoScalingGroupFromInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupName") + delete(f, "InstanceId") + delete(f, "MinSize") + delete(f, "MaxSize") + delete(f, "DesiredCapacity") + delete(f, "InheritInstanceTag") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAutoScalingGroupFromInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateAutoScalingGroupFromInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateAutoScalingGroupFromInstanceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAutoScalingGroupFromInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateAutoScalingGroupRequest struct { + *tchttp.BaseRequest + + // 伸缩组名称,在您账号中必须唯一。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超55个字节。 + AutoScalingGroupName *string `json:"AutoScalingGroupName,omitempty" name:"AutoScalingGroupName"` + + // 启动配置ID + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 最大实例数,取值范围为0-2000。 + MaxSize *uint64 `json:"MaxSize,omitempty" name:"MaxSize"` + + // 最小实例数,取值范围为0-2000。 + MinSize *uint64 `json:"MinSize,omitempty" name:"MinSize"` + + // VPC ID,基础网络则填空字符串 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 默认冷却时间,单位秒,默认值为300 + DefaultCooldown *uint64 `json:"DefaultCooldown,omitempty" name:"DefaultCooldown"` + + // 期望实例数,大小介于最小实例数和最大实例数之间 + DesiredCapacity *uint64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` + + // 传统负载均衡器ID列表,目前长度上限为20,LoadBalancerIds 和 ForwardLoadBalancers 二者同时最多只能指定一个 + LoadBalancerIds []*string `json:"LoadBalancerIds,omitempty" name:"LoadBalancerIds"` + + // 伸缩组内实例所属项目ID。不填为默认项目。 + ProjectId *uint64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 应用型负载均衡器列表,目前长度上限为50,LoadBalancerIds 和 ForwardLoadBalancers 二者同时最多只能指定一个 + ForwardLoadBalancers []*ForwardLoadBalancer `json:"ForwardLoadBalancers,omitempty" name:"ForwardLoadBalancers"` + + // 子网ID列表,VPC场景下必须指定子网。多个子网以填写顺序为优先级,依次进行尝试,直至可以成功创建实例。 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 销毁策略,目前长度上限为1。取值包括 OLDEST_INSTANCE 和 NEWEST_INSTANCE,默认取值为 OLDEST_INSTANCE。 + // <br><li> OLDEST_INSTANCE 优先销毁伸缩组中最旧的实例。 + // <br><li> NEWEST_INSTANCE,优先销毁伸缩组中最新的实例。 + TerminationPolicies []*string `json:"TerminationPolicies,omitempty" name:"TerminationPolicies"` + + // 可用区列表,基础网络场景下必须指定可用区。多个可用区以填写顺序为优先级,依次进行尝试,直至可以成功创建实例。 + Zones []*string `json:"Zones,omitempty" name:"Zones"` + + // 重试策略,取值包括 IMMEDIATE_RETRY、 INCREMENTAL_INTERVALS、NO_RETRY,默认取值为 IMMEDIATE_RETRY。 + // <br><li> IMMEDIATE_RETRY,立即重试,在较短时间内快速重试,连续失败超过一定次数(5次)后不再重试。 + // <br><li> INCREMENTAL_INTERVALS,间隔递增重试,随着连续失败次数的增加,重试间隔逐渐增大,重试间隔从秒级到1天不等。 + // <br><li> NO_RETRY,不进行重试,直到再次收到用户调用或者告警信息后才会重试。 + RetryPolicy *string `json:"RetryPolicy,omitempty" name:"RetryPolicy"` + + // 可用区校验策略,取值包括 ALL 和 ANY,默认取值为ANY。 + // <br><li> ALL,所有可用区(Zone)或子网(SubnetId)都可用则通过校验,否则校验报错。 + // <br><li> ANY,存在任何一个可用区(Zone)或子网(SubnetId)可用则通过校验,否则校验报错。 + // + // 可用区或子网不可用的常见原因包括该可用区CVM实例类型售罄、该可用区CBS云盘售罄、该可用区配额不足、该子网IP不足等。 + // 如果 Zones/SubnetIds 中可用区或者子网不存在,则无论 ZonesCheckPolicy 采用何种取值,都会校验报错。 + ZonesCheckPolicy *string `json:"ZonesCheckPolicy,omitempty" name:"ZonesCheckPolicy"` + + // 标签描述列表。通过指定该参数可以支持绑定标签到伸缩组。同时绑定标签到相应的资源实例。每个伸缩组最多支持30个标签。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 服务设置,包括云监控不健康替换等服务设置。 + ServiceSettings *ServiceSettings `json:"ServiceSettings,omitempty" name:"ServiceSettings"` + + // 实例具有IPv6地址数量的配置,取值包括 0、1,默认值为0。 + Ipv6AddressCount *int64 `json:"Ipv6AddressCount,omitempty" name:"Ipv6AddressCount"` + + // 多可用区/子网策略,取值包括 PRIORITY 和 EQUALITY,默认为 PRIORITY。 + // <br><li> PRIORITY,按照可用区/子网列表的顺序,作为优先级来尝试创建实例,如果优先级最高的可用区/子网可以创建成功,则总在该可用区/子网创建。 + // <br><li> EQUALITY:扩容出的实例会打散到多个可用区/子网,保证扩容后的各个可用区/子网实例数相对均衡。 + // + // 与本策略相关的注意点: + // <br><li> 当伸缩组为基础网络时,本策略适用于多可用区;当伸缩组为VPC网络时,本策略适用于多子网,此时不再考虑可用区因素,例如四个子网ABCD,其中ABC处于可用区1,D处于可用区2,此时考虑子网ABCD进行排序,而不考虑可用区1、2。 + // <br><li> 本策略适用于多可用区/子网,不适用于启动配置的多机型。多机型按照优先级策略进行选择。 + // <br><li> 按照 PRIORITY 策略创建实例时,先保证多机型的策略,后保证多可用区/子网的策略。例如多机型A、B,多子网1、2、3,会按照A1、A2、A3、B1、B2、B3 进行尝试,如果A1售罄,会尝试A2(而非B1)。 + MultiZoneSubnetPolicy *string `json:"MultiZoneSubnetPolicy,omitempty" name:"MultiZoneSubnetPolicy"` + + // 伸缩组实例健康检查类型,取值如下:<br><li>CVM:根据实例网络状态判断实例是否处于不健康状态,不健康的网络状态即发生实例 PING 不可达事件,详细判断标准可参考[实例健康检查](https://cloud.tencent.com/document/product/377/8553)<br><li>CLB:根据 CLB 的健康检查状态判断实例是否处于不健康状态,CLB健康检查原理可参考[健康检查](https://cloud.tencent.com/document/product/214/6097) <br>如果选择了`CLB`类型,伸缩组将同时检查实例网络状态与CLB健康检查状态,如果出现实例网络状态不健康,实例将被标记为 UNHEALTHY 状态;如果出现 CLB 健康检查状态异常,实例将被标记为CLB_UNHEALTHY 状态,如果两个异常状态同时出现,实例`HealthStatus`字段将返回 UNHEALTHY|CLB_UNHEALTHY。默认值:CLB + HealthCheckType *string `json:"HealthCheckType,omitempty" name:"HealthCheckType"` + + // CLB健康检查宽限期,当扩容的实例进入`IN_SERVICE`后,在宽限期时间范围内将不会被标记为不健康`CLB_UNHEALTHY`。<br>默认值:0。取值范围[0, 7200],单位:秒。 + LoadBalancerHealthCheckGracePeriod *uint64 `json:"LoadBalancerHealthCheckGracePeriod,omitempty" name:"LoadBalancerHealthCheckGracePeriod"` + + // 实例分配策略,取值包括 LAUNCH_CONFIGURATION 和 SPOT_MIXED,默认取 LAUNCH_CONFIGURATION。 + // <br><li> LAUNCH_CONFIGURATION,代表传统的按照启动配置模式。 + // <br><li> SPOT_MIXED,代表竞价混合模式。目前仅支持启动配置为按量计费模式时使用混合模式,混合模式下,伸缩组将根据设定扩容按量或竞价机型。使用混合模式时,关联的启动配置的计费类型不可被修改。 + InstanceAllocationPolicy *string `json:"InstanceAllocationPolicy,omitempty" name:"InstanceAllocationPolicy"` + + // 竞价混合模式下,各计费类型实例的分配策略。 + // 仅当 InstanceAllocationPolicy 取 SPOT_MIXED 时可用。 + SpotMixedAllocationPolicy *SpotMixedAllocationPolicy `json:"SpotMixedAllocationPolicy,omitempty" name:"SpotMixedAllocationPolicy"` + + // 容量重平衡功能,仅对伸缩组内的竞价实例有效。取值范围: + // <br><li> TRUE,开启该功能,当伸缩组内的竞价实例即将被竞价实例服务自动回收前,AS 主动发起竞价实例销毁流程,如果有配置过缩容 hook,则销毁前 hook 会生效。销毁流程启动后,AS 会异步开启一个扩容活动,用于补齐期望实例数。 + // <br><li> FALSE,不开启该功能,则 AS 等待竞价实例被销毁后才会去扩容补齐伸缩组期望实例数。 + // + // 默认取 FALSE。 + CapacityRebalance *bool `json:"CapacityRebalance,omitempty" name:"CapacityRebalance"` +} + +func (r *CreateAutoScalingGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAutoScalingGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupName") + delete(f, "LaunchConfigurationId") + delete(f, "MaxSize") + delete(f, "MinSize") + delete(f, "VpcId") + delete(f, "DefaultCooldown") + delete(f, "DesiredCapacity") + delete(f, "LoadBalancerIds") + delete(f, "ProjectId") + delete(f, "ForwardLoadBalancers") + delete(f, "SubnetIds") + delete(f, "TerminationPolicies") + delete(f, "Zones") + delete(f, "RetryPolicy") + delete(f, "ZonesCheckPolicy") + delete(f, "Tags") + delete(f, "ServiceSettings") + delete(f, "Ipv6AddressCount") + delete(f, "MultiZoneSubnetPolicy") + delete(f, "HealthCheckType") + delete(f, "LoadBalancerHealthCheckGracePeriod") + delete(f, "InstanceAllocationPolicy") + delete(f, "SpotMixedAllocationPolicy") + delete(f, "CapacityRebalance") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAutoScalingGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateAutoScalingGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateAutoScalingGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAutoScalingGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateLaunchConfigurationRequest struct { + *tchttp.BaseRequest + + // 启动配置显示名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。 + LaunchConfigurationName *string `json:"LaunchConfigurationName,omitempty" name:"LaunchConfigurationName"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-8toqc6s3`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。</li> + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 启动配置所属项目ID。不填为默认项目。 + // 注意:伸缩组内实例所属项目ID取伸缩组项目ID,与这里取值无关。 + ProjectId *uint64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口 [DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749) 来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。 + // `InstanceType`和`InstanceTypes`参数互斥,二者必填一个且只能填写一个。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘,最多支持指定11块数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的`SecurityGroupId`字段来获取。若不指定该参数,则默认不绑定安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 经过 Base64 编码后的自定义数据,最大长度不超过16KB。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 实例计费类型,CVM默认值按照POSTPAID_BY_HOUR处理。 + // <br><li>POSTPAID_BY_HOUR:按小时后付费 + // <br><li>SPOTPAID:竞价付费 + // <br><li>PREPAID:预付费,即包年包月 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 实例机型列表,不同实例机型指定了不同的资源规格,最多支持10种实例机型。 + // `InstanceType`和`InstanceTypes`参数互斥,二者必填一个且只能填写一个。 + InstanceTypes []*string `json:"InstanceTypes,omitempty" name:"InstanceTypes"` + + // 实例类型校验策略,取值包括 ALL 和 ANY,默认取值为ANY。 + // <br><li> ALL,所有实例类型(InstanceType)都可用则通过校验,否则校验报错。 + // <br><li> ANY,存在任何一个实例类型(InstanceType)可用则通过校验,否则校验报错。 + // + // 实例类型不可用的常见原因包括该实例类型售罄、对应云盘售罄等。 + // 如果 InstanceTypes 中一款机型不存在或者已下线,则无论 InstanceTypesCheckPolicy 采用何种取值,都会校验报错。 + InstanceTypesCheckPolicy *string `json:"InstanceTypesCheckPolicy,omitempty" name:"InstanceTypesCheckPolicy"` + + // 标签列表。通过指定该参数,可以为扩容的实例绑定标签。最多支持指定10个标签。 + InstanceTags []*InstanceTag `json:"InstanceTags,omitempty" name:"InstanceTags"` + + // CAM角色名称。可通过DescribeRoleList接口返回值中的roleName获取。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 云服务器主机名(HostName)的相关设置。 + HostNameSettings *HostNameSettings `json:"HostNameSettings,omitempty" name:"HostNameSettings"` + + // 云服务器实例名(InstanceName)的相关设置。 + // 如果用户在启动配置中设置此字段,则伸缩组创建出的实例 InstanceName 参照此字段进行设置,并传递给 CVM;如果用户未在启动配置中设置此字段,则伸缩组创建出的实例 InstanceName 按照“as-{{ 伸缩组AutoScalingGroupName }}”进行设置,并传递给 CVM。 + InstanceNameSettings *InstanceNameSettings `json:"InstanceNameSettings,omitempty" name:"InstanceNameSettings"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 云盘类型选择策略,默认取值 ORIGINAL,取值范围: + // <br><li>ORIGINAL:使用设置的云盘类型 + // <br><li>AUTOMATIC:自动选择当前可用的云盘类型 + DiskTypePolicy *string `json:"DiskTypePolicy,omitempty" name:"DiskTypePolicy"` +} + +func (r *CreateLaunchConfigurationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLaunchConfigurationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchConfigurationName") + delete(f, "ImageId") + delete(f, "ProjectId") + delete(f, "InstanceType") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "InternetAccessible") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "UserData") + delete(f, "InstanceChargeType") + delete(f, "InstanceMarketOptions") + delete(f, "InstanceTypes") + delete(f, "InstanceTypesCheckPolicy") + delete(f, "InstanceTags") + delete(f, "CamRoleName") + delete(f, "HostNameSettings") + delete(f, "InstanceNameSettings") + delete(f, "InstanceChargePrepaid") + delete(f, "DiskTypePolicy") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLaunchConfigurationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateLaunchConfigurationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 当通过本接口来创建启动配置时会返回该参数,表示启动配置ID。 + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateLaunchConfigurationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLaunchConfigurationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateLifecycleHookRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 生命周期挂钩名称。名称仅支持中文、英文、数字、下划线(_)、短横线(-)、小数点(.),最大长度不能超128个字节。 + LifecycleHookName *string `json:"LifecycleHookName,omitempty" name:"LifecycleHookName"` + + // 进行生命周期挂钩的场景,取值范围包括 INSTANCE_LAUNCHING 和 INSTANCE_TERMINATING + LifecycleTransition *string `json:"LifecycleTransition,omitempty" name:"LifecycleTransition"` + + // 定义伸缩组在生命周期挂钩超时的情况下应采取的操作,取值范围是 CONTINUE 或 ABANDON,默认值为 CONTINUE + DefaultResult *string `json:"DefaultResult,omitempty" name:"DefaultResult"` + + // 生命周期挂钩超时之前可以经过的最长时间(以秒为单位),范围从30到7200秒,默认值为300秒 + HeartbeatTimeout *int64 `json:"HeartbeatTimeout,omitempty" name:"HeartbeatTimeout"` + + // 弹性伸缩向通知目标发送的附加信息,默认值为空字符串""。最大长度不能超过1024个字节。 + NotificationMetadata *string `json:"NotificationMetadata,omitempty" name:"NotificationMetadata"` + + // 通知目标 + NotificationTarget *NotificationTarget `json:"NotificationTarget,omitempty" name:"NotificationTarget"` + + // 进行生命周期挂钩的场景类型,取值范围包括NORMAL 和 EXTENSION。说明:设置为EXTENSION值,在AttachInstances、DetachInstances、RemoveInstaces接口时会触发生命周期挂钩操作,值为NORMAL则不会在这些接口中触发生命周期挂钩。 + LifecycleTransitionType *string `json:"LifecycleTransitionType,omitempty" name:"LifecycleTransitionType"` +} + +func (r *CreateLifecycleHookRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLifecycleHookRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "LifecycleHookName") + delete(f, "LifecycleTransition") + delete(f, "DefaultResult") + delete(f, "HeartbeatTimeout") + delete(f, "NotificationMetadata") + delete(f, "NotificationTarget") + delete(f, "LifecycleTransitionType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLifecycleHookRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateLifecycleHookResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 生命周期挂钩ID + LifecycleHookId *string `json:"LifecycleHookId,omitempty" name:"LifecycleHookId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateLifecycleHookResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLifecycleHookResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateNotificationConfigurationRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 通知类型,即为需要订阅的通知类型集合,取值范围如下: + // <li>SCALE_OUT_SUCCESSFUL:扩容成功</li> + // <li>SCALE_OUT_FAILED:扩容失败</li> + // <li>SCALE_IN_SUCCESSFUL:缩容成功</li> + // <li>SCALE_IN_FAILED:缩容失败</li> + // <li>REPLACE_UNHEALTHY_INSTANCE_SUCCESSFUL:替换不健康子机成功</li> + // <li>REPLACE_UNHEALTHY_INSTANCE_FAILED:替换不健康子机失败</li> + NotificationTypes []*string `json:"NotificationTypes,omitempty" name:"NotificationTypes"` + + // 通知组ID,即为用户组ID集合,用户组ID可以通过[ListGroups](https://cloud.tencent.com/document/product/598/34589)查询。 + NotificationUserGroupIds []*string `json:"NotificationUserGroupIds,omitempty" name:"NotificationUserGroupIds"` + + // 通知接收端类型,取值如下 + // <br><li>USER_GROUP:用户组 + // <br><li>CMQ_QUEUE:CMQ 队列 + // <br><li>CMQ_TOPIC:CMQ 主题 + // <br><li>TDMQ_CMQ_TOPIC:TDMQ CMQ 主题 + // <br><li>TDMQ_CMQ_QUEUE:TDMQ CMQ 队列 + // + // 默认值为:`USER_GROUP`。 + TargetType *string `json:"TargetType,omitempty" name:"TargetType"` + + // CMQ 队列名称,如 TargetType 取值为 `CMQ_QUEUE` 或 `TDMQ_CMQ_QUEUE` 时,该字段必填。 + QueueName *string `json:"QueueName,omitempty" name:"QueueName"` + + // CMQ 主题名称,如 TargetType 取值为 `CMQ_TOPIC` 或 `TDMQ_CMQ_TOPIC` 时,该字段必填。 + TopicName *string `json:"TopicName,omitempty" name:"TopicName"` +} + +func (r *CreateNotificationConfigurationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNotificationConfigurationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "NotificationTypes") + delete(f, "NotificationUserGroupIds") + delete(f, "TargetType") + delete(f, "QueueName") + delete(f, "TopicName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateNotificationConfigurationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateNotificationConfigurationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 通知ID。 + AutoScalingNotificationId *string `json:"AutoScalingNotificationId,omitempty" name:"AutoScalingNotificationId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateNotificationConfigurationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNotificationConfigurationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateScalingPolicyRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 告警触发策略名称。 + ScalingPolicyName *string `json:"ScalingPolicyName,omitempty" name:"ScalingPolicyName"` + + // 告警触发后,期望实例数修改方式。取值 :<br><li>CHANGE_IN_CAPACITY:增加或减少若干期望实例数</li><li>EXACT_CAPACITY:调整至指定期望实例数</li> <li>PERCENT_CHANGE_IN_CAPACITY:按百分比调整期望实例数</li> + AdjustmentType *string `json:"AdjustmentType,omitempty" name:"AdjustmentType"` + + // 告警触发后,期望实例数的调整值。取值:<br><li>当 AdjustmentType 为 CHANGE_IN_CAPACITY 时,AdjustmentValue 为正数表示告警触发后增加实例,为负数表示告警触发后减少实例 </li> <li> 当 AdjustmentType 为 EXACT_CAPACITY 时,AdjustmentValue 的值即为告警触发后新的期望实例数,需要大于或等于0 </li> <li> 当 AdjustmentType 为 PERCENT_CHANGE_IN_CAPACITY 时,AdjusmentValue 为正数表示告警触发后按百分比增加实例,为负数表示告警触发后按百分比减少实例,单位是:%。 + AdjustmentValue *int64 `json:"AdjustmentValue,omitempty" name:"AdjustmentValue"` + + // 告警监控指标。 + MetricAlarm *MetricAlarm `json:"MetricAlarm,omitempty" name:"MetricAlarm"` + + // 冷却时间,单位为秒。默认冷却时间300秒。 + Cooldown *uint64 `json:"Cooldown,omitempty" name:"Cooldown"` + + // 通知组ID,即为用户组ID集合,用户组ID可以通过[ListGroups](https://cloud.tencent.com/document/product/598/34589)查询。 + NotificationUserGroupIds []*string `json:"NotificationUserGroupIds,omitempty" name:"NotificationUserGroupIds"` +} + +func (r *CreateScalingPolicyRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateScalingPolicyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "ScalingPolicyName") + delete(f, "AdjustmentType") + delete(f, "AdjustmentValue") + delete(f, "MetricAlarm") + delete(f, "Cooldown") + delete(f, "NotificationUserGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateScalingPolicyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateScalingPolicyResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 告警触发策略ID。 + AutoScalingPolicyId *string `json:"AutoScalingPolicyId,omitempty" name:"AutoScalingPolicyId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateScalingPolicyResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateScalingPolicyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateScheduledActionRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 定时任务名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。同一伸缩组下必须唯一。 + ScheduledActionName *string `json:"ScheduledActionName,omitempty" name:"ScheduledActionName"` + + // 当定时任务触发时,设置的伸缩组最大实例数。 + MaxSize *uint64 `json:"MaxSize,omitempty" name:"MaxSize"` + + // 当定时任务触发时,设置的伸缩组最小实例数。 + MinSize *uint64 `json:"MinSize,omitempty" name:"MinSize"` + + // 当定时任务触发时,设置的伸缩组期望实例数。 + DesiredCapacity *uint64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` + + // 定时任务的首次触发时间,取值为`北京时间`(UTC+8),按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ss+08:00`。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 定时任务的结束时间,取值为`北京时间`(UTC+8),按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ss+08:00`。<br><br>此参数与`Recurrence`需要同时指定,到达结束时间之后,定时任务将不再生效。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // 定时任务的重复方式。为标准 Cron 格式<br><br>此参数与`EndTime`需要同时指定。 + Recurrence *string `json:"Recurrence,omitempty" name:"Recurrence"` +} + +func (r *CreateScheduledActionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateScheduledActionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "ScheduledActionName") + delete(f, "MaxSize") + delete(f, "MinSize") + delete(f, "DesiredCapacity") + delete(f, "StartTime") + delete(f, "EndTime") + delete(f, "Recurrence") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateScheduledActionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateScheduledActionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 定时任务ID + ScheduledActionId *string `json:"ScheduledActionId,omitempty" name:"ScheduledActionId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateScheduledActionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateScheduledActionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DataDisk struct { + + // 数据盘类型。数据盘类型限制详见[云硬盘类型](https://cloud.tencent.com/document/product/362/2353)。取值范围:<br><li>LOCAL_BASIC:本地硬盘<br><li>LOCAL_SSD:本地SSD硬盘<br><li>CLOUD_BASIC:普通云硬盘<br><li>CLOUD_PREMIUM:高性能云硬盘<br><li>CLOUD_SSD:SSD云硬盘<br><br>默认取值与系统盘类型(SystemDisk.DiskType)保持一致。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 数据盘大小,单位:GB。最小调整步长为10G,不同数据盘类型取值范围不同,具体限制详见:[CVM实例配置](https://cloud.tencent.com/document/product/213/2177)。默认值为0,表示不购买数据盘。更多限制详见产品文档。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskSize *uint64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 数据盘快照 ID,类似 `snap-l8psqwnt`。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` +} + +type DeleteAutoScalingGroupRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` +} + +func (r *DeleteAutoScalingGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAutoScalingGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAutoScalingGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteAutoScalingGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteAutoScalingGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAutoScalingGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLaunchConfigurationRequest struct { + *tchttp.BaseRequest + + // 需要删除的启动配置ID。 + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` +} + +func (r *DeleteLaunchConfigurationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLaunchConfigurationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchConfigurationId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteLaunchConfigurationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLaunchConfigurationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteLaunchConfigurationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLaunchConfigurationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLifecycleHookRequest struct { + *tchttp.BaseRequest + + // 生命周期挂钩ID + LifecycleHookId *string `json:"LifecycleHookId,omitempty" name:"LifecycleHookId"` +} + +func (r *DeleteLifecycleHookRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLifecycleHookRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LifecycleHookId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteLifecycleHookRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLifecycleHookResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteLifecycleHookResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLifecycleHookResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNotificationConfigurationRequest struct { + *tchttp.BaseRequest + + // 待删除的通知ID。 + AutoScalingNotificationId *string `json:"AutoScalingNotificationId,omitempty" name:"AutoScalingNotificationId"` +} + +func (r *DeleteNotificationConfigurationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNotificationConfigurationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingNotificationId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteNotificationConfigurationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNotificationConfigurationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteNotificationConfigurationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNotificationConfigurationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteScalingPolicyRequest struct { + *tchttp.BaseRequest + + // 待删除的告警策略ID。 + AutoScalingPolicyId *string `json:"AutoScalingPolicyId,omitempty" name:"AutoScalingPolicyId"` +} + +func (r *DeleteScalingPolicyRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteScalingPolicyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingPolicyId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteScalingPolicyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteScalingPolicyResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteScalingPolicyResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteScalingPolicyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteScheduledActionRequest struct { + *tchttp.BaseRequest + + // 待删除的定时任务ID。 + ScheduledActionId *string `json:"ScheduledActionId,omitempty" name:"ScheduledActionId"` +} + +func (r *DeleteScheduledActionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteScheduledActionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ScheduledActionId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteScheduledActionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteScheduledActionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteScheduledActionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteScheduledActionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAccountLimitsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeAccountLimitsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAccountLimitsRequest) 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", "DescribeAccountLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAccountLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 用户账户被允许创建的启动配置最大数量 + MaxNumberOfLaunchConfigurations *int64 `json:"MaxNumberOfLaunchConfigurations,omitempty" name:"MaxNumberOfLaunchConfigurations"` + + // 用户账户启动配置的当前数量 + NumberOfLaunchConfigurations *int64 `json:"NumberOfLaunchConfigurations,omitempty" name:"NumberOfLaunchConfigurations"` + + // 用户账户被允许创建的伸缩组最大数量 + MaxNumberOfAutoScalingGroups *int64 `json:"MaxNumberOfAutoScalingGroups,omitempty" name:"MaxNumberOfAutoScalingGroups"` + + // 用户账户伸缩组的当前数量 + NumberOfAutoScalingGroups *int64 `json:"NumberOfAutoScalingGroups,omitempty" name:"NumberOfAutoScalingGroups"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAccountLimitsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAccountLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingActivitiesRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个伸缩活动ID查询。伸缩活动ID形如:`asa-5l2ejpfo`。每次请求的上限为100。参数不支持同时指定`ActivityIds`和`Filters`。 + ActivityIds []*string `json:"ActivityIds,omitempty" name:"ActivityIds"` + + // 过滤条件。 + // <li> auto-scaling-group-id - String - 是否必填:否 -(过滤条件)按照伸缩组ID过滤。</li> + // <li> activity-status-code - String - 是否必填:否 -(过滤条件)按照伸缩活动状态过滤。(INIT:初始化中|RUNNING:运行中|SUCCESSFUL:活动成功|PARTIALLY_SUCCESSFUL:活动部分成功|FAILED:活动失败|CANCELLED:活动取消)</li> + // <li> activity-type - String - 是否必填:否 -(过滤条件)按照伸缩活动类型过滤。(SCALE_OUT:扩容活动|SCALE_IN:缩容活动|ATTACH_INSTANCES:添加实例|REMOVE_INSTANCES:销毁实例|DETACH_INSTANCES:移出实例|TERMINATE_INSTANCES_UNEXPECTEDLY:实例在CVM控制台被销毁|REPLACE_UNHEALTHY_INSTANCE:替换不健康实例|UPDATE_LOAD_BALANCERS:更新负载均衡器)</li> + // <li> activity-id - String - 是否必填:否 -(过滤条件)按照伸缩活动ID过滤。</li> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`ActivityIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 伸缩活动最早的开始时间,如果指定了ActivityIds,此参数将被忽略。取值为`UTC`时间,按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ssZ`。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 伸缩活动最晚的结束时间,如果指定了ActivityIds,此参数将被忽略。取值为`UTC`时间,按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ssZ`。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` +} + +func (r *DescribeAutoScalingActivitiesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingActivitiesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ActivityIds") + delete(f, "Filters") + delete(f, "Limit") + delete(f, "Offset") + delete(f, "StartTime") + delete(f, "EndTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAutoScalingActivitiesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingActivitiesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的伸缩活动数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 符合条件的伸缩活动信息集合。 + ActivitySet []*Activity `json:"ActivitySet,omitempty" name:"ActivitySet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAutoScalingActivitiesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingActivitiesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingAdvicesRequest struct { + *tchttp.BaseRequest + + // 待查询的伸缩组列表,上限100。 + AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` +} + +func (r *DescribeAutoScalingAdvicesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingAdvicesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAutoScalingAdvicesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingAdvicesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩组配置建议集合。 + AutoScalingAdviceSet []*AutoScalingAdvice `json:"AutoScalingAdviceSet,omitempty" name:"AutoScalingAdviceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAutoScalingAdvicesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingAdvicesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingGroupLastActivitiesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID列表 + AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` +} + +func (r *DescribeAutoScalingGroupLastActivitiesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingGroupLastActivitiesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAutoScalingGroupLastActivitiesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingGroupLastActivitiesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的伸缩活动信息集合。说明:伸缩组伸缩活动不存在的则不返回,如传50个伸缩组ID,返回45条数据,说明其中有5个伸缩组伸缩活动不存在。 + ActivitySet []*Activity `json:"ActivitySet,omitempty" name:"ActivitySet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAutoScalingGroupLastActivitiesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingGroupLastActivitiesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingGroupsRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个伸缩组ID查询。伸缩组ID形如:`asg-nkdwoui0`。每次请求的上限为100。参数不支持同时指定`AutoScalingGroupIds`和`Filters`。 + AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` + + // 过滤条件。 + // <li> auto-scaling-group-id - String - 是否必填:否 -(过滤条件)按照伸缩组ID过滤。</li> + // <li> auto-scaling-group-name - String - 是否必填:否 -(过滤条件)按照伸缩组名称过滤。</li> + // <li> vague-auto-scaling-group-name - String - 是否必填:否 -(过滤条件)按照伸缩组名称模糊搜索。</li> + // <li> launch-configuration-id - String - 是否必填:否 -(过滤条件)按照启动配置ID过滤。</li> + // <li> tag-key - String - 是否必填:否 -(过滤条件)按照标签键进行过滤。</li> + // <li> tag-value - String - 是否必填:否 -(过滤条件)按照标签值进行过滤。</li> + // <li> tag:tag-key - String - 是否必填:否 -(过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例2</li> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`AutoScalingGroupIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *DescribeAutoScalingGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupIds") + delete(f, "Filters") + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAutoScalingGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩组详细信息列表。 + AutoScalingGroupSet []*AutoScalingGroup `json:"AutoScalingGroupSet,omitempty" name:"AutoScalingGroupSet"` + + // 符合条件的伸缩组数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAutoScalingGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingInstancesRequest struct { + *tchttp.BaseRequest + + // 待查询云服务器(CVM)的实例ID。参数不支持同时指定InstanceIds和Filters。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 过滤条件。 + // <li> instance-id - String - 是否必填:否 -(过滤条件)按照实例ID过滤。</li> + // <li> auto-scaling-group-id - String - 是否必填:否 -(过滤条件)按照伸缩组ID过滤。</li> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`InstanceIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为2000。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeAutoScalingInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingInstancesRequest) 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", "DescribeAutoScalingInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAutoScalingInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例详细信息列表。 + AutoScalingInstanceSet []*Instance `json:"AutoScalingInstanceSet,omitempty" name:"AutoScalingInstanceSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAutoScalingInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAutoScalingInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLaunchConfigurationsRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个启动配置ID查询。启动配置ID形如:`asc-ouy1ax38`。每次请求的上限为100。参数不支持同时指定`LaunchConfigurationIds`和`Filters` + LaunchConfigurationIds []*string `json:"LaunchConfigurationIds,omitempty" name:"LaunchConfigurationIds"` + + // 过滤条件。 + // <li> launch-configuration-id - String - 是否必填:否 -(过滤条件)按照启动配置ID过滤。</li> + // <li> launch-configuration-name - String - 是否必填:否 -(过滤条件)按照启动配置名称过滤。</li> + // <li> vague-launch-configuration-name - String - 是否必填:否 -(过滤条件)按照启动配置名称模糊搜索。</li> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`LaunchConfigurationIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *DescribeLaunchConfigurationsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLaunchConfigurationsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchConfigurationIds") + delete(f, "Filters") + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLaunchConfigurationsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLaunchConfigurationsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的启动配置数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 启动配置详细信息列表。 + LaunchConfigurationSet []*LaunchConfiguration `json:"LaunchConfigurationSet,omitempty" name:"LaunchConfigurationSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeLaunchConfigurationsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLaunchConfigurationsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLifecycleHooksRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个生命周期挂钩ID查询。生命周期挂钩ID形如:`ash-8azjzxcl`。每次请求的上限为100。参数不支持同时指定`LifecycleHookIds`和`Filters`。 + LifecycleHookIds []*string `json:"LifecycleHookIds,omitempty" name:"LifecycleHookIds"` + + // 过滤条件。 + // <li> lifecycle-hook-id - String - 是否必填:否 -(过滤条件)按照生命周期挂钩ID过滤。</li> + // <li> lifecycle-hook-name - String - 是否必填:否 -(过滤条件)按照生命周期挂钩名称过滤。</li> + // <li> auto-scaling-group-id - String - 是否必填:否 -(过滤条件)按照伸缩组ID过滤。</li> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`LifecycleHookIds `和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *DescribeLifecycleHooksRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLifecycleHooksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LifecycleHookIds") + delete(f, "Filters") + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLifecycleHooksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLifecycleHooksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 生命周期挂钩数组 + LifecycleHookSet []*LifecycleHook `json:"LifecycleHookSet,omitempty" name:"LifecycleHookSet"` + + // 总体数量 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeLifecycleHooksResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLifecycleHooksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNotificationConfigurationsRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个通知ID查询。实例ID形如:asn-2sestqbr。每次请求的实例的上限为100。参数不支持同时指定`AutoScalingNotificationIds`和`Filters`。 + AutoScalingNotificationIds []*string `json:"AutoScalingNotificationIds,omitempty" name:"AutoScalingNotificationIds"` + + // 过滤条件。 + // <li> auto-scaling-notification-id - String - 是否必填:否 -(过滤条件)按照通知ID过滤。</li> + // <li> auto-scaling-group-id - String - 是否必填:否 -(过滤条件)按照伸缩组ID过滤。</li> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`AutoScalingNotificationIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *DescribeNotificationConfigurationsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNotificationConfigurationsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingNotificationIds") + delete(f, "Filters") + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNotificationConfigurationsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNotificationConfigurationsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的通知数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 弹性伸缩事件通知详细信息列表。 + AutoScalingNotificationSet []*AutoScalingNotification `json:"AutoScalingNotificationSet,omitempty" name:"AutoScalingNotificationSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNotificationConfigurationsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNotificationConfigurationsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePaiInstancesRequest struct { + *tchttp.BaseRequest + + // 依据PAI实例的实例ID进行查询。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 过滤条件。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *DescribePaiInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePaiInstancesRequest) 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, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePaiInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePaiInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的PAI实例数量 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // PAI实例详细信息 + PaiInstanceSet []*PaiInstance `json:"PaiInstanceSet,omitempty" name:"PaiInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePaiInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePaiInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeScalingPoliciesRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个告警策略ID查询。告警策略ID形如:asp-i9vkg894。每次请求的实例的上限为100。参数不支持同时指定`AutoScalingPolicyIds`和`Filters`。 + AutoScalingPolicyIds []*string `json:"AutoScalingPolicyIds,omitempty" name:"AutoScalingPolicyIds"` + + // 过滤条件。 + // <li> auto-scaling-policy-id - String - 是否必填:否 -(过滤条件)按照告警策略ID过滤。</li> + // <li> auto-scaling-group-id - String - 是否必填:否 -(过滤条件)按照伸缩组ID过滤。</li> + // <li> scaling-policy-name - String - 是否必填:否 -(过滤条件)按照告警策略名称过滤。</li> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`AutoScalingPolicyIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *DescribeScalingPoliciesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeScalingPoliciesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingPolicyIds") + delete(f, "Filters") + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeScalingPoliciesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeScalingPoliciesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 弹性伸缩告警触发策略详细信息列表。 + ScalingPolicySet []*ScalingPolicy `json:"ScalingPolicySet,omitempty" name:"ScalingPolicySet"` + + // 符合条件的通知数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeScalingPoliciesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeScalingPoliciesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeScheduledActionsRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个定时任务ID查询。实例ID形如:asst-am691zxo。每次请求的实例的上限为100。参数不支持同时指定ScheduledActionIds和Filters。 + ScheduledActionIds []*string `json:"ScheduledActionIds,omitempty" name:"ScheduledActionIds"` + + // 过滤条件。 + // <li> scheduled-action-id - String - 是否必填:否 -(过滤条件)按照定时任务ID过滤。</li> + // <li> scheduled-action-name - String - 是否必填:否 - (过滤条件) 按照定时任务名称过滤。</li> + // <li> auto-scaling-group-id - String - 是否必填:否 - (过滤条件) 按照伸缩组ID过滤。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeScheduledActionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeScheduledActionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ScheduledActionIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeScheduledActionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeScheduledActionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的定时任务数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 定时任务详细信息列表。 + ScheduledActionSet []*ScheduledAction `json:"ScheduledActionSet,omitempty" name:"ScheduledActionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeScheduledActionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeScheduledActionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DetachInstancesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // CVM实例ID列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *DetachInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DetachInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DetachInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DetachInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DetachLoadBalancersRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 传统负载均衡器ID列表,列表长度上限为20,LoadBalancerIds 和 ForwardLoadBalancerIdentifications 二者同时最多只能指定一个 + LoadBalancerIds []*string `json:"LoadBalancerIds,omitempty" name:"LoadBalancerIds"` + + // 应用型负载均衡器标识信息列表,列表长度上限为50,LoadBalancerIds 和 ForwardLoadBalancerIdentifications二者同时最多只能指定一个 + ForwardLoadBalancerIdentifications []*ForwardLoadBalancerIdentification `json:"ForwardLoadBalancerIdentifications,omitempty" name:"ForwardLoadBalancerIdentifications"` +} + +func (r *DetachLoadBalancersRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachLoadBalancersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "LoadBalancerIds") + delete(f, "ForwardLoadBalancerIdentifications") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DetachLoadBalancersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DetachLoadBalancersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DetachLoadBalancersResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachLoadBalancersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DetailedStatusMessage struct { + + // 错误类型。 + Code *string `json:"Code,omitempty" name:"Code"` + + // 可用区信息。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例计费类型。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 子网ID。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 错误描述。 + Message *string `json:"Message,omitempty" name:"Message"` + + // 实例类型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` +} + +type DisableAutoScalingGroupRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` +} + +func (r *DisableAutoScalingGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableAutoScalingGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableAutoScalingGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisableAutoScalingGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableAutoScalingGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableAutoScalingGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnableAutoScalingGroupRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` +} + +func (r *EnableAutoScalingGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableAutoScalingGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableAutoScalingGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableAutoScalingGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableAutoScalingGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableAutoScalingGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnhancedService struct { + + // 开启云安全服务。若不指定该参数,则默认开启云安全服务。 + SecurityService *RunSecurityServiceEnabled `json:"SecurityService,omitempty" name:"SecurityService"` + + // 开启云监控服务。若不指定该参数,则默认开启云监控服务。 + MonitorService *RunMonitorServiceEnabled `json:"MonitorService,omitempty" name:"MonitorService"` +} + +type ExecuteScalingPolicyRequest struct { + *tchttp.BaseRequest + + // 告警伸缩策略ID + AutoScalingPolicyId *string `json:"AutoScalingPolicyId,omitempty" name:"AutoScalingPolicyId"` + + // 是否检查伸缩组活动处于冷却时间内,默认值为false + HonorCooldown *bool `json:"HonorCooldown,omitempty" name:"HonorCooldown"` + + // 执行伸缩策略的触发来源,取值包括 API 和 CLOUD_MONITOR,默认值为 API。CLOUD_MONITOR 专门供云监控触发调用。 + TriggerSource *string `json:"TriggerSource,omitempty" name:"TriggerSource"` +} + +func (r *ExecuteScalingPolicyRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ExecuteScalingPolicyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingPolicyId") + delete(f, "HonorCooldown") + delete(f, "TriggerSource") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ExecuteScalingPolicyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ExecuteScalingPolicyResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ExecuteScalingPolicyResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ExecuteScalingPolicyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Filter struct { + + // 需要过滤的字段。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 字段的过滤值。 + Values []*string `json:"Values,omitempty" name:"Values"` +} + +type ForwardLoadBalancer struct { + + // 负载均衡器ID + LoadBalancerId *string `json:"LoadBalancerId,omitempty" name:"LoadBalancerId"` + + // 应用型负载均衡监听器 ID + ListenerId *string `json:"ListenerId,omitempty" name:"ListenerId"` + + // 目标规则属性列表 + TargetAttributes []*TargetAttribute `json:"TargetAttributes,omitempty" name:"TargetAttributes"` + + // 转发规则ID,注意:针对七层监听器此参数必填 + LocationId *string `json:"LocationId,omitempty" name:"LocationId"` + + // 负载均衡实例所属地域,默认取AS服务所在地域。格式与公共参数Region相同,如:"ap-guangzhou"。 + Region *string `json:"Region,omitempty" name:"Region"` +} + +type ForwardLoadBalancerIdentification struct { + + // 负载均衡器ID + LoadBalancerId *string `json:"LoadBalancerId,omitempty" name:"LoadBalancerId"` + + // 应用型负载均衡监听器 ID + ListenerId *string `json:"ListenerId,omitempty" name:"ListenerId"` + + // 转发规则ID,注意:针对七层监听器此参数必填 + LocationId *string `json:"LocationId,omitempty" name:"LocationId"` +} + +type HostNameSettings struct { + + // 云服务器的主机名。 + // <br><li> 点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。 + // <br><li> 不支持 Windows 实例。 + // <br><li> 其他类型(Linux 等)实例:字符长度为[2, 40],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。不允许为纯数字。 + // 注意:此字段可能返回 null,表示取不到有效值。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 云服务器主机名的风格,取值范围包括 ORIGINAL 和 UNIQUE,默认为 ORIGINAL。 + // <br><li> ORIGINAL,AS 直接将入参中所填的 HostName 传递给 CVM,CVM 可能会对 HostName 追加序列号,伸缩组中实例的 HostName 会出现冲突的情况。 + // <br><li> UNIQUE,入参所填的 HostName 相当于主机名前缀,AS 和 CVM 会对其进行拓展,伸缩组中实例的 HostName 可以保证唯一。 + // 注意:此字段可能返回 null,表示取不到有效值。 + HostNameStyle *string `json:"HostNameStyle,omitempty" name:"HostNameStyle"` +} + +type Instance struct { + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 启动配置ID + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 启动配置名称 + LaunchConfigurationName *string `json:"LaunchConfigurationName,omitempty" name:"LaunchConfigurationName"` + + // 生命周期状态,取值如下:<br> + // <li>IN_SERVICE:运行中 + // <li>CREATING:创建中 + // <li>CREATION_FAILED:创建失败 + // <li>TERMINATING:中止中 + // <li>TERMINATION_FAILED:中止失败 + // <li>ATTACHING:绑定中 + // <li>DETACHING:解绑中 + // <li>ATTACHING_LB:绑定LB中<li>DETACHING_LB:解绑LB中 + // <li>STARTING:开机中 + // <li>START_FAILED:开机失败 + // <li>STOPPING:关机中 + // <li>STOP_FAILED:关机失败 + // <li>STOPPED:已关机 + LifeCycleState *string `json:"LifeCycleState,omitempty" name:"LifeCycleState"` + + // 健康状态,取值包括HEALTHY和UNHEALTHY + HealthStatus *string `json:"HealthStatus,omitempty" name:"HealthStatus"` + + // 是否加入缩容保护 + ProtectedFromScaleIn *bool `json:"ProtectedFromScaleIn,omitempty" name:"ProtectedFromScaleIn"` + + // 可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 创建类型,取值包括AUTO_CREATION, MANUAL_ATTACHING。 + CreationType *string `json:"CreationType,omitempty" name:"CreationType"` + + // 实例加入时间 + AddTime *string `json:"AddTime,omitempty" name:"AddTime"` + + // 实例类型 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 版本号 + VersionNumber *int64 `json:"VersionNumber,omitempty" name:"VersionNumber"` + + // 伸缩组名称 + AutoScalingGroupName *string `json:"AutoScalingGroupName,omitempty" name:"AutoScalingGroupName"` +} + +type InstanceChargePrepaid struct { + + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36。 + Period *int64 `json:"Period,omitempty" name:"Period"` + + // 自动续费标识。取值范围:<br><li>NOTIFY_AND_AUTO_RENEW:通知过期且自动续费<br><li>NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费<br><li>DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费<br><br>默认取值:NOTIFY_AND_MANUAL_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +type InstanceMarketOptionsRequest struct { + + // 竞价相关选项 + SpotOptions *SpotMarketOptions `json:"SpotOptions,omitempty" name:"SpotOptions"` + + // 市场选项类型,当前只支持取值:spot + // 注意:此字段可能返回 null,表示取不到有效值。 + MarketType *string `json:"MarketType,omitempty" name:"MarketType"` +} + +type InstanceNameSettings struct { + + // 云服务器的实例名。 + // + // 点号(.)和短横线(-)不能作为 InstanceName 的首尾字符,不能连续使用。 + // 字符长度为[2, 40],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。不允许为纯数字。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 云服务器实例名的风格,取值范围包括 ORIGINAL 和 UNIQUE,默认为 ORIGINAL。 + // + // ORIGINAL,AS 直接将入参中所填的 InstanceName 传递给 CVM,CVM 可能会对 InstanceName 追加序列号,伸缩组中实例的 InstanceName 会出现冲突的情况。 + // + // UNIQUE,入参所填的 InstanceName 相当于实例名前缀,AS 和 CVM 会对其进行拓展,伸缩组中实例的 InstanceName 可以保证唯一。 + InstanceNameStyle *string `json:"InstanceNameStyle,omitempty" name:"InstanceNameStyle"` +} + +type InstanceTag struct { + + // 标签键 + Key *string `json:"Key,omitempty" name:"Key"` + + // 标签值 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type InternetAccessible struct { + + // 网络计费类型。取值范围:<br><li>BANDWIDTH_PREPAID:预付费按带宽结算<br><li>TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费<br><li>BANDWIDTH_POSTPAID_BY_HOUR:带宽按小时后付费<br><li>BANDWIDTH_PACKAGE:带宽包用户<br>默认取值:TRAFFIC_POSTPAID_BY_HOUR。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 公网出带宽上限,单位:Mbps。默认值:0Mbps。不同机型带宽上限范围不一致,具体限制详见[购买网络带宽](https://cloud.tencent.com/document/product/213/509)。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 是否分配公网IP。取值范围:<br><li>TRUE:表示分配公网IP<br><li>FALSE:表示不分配公网IP<br><br>当公网带宽大于0Mbps时,可自由选择开通与否,默认开通公网IP;当公网带宽为0,则不允许分配公网IP。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PublicIpAssigned *bool `json:"PublicIpAssigned,omitempty" name:"PublicIpAssigned"` + + // 带宽包ID。可通过[DescribeBandwidthPackages](https://cloud.tencent.com/document/api/215/19209)接口返回值中的`BandwidthPackageId`获取。 + // 注意:此字段可能返回 null,表示取不到有效值。 + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` +} + +type LaunchConfiguration struct { + + // 实例所属项目ID。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 启动配置ID。 + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 启动配置名称。 + LaunchConfigurationName *string `json:"LaunchConfigurationName,omitempty" name:"LaunchConfigurationName"` + + // 实例机型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例系统盘配置信息。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 实例登录设置。 + LoginSettings *LimitedLoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 公网带宽相关信息设置。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 实例所属安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 启动配置关联的伸缩组。 + AutoScalingGroupAbstractSet []*AutoScalingGroupAbstract `json:"AutoScalingGroupAbstractSet,omitempty" name:"AutoScalingGroupAbstractSet"` + + // 自定义数据。 + // 注意:此字段可能返回 null,表示取不到有效值。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 启动配置创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 实例的增强服务启用情况与其设置。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 镜像ID。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 启动配置当前状态。取值范围:<br><li>NORMAL:正常<br><li>IMAGE_ABNORMAL:启动配置镜像异常<br><li>CBS_SNAP_ABNORMAL:启动配置数据盘快照异常<br><li>SECURITY_GROUP_ABNORMAL:启动配置安全组异常<br> + LaunchConfigurationStatus *string `json:"LaunchConfigurationStatus,omitempty" name:"LaunchConfigurationStatus"` + + // 实例计费类型,CVM默认值按照POSTPAID_BY_HOUR处理。 + // <br><li>POSTPAID_BY_HOUR:按小时后付费 + // <br><li>SPOTPAID:竞价付费 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 实例机型列表。 + InstanceTypes []*string `json:"InstanceTypes,omitempty" name:"InstanceTypes"` + + // 标签列表。 + InstanceTags []*InstanceTag `json:"InstanceTags,omitempty" name:"InstanceTags"` + + // 版本号。 + VersionNumber *int64 `json:"VersionNumber,omitempty" name:"VersionNumber"` + + // 更新时间。 + UpdatedTime *string `json:"UpdatedTime,omitempty" name:"UpdatedTime"` + + // CAM角色名称。可通过DescribeRoleList接口返回值中的roleName获取。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 上次操作时,InstanceTypesCheckPolicy 取值。 + LastOperationInstanceTypesCheckPolicy *string `json:"LastOperationInstanceTypesCheckPolicy,omitempty" name:"LastOperationInstanceTypesCheckPolicy"` + + // 云服务器主机名(HostName)的相关设置。 + HostNameSettings *HostNameSettings `json:"HostNameSettings,omitempty" name:"HostNameSettings"` + + // 云服务器实例名(InstanceName)的相关设置。 + InstanceNameSettings *InstanceNameSettings `json:"InstanceNameSettings,omitempty" name:"InstanceNameSettings"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 云盘类型选择策略。取值范围: + // <br><li>ORIGINAL:使用设置的云盘类型 + // <br><li>AUTOMATIC:自动选择当前可用区下可用的云盘类型 + DiskTypePolicy *string `json:"DiskTypePolicy,omitempty" name:"DiskTypePolicy"` +} + +type LifecycleActionResultInfo struct { + + // 生命周期挂钩标识。 + LifecycleHookId *string `json:"LifecycleHookId,omitempty" name:"LifecycleHookId"` + + // 实例标识。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 通知的结果,表示通知CMQ是否成功。 + NotificationResult *string `json:"NotificationResult,omitempty" name:"NotificationResult"` + + // 生命周期挂钩动作的执行结果,取值包括 CONTINUE、ABANDON。 + LifecycleActionResult *string `json:"LifecycleActionResult,omitempty" name:"LifecycleActionResult"` + + // 结果的原因。 + ResultReason *string `json:"ResultReason,omitempty" name:"ResultReason"` +} + +type LifecycleHook struct { + + // 生命周期挂钩ID + LifecycleHookId *string `json:"LifecycleHookId,omitempty" name:"LifecycleHookId"` + + // 生命周期挂钩名称 + LifecycleHookName *string `json:"LifecycleHookName,omitempty" name:"LifecycleHookName"` + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 生命周期挂钩默认结果 + DefaultResult *string `json:"DefaultResult,omitempty" name:"DefaultResult"` + + // 生命周期挂钩等待超时时间 + HeartbeatTimeout *int64 `json:"HeartbeatTimeout,omitempty" name:"HeartbeatTimeout"` + + // 生命周期挂钩适用场景 + LifecycleTransition *string `json:"LifecycleTransition,omitempty" name:"LifecycleTransition"` + + // 通知目标的附加信息 + NotificationMetadata *string `json:"NotificationMetadata,omitempty" name:"NotificationMetadata"` + + // 创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 通知目标 + NotificationTarget *NotificationTarget `json:"NotificationTarget,omitempty" name:"NotificationTarget"` + + // 生命周期挂钩适用场景 + LifecycleTransitionType *string `json:"LifecycleTransitionType,omitempty" name:"LifecycleTransitionType"` +} + +type LimitedLoginSettings struct { + + // 密钥ID列表。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` +} + +type LoginSettings struct { + + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:<br><li>Linux实例密码必须8到16位,至少包括两项[a-z,A-Z]、[0-9] 和 [( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。<br><li>Windows实例密码必须12到16位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) ` ~ ! @ # $ % ^ & * - + = { } [ ] : ; ' , . ? /]中的特殊符号。<br><br>若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Password *string `json:"Password,omitempty" name:"Password"` + + // 密钥ID列表。关联密钥后,就可以通过对应的私钥来访问实例;KeyId可通过接口DescribeKeyPairs获取,密钥与密码不能同时指定,同时Windows操作系统不支持指定密钥。当前仅支持购买的时候指定一个密钥。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为TRUE。取值范围:<br><li>TRUE:表示保持镜像的登录设置<br><li>FALSE:表示不保持镜像的登录设置<br><br>默认取值:FALSE。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeepImageLogin *bool `json:"KeepImageLogin,omitempty" name:"KeepImageLogin"` +} + +type MetricAlarm struct { + + // 比较运算符,可选值:<br><li>GREATER_THAN:大于</li><li>GREATER_THAN_OR_EQUAL_TO:大于或等于</li><li>LESS_THAN:小于</li><li> LESS_THAN_OR_EQUAL_TO:小于或等于</li><li> EQUAL_TO:等于</li> <li>NOT_EQUAL_TO:不等于</li> + ComparisonOperator *string `json:"ComparisonOperator,omitempty" name:"ComparisonOperator"` + + // 指标名称,可选字段如下:<br><li>CPU_UTILIZATION:CPU利用率</li><li>MEM_UTILIZATION:内存利用率</li><li>LAN_TRAFFIC_OUT:内网出带宽</li><li>LAN_TRAFFIC_IN:内网入带宽</li><li>WAN_TRAFFIC_OUT:外网出带宽</li><li>WAN_TRAFFIC_IN:外网入带宽</li> + MetricName *string `json:"MetricName,omitempty" name:"MetricName"` + + // 告警阈值:<br><li>CPU_UTILIZATION:[1, 100],单位:%</li><li>MEM_UTILIZATION:[1, 100],单位:%</li><li>LAN_TRAFFIC_OUT:>0,单位:Mbps </li><li>LAN_TRAFFIC_IN:>0,单位:Mbps</li><li>WAN_TRAFFIC_OUT:>0,单位:Mbps</li><li>WAN_TRAFFIC_IN:>0,单位:Mbps</li> + Threshold *uint64 `json:"Threshold,omitempty" name:"Threshold"` + + // 时间周期,单位:秒,取值枚举值为60、300。 + Period *uint64 `json:"Period,omitempty" name:"Period"` + + // 重复次数。取值范围 [1, 10] + ContinuousTime *uint64 `json:"ContinuousTime,omitempty" name:"ContinuousTime"` + + // 统计类型,可选字段如下:<br><li>AVERAGE:平均值</li><li>MAXIMUM:最大值<li>MINIMUM:最小值</li><br> 默认取值:AVERAGE + Statistic *string `json:"Statistic,omitempty" name:"Statistic"` +} + +type ModifyAutoScalingGroupRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 伸缩组名称,在您账号中必须唯一。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超55个字节。 + AutoScalingGroupName *string `json:"AutoScalingGroupName,omitempty" name:"AutoScalingGroupName"` + + // 默认冷却时间,单位秒,默认值为300 + DefaultCooldown *uint64 `json:"DefaultCooldown,omitempty" name:"DefaultCooldown"` + + // 期望实例数,大小介于最小实例数和最大实例数之间 + DesiredCapacity *uint64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` + + // 启动配置ID + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 最大实例数,取值范围为0-2000。 + MaxSize *uint64 `json:"MaxSize,omitempty" name:"MaxSize"` + + // 最小实例数,取值范围为0-2000。 + MinSize *uint64 `json:"MinSize,omitempty" name:"MinSize"` + + // 项目ID + ProjectId *uint64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 子网ID列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 销毁策略,目前长度上限为1。取值包括 OLDEST_INSTANCE 和 NEWEST_INSTANCE。 + // <br><li> OLDEST_INSTANCE 优先销毁伸缩组中最旧的实例。 + // <br><li> NEWEST_INSTANCE,优先销毁伸缩组中最新的实例。 + TerminationPolicies []*string `json:"TerminationPolicies,omitempty" name:"TerminationPolicies"` + + // VPC ID,基础网络则填空字符串。修改为具体VPC ID时,需指定相应的SubnetIds;修改为基础网络时,需指定相应的Zones。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 可用区列表 + Zones []*string `json:"Zones,omitempty" name:"Zones"` + + // 重试策略,取值包括 IMMEDIATE_RETRY、 INCREMENTAL_INTERVALS、NO_RETRY,默认取值为 IMMEDIATE_RETRY。 + // <br><li> IMMEDIATE_RETRY,立即重试,在较短时间内快速重试,连续失败超过一定次数(5次)后不再重试。 + // <br><li> INCREMENTAL_INTERVALS,间隔递增重试,随着连续失败次数的增加,重试间隔逐渐增大,重试间隔从秒级到1天不等。 + // <br><li> NO_RETRY,不进行重试,直到再次收到用户调用或者告警信息后才会重试。 + RetryPolicy *string `json:"RetryPolicy,omitempty" name:"RetryPolicy"` + + // 可用区校验策略,取值包括 ALL 和 ANY,默认取值为ANY。在伸缩组实际变更资源相关字段时(启动配置、可用区、子网)发挥作用。 + // <br><li> ALL,所有可用区(Zone)或子网(SubnetId)都可用则通过校验,否则校验报错。 + // <br><li> ANY,存在任何一个可用区(Zone)或子网(SubnetId)可用则通过校验,否则校验报错。 + // + // 可用区或子网不可用的常见原因包括该可用区CVM实例类型售罄、该可用区CBS云盘售罄、该可用区配额不足、该子网IP不足等。 + // 如果 Zones/SubnetIds 中可用区或者子网不存在,则无论 ZonesCheckPolicy 采用何种取值,都会校验报错。 + ZonesCheckPolicy *string `json:"ZonesCheckPolicy,omitempty" name:"ZonesCheckPolicy"` + + // 服务设置,包括云监控不健康替换等服务设置。 + ServiceSettings *ServiceSettings `json:"ServiceSettings,omitempty" name:"ServiceSettings"` + + // 实例具有IPv6地址数量的配置,取值包括0、1。 + Ipv6AddressCount *int64 `json:"Ipv6AddressCount,omitempty" name:"Ipv6AddressCount"` + + // 多可用区/子网策略,取值包括 PRIORITY 和 EQUALITY,默认为 PRIORITY。 + // <br><li> PRIORITY,按照可用区/子网列表的顺序,作为优先级来尝试创建实例,如果优先级最高的可用区/子网可以创建成功,则总在该可用区/子网创建。 + // <br><li> EQUALITY:扩容出的实例会打散到多个可用区/子网,保证扩容后的各个可用区/子网实例数相对均衡。 + // + // 与本策略相关的注意点: + // <br><li> 当伸缩组为基础网络时,本策略适用于多可用区;当伸缩组为VPC网络时,本策略适用于多子网,此时不再考虑可用区因素,例如四个子网ABCD,其中ABC处于可用区1,D处于可用区2,此时考虑子网ABCD进行排序,而不考虑可用区1、2。 + // <br><li> 本策略适用于多可用区/子网,不适用于启动配置的多机型。多机型按照优先级策略进行选择。 + // <br><li> 按照 PRIORITY 策略创建实例时,先保证多机型的策略,后保证多可用区/子网的策略。例如多机型A、B,多子网1、2、3,会按照A1、A2、A3、B1、B2、B3 进行尝试,如果A1售罄,会尝试A2(而非B1)。 + MultiZoneSubnetPolicy *string `json:"MultiZoneSubnetPolicy,omitempty" name:"MultiZoneSubnetPolicy"` + + // 伸缩组实例健康检查类型,取值如下:<br><li>CVM:根据实例网络状态判断实例是否处于不健康状态,不健康的网络状态即发生实例 PING 不可达事件,详细判断标准可参考[实例健康检查](https://cloud.tencent.com/document/product/377/8553)<br><li>CLB:根据 CLB 的健康检查状态判断实例是否处于不健康状态,CLB健康检查原理可参考[健康检查](https://cloud.tencent.com/document/product/214/6097) + HealthCheckType *string `json:"HealthCheckType,omitempty" name:"HealthCheckType"` + + // CLB健康检查宽限期。 + LoadBalancerHealthCheckGracePeriod *uint64 `json:"LoadBalancerHealthCheckGracePeriod,omitempty" name:"LoadBalancerHealthCheckGracePeriod"` + + // 实例分配策略,取值包括 LAUNCH_CONFIGURATION 和 SPOT_MIXED。 + // <br><li> LAUNCH_CONFIGURATION,代表传统的按照启动配置模式。 + // <br><li> SPOT_MIXED,代表竞价混合模式。目前仅支持启动配置为按量计费模式时使用混合模式,混合模式下,伸缩组将根据设定扩容按量或竞价机型。使用混合模式时,关联的启动配置的计费类型不可被修改。 + InstanceAllocationPolicy *string `json:"InstanceAllocationPolicy,omitempty" name:"InstanceAllocationPolicy"` + + // 竞价混合模式下,各计费类型实例的分配策略。 + // 仅当 InstanceAllocationPolicy 取 SPOT_MIXED 时可用。 + SpotMixedAllocationPolicy *SpotMixedAllocationPolicy `json:"SpotMixedAllocationPolicy,omitempty" name:"SpotMixedAllocationPolicy"` + + // 容量重平衡功能,仅对伸缩组内的竞价实例有效。取值范围: + // <br><li> TRUE,开启该功能,当伸缩组内的竞价实例即将被竞价实例服务自动回收前,AS 主动发起竞价实例销毁流程,如果有配置过缩容 hook,则销毁前 hook 会生效。销毁流程启动后,AS 会异步开启一个扩容活动,用于补齐期望实例数。 + // <br><li> FALSE,不开启该功能,则 AS 等待竞价实例被销毁后才会去扩容补齐伸缩组期望实例数。 + CapacityRebalance *bool `json:"CapacityRebalance,omitempty" name:"CapacityRebalance"` +} + +func (r *ModifyAutoScalingGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAutoScalingGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "AutoScalingGroupName") + delete(f, "DefaultCooldown") + delete(f, "DesiredCapacity") + delete(f, "LaunchConfigurationId") + delete(f, "MaxSize") + delete(f, "MinSize") + delete(f, "ProjectId") + delete(f, "SubnetIds") + delete(f, "TerminationPolicies") + delete(f, "VpcId") + delete(f, "Zones") + delete(f, "RetryPolicy") + delete(f, "ZonesCheckPolicy") + delete(f, "ServiceSettings") + delete(f, "Ipv6AddressCount") + delete(f, "MultiZoneSubnetPolicy") + delete(f, "HealthCheckType") + delete(f, "LoadBalancerHealthCheckGracePeriod") + delete(f, "InstanceAllocationPolicy") + delete(f, "SpotMixedAllocationPolicy") + delete(f, "CapacityRebalance") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAutoScalingGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAutoScalingGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyAutoScalingGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAutoScalingGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDesiredCapacityRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 期望实例数 + DesiredCapacity *uint64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` +} + +func (r *ModifyDesiredCapacityRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyDesiredCapacityRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "DesiredCapacity") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDesiredCapacityRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDesiredCapacityResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyDesiredCapacityResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyDesiredCapacityResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLaunchConfigurationAttributesRequest struct { + *tchttp.BaseRequest + + // 启动配置ID + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-8toqc6s3`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。</li> + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例类型列表,不同实例机型指定了不同的资源规格,最多支持10种实例机型。 + // InstanceType 指定单一实例类型,通过设置 InstanceTypes可以指定多实例类型,并使原有的InstanceType失效。 + InstanceTypes []*string `json:"InstanceTypes,omitempty" name:"InstanceTypes"` + + // 实例类型校验策略,在实际修改 InstanceTypes 时发挥作用,取值包括 ALL 和 ANY,默认取值为ANY。 + // <br><li> ALL,所有实例类型(InstanceType)都可用则通过校验,否则校验报错。 + // <br><li> ANY,存在任何一个实例类型(InstanceType)可用则通过校验,否则校验报错。 + // + // 实例类型不可用的常见原因包括该实例类型售罄、对应云盘售罄等。 + // 如果 InstanceTypes 中一款机型不存在或者已下线,则无论 InstanceTypesCheckPolicy 采用何种取值,都会校验报错。 + InstanceTypesCheckPolicy *string `json:"InstanceTypesCheckPolicy,omitempty" name:"InstanceTypesCheckPolicy"` + + // 启动配置显示名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。 + LaunchConfigurationName *string `json:"LaunchConfigurationName,omitempty" name:"LaunchConfigurationName"` + + // 经过 Base64 编码后的自定义数据,最大长度不超过16KB。如果要清空UserData,则指定其为空字符串。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的`SecurityGroupId`字段来获取。 + // 若指定该参数,请至少提供一个安全组,列表顺序有先后。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 公网带宽相关信息设置。 + // 当公网出带宽上限为0Mbps时,不支持修改为开通分配公网IP;相应的,当前为开通分配公网IP时,修改的公网出带宽上限值必须大于0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 实例计费类型。具体取值范围如下: + // <br><li>POSTPAID_BY_HOUR:按小时后付费 + // <br><li>SPOTPAID:竞价付费 + // <br><li>PREPAID:预付费,即包年包月 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。 + // 若修改实例的付费模式为预付费,则该参数必传;从预付费修改为其他付费模式时,本字段原信息会自动丢弃。 + // 当新增该字段时,必须传递购买实例的时长,其它未传递字段会设置为默认值。 + // 当修改本字段时,当前付费模式必须为预付费。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 实例的市场相关选项,如竞价实例相关参数。 + // 若修改实例的付费模式为竞价付费,则该参数必传;从竞价付费修改为其他付费模式时,本字段原信息会自动丢弃。 + // 当新增该字段时,必须传递竞价相关选项下的竞价出价,其它未传递字段会设置为默认值。 + // 当修改本字段时,当前付费模式必须为竞价付费。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 云盘类型选择策略,取值范围: + // <br><li>ORIGINAL:使用设置的云盘类型。 + // <br><li>AUTOMATIC:自动选择当前可用的云盘类型。 + DiskTypePolicy *string `json:"DiskTypePolicy,omitempty" name:"DiskTypePolicy"` + + // 实例系统盘配置信息。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。 + // 最多支持指定11块数据盘。采取整体修改,因此请提供修改后的全部值。 + // 数据盘类型默认与系统盘类型保持一致。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 云服务器主机名(HostName)的相关设置。 + // 不支持windows实例设置主机名。 + // 新增该属性时,必须传递云服务器的主机名,其它未传递字段会设置为默认值。 + HostNameSettings *HostNameSettings `json:"HostNameSettings,omitempty" name:"HostNameSettings"` + + // 云服务器(InstanceName)实例名的相关设置。 + // 如果用户在启动配置中设置此字段,则伸缩组创建出的实例 InstanceName 参照此字段进行设置,并传递给 CVM;如果用户未在启动配置中设置此字段,则伸缩组创建出的实例 InstanceName 按照“as-{{ 伸缩组AutoScalingGroupName }}”进行设置,并传递给 CVM。 + // 新增该属性时,必须传递云服务器的实例名称,其它未传递字段会设置为默认值。 + InstanceNameSettings *InstanceNameSettings `json:"InstanceNameSettings,omitempty" name:"InstanceNameSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // CAM角色名称。可通过DescribeRoleList接口返回值中的roleName获取。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` +} + +func (r *ModifyLaunchConfigurationAttributesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLaunchConfigurationAttributesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchConfigurationId") + delete(f, "ImageId") + delete(f, "InstanceTypes") + delete(f, "InstanceTypesCheckPolicy") + delete(f, "LaunchConfigurationName") + delete(f, "UserData") + delete(f, "SecurityGroupIds") + delete(f, "InternetAccessible") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + delete(f, "InstanceMarketOptions") + delete(f, "DiskTypePolicy") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "HostNameSettings") + delete(f, "InstanceNameSettings") + delete(f, "EnhancedService") + delete(f, "CamRoleName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyLaunchConfigurationAttributesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLaunchConfigurationAttributesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyLaunchConfigurationAttributesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLaunchConfigurationAttributesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLoadBalancerTargetAttributesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 需修改目标规则属性的应用型负载均衡器列表,列表长度上限为50 + ForwardLoadBalancers []*ForwardLoadBalancer `json:"ForwardLoadBalancers,omitempty" name:"ForwardLoadBalancers"` +} + +func (r *ModifyLoadBalancerTargetAttributesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLoadBalancerTargetAttributesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "ForwardLoadBalancers") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyLoadBalancerTargetAttributesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLoadBalancerTargetAttributesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyLoadBalancerTargetAttributesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLoadBalancerTargetAttributesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLoadBalancersRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 传统负载均衡器ID列表,目前长度上限为20,LoadBalancerIds 和 ForwardLoadBalancers 二者同时最多只能指定一个 + LoadBalancerIds []*string `json:"LoadBalancerIds,omitempty" name:"LoadBalancerIds"` + + // 应用型负载均衡器列表,目前长度上限为50,LoadBalancerIds 和 ForwardLoadBalancers 二者同时最多只能指定一个 + ForwardLoadBalancers []*ForwardLoadBalancer `json:"ForwardLoadBalancers,omitempty" name:"ForwardLoadBalancers"` + + // 负载均衡器校验策略,取值包括 ALL 和 DIFF,默认取值为 ALL。 + // <br><li> ALL,所有负载均衡器都合法则通过校验,否则校验报错。 + // <br><li> DIFF,仅校验负载均衡器参数中实际变化的部分,如果合法则通过校验,否则校验报错。 + LoadBalancersCheckPolicy *string `json:"LoadBalancersCheckPolicy,omitempty" name:"LoadBalancersCheckPolicy"` +} + +func (r *ModifyLoadBalancersRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLoadBalancersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "LoadBalancerIds") + delete(f, "ForwardLoadBalancers") + delete(f, "LoadBalancersCheckPolicy") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyLoadBalancersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLoadBalancersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyLoadBalancersResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLoadBalancersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNotificationConfigurationRequest struct { + *tchttp.BaseRequest + + // 待修改的通知ID。 + AutoScalingNotificationId *string `json:"AutoScalingNotificationId,omitempty" name:"AutoScalingNotificationId"` + + // 通知类型,即为需要订阅的通知类型集合,取值范围如下: + // <li>SCALE_OUT_SUCCESSFUL:扩容成功</li> + // <li>SCALE_OUT_FAILED:扩容失败</li> + // <li>SCALE_IN_SUCCESSFUL:缩容成功</li> + // <li>SCALE_IN_FAILED:缩容失败</li> + // <li>REPLACE_UNHEALTHY_INSTANCE_SUCCESSFUL:替换不健康子机成功</li> + // <li>REPLACE_UNHEALTHY_INSTANCE_FAILED:替换不健康子机失败</li> + NotificationTypes []*string `json:"NotificationTypes,omitempty" name:"NotificationTypes"` + + // 通知组ID,即为用户组ID集合,用户组ID可以通过[ListGroups](https://cloud.tencent.com/document/product/598/34589)查询。 + NotificationUserGroupIds []*string `json:"NotificationUserGroupIds,omitempty" name:"NotificationUserGroupIds"` + + // CMQ 队列或 TDMQ CMQ 队列名。 + QueueName *string `json:"QueueName,omitempty" name:"QueueName"` + + // CMQ 主题或 TDMQ CMQ 主题名。 + TopicName *string `json:"TopicName,omitempty" name:"TopicName"` +} + +func (r *ModifyNotificationConfigurationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNotificationConfigurationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingNotificationId") + delete(f, "NotificationTypes") + delete(f, "NotificationUserGroupIds") + delete(f, "QueueName") + delete(f, "TopicName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNotificationConfigurationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNotificationConfigurationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNotificationConfigurationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNotificationConfigurationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyScalingPolicyRequest struct { + *tchttp.BaseRequest + + // 告警策略ID。 + AutoScalingPolicyId *string `json:"AutoScalingPolicyId,omitempty" name:"AutoScalingPolicyId"` + + // 告警策略名称。 + ScalingPolicyName *string `json:"ScalingPolicyName,omitempty" name:"ScalingPolicyName"` + + // 告警触发后,期望实例数修改方式。取值 :<br><li>CHANGE_IN_CAPACITY:增加或减少若干期望实例数</li><li>EXACT_CAPACITY:调整至指定期望实例数</li> <li>PERCENT_CHANGE_IN_CAPACITY:按百分比调整期望实例数</li> + AdjustmentType *string `json:"AdjustmentType,omitempty" name:"AdjustmentType"` + + // 告警触发后,期望实例数的调整值。取值:<br><li>当 AdjustmentType 为 CHANGE_IN_CAPACITY 时,AdjustmentValue 为正数表示告警触发后增加实例,为负数表示告警触发后减少实例 </li> <li> 当 AdjustmentType 为 EXACT_CAPACITY 时,AdjustmentValue 的值即为告警触发后新的期望实例数,需要大于或等于0 </li> <li> 当 AdjustmentType 为 PERCENT_CHANGE_IN_CAPACITY 时,AdjusmentValue 为正数表示告警触发后按百分比增加实例,为负数表示告警触发后按百分比减少实例,单位是:%。 + AdjustmentValue *int64 `json:"AdjustmentValue,omitempty" name:"AdjustmentValue"` + + // 冷却时间,单位为秒。 + Cooldown *uint64 `json:"Cooldown,omitempty" name:"Cooldown"` + + // 告警监控指标。 + MetricAlarm *MetricAlarm `json:"MetricAlarm,omitempty" name:"MetricAlarm"` + + // 通知组ID,即为用户组ID集合,用户组ID可以通过[ListGroups](https://cloud.tencent.com/document/product/598/34589)查询。 + // 如果需要清空通知用户组,需要在列表中传入特定字符串 "NULL"。 + NotificationUserGroupIds []*string `json:"NotificationUserGroupIds,omitempty" name:"NotificationUserGroupIds"` +} + +func (r *ModifyScalingPolicyRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyScalingPolicyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingPolicyId") + delete(f, "ScalingPolicyName") + delete(f, "AdjustmentType") + delete(f, "AdjustmentValue") + delete(f, "Cooldown") + delete(f, "MetricAlarm") + delete(f, "NotificationUserGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyScalingPolicyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyScalingPolicyResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyScalingPolicyResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyScalingPolicyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyScheduledActionRequest struct { + *tchttp.BaseRequest + + // 待修改的定时任务ID + ScheduledActionId *string `json:"ScheduledActionId,omitempty" name:"ScheduledActionId"` + + // 定时任务名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。同一伸缩组下必须唯一。 + ScheduledActionName *string `json:"ScheduledActionName,omitempty" name:"ScheduledActionName"` + + // 当定时任务触发时,设置的伸缩组最大实例数。 + MaxSize *uint64 `json:"MaxSize,omitempty" name:"MaxSize"` + + // 当定时任务触发时,设置的伸缩组最小实例数。 + MinSize *uint64 `json:"MinSize,omitempty" name:"MinSize"` + + // 当定时任务触发时,设置的伸缩组期望实例数。 + DesiredCapacity *uint64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` + + // 定时任务的首次触发时间,取值为`北京时间`(UTC+8),按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ss+08:00`。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 定时任务的结束时间,取值为`北京时间`(UTC+8),按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ss+08:00`。<br>此参数与`Recurrence`需要同时指定,到达结束时间之后,定时任务将不再生效。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // 定时任务的重复方式。为标准 Cron 格式<br>此参数与`EndTime`需要同时指定。 + Recurrence *string `json:"Recurrence,omitempty" name:"Recurrence"` +} + +func (r *ModifyScheduledActionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyScheduledActionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ScheduledActionId") + delete(f, "ScheduledActionName") + delete(f, "MaxSize") + delete(f, "MinSize") + delete(f, "DesiredCapacity") + delete(f, "StartTime") + delete(f, "EndTime") + delete(f, "Recurrence") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyScheduledActionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyScheduledActionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyScheduledActionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyScheduledActionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type NotificationTarget struct { + + // 目标类型,取值范围包括`CMQ_QUEUE`、`CMQ_TOPIC`、`TDMQ_CMQ_QUEUE`、`TDMQ_CMQ_TOPIC`。 + // <li> CMQ_QUEUE,指腾讯云消息队列-队列模型。</li> + // <li> CMQ_TOPIC,指腾讯云消息队列-主题模型。</li> + // <li> TDMQ_CMQ_QUEUE,指腾讯云 TDMQ 消息队列-队列模型。</li> + // <li> TDMQ_CMQ_TOPIC,指腾讯云 TDMQ 消息队列-主题模型。</li> + TargetType *string `json:"TargetType,omitempty" name:"TargetType"` + + // 队列名称,如果`TargetType`取值为`CMQ_QUEUE` 或 `TDMQ_CMQ_QUEUE`,则本字段必填。 + QueueName *string `json:"QueueName,omitempty" name:"QueueName"` + + // 主题名称,如果`TargetType`取值为`CMQ_TOPIC` 或 `TDMQ_CMQ_TOPIC`,则本字段必填。 + TopicName *string `json:"TopicName,omitempty" name:"TopicName"` +} + +type PaiInstance struct { + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例域名 + DomainName *string `json:"DomainName,omitempty" name:"DomainName"` + + // PAI管理页面URL + PaiMateUrl *string `json:"PaiMateUrl,omitempty" name:"PaiMateUrl"` +} + +type PreviewPaiDomainNameRequest struct { + *tchttp.BaseRequest + + // 域名类型 + DomainNameType *string `json:"DomainNameType,omitempty" name:"DomainNameType"` +} + +func (r *PreviewPaiDomainNameRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PreviewPaiDomainNameRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DomainNameType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "PreviewPaiDomainNameRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type PreviewPaiDomainNameResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可用的PAI域名 + DomainName *string `json:"DomainName,omitempty" name:"DomainName"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *PreviewPaiDomainNameResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PreviewPaiDomainNameResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RemoveInstancesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // CVM实例ID列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *RemoveInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RemoveInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RemoveInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RemoveInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RemoveInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RemoveInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RunMonitorServiceEnabled struct { + + // 是否开启[云监控](https://cloud.tencent.com/document/product/248)服务。取值范围:<br><li>TRUE:表示开启云监控服务<br><li>FALSE:表示不开启云监控服务<br><br>默认取值:TRUE。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type RunSecurityServiceEnabled struct { + + // 是否开启[云安全](https://cloud.tencent.com/document/product/296)服务。取值范围:<br><li>TRUE:表示开启云安全服务<br><li>FALSE:表示不开启云安全服务<br><br>默认取值:TRUE。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type ScaleInInstancesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 希望缩容的实例数量。 + ScaleInNumber *uint64 `json:"ScaleInNumber,omitempty" name:"ScaleInNumber"` +} + +func (r *ScaleInInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ScaleInInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "ScaleInNumber") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScaleInInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ScaleInInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID。 + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ScaleInInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ScaleInInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ScaleOutInstancesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 希望扩容的实例数量。 + ScaleOutNumber *uint64 `json:"ScaleOutNumber,omitempty" name:"ScaleOutNumber"` +} + +func (r *ScaleOutInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ScaleOutInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "ScaleOutNumber") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScaleOutInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ScaleOutInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID。 + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ScaleOutInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ScaleOutInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ScalingPolicy struct { + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 告警触发策略ID。 + AutoScalingPolicyId *string `json:"AutoScalingPolicyId,omitempty" name:"AutoScalingPolicyId"` + + // 告警触发策略名称。 + ScalingPolicyName *string `json:"ScalingPolicyName,omitempty" name:"ScalingPolicyName"` + + // 告警触发后,期望实例数修改方式。取值 :<br><li>CHANGE_IN_CAPACITY:增加或减少若干期望实例数</li><li>EXACT_CAPACITY:调整至指定期望实例数</li> <li>PERCENT_CHANGE_IN_CAPACITY:按百分比调整期望实例数</li> + AdjustmentType *string `json:"AdjustmentType,omitempty" name:"AdjustmentType"` + + // 告警触发后,期望实例数的调整值。 + AdjustmentValue *int64 `json:"AdjustmentValue,omitempty" name:"AdjustmentValue"` + + // 冷却时间。 + Cooldown *uint64 `json:"Cooldown,omitempty" name:"Cooldown"` + + // 告警监控指标。 + MetricAlarm *MetricAlarm `json:"MetricAlarm,omitempty" name:"MetricAlarm"` + + // 通知组ID,即为用户组ID集合。 + NotificationUserGroupIds []*string `json:"NotificationUserGroupIds,omitempty" name:"NotificationUserGroupIds"` +} + +type ScheduledAction struct { + + // 定时任务ID。 + ScheduledActionId *string `json:"ScheduledActionId,omitempty" name:"ScheduledActionId"` + + // 定时任务名称。 + ScheduledActionName *string `json:"ScheduledActionName,omitempty" name:"ScheduledActionName"` + + // 定时任务所在伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 定时任务的开始时间。取值为`北京时间`(UTC+8),按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ss+08:00`。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 定时任务的重复方式。 + Recurrence *string `json:"Recurrence,omitempty" name:"Recurrence"` + + // 定时任务的结束时间。取值为`北京时间`(UTC+8),按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ss+08:00`。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // 定时任务设置的最大实例数。 + MaxSize *uint64 `json:"MaxSize,omitempty" name:"MaxSize"` + + // 定时任务设置的期望实例数。 + DesiredCapacity *uint64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` + + // 定时任务设置的最小实例数。 + MinSize *uint64 `json:"MinSize,omitempty" name:"MinSize"` + + // 定时任务的创建时间。取值为`UTC`时间,按照`ISO8601`标准,格式:`YYYY-MM-DDThh:mm:ssZ`。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type ServiceSettings struct { + + // 开启监控不健康替换服务。若开启则对于云监控标记为不健康的实例,弹性伸缩服务会进行替换。若不指定该参数,则默认为 False。 + ReplaceMonitorUnhealthy *bool `json:"ReplaceMonitorUnhealthy,omitempty" name:"ReplaceMonitorUnhealthy"` + + // 取值范围: + // CLASSIC_SCALING:经典方式,使用创建、销毁实例来实现扩缩容; + // WAKE_UP_STOPPED_SCALING:扩容优先开机。扩容时优先对已关机的实例执行开机操作,若开机后实例数仍低于期望实例数,则创建实例,缩容仍采用销毁实例的方式。用户可以使用StopAutoScalingInstances接口来关闭伸缩组内的实例。监控告警触发的扩容仍将创建实例 + // 默认取值:CLASSIC_SCALING + ScalingMode *string `json:"ScalingMode,omitempty" name:"ScalingMode"` + + // 开启负载均衡不健康替换服务。若开启则对于负载均衡健康检查判断不健康的实例,弹性伸缩服务会进行替换。若不指定该参数,则默认为 False。 + ReplaceLoadBalancerUnhealthy *bool `json:"ReplaceLoadBalancerUnhealthy,omitempty" name:"ReplaceLoadBalancerUnhealthy"` +} + +type SetInstancesProtectionRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID。 + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 实例ID。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例是否需要设置保护。 + ProtectedFromScaleIn *bool `json:"ProtectedFromScaleIn,omitempty" name:"ProtectedFromScaleIn"` +} + +func (r *SetInstancesProtectionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SetInstancesProtectionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "InstanceIds") + delete(f, "ProtectedFromScaleIn") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SetInstancesProtectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type SetInstancesProtectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SetInstancesProtectionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SetInstancesProtectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SpotMarketOptions struct { + + // 竞价出价,例如“1.05” + MaxPrice *string `json:"MaxPrice,omitempty" name:"MaxPrice"` + + // 竞价请求类型,当前仅支持类型:one-time,默认值为one-time + // 注意:此字段可能返回 null,表示取不到有效值。 + SpotInstanceType *string `json:"SpotInstanceType,omitempty" name:"SpotInstanceType"` +} + +type SpotMixedAllocationPolicy struct { + + // 混合模式下,基础容量的大小,基础容量部分固定为按量计费实例。默认值 0,最大不可超过伸缩组的最大实例数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + BaseCapacity *uint64 `json:"BaseCapacity,omitempty" name:"BaseCapacity"` + + // 超出基础容量部分,按量计费实例所占的比例。取值范围 [0, 100],0 代表超出基础容量的部分仅生产竞价实例,100 代表仅生产按量实例,默认值为 70。按百分比计算按量实例数时,向上取整。 + // 比如,总期望实例数取 3,基础容量取 1,超基础部分按量百分比取 1,则最终按量 2 台(1 台来自基础容量,1 台按百分比向上取整得到),竞价 1台。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OnDemandPercentageAboveBaseCapacity *uint64 `json:"OnDemandPercentageAboveBaseCapacity,omitempty" name:"OnDemandPercentageAboveBaseCapacity"` + + // 混合模式下,竞价实例的分配策略。取值包括 COST_OPTIMIZED 和 CAPACITY_OPTIMIZED,默认取 COST_OPTIMIZED。 + // <br><li> COST_OPTIMIZED,成本优化策略。对于启动配置内的所有机型,按照各机型在各可用区的每核单价由小到大依次尝试。优先尝试购买每核单价最便宜的,如果购买失败则尝试购买次便宜的,以此类推。 + // <br><li> CAPACITY_OPTIMIZED,容量优化策略。对于启动配置内的所有机型,按照各机型在各可用区的库存情况由大到小依次尝试。优先尝试购买剩余库存最大的机型,这样可尽量降低竞价实例被动回收的发生概率。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SpotAllocationStrategy *string `json:"SpotAllocationStrategy,omitempty" name:"SpotAllocationStrategy"` + + // 按量实例替补功能。取值范围: + // <br><li> TRUE,开启该功能,当所有竞价机型因库存不足等原因全部购买失败后,尝试购买按量实例。 + // <br><li> FALSE,不开启该功能,伸缩组在需要扩容竞价实例时仅尝试所配置的竞价机型。 + // + // 默认取值: TRUE。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CompensateWithBaseInstance *bool `json:"CompensateWithBaseInstance,omitempty" name:"CompensateWithBaseInstance"` +} + +type StartAutoScalingInstancesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 待开启的CVM实例ID列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *StartAutoScalingInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *StartAutoScalingInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "StartAutoScalingInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type StartAutoScalingInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *StartAutoScalingInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *StartAutoScalingInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type StopAutoScalingInstancesRequest struct { + *tchttp.BaseRequest + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 待关闭的CVM实例ID列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 关闭的实例是否收费,取值为: + // KEEP_CHARGING:关机继续收费 + // STOP_CHARGING:关机停止收费 + // 默认为 KEEP_CHARGING + StoppedMode *string `json:"StoppedMode,omitempty" name:"StoppedMode"` +} + +func (r *StopAutoScalingInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *StopAutoScalingInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AutoScalingGroupId") + delete(f, "InstanceIds") + delete(f, "StoppedMode") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "StopAutoScalingInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type StopAutoScalingInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 伸缩活动ID + ActivityId *string `json:"ActivityId,omitempty" name:"ActivityId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *StopAutoScalingInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *StopAutoScalingInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SystemDisk struct { + + // 系统盘类型。系统盘类型限制详见[云硬盘类型](https://cloud.tencent.com/document/product/362/2353)。取值范围:<br><li>LOCAL_BASIC:本地硬盘<br><li>LOCAL_SSD:本地SSD硬盘<br><li>CLOUD_BASIC:普通云硬盘<br><li>CLOUD_PREMIUM:高性能云硬盘<br><li>CLOUD_SSD:SSD云硬盘<br><br>默认取值:CLOUD_PREMIUM。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 系统盘大小,单位:GB。默认值为 50 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskSize *uint64 `json:"DiskSize,omitempty" name:"DiskSize"` +} + +type Tag struct { + + // 标签键 + Key *string `json:"Key,omitempty" name:"Key"` + + // 标签值 + Value *string `json:"Value,omitempty" name:"Value"` + + // 标签绑定的资源类型,当前支持类型:"auto-scaling-group + // 注意:此字段可能返回 null,表示取不到有效值。 + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` +} + +type TargetAttribute struct { + + // 端口 + Port *uint64 `json:"Port,omitempty" name:"Port"` + + // 权重 + Weight *uint64 `json:"Weight,omitempty" name:"Weight"` +} + +type UpgradeLaunchConfigurationRequest struct { + *tchttp.BaseRequest + + // 启动配置ID。 + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-8toqc6s3`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。</li> + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例机型列表,不同实例机型指定了不同的资源规格,最多支持5种实例机型。 + InstanceTypes []*string `json:"InstanceTypes,omitempty" name:"InstanceTypes"` + + // 启动配置显示名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。 + LaunchConfigurationName *string `json:"LaunchConfigurationName,omitempty" name:"LaunchConfigurationName"` + + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘,最多支持指定11块数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 实例计费类型,CVM默认值按照POSTPAID_BY_HOUR处理。 + // <br><li>POSTPAID_BY_HOUR:按小时后付费 + // <br><li>SPOTPAID:竞价付费 + // <br><li>PREPAID:预付费,即包年包月 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 实例类型校验策略,取值包括 ALL 和 ANY,默认取值为ANY。 + // <br><li> ALL,所有实例类型(InstanceType)都可用则通过校验,否则校验报错。 + // <br><li> ANY,存在任何一个实例类型(InstanceType)可用则通过校验,否则校验报错。 + // + // 实例类型不可用的常见原因包括该实例类型售罄、对应云盘售罄等。 + // 如果 InstanceTypes 中一款机型不存在或者已下线,则无论 InstanceTypesCheckPolicy 采用何种取值,都会校验报错。 + InstanceTypesCheckPolicy *string `json:"InstanceTypesCheckPolicy,omitempty" name:"InstanceTypesCheckPolicy"` + + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属项目ID。不填为默认项目。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的`SecurityGroupId`字段来获取。若不指定该参数,则默认不绑定安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 经过 Base64 编码后的自定义数据,最大长度不超过16KB。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 标签列表。通过指定该参数,可以为扩容的实例绑定标签。最多支持指定10个标签。 + InstanceTags []*InstanceTag `json:"InstanceTags,omitempty" name:"InstanceTags"` + + // CAM角色名称。可通过DescribeRoleList接口返回值中的roleName获取。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 云服务器主机名(HostName)的相关设置。 + HostNameSettings *HostNameSettings `json:"HostNameSettings,omitempty" name:"HostNameSettings"` + + // 云服务器实例名(InstanceName)的相关设置。 + InstanceNameSettings *InstanceNameSettings `json:"InstanceNameSettings,omitempty" name:"InstanceNameSettings"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 云盘类型选择策略,取值范围: + // <br><li>ORIGINAL:使用设置的云盘类型 + // <br><li>AUTOMATIC:自动选择当前可用的云盘类型 + DiskTypePolicy *string `json:"DiskTypePolicy,omitempty" name:"DiskTypePolicy"` +} + +func (r *UpgradeLaunchConfigurationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpgradeLaunchConfigurationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchConfigurationId") + delete(f, "ImageId") + delete(f, "InstanceTypes") + delete(f, "LaunchConfigurationName") + delete(f, "DataDisks") + delete(f, "EnhancedService") + delete(f, "InstanceChargeType") + delete(f, "InstanceMarketOptions") + delete(f, "InstanceTypesCheckPolicy") + delete(f, "InternetAccessible") + delete(f, "LoginSettings") + delete(f, "ProjectId") + delete(f, "SecurityGroupIds") + delete(f, "SystemDisk") + delete(f, "UserData") + delete(f, "InstanceTags") + delete(f, "CamRoleName") + delete(f, "HostNameSettings") + delete(f, "InstanceNameSettings") + delete(f, "InstanceChargePrepaid") + delete(f, "DiskTypePolicy") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpgradeLaunchConfigurationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeLaunchConfigurationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpgradeLaunchConfigurationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpgradeLaunchConfigurationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeLifecycleHookRequest struct { + *tchttp.BaseRequest + + // 生命周期挂钩ID + LifecycleHookId *string `json:"LifecycleHookId,omitempty" name:"LifecycleHookId"` + + // 生命周期挂钩名称 + LifecycleHookName *string `json:"LifecycleHookName,omitempty" name:"LifecycleHookName"` + + // 进行生命周期挂钩的场景,取值范围包括“INSTANCE_LAUNCHING”和“INSTANCE_TERMINATING” + LifecycleTransition *string `json:"LifecycleTransition,omitempty" name:"LifecycleTransition"` + + // 定义伸缩组在生命周期挂钩超时的情况下应采取的操作,取值范围是“CONTINUE”或“ABANDON”,默认值为“CONTINUE” + DefaultResult *string `json:"DefaultResult,omitempty" name:"DefaultResult"` + + // 生命周期挂钩超时之前可以经过的最长时间(以秒为单位),范围从30到7200秒,默认值为300秒 + HeartbeatTimeout *int64 `json:"HeartbeatTimeout,omitempty" name:"HeartbeatTimeout"` + + // 弹性伸缩向通知目标发送的附加信息,默认值为空字符串"" + NotificationMetadata *string `json:"NotificationMetadata,omitempty" name:"NotificationMetadata"` + + // 通知目标 + NotificationTarget *NotificationTarget `json:"NotificationTarget,omitempty" name:"NotificationTarget"` + + // 进行生命周期挂钩的场景类型,取值范围包括NORMAL 和 EXTENSION。说明:设置为EXTENSION值,在AttachInstances、DetachInstances、RemoveInstaces接口时会触发生命周期挂钩操作,值为NORMAL则不会在这些接口中触发生命周期挂钩。 + LifecycleTransitionType *string `json:"LifecycleTransitionType,omitempty" name:"LifecycleTransitionType"` +} + +func (r *UpgradeLifecycleHookRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpgradeLifecycleHookRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LifecycleHookId") + delete(f, "LifecycleHookName") + delete(f, "LifecycleTransition") + delete(f, "DefaultResult") + delete(f, "HeartbeatTimeout") + delete(f, "NotificationMetadata") + delete(f, "NotificationTarget") + delete(f, "LifecycleTransitionType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpgradeLifecycleHookRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeLifecycleHookResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpgradeLifecycleHookResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpgradeLifecycleHookResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/LICENSE b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..efc75a2253eac0053be445ee5f529090466b9faf --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/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/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/circuit_breaker.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/circuit_breaker.go new file mode 100644 index 0000000000000000000000000000000000000000..271166167495392952684f674e8c5fd132d33f8b --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/circuit_breaker.go @@ -0,0 +1,273 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "errors" + "strings" + "sync" + "time" +) + +const ( + defaultBackupEndpoint = "ap-guangzhou.tencentcloudapi.com" + defaultMaxFailNum = 5 + defaultMaxFailPercentage = 75 + defaultWindowLength = 1 * 60 * time.Second + defaultTimeout = 60 * time.Second +) + +var ( + // ErrOpenState is returned when the CB state is open + errOpenState = errors.New("circuit breaker is open") +) + +// counter use atomic operations to ensure consistency +// Atomic operations perform better than mutex +type counter struct { + failures int + all int + consecutiveSuccesses int + consecutiveFailures int +} + +func newRegionCounter() counter { + return counter{ + failures: 0, + all: 0, + consecutiveSuccesses: 0, + consecutiveFailures: 0, + } +} + +func (c *counter) onSuccess() { + c.all++ + c.consecutiveSuccesses++ + c.consecutiveFailures = 0 +} + +func (c *counter) onFailure() { + c.all++ + c.failures++ + c.consecutiveSuccesses = 0 + c.consecutiveSuccesses = 0 +} + +func (c *counter) clear() { + c.all = 0 + c.failures = 0 + c.consecutiveSuccesses = 0 +} + +// State is a type that represents a state of CircuitBreaker. +type state int + +// These constants are states of CircuitBreaker. +const ( + StateClosed state = iota + StateHalfOpen + StateOpen +) + +type breakerSetting struct { + // backupEndpoint + // the default is "ap-guangzhou.tencentcloudapi.com" + backupEndpoint string + // max fail nums + // the default is 5 + maxFailNum int + // max fail percentage + // the default is 75/100 + maxFailPercentage int + // windowInterval decides when to reset counter if the state is StateClosed + // the default is 5minutes + windowInterval time.Duration + // timeout decides when to turn StateOpen to StateHalfOpen + // the default is 60s + timeout time.Duration + // maxRequests decides when to turn StateHalfOpen to StateClosed + maxRequests int +} + +type circuitBreaker struct { + // settings + breakerSetting + // read and write lock + mu sync.Mutex + // the breaker's state: closed, open, half-open + state state + // expiry time determines whether to enter the next generation + // if in StateClosed, it will be now + windowInterval + // if in StateOpen, it will be now + timeout + // if in StateHalfOpen. it will be zero + expiry time.Time + // generation decide whether add the afterRequest's request to counter + generation uint64 + // counter + counter counter +} + +func newRegionBreaker(set breakerSetting) (re *circuitBreaker) { + re = new(circuitBreaker) + re.breakerSetting = set + return +} + +func defaultRegionBreaker() *circuitBreaker { + defaultSet := breakerSetting{ + backupEndpoint: defaultBackupEndpoint, + maxFailNum: defaultMaxFailNum, + maxFailPercentage: defaultMaxFailPercentage, + windowInterval: defaultWindowLength, + timeout: defaultTimeout, + } + return newRegionBreaker(defaultSet) +} + +// currentState return the current state. +// if in StateClosed and now is over expiry time, it will turn to a new generation. +// if in StateOpen and now is over expiry time, it will turn to StateHalfOpen +func (s *circuitBreaker) currentState(now time.Time) (state, uint64) { + switch s.state { + case StateClosed: + if s.expiry.Before(now) { + s.toNewGeneration(now) + } + case StateOpen: + if s.expiry.Before(now) { + s.setState(StateHalfOpen, now) + } + } + return s.state, s.generation +} + +// setState set the circuitBreaker's state to newState +// and turn to new generation +func (s *circuitBreaker) setState(newState state, now time.Time) { + if s.state == newState { + return + } + s.state = newState + s.toNewGeneration(now) +} + +// toNewGeneration will increase the generation and clear the counter. +// it also will reset the expiry +func (s *circuitBreaker) toNewGeneration(now time.Time) { + s.generation++ + s.counter.clear() + var zero time.Time + switch s.state { + case StateClosed: + s.expiry = now.Add(s.windowInterval) + case StateOpen: + s.expiry = now.Add(s.timeout) + default: // StateHalfOpen + s.expiry = zero + } +} + +// beforeRequest return the current generation; if the breaker is in StateOpen, it will also return an errOpenState +func (s *circuitBreaker) beforeRequest() (uint64, error) { + s.mu.Lock() + defer s.mu.Unlock() + + now := time.Now() + state, generation := s.currentState(now) + //log.Println(s.counter) + if state == StateOpen { + return generation, errOpenState + } + return generation, nil +} + +func (s *circuitBreaker) afterRequest(before uint64, success bool) { + s.mu.Lock() + defer s.mu.Unlock() + + now := time.Now() + state, generation := s.currentState(now) + // the breaker has entered the next generation, the current results abandon. + if generation != before { + return + } + if success { + s.onSuccess(state, now) + } else { + s.onFailure(state, now) + } +} + +func (s *circuitBreaker) onSuccess(state state, now time.Time) { + switch state { + case StateClosed: + s.counter.onSuccess() + case StateHalfOpen: + s.counter.onSuccess() + // The conditions for closing breaker are met + if s.counter.all-s.counter.failures >= s.maxRequests { + s.setState(StateClosed, now) + } + } +} + +func (s *circuitBreaker) readyToOpen(c counter) bool { + failPre := float64(c.failures) / float64(c.all) + return (c.failures >= s.maxFailNum && failPre >= float64(s.maxFailPercentage)/100.0) || + c.consecutiveFailures > 5 +} + +func (s *circuitBreaker) onFailure(state state, now time.Time) { + switch state { + case StateClosed: + s.counter.onFailure() + if f := s.readyToOpen(s.counter); f { + s.setState(StateOpen, now) + } + case StateHalfOpen: + s.setState(StateOpen, now) + } +} + +// checkEndpoint +// valid: cvm.ap-shanghai.tencentcloudapi.com, cvm.ap-shenzhen-fs.tencentcloudapi.com,cvm.tencentcloudapi.com +// invalid: cvm.tencentcloud.com +func checkEndpoint(endpoint string) bool { + ss := strings.Split(endpoint, ".") + if len(ss) != 4 && len(ss) != 3 { + return false + } + if ss[len(ss)-2] != "tencentcloudapi" { + return false + } + // ap-beijing + if len(ss) == 4 && len(strings.Split(ss[1], "-")) < 2 { + return false + } + return true +} + +func renewUrl(oldDomain, region string) string { + ss := strings.Split(oldDomain, ".") + if len(ss) == 3 { + ss = append([]string{ss[0], region}, ss[1:]...) + } else if len(ss) == 4 { + ss[1] = region + } + newDomain := strings.Join(ss, ".") + return newDomain +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go new file mode 100644 index 0000000000000000000000000000000000000000..5b6ed6f77faf2a4046dd57d4cfa90a81a3092351 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go @@ -0,0 +1,405 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "log" + "net/http" + "net/http/httputil" + "strconv" + "strings" + "time" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const ( + octetStream = "application/octet-stream" +) + +type Client struct { + region string + httpClient *http.Client + httpProfile *profile.HttpProfile + profile *profile.ClientProfile + credential CredentialIface + signMethod string + unsignedPayload bool + debug bool + rb *circuitBreaker +} + +func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err error) { + if request.GetScheme() == "" { + request.SetScheme(c.httpProfile.Scheme) + } + + if request.GetRootDomain() == "" { + request.SetRootDomain(c.httpProfile.RootDomain) + } + + if request.GetDomain() == "" { + domain := c.httpProfile.Endpoint + if domain == "" { + domain = request.GetServiceDomain(request.GetService()) + } + request.SetDomain(domain) + } + + if request.GetHttpMethod() == "" { + request.SetHttpMethod(c.httpProfile.ReqMethod) + } + + tchttp.CompleteCommonParams(request, c.GetRegion()) + + // reflect to inject client if field ClientToken exists and retry feature is enabled + if c.profile.NetworkFailureMaxRetries > 0 || c.profile.RateLimitExceededMaxRetries > 0 { + safeInjectClientToken(request) + } + + if c.profile.DisableRegionBreaker == true || c.rb == nil { + return c.sendWithSignature(request, response) + } else { + return c.sendWithRegionBreaker(request, response) + } +} + +func (c *Client) sendWithRegionBreaker(request tchttp.Request, response tchttp.Response) (err error) { + defer func() { + e := recover() + if e != nil { + msg := fmt.Sprintf("%s", e) + err = tcerr.NewTencentCloudSDKError("ClientError.CircuitBreakerError", msg, "") + } + }() + + ge, err := c.rb.beforeRequest() + + if err == errOpenState { + newEndpoint := request.GetService() + "." + c.rb.backupEndpoint + request.SetDomain(newEndpoint) + } + err = c.sendWithSignature(request, response) + isSuccess := false + // Success is considered only when the server returns an effective response (have requestId and the code is not InternalError ) + if e, ok := err.(*tcerr.TencentCloudSDKError); ok { + if e.GetRequestId() != "" && e.GetCode() != "InternalError" { + isSuccess = true + } + } + c.rb.afterRequest(ge, isSuccess) + return err +} + +func (c *Client) sendWithSignature(request tchttp.Request, response tchttp.Response) (err error) { + if c.signMethod == "HmacSHA1" || c.signMethod == "HmacSHA256" { + return c.sendWithSignatureV1(request, response) + } else { + return c.sendWithSignatureV3(request, response) + } +} + +func (c *Client) sendWithSignatureV1(request tchttp.Request, response tchttp.Response) (err error) { + // TODO: not an elegant way, it should be done in common params, but finally it need to refactor + request.GetParams()["Language"] = c.profile.Language + err = tchttp.ConstructParams(request) + if err != nil { + return err + } + err = signRequest(request, c.credential, c.signMethod) + if err != nil { + return err + } + httpRequest, err := http.NewRequestWithContext(request.GetContext(), request.GetHttpMethod(), request.GetUrl(), request.GetBodyReader()) + if err != nil { + return err + } + if request.GetHttpMethod() == "POST" { + httpRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded") + } + httpResponse, err := c.sendWithRateLimitRetry(httpRequest, isRetryable(request)) + if err != nil { + return err + } + err = tchttp.ParseFromHttpResponse(httpResponse, response) + return err +} + +func (c *Client) sendWithSignatureV3(request tchttp.Request, response tchttp.Response) (err error) { + headers := map[string]string{ + "Host": request.GetDomain(), + "X-TC-Action": request.GetAction(), + "X-TC-Version": request.GetVersion(), + "X-TC-Timestamp": request.GetParams()["Timestamp"], + "X-TC-RequestClient": request.GetParams()["RequestClient"], + "X-TC-Language": c.profile.Language, + } + if c.region != "" { + headers["X-TC-Region"] = c.region + } + if c.credential.GetToken() != "" { + headers["X-TC-Token"] = c.credential.GetToken() + } + if request.GetHttpMethod() == "GET" { + headers["Content-Type"] = "application/x-www-form-urlencoded" + } else { + headers["Content-Type"] = "application/json" + } + isOctetStream := false + cr := &tchttp.CommonRequest{} + ok := false + var octetStreamBody []byte + if cr, ok = request.(*tchttp.CommonRequest); ok { + if cr.IsOctetStream() { + isOctetStream = true + // custom headers must contain Content-Type : application/octet-stream + // todo:the custom header may overwrite headers + for k, v := range cr.GetHeader() { + headers[k] = v + } + octetStreamBody = cr.GetOctetStreamBody() + } + } + + if !isOctetStream && request.GetContentType() == octetStream { + isOctetStream = true + b, _ := json.Marshal(request) + var m map[string]string + _ = json.Unmarshal(b, &m) + for k, v := range m { + key := "X-" + strings.ToUpper(request.GetService()) + "-" + k + headers[key] = v + } + + headers["Content-Type"] = octetStream + octetStreamBody = request.GetBody() + } + // start signature v3 process + + // build canonical request string + httpRequestMethod := request.GetHttpMethod() + canonicalURI := "/" + canonicalQueryString := "" + if httpRequestMethod == "GET" { + err = tchttp.ConstructParams(request) + if err != nil { + return err + } + params := make(map[string]string) + for key, value := range request.GetParams() { + params[key] = value + } + delete(params, "Action") + delete(params, "Version") + delete(params, "Nonce") + delete(params, "Region") + delete(params, "RequestClient") + delete(params, "Timestamp") + canonicalQueryString = tchttp.GetUrlQueriesEncoded(params) + } + canonicalHeaders := fmt.Sprintf("content-type:%s\nhost:%s\n", headers["Content-Type"], headers["Host"]) + signedHeaders := "content-type;host" + requestPayload := "" + if httpRequestMethod == "POST" { + if isOctetStream { + // todo Conversion comparison between string and []byte affects performance much + requestPayload = string(octetStreamBody) + } else { + b, err := json.Marshal(request) + if err != nil { + return err + } + requestPayload = string(b) + } + } + hashedRequestPayload := "" + if c.unsignedPayload { + hashedRequestPayload = sha256hex("UNSIGNED-PAYLOAD") + headers["X-TC-Content-SHA256"] = "UNSIGNED-PAYLOAD" + } else { + hashedRequestPayload = sha256hex(requestPayload) + } + canonicalRequest := fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s", + httpRequestMethod, + canonicalURI, + canonicalQueryString, + canonicalHeaders, + signedHeaders, + hashedRequestPayload) + //log.Println("canonicalRequest:", canonicalRequest) + + // build string to sign + algorithm := "TC3-HMAC-SHA256" + requestTimestamp := headers["X-TC-Timestamp"] + timestamp, _ := strconv.ParseInt(requestTimestamp, 10, 64) + t := time.Unix(timestamp, 0).UTC() + // must be the format 2006-01-02, ref to package time for more info + date := t.Format("2006-01-02") + credentialScope := fmt.Sprintf("%s/%s/tc3_request", date, request.GetService()) + hashedCanonicalRequest := sha256hex(canonicalRequest) + string2sign := fmt.Sprintf("%s\n%s\n%s\n%s", + algorithm, + requestTimestamp, + credentialScope, + hashedCanonicalRequest) + //log.Println("string2sign", string2sign) + + // sign string + secretDate := hmacsha256(date, "TC3"+c.credential.GetSecretKey()) + secretService := hmacsha256(request.GetService(), secretDate) + secretKey := hmacsha256("tc3_request", secretService) + signature := hex.EncodeToString([]byte(hmacsha256(string2sign, secretKey))) + //log.Println("signature", signature) + + // build authorization + authorization := fmt.Sprintf("%s Credential=%s/%s, SignedHeaders=%s, Signature=%s", + algorithm, + c.credential.GetSecretId(), + credentialScope, + signedHeaders, + signature) + //log.Println("authorization", authorization) + + headers["Authorization"] = authorization + url := request.GetScheme() + "://" + request.GetDomain() + request.GetPath() + if canonicalQueryString != "" { + url = url + "?" + canonicalQueryString + } + httpRequest, err := http.NewRequestWithContext(request.GetContext(), httpRequestMethod, url, strings.NewReader(requestPayload)) + if err != nil { + return err + } + for k, v := range headers { + httpRequest.Header[k] = []string{v} + } + httpResponse, err := c.sendWithRateLimitRetry(httpRequest, isRetryable(request)) + if err != nil { + return err + } + err = tchttp.ParseFromHttpResponse(httpResponse, response) + return err +} + +// send http request +func (c *Client) sendHttp(request *http.Request) (response *http.Response, err error) { + if c.debug { + outBytes, err := httputil.DumpRequest(request, true) + if err != nil { + log.Printf("[ERROR] dump request failed because %s", err) + return nil, err + } + log.Printf("[DEBUG] http request = %s", outBytes) + } + + response, err = c.httpClient.Do(request) + return response, err +} + +func (c *Client) GetRegion() string { + return c.region +} + +func (c *Client) Init(region string) *Client { + c.httpClient = &http.Client{} + c.region = region + c.signMethod = "TC3-HMAC-SHA256" + c.debug = false + log.SetFlags(log.LstdFlags | log.Lshortfile) + return c +} + +func (c *Client) WithSecretId(secretId, secretKey string) *Client { + c.credential = NewCredential(secretId, secretKey) + return c +} + +func (c *Client) WithCredential(cred CredentialIface) *Client { + c.credential = cred + return c +} + +func (c *Client) WithProfile(clientProfile *profile.ClientProfile) *Client { + c.profile = clientProfile + if c.profile.DisableRegionBreaker == false { + c.withRegionBreaker() + } + c.signMethod = clientProfile.SignMethod + c.unsignedPayload = clientProfile.UnsignedPayload + c.httpProfile = clientProfile.HttpProfile + c.debug = clientProfile.Debug + c.httpClient.Timeout = time.Duration(c.httpProfile.ReqTimeout) * time.Second + return c +} + +func (c *Client) WithSignatureMethod(method string) *Client { + c.signMethod = method + return c +} + +func (c *Client) WithHttpTransport(transport http.RoundTripper) *Client { + c.httpClient.Transport = transport + return c +} + +func (c *Client) WithDebug(flag bool) *Client { + c.debug = flag + return c +} + +// WithProvider use specify provider to get a credential and use it to build a client +func (c *Client) WithProvider(provider Provider) (*Client, error) { + cred, err := provider.GetCredential() + if err != nil { + return nil, err + } + return c.WithCredential(cred), nil +} + +func (c *Client) withRegionBreaker() *Client { + rb := defaultRegionBreaker() + if c.profile.BackupEndpoint != "" { + rb.backupEndpoint = c.profile.BackupEndpoint + } else if c.profile.BackupEndPoint != "" { + rb.backupEndpoint = c.profile.BackupEndPoint + } + c.rb = rb + return c +} + +func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { + client = &Client{} + client.Init(region).WithSecretId(secretId, secretKey) + return +} + +// NewClientWithProviders build client with your custom providers; +// If you don't specify the providers, it will use the DefaultProviderChain to find credential +func NewClientWithProviders(region string, providers ...Provider) (client *Client, err error) { + client = (&Client{}).Init(region) + var pc Provider + if len(providers) == 0 { + pc = DefaultProviderChain() + } else { + pc = NewProviderChain(providers) + } + return client.WithProvider(pc) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/clienttoken.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/clienttoken.go new file mode 100644 index 0000000000000000000000000000000000000000..aa6bf0fa6f2f7840782c24d064ea09f92ce38223 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/clienttoken.go @@ -0,0 +1,62 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "crypto/rand" + "fmt" + "reflect" +) + +const ( + fieldClientToken = "ClientToken" +) + +func safeInjectClientToken(obj interface{}) { + // obj Must be struct ptr + getType := reflect.TypeOf(obj) + if getType.Kind() != reflect.Ptr || getType.Elem().Kind() != reflect.Struct { + return + } + + // obj Must exist named field + _, ok := getType.Elem().FieldByName(fieldClientToken) + if !ok { + return + } + + field := reflect.ValueOf(obj).Elem().FieldByName(fieldClientToken) + + // field Must be string ptr + if field.Kind() != reflect.Ptr { + return + } + + // Set if ClientToken is nil or empty + if field.IsNil() || (field.Elem().Kind() == reflect.String && field.Elem().Len() == 0) { + uuidVal := randomClientToken() + field.Set(reflect.ValueOf(&uuidVal)) + } +} + +// randomClientToken generate random string as ClientToken +// ref: https://stackoverflow.com/questions/15130321/is-there-a-method-to-generate-a-uuid-with-go-language +func randomClientToken() string { + b := make([]byte, 16) + _, _ = rand.Read(b) + return fmt.Sprintf("%X-%X-%X-%X-%X", b[0:4], b[4:6], b[6:8], b[8:10], b[10:]) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/common_client.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/common_client.go new file mode 100644 index 0000000000000000000000000000000000000000..897542a01839fb79795af1ac92a864b527bc1a65 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/common_client.go @@ -0,0 +1,52 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +func NewCommonClient(cred CredentialIface, region string, clientProfile *profile.ClientProfile) (c *Client) { + return new(Client).Init(region).WithCredential(cred).WithProfile(clientProfile) +} + +// SendOctetStream Invoke API with application/octet-stream content-type. +// +// Note: +// 1. only specific API can be invoked in such manner. +// 2. only TC3-HMAC-SHA256 signature method can be specified. +// 3. only POST request method can be specified +// 4. the request Must be a CommonRequest and called SetOctetStreamParameters +// +func (c *Client) SendOctetStream(request tchttp.Request, response tchttp.Response) (err error) { + if c.profile.SignMethod != "TC3-HMAC-SHA256" { + return tcerr.NewTencentCloudSDKError("ClientError", "Invalid signature method.", "") + } + if c.profile.HttpProfile.ReqMethod != "POST" { + return tcerr.NewTencentCloudSDKError("ClientError", "Invalid request method.", "") + } + //cr, ok := request.(*tchttp.CommonRequest) + //if !ok { + // return tcerr.NewTencentCloudSDKError("ClientError", "Invalid request, must be *CommonRequest!", "") + //} + //if !cr.IsOctetStream() { + // return tcerr.NewTencentCloudSDKError("ClientError", "Invalid request, does not meet the conditions for sending OctetStream", "") + //} + return c.Send(request, response) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go new file mode 100644 index 0000000000000000000000000000000000000000..7385dba1ff35d0b1156e9b2f37697fb382f3d498 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/credentials.go @@ -0,0 +1,67 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +var creErr = "ClientError.CredentialError" + +type CredentialIface interface { + GetSecretId() string + GetToken() string + GetSecretKey() string + // needRefresh() bool + // refresh() +} + +type Credential struct { + SecretId string + SecretKey string + Token string +} + +func (c *Credential) needRefresh() bool { + return false +} + +func (c *Credential) refresh() { +} + +func NewCredential(secretId, secretKey string) *Credential { + return &Credential{ + SecretId: secretId, + SecretKey: secretKey, + } +} + +func NewTokenCredential(secretId, secretKey, token string) *Credential { + return &Credential{ + SecretId: secretId, + SecretKey: secretKey, + Token: token, + } +} + +func (c *Credential) GetSecretKey() string { + return c.SecretKey +} + +func (c *Credential) GetSecretId() string { + return c.SecretId +} + +func (c *Credential) GetToken() string { + return c.Token +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/cvm_role_credential.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/cvm_role_credential.go new file mode 100644 index 0000000000000000000000000000000000000000..2f4bced772f4027a97ce749ada16163137003632 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/cvm_role_credential.go @@ -0,0 +1,70 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "log" + "time" +) + +const ExpiredTimeout = 300 + +type CvmRoleCredential struct { + roleName string + expiredTime int64 + tmpSecretId string + tmpSecretKey string + token string + source *CvmRoleProvider +} + +func (c *CvmRoleCredential) GetSecretId() string { + if c.needRefresh() { + c.refresh() + } + return c.tmpSecretId +} + +func (c *CvmRoleCredential) GetToken() string { + if c.needRefresh() { + c.refresh() + } + return c.token +} + +func (c *CvmRoleCredential) GetSecretKey() string { + if c.needRefresh() { + c.refresh() + } + return c.tmpSecretKey +} + +func (c *CvmRoleCredential) needRefresh() bool { + if c.tmpSecretId == "" || c.tmpSecretKey == "" || c.token == "" || c.expiredTime-ExpiredTimeout <= time.Now().Unix() { + return true + } + return false +} + +func (c *CvmRoleCredential) refresh() { + newCre, err := c.source.GetCredential() + if err != nil { + log.Println(err) + return + } + *c = *newCre.(*CvmRoleCredential) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/cvm_role_provider.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/cvm_role_provider.go new file mode 100644 index 0000000000000000000000000000000000000000..7b5196eba5edc99bfa47629fbbd53892955865b9 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/cvm_role_provider.go @@ -0,0 +1,113 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "encoding/json" + "errors" + "io/ioutil" + "net/http" + "time" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +const ( + metaUrl = "http://metadata.tencentyun.com/latest/meta-data/" + roleUrl = metaUrl + "cam/security-credentials/" +) + +var roleNotBound = errors.New("get cvm role name failed, Please confirm whether the role is bound") + +type CvmRoleProvider struct { + roleName string +} + +type roleRsp struct { + TmpSecretId string `json:"TmpSecretId"` + TmpSecretKey string `json:"TmpSecretKey"` + ExpiredTime int64 `json:"ExpiredTime"` + Expiration time.Time `json:"Expiration"` + Token string `json:"Token"` + Code string `json:"Code"` +} + +// NewCvmRoleProvider need you to specify the roleName of the cvm currently in use +func NewCvmRoleProvider(roleName string) *CvmRoleProvider { + return &CvmRoleProvider{roleName: roleName} +} + +// DefaultCvmRoleProvider will auto get the cvm role name by accessing the metadata api +// more info please lookup: https://cloud.tencent.com/document/product/213/4934 +func DefaultCvmRoleProvider() *CvmRoleProvider { + return NewCvmRoleProvider("") +} + +func get(url string) ([]byte, error) { + rsp, err := http.Get(url) + if err != nil { + return nil, err + } + + if rsp.StatusCode == http.StatusNotFound { + return nil, roleNotBound + } + + body, err := ioutil.ReadAll(rsp.Body) + if err != nil { + return []byte{}, err + } + return body, nil +} + +func (r *CvmRoleProvider) getRoleName() (string, error) { + if r.roleName != "" { + return r.roleName, nil + } + rn, err := get(roleUrl) + return string(rn), err +} + +func (r *CvmRoleProvider) GetCredential() (CredentialIface, error) { + roleName, err := r.getRoleName() + if err != nil { + return nil, noCvmRole + } + // get the cvm role name by accessing the metadata api + // https://cloud.tencent.com/document/product/213/4934 + body, err := get(roleUrl + roleName) + + if err != nil { + return nil, err + } + rspSt := new(roleRsp) + if err = json.Unmarshal(body, rspSt); err != nil { + return nil, tcerr.NewTencentCloudSDKError(creErr, err.Error(), "") + } + if rspSt.Code != "Success" { + return nil, tcerr.NewTencentCloudSDKError(creErr, "Get credential from metadata server by role name "+roleName+" failed, code="+rspSt.Code, "") + } + cre := &CvmRoleCredential{ + tmpSecretId: rspSt.TmpSecretId, + tmpSecretKey: rspSt.TmpSecretKey, + token: rspSt.Token, + roleName: roleName, + expiredTime: rspSt.ExpiredTime, + source: r, + } + return cre, nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/env_provider.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/env_provider.go new file mode 100644 index 0000000000000000000000000000000000000000..46937e385e900083fb13d7f4cead8463ee74fcee --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/env_provider.go @@ -0,0 +1,57 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "os" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +type EnvProvider struct { + secretIdENV string + secretKeyENV string +} + +// DefaultEnvProvider return a default provider +// The default environment variable name are TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY +func DefaultEnvProvider() *EnvProvider { + return &EnvProvider{ + secretIdENV: "TENCENTCLOUD_SECRET_ID", + secretKeyENV: "TENCENTCLOUD_SECRET_KEY", + } +} + +// NewEnvProvider uses the name of the environment variable you specified to get the credentials +func NewEnvProvider(secretIdEnvName, secretKeyEnvName string) *EnvProvider { + return &EnvProvider{ + secretIdENV: secretIdEnvName, + secretKeyENV: secretKeyEnvName, + } +} + +func (p *EnvProvider) GetCredential() (CredentialIface, error) { + secretId, ok1 := os.LookupEnv(p.secretIdENV) + secretKey, ok2 := os.LookupEnv(p.secretKeyENV) + if !ok1 || !ok2 { + return nil, envNotSet + } + if secretId == "" || secretKey == "" { + return nil, tcerr.NewTencentCloudSDKError(creErr, "Environmental variable ("+p.secretIdENV+" or "+p.secretKeyENV+") is empty", "") + } + return NewCredential(secretId, secretKey), nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors/errors.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors/errors.go new file mode 100644 index 0000000000000000000000000000000000000000..313626c7925d0fba517a13bbda0a2ab9df06010c --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors/errors.go @@ -0,0 +1,54 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 errors + +import ( + "fmt" +) + +type TencentCloudSDKError struct { + Code string + Message string + RequestId string +} + +func (e *TencentCloudSDKError) Error() string { + if e.RequestId == "" { + return fmt.Sprintf("[TencentCloudSDKError] Code=%s, Message=%s", e.Code, e.Message) + } + return fmt.Sprintf("[TencentCloudSDKError] Code=%s, Message=%s, RequestId=%s", e.Code, e.Message, e.RequestId) +} + +func NewTencentCloudSDKError(code, message, requestId string) error { + return &TencentCloudSDKError{ + Code: code, + Message: message, + RequestId: requestId, + } +} + +func (e *TencentCloudSDKError) GetCode() string { + return e.Code +} + +func (e *TencentCloudSDKError) GetMessage() string { + return e.Message +} + +func (e *TencentCloudSDKError) GetRequestId() string { + return e.RequestId +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_request.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_request.go new file mode 100644 index 0000000000000000000000000000000000000000..ffa08b0d6118f9c929265df8c0cff8594a96ca93 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_request.go @@ -0,0 +1,125 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "encoding/json" + "fmt" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +const ( + octetStream = "application/octet-stream" +) + +type actionParameters map[string]interface{} + +type CommonRequest struct { + *BaseRequest + // custom header, may be overwritten + header map[string]string + actionParameters +} + +func NewCommonRequest(service, version, action string) (request *CommonRequest) { + request = &CommonRequest{ + BaseRequest: &BaseRequest{}, + actionParameters: actionParameters{}, + } + request.Init().WithApiInfo(service, version, action) + return +} + +// SetActionParameters set common request's actionParameters to your data. +// note: your data Must be a json-formatted string or byte array or map[string]interface{} +// note: you could not call SetActionParameters and SetOctetStreamParameters at once +func (cr *CommonRequest) SetActionParameters(data interface{}) error { + if data == nil { + return nil + } + switch data.(type) { + case []byte: + if err := json.Unmarshal(data.([]byte), &cr.actionParameters); err != nil { + msg := fmt.Sprintf("Fail to parse contents %s to json, because: %s", data.([]byte), err) + return tcerr.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + case string: + if err := json.Unmarshal([]byte(data.(string)), &cr.actionParameters); err != nil { + msg := fmt.Sprintf("Fail to parse contents %s to json, because: %s", data.(string), err) + return tcerr.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + case map[string]interface{}: + cr.actionParameters = data.(map[string]interface{}) + default: + msg := fmt.Sprintf("Invalid data type:%T, must be one of the following: []byte, string, map[string]interface{}", data) + return tcerr.NewTencentCloudSDKError("ClientError.InvalidParameter", msg, "") + } + return nil +} + +func (cr *CommonRequest) IsOctetStream() bool { + v, ok := cr.header["Content-Type"] + if !ok || v != octetStream { + return false + } + value, ok := cr.actionParameters["OctetStreamBody"] + if !ok { + return false + } + _, ok = value.([]byte) + if !ok { + return false + } + return true +} + +func (cr *CommonRequest) SetHeader(header map[string]string) { + if header == nil { + return + } + cr.header = header +} + +func (cr *CommonRequest) GetHeader() map[string]string { + return cr.header +} + +// SetOctetStreamParameters set request body to your data, and set head Content-Type to application/octet-stream +// note: you could not call SetActionParameters and SetOctetStreamParameters on the same request +func (cr *CommonRequest) SetOctetStreamParameters(header map[string]string, body []byte) { + parameter := map[string]interface{}{} + if header == nil { + header = map[string]string{} + } + header["Content-Type"] = octetStream + cr.header = header + parameter["OctetStreamBody"] = body + cr.actionParameters = parameter +} + +func (cr *CommonRequest) GetOctetStreamBody() []byte { + if cr.IsOctetStream() { + return cr.actionParameters["OctetStreamBody"].([]byte) + } else { + return nil + } +} + +func (cr *CommonRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(cr.actionParameters) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_response.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_response.go new file mode 100644 index 0000000000000000000000000000000000000000..0c8698f88d42104ab5a8ca62298088afa73a22dc --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_response.go @@ -0,0 +1,42 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import "encoding/json" + +type actionResult map[string]interface{} +type CommonResponse struct { + *BaseResponse + *actionResult +} + +func NewCommonResponse() (response *CommonResponse) { + response = &CommonResponse{ + BaseResponse: &BaseResponse{}, + actionResult: &actionResult{}, + } + return +} + +func (r *CommonResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, r.actionResult) +} + +func (r *CommonResponse) GetBody() []byte { + raw, _ := json.Marshal(r.actionResult) + return raw +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go new file mode 100644 index 0000000000000000000000000000000000000000..c2f4f08e73addcba93224d414b503701f2ae2241 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -0,0 +1,337 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "context" + "io" + //"log" + "math/rand" + "net/url" + "reflect" + "strconv" + "strings" + "time" +) + +const ( + POST = "POST" + GET = "GET" + + HTTP = "http" + HTTPS = "https" + + RootDomain = "tencentcloudapi.com" + Path = "/" +) + +type Request interface { + GetAction() string + GetBodyReader() io.Reader + GetScheme() string + GetRootDomain() string + GetServiceDomain(string) string + GetDomain() string + GetHttpMethod() string + GetParams() map[string]string + GetBody() []byte + GetPath() string + GetService() string + GetUrl() string + GetVersion() string + GetContentType() string + GetContext() context.Context + SetScheme(string) + SetRootDomain(string) + SetDomain(string) + SetHttpMethod(string) + SetPath(string) + SetContentType(string) + SetBody([]byte) + SetContext(context.Context) +} + +type BaseRequest struct { + context context.Context + httpMethod string + scheme string + rootDomain string + domain string + path string + params map[string]string + formParams map[string]string + + service string + version string + action string + + contentType string + body []byte +} + +func (r *BaseRequest) GetAction() string { + return r.action +} + +func (r *BaseRequest) GetHttpMethod() string { + return r.httpMethod +} + +func (r *BaseRequest) GetParams() map[string]string { + return r.params +} + +func (r *BaseRequest) GetPath() string { + return r.path +} + +func (r *BaseRequest) GetDomain() string { + return r.domain +} + +func (r *BaseRequest) GetScheme() string { + return r.scheme +} + +func (r *BaseRequest) GetRootDomain() string { + return r.rootDomain +} + +func (r *BaseRequest) GetServiceDomain(service string) (domain string) { + rootDomain := r.rootDomain + if rootDomain == "" { + rootDomain = RootDomain + } + domain = service + "." + rootDomain + return +} + +func (r *BaseRequest) GetBody() []byte { + return r.body +} + +func (r *BaseRequest) SetBody(body []byte) { + r.body = body +} + +func (r *BaseRequest) GetContentType() string { + return r.contentType +} + +func (r *BaseRequest) SetContentType(contentType string) { + r.contentType = contentType +} + +func (r *BaseRequest) SetDomain(domain string) { + r.domain = domain +} + +func (r *BaseRequest) SetScheme(scheme string) { + scheme = strings.ToLower(scheme) + switch scheme { + case HTTP: + r.scheme = HTTP + default: + r.scheme = HTTPS + } +} + +func (r *BaseRequest) SetRootDomain(rootDomain string) { + r.rootDomain = rootDomain +} + +func (r *BaseRequest) SetHttpMethod(method string) { + switch strings.ToUpper(method) { + case POST: + { + r.httpMethod = POST + } + case GET: + { + r.httpMethod = GET + } + default: + { + r.httpMethod = GET + } + } +} + +func (r *BaseRequest) SetPath(path string) { + r.path = path +} + +func (r *BaseRequest) GetService() string { + return r.service +} + +func (r *BaseRequest) GetUrl() string { + if r.httpMethod == GET { + return r.GetScheme() + "://" + r.domain + r.path + "?" + GetUrlQueriesEncoded(r.params) + } else if r.httpMethod == POST { + return r.GetScheme() + "://" + r.domain + r.path + } else { + return "" + } +} + +func (r *BaseRequest) GetVersion() string { + return r.version +} + +func (r *BaseRequest) GetContext() context.Context { + if r.context == nil { + return context.Background() + } + return r.context +} + +func (r *BaseRequest) SetContext(ctx context.Context) { + r.context = ctx +} + +func GetUrlQueriesEncoded(params map[string]string) string { + values := url.Values{} + for key, value := range params { + values.Add(key, value) + } + return values.Encode() +} + +func (r *BaseRequest) GetBodyReader() io.Reader { + if r.httpMethod == POST { + s := GetUrlQueriesEncoded(r.params) + return strings.NewReader(s) + } else { + return strings.NewReader("") + } +} + +func (r *BaseRequest) Init() *BaseRequest { + r.domain = "" + r.path = Path + r.params = make(map[string]string) + r.formParams = make(map[string]string) + return r +} + +func (r *BaseRequest) WithApiInfo(service, version, action string) *BaseRequest { + r.service = service + r.version = version + r.action = action + return r +} + +func (r *BaseRequest) WithContentType(contentType string) *BaseRequest { + r.contentType = contentType + return r +} + +// Deprecated, use request.GetServiceDomain instead +func GetServiceDomain(service string) (domain string) { + domain = service + "." + RootDomain + return +} + +func CompleteCommonParams(request Request, region string) { + params := request.GetParams() + params["Region"] = region + if request.GetVersion() != "" { + params["Version"] = request.GetVersion() + } + params["Action"] = request.GetAction() + params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) + params["Nonce"] = strconv.Itoa(rand.Int()) + params["RequestClient"] = "SDK_GO_1.0.335" +} + +func ConstructParams(req Request) (err error) { + value := reflect.ValueOf(req).Elem() + err = flatStructure(value, req, "") + //log.Printf("[DEBUG] params=%s", req.GetParams()) + return +} + +func flatStructure(value reflect.Value, request Request, prefix string) (err error) { + //log.Printf("[DEBUG] reflect value: %v", value.Type()) + valueType := value.Type() + for i := 0; i < valueType.NumField(); i++ { + tag := valueType.Field(i).Tag + nameTag, hasNameTag := tag.Lookup("name") + if !hasNameTag { + continue + } + field := value.Field(i) + kind := field.Kind() + if kind == reflect.Ptr && field.IsNil() { + continue + } + if kind == reflect.Ptr { + field = field.Elem() + kind = field.Kind() + } + key := prefix + nameTag + if kind == reflect.String { + s := field.String() + if s != "" { + request.GetParams()[key] = s + } + } else if kind == reflect.Bool { + request.GetParams()[key] = strconv.FormatBool(field.Bool()) + } else if kind == reflect.Int || kind == reflect.Int64 { + request.GetParams()[key] = strconv.FormatInt(field.Int(), 10) + } else if kind == reflect.Uint || kind == reflect.Uint64 { + request.GetParams()[key] = strconv.FormatUint(field.Uint(), 10) + } else if kind == reflect.Float64 { + request.GetParams()[key] = strconv.FormatFloat(field.Float(), 'f', -1, 64) + } else if kind == reflect.Slice { + list := value.Field(i) + for j := 0; j < list.Len(); j++ { + vj := list.Index(j) + key := prefix + nameTag + "." + strconv.Itoa(j) + kind = vj.Kind() + if kind == reflect.Ptr && vj.IsNil() { + continue + } + if kind == reflect.Ptr { + vj = vj.Elem() + kind = vj.Kind() + } + if kind == reflect.String { + request.GetParams()[key] = vj.String() + } else if kind == reflect.Bool { + request.GetParams()[key] = strconv.FormatBool(vj.Bool()) + } else if kind == reflect.Int || kind == reflect.Int64 { + request.GetParams()[key] = strconv.FormatInt(vj.Int(), 10) + } else if kind == reflect.Uint || kind == reflect.Uint64 { + request.GetParams()[key] = strconv.FormatUint(vj.Uint(), 10) + } else if kind == reflect.Float64 { + request.GetParams()[key] = strconv.FormatFloat(vj.Float(), 'f', -1, 64) + } else { + if err = flatStructure(vj, request, key+"."); err != nil { + return + } + } + } + } else { + if err = flatStructure(reflect.ValueOf(field.Interface()), request, prefix+nameTag+"."); err != nil { + return + } + } + } + return +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go new file mode 100644 index 0000000000000000000000000000000000000000..1b0e982cdd19a574a5e84a18db0c35e6213f4c26 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/response.go @@ -0,0 +1,121 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "encoding/json" + "fmt" + "io/ioutil" + + //"log" + "net/http" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +type Response interface { + ParseErrorFromHTTPResponse(body []byte) error +} + +type BaseResponse struct { +} + +type ErrorResponse struct { + Response struct { + Error struct { + Code string `json:"Code"` + Message string `json:"Message"` + } `json:"Error,omitempty"` + RequestId string `json:"RequestId"` + } `json:"Response"` +} + +type DeprecatedAPIErrorResponse struct { + Code int `json:"code"` + Message string `json:"message"` + CodeDesc string `json:"codeDesc"` +} + +func (r *BaseResponse) ParseErrorFromHTTPResponse(body []byte) (err error) { + resp := &ErrorResponse{} + err = json.Unmarshal(body, resp) + if err != nil { + msg := fmt.Sprintf("Fail to parse json content: %s, because: %s", body, err) + return errors.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + if resp.Response.Error.Code != "" { + return errors.NewTencentCloudSDKError(resp.Response.Error.Code, resp.Response.Error.Message, resp.Response.RequestId) + } + + deprecated := &DeprecatedAPIErrorResponse{} + err = json.Unmarshal(body, deprecated) + if err != nil { + msg := fmt.Sprintf("Fail to parse json content: %s, because: %s", body, err) + return errors.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + if deprecated.Code != 0 { + return errors.NewTencentCloudSDKError(deprecated.CodeDesc, deprecated.Message, "") + } + return nil +} + +func ParseErrorFromHTTPResponse(body []byte) (err error) { + resp := &ErrorResponse{} + err = json.Unmarshal(body, resp) + if err != nil { + msg := fmt.Sprintf("Fail to parse json content: %s, because: %s", body, err) + return errors.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + if resp.Response.Error.Code != "" { + return errors.NewTencentCloudSDKError(resp.Response.Error.Code, resp.Response.Error.Message, resp.Response.RequestId) + } + + deprecated := &DeprecatedAPIErrorResponse{} + err = json.Unmarshal(body, deprecated) + if err != nil { + msg := fmt.Sprintf("Fail to parse json content: %s, because: %s", body, err) + return errors.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + if deprecated.Code != 0 { + return errors.NewTencentCloudSDKError(deprecated.CodeDesc, deprecated.Message, "") + } + return nil +} + +func ParseFromHttpResponse(hr *http.Response, response Response) (err error) { + defer hr.Body.Close() + body, err := ioutil.ReadAll(hr.Body) + if err != nil { + msg := fmt.Sprintf("Fail to read response body because %s", err) + return errors.NewTencentCloudSDKError("ClientError.IOError", msg, "") + } + if hr.StatusCode != 200 { + msg := fmt.Sprintf("Request fail with http status code: %s, with body: %s", hr.Status, body) + return errors.NewTencentCloudSDKError("ClientError.HttpStatusCodeError", msg, "") + } + //log.Printf("[DEBUG] Response Body=%s", body) + err = response.ParseErrorFromHTTPResponse(body) + if err != nil { + return + } + err = json.Unmarshal(body, &response) + if err != nil { + msg := fmt.Sprintf("Fail to parse json content: %s, because: %s", body, err) + return errors.NewTencentCloudSDKError("ClientError.ParseJsonError", msg, "") + } + return +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/ini.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/ini.go new file mode 100644 index 0000000000000000000000000000000000000000..fbdb7f9229c7ea5b004df6777bd659b9f5e0f6e1 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/ini.go @@ -0,0 +1,100 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "fmt" + "io/ioutil" + "strings" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +var ( + globalSectionName = "____GLOBAL____" + iniErr = "ClientError.INIError" +) + +func openFile(path string) (data []byte, err error) { + data, err = ioutil.ReadFile(path) + if err != nil { + err = tcerr.NewTencentCloudSDKError(iniErr, err.Error(), "") + } + return +} + +func parse(path string) (*sections, error) { + result := §ions{map[string]*section{}} + buf, err := openFile(path) + if err != nil { + return §ions{}, err + } + content := string(buf) + + lines := strings.Split(content, "\n") + if len(lines) == 0 { + msg := fmt.Sprintf("the result of reading the %s is empty", path) + return §ions{}, tcerr.NewTencentCloudSDKError(iniErr, msg, "") + } + currentSectionName := globalSectionName + currentSection := §ion{make(map[string]*value)} + for i, line := range lines { + line = strings.Replace(line, "\r", "", -1) + line = strings.TrimSpace(line) + if len(line) == 0 { + continue + } + // comments + if strings.HasPrefix(line, "#") || strings.HasPrefix(line, ";") { + continue + } + // section name + if strings.HasPrefix(line, "[") { + if strings.HasSuffix(line, "]") { + tempSection := line[1 : len(line)-1] + if len(tempSection) == 0 { + msg := fmt.Sprintf("INI file %s lien %d is not valid: wrong section", path, i) + return result, tcerr.NewTencentCloudSDKError(iniErr, msg, "") + } + // Save the previous section + result.contains[currentSectionName] = currentSection + // new section + currentSectionName = tempSection + currentSection = §ion{make(map[string]*value, 0)} + continue + } else { + msg := fmt.Sprintf("INI file %s lien %d is not valid: wrong section", path, i) + return result, tcerr.NewTencentCloudSDKError(iniErr, msg, "") + } + } + + pos := strings.Index(line, "=") + if pos > 0 && pos < len(line)-1 { + key := line[:pos] + val := line[pos+1:] + + key = strings.TrimSpace(key) + val = strings.TrimSpace(val) + + v := &value{raw: val} + currentSection.content[key] = v + } + } + + result.contains[currentSectionName] = currentSection + return result, nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/netretry.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/netretry.go new file mode 100644 index 0000000000000000000000000000000000000000..f5ff9ac625030adc114cf6d18ea229dcee8be723 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/netretry.go @@ -0,0 +1,99 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "fmt" + "log" + "net" + "net/http" + "reflect" + "time" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const ( + tplNetworkFailureRetry = "[WARN] temporary network failure, retrying (%d/%d) in %f seconds: %s" +) + +func (c *Client) sendWithNetworkFailureRetry(req *http.Request, retryable bool) (resp *http.Response, err error) { + // make sure maxRetries is more than or equal 0 + var maxRetries int + if retryable { + maxRetries = maxInt(c.profile.NetworkFailureMaxRetries, 0) + } + durationFunc := safeDurationFunc(c.profile.NetworkFailureRetryDuration) + + for idx := 0; idx <= maxRetries; idx++ { + resp, err = c.sendHttp(req) + + // retry when error occurred and retryable and not the last retry + // should not sleep on last retry even if it's retryable + if err != nil && retryable && idx < maxRetries { + if err, ok := err.(net.Error); ok && (err.Timeout() || err.Temporary()) { + duration := durationFunc(idx) + if c.debug { + log.Printf(tplNetworkFailureRetry, idx, maxRetries, duration.Seconds(), err.Error()) + } + + time.Sleep(duration) + continue + } + } + + if err != nil { + msg := fmt.Sprintf("Fail to get response because %s", err) + err = errors.NewTencentCloudSDKError("ClientError.NetworkError", msg, "") + } + + return resp, err + } + + return resp, err +} + +func maxInt(a, b int) int { + if a > b { + return a + } + return b +} + +func safeDurationFunc(durationFunc profile.DurationFunc) profile.DurationFunc { + if durationFunc != nil { + return durationFunc + } + return profile.ExponentialBackoff +} + +// isRetryable means if request is retryable or not, +// depends on if request has a `ClientToken` field or not, +// request with `ClientToken` means it's idempotent and retryable, +// unretryable request SHOULDN'T retry for temporary network failure +func isRetryable(obj interface{}) bool { + // obj Must be struct ptr + getType := reflect.TypeOf(obj) + if getType.Kind() != reflect.Ptr || getType.Elem().Kind() != reflect.Struct { + return false + } + + // obj Must exist named field + _, ok := getType.Elem().FieldByName(fieldClientToken) + return ok +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/client_profile.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/client_profile.go new file mode 100644 index 0000000000000000000000000000000000000000..113068ccda6e324ced2758a4c6d998a8142b7573 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/client_profile.go @@ -0,0 +1,73 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 profile + +import ( + "math" + "time" +) + +type DurationFunc func(index int) time.Duration + +func ConstantDurationFunc(duration time.Duration) DurationFunc { + return func(int) time.Duration { + return duration + } +} + +func ExponentialBackoff(index int) time.Duration { + seconds := math.Pow(2, float64(index)) + return time.Duration(seconds) * time.Second +} + +type ClientProfile struct { + HttpProfile *HttpProfile + // Valid choices: HmacSHA1, HmacSHA256, TC3-HMAC-SHA256. + // Default value is TC3-HMAC-SHA256. + SignMethod string + UnsignedPayload bool + // Valid choices: zh-CN, en-US. + // Default value is zh-CN. + Language string + Debug bool + // define Whether to enable Regional auto switch + DisableRegionBreaker bool + + // Deprecated. Use BackupEndpoint instead. + BackupEndPoint string + BackupEndpoint string + + // define how to retry request + NetworkFailureMaxRetries int + NetworkFailureRetryDuration DurationFunc + RateLimitExceededMaxRetries int + RateLimitExceededRetryDuration DurationFunc +} + +func NewClientProfile() *ClientProfile { + return &ClientProfile{ + HttpProfile: NewHttpProfile(), + SignMethod: "TC3-HMAC-SHA256", + UnsignedPayload: false, + Language: "zh-CN", + Debug: false, + // now is true, will become to false in future + DisableRegionBreaker: true, + BackupEndPoint: "", + BackupEndpoint: "", + } +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/http_profile.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/http_profile.go new file mode 100644 index 0000000000000000000000000000000000000000..9acd6833324ec94afebfc80cfeced6cb60ee4b69 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile/http_profile.go @@ -0,0 +1,37 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 profile + +type HttpProfile struct { + ReqMethod string + ReqTimeout int + Scheme string + RootDomain string + Endpoint string + // Deprecated, use Scheme instead + Protocol string +} + +func NewHttpProfile() *HttpProfile { + return &HttpProfile{ + ReqMethod: "POST", + ReqTimeout: 60, + Scheme: "HTTPS", + RootDomain: "", + Endpoint: "", + } +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile_provider.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile_provider.go new file mode 100644 index 0000000000000000000000000000000000000000..64a7db95adcf680b9ebe79508ed3da06154fa2f1 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile_provider.go @@ -0,0 +1,112 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "os" + "path/filepath" + "runtime" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +const ( + EnvCredentialFile = "TENCENTCLOUD_CREDENTIALS_FILE" +) + +type ProfileProvider struct { +} + +// DefaultProfileProvider return a default Profile provider +// profile path : +// 1. The value of the environment variable TENCENTCLOUD_CREDENTIALS_FILE +// 2. linux: ~/.tencentcloud/credentials +// windows: \c:\Users\NAME\.tencentcloud\credentials +func DefaultProfileProvider() *ProfileProvider { + return &ProfileProvider{} +} + +// getHomePath return home directory according to the system. +// if the environmental variables does not exist, it will return empty string +func getHomePath() string { + // Windows + if runtime.GOOS == "windows" { + return os.Getenv("USERPROFILE") + } + // *nix + return os.Getenv("HOME") +} + +func getCredentialsFilePath() string { + homePath := getHomePath() + if homePath == "" { + return homePath + } + return filepath.Join(homePath, ".tencentcloud", "credentials") +} + +func checkDefaultFile() (path string, err error) { + path = getCredentialsFilePath() + if path == "" { + return path, nil + } + _, err = os.Stat(path) + if err != nil { + if os.IsNotExist(err) { + return "", nil + } + return "", err + } + return path, nil +} + +func (p *ProfileProvider) GetCredential() (CredentialIface, error) { + path, ok := os.LookupEnv(EnvCredentialFile) + // if not set custom file path, will use the default path + if !ok { + var err error + path, err = checkDefaultFile() + // only when the file exist but failed read it the err is not nil + if err != nil { + return nil, tcerr.NewTencentCloudSDKError(creErr, "Failed to find profile file,"+err.Error(), "") + } + // when the path is "" means the file dose not exist + if path == "" { + return nil, fileDoseNotExist + } + // if the EnvCredentialFile is set to "", will return an error + } else if path == "" { + return nil, tcerr.NewTencentCloudSDKError(creErr, "Environment variable '"+EnvCredentialFile+"' cannot be empty", "") + } + + cfg, err := parse(path) + if err != nil { + return nil, err + } + + sId := cfg.section("default").key("secret_id").string() + sKey := cfg.section("default").key("secret_key").string() + // if sId and sKey is "", but the credential file exist, means an error + if sId == "" || sKey == "" { + return nil, tcerr.NewTencentCloudSDKError(creErr, "Failed to parse profile file,please confirm whether it contains \"secret_id\" and \"secret_key\" in section: \"default\" ", "") + } + return &Credential{ + SecretId: sId, + SecretKey: sKey, + Token: "", + }, nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/provider.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/provider.go new file mode 100644 index 0000000000000000000000000000000000000000..19e0b9afa519fac66dcb6a28399a3e480f69838b --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/provider.go @@ -0,0 +1,37 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + +var ( + envNotSet = tcerr.NewTencentCloudSDKError(creErr, "could not find environmental variable", "") + fileDoseNotExist = tcerr.NewTencentCloudSDKError(creErr, "could not find config file", "") + noCvmRole = tcerr.NewTencentCloudSDKError(creErr, "get cvm role name failed, Please confirm whether the role is bound", "") +) + +// Provider provide credential to build client. +// +// Now there are four kinds provider: +// EnvProvider : get credential from your Variable environment +// ProfileProvider : get credential from your profile +// CvmRoleProvider : get credential from your cvm role +// RoleArnProvider : get credential from your role arn +type Provider interface { + // GetCredential get the credential interface + GetCredential() (CredentialIface, error) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/provider_chain.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/provider_chain.go new file mode 100644 index 0000000000000000000000000000000000000000..d4ab6358712e128689f178cb3449033d75ca1252 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/provider_chain.go @@ -0,0 +1,57 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +type ProviderChain struct { + Providers []Provider +} + +// NewProviderChain returns a provider chain in your custom order +func NewProviderChain(providers []Provider) Provider { + return &ProviderChain{ + Providers: providers, + } +} + +// DefaultProviderChain returns a default provider chain and try to get credentials in the following order: +// 1. Environment variable +// 2. Profile +// 3. CvmRole +// If you want to customize the search order, please use the function NewProviderChain +func DefaultProviderChain() Provider { + return NewProviderChain([]Provider{DefaultEnvProvider(), DefaultProfileProvider(), DefaultCvmRoleProvider()}) +} + +func (c *ProviderChain) GetCredential() (CredentialIface, error) { + for _, provider := range c.Providers { + cred, err := provider.GetCredential() + if err != nil { + if err == envNotSet || err == fileDoseNotExist || err == noCvmRole { + continue + } else { + return nil, err + } + } + return cred, err + } + return nil, tcerr.NewTencentCloudSDKError(creErr, "no credential found in every providers", "") + +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/ratelimitretry.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/ratelimitretry.go new file mode 100644 index 0000000000000000000000000000000000000000..3bae90fce6cc4a0ed8a42e129609ad1f9c242327 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/ratelimitretry.go @@ -0,0 +1,74 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "bytes" + "io" + "io/ioutil" + "log" + "net/http" + "time" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +const ( + codeLimitExceeded = "RequestLimitExceeded" + tplRateLimitRetry = "[WARN] rate limit exceeded, retrying (%d/%d) in %f seconds: %s" +) + +func (c *Client) sendWithRateLimitRetry(req *http.Request, retryable bool) (resp *http.Response, err error) { + // make sure maxRetries is more than 0 + maxRetries := maxInt(c.profile.RateLimitExceededMaxRetries, 0) + durationFunc := safeDurationFunc(c.profile.RateLimitExceededRetryDuration) + + var shadow []byte + for idx := 0; idx <= maxRetries; idx++ { + resp, err = c.sendWithNetworkFailureRetry(req, retryable) + if err != nil { + return + } + + resp.Body, shadow = shadowRead(resp.Body) + + err = tchttp.ParseErrorFromHTTPResponse(shadow) + // should not sleep on last request + if err, ok := err.(*errors.TencentCloudSDKError); ok && err.Code == codeLimitExceeded && idx < maxRetries { + duration := durationFunc(idx) + if c.debug { + log.Printf(tplRateLimitRetry, idx, maxRetries, duration.Seconds(), err.Error()) + } + + time.Sleep(duration) + continue + } + + return resp, err + } + + return resp, err +} + +func shadowRead(reader io.ReadCloser) (io.ReadCloser, []byte) { + val, err := ioutil.ReadAll(reader) + if err != nil { + return reader, nil + } + return ioutil.NopCloser(bytes.NewBuffer(val)), val +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/regions/regions.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/regions/regions.go new file mode 100644 index 0000000000000000000000000000000000000000..56f76296816ee33ba108bee4a8e51f53d06f3d4f --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/regions/regions.go @@ -0,0 +1,60 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 regions + +const ( + // 曼谷 + Bangkok = "ap-bangkok" + // 北京 + Beijing = "ap-beijing" + // 成都 + Chengdu = "ap-chengdu" + // 重庆 + Chongqing = "ap-chongqing" + // 广州 + Guangzhou = "ap-guangzhou" + // 广州Open + GuangzhouOpen = "ap-guangzhou-open" + // 中国香港 + HongKong = "ap-hongkong" + // 孟买 + Mumbai = "ap-mumbai" + // 首尔 + Seoul = "ap-seoul" + // 上海 + Shanghai = "ap-shanghai" + // 南京 + Nanjing = "ap-nanjing" + // 上海金融 + ShanghaiFSI = "ap-shanghai-fsi" + // 深圳金融 + ShenzhenFSI = "ap-shenzhen-fsi" + // 新加坡 + Singapore = "ap-singapore" + // 东京 + Tokyo = "ap-tokyo" + // 法兰克福 + Frankfurt = "eu-frankfurt" + // 莫斯科 + Moscow = "eu-moscow" + // 阿什本 + Ashburn = "na-ashburn" + // 硅谷 + SiliconValley = "na-siliconvalley" + // 多伦多 + Toronto = "na-toronto" +) diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/role_arn_credential.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/role_arn_credential.go new file mode 100644 index 0000000000000000000000000000000000000000..8d17301d5157555de00f7e1b998f9de10ca44bff --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/role_arn_credential.go @@ -0,0 +1,70 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "log" + "time" +) + +type RoleArnCredential struct { + roleArn string + roleSessionName string + durationSeconds int64 + expiredTime int64 + token string + tmpSecretId string + tmpSecretKey string + source *RoleArnProvider +} + +func (c *RoleArnCredential) GetSecretId() string { + if c.needRefresh() { + c.refresh() + } + return c.tmpSecretId +} + +func (c *RoleArnCredential) GetSecretKey() string { + if c.needRefresh() { + c.refresh() + } + return c.tmpSecretKey + +} + +func (c *RoleArnCredential) GetToken() string { + if c.needRefresh() { + c.refresh() + } + return c.token +} + +func (c *RoleArnCredential) needRefresh() bool { + if c.tmpSecretKey == "" || c.tmpSecretId == "" || c.token == "" || c.expiredTime <= time.Now().Unix() { + return true + } + return false +} + +func (c *RoleArnCredential) refresh() { + newCre, err := c.source.GetCredential() + if err != nil { + log.Println(err) + } + *c = *newCre.(*RoleArnCredential) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/role_arn_provider.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/role_arn_provider.go new file mode 100644 index 0000000000000000000000000000000000000000..3c5e3b4d5ce208b7483905e2c6834ebd8f52d9d1 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/role_arn_provider.go @@ -0,0 +1,121 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "encoding/json" + "strconv" + "time" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/regions" +) + +const ( + endpoint = "sts.tencentcloudapi.com" + service = "sts" + version = "2018-08-13" + region = regions.Guangzhou + defaultSessionName = "tencentcloud-go-sdk-" + action = "AssumeRole" + defaultDurationSeconds = 7200 +) + +type RoleArnProvider struct { + longSecretId string + longSecretKey string + roleArn string + roleSessionName string + durationSeconds int64 +} + +type stsRsp struct { + Response struct { + Credentials struct { + Token string `json:"Token"` + TmpSecretId string `json:"TmpSecretId"` + TmpSecretKey string `json:"TmpSecretKey"` + } `json:"Credentials"` + ExpiredTime int `json:"ExpiredTime"` + Expiration time.Time `json:"Expiration"` + RequestId string `json:"RequestId"` + } `json:"Response"` +} + +func NewRoleArnProvider(secretId, secretKey, roleArn, sessionName string, duration int64) *RoleArnProvider { + return &RoleArnProvider{ + longSecretId: secretId, + longSecretKey: secretKey, + roleArn: roleArn, + roleSessionName: sessionName, + durationSeconds: duration, + } +} + +// DefaultRoleArnProvider returns a RoleArnProvider that use some default options: +// 1. roleSessionName will be "tencentcloud-go-sdk-" + timestamp +// 2. durationSeconds will be 7200s +func DefaultRoleArnProvider(secretId, secretKey, roleArn string) *RoleArnProvider { + return NewRoleArnProvider(secretId, secretKey, roleArn, defaultSessionName+strconv.FormatInt(time.Now().UnixNano()/1000, 10), defaultDurationSeconds) +} + +func (r *RoleArnProvider) GetCredential() (CredentialIface, error) { + if r.durationSeconds > 43200 || r.durationSeconds <= 0 { + return nil, tcerr.NewTencentCloudSDKError(creErr, "Assume Role durationSeconds should be in the range of 0~43200s", "") + } + credential := NewCredential(r.longSecretId, r.longSecretKey) + cpf := profile.NewClientProfile() + cpf.HttpProfile.Endpoint = endpoint + cpf.HttpProfile.ReqMethod = "POST" + + client := NewCommonClient(credential, region, cpf) + request := tchttp.NewCommonRequest(service, version, action) + + params := map[string]interface{}{ + "RoleArn": r.roleArn, + "RoleSessionName": r.roleSessionName, + "DurationSeconds": r.durationSeconds, + } + err := request.SetActionParameters(params) + if err != nil { + return nil, err + } + + response := tchttp.NewCommonResponse() + err = client.Send(request, response) + if err != nil { + return nil, err + } + rspSt := new(stsRsp) + + if err = json.Unmarshal(response.GetBody(), rspSt); err != nil { + return nil, tcerr.NewTencentCloudSDKError(creErr, err.Error(), "") + } + + return &RoleArnCredential{ + roleArn: r.roleArn, + roleSessionName: r.roleSessionName, + durationSeconds: r.durationSeconds, + expiredTime: int64(rspSt.Response.ExpiredTime) - r.durationSeconds/10*9, // credential's actual duration time is 1/10 of the original + token: rspSt.Response.Credentials.Token, + tmpSecretId: rspSt.Response.Credentials.TmpSecretId, + tmpSecretKey: rspSt.Response.Credentials.TmpSecretKey, + source: r, + }, nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/section.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/section.go new file mode 100644 index 0000000000000000000000000000000000000000..2ebfc05c99a104880fb3c71ad10781c71fec5d77 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/section.go @@ -0,0 +1,43 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +type sections struct { + contains map[string]*section +} + +func (ss sections) section(name string) *section { + s, ok := ss.contains[name] + if !ok { + s = new(section) + ss.contains[name] = s + } + return s +} + +type section struct { + content map[string]*value +} + +func (s *section) key(name string) *value { + v, ok := s.content[name] + if !ok { + v = new(value) + s.content[name] = v + } + return v +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/sign.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/sign.go new file mode 100644 index 0000000000000000000000000000000000000000..44c5be0c6becdc55da57785d06cb31264abb0bf3 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/sign.go @@ -0,0 +1,106 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "bytes" + "crypto/hmac" + "crypto/sha1" + "crypto/sha256" + "encoding/base64" + "encoding/hex" + "sort" + + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +const ( + SHA256 = "HmacSHA256" + SHA1 = "HmacSHA1" +) + +func Sign(s, secretKey, method string) string { + hashed := hmac.New(sha1.New, []byte(secretKey)) + if method == SHA256 { + hashed = hmac.New(sha256.New, []byte(secretKey)) + } + hashed.Write([]byte(s)) + + return base64.StdEncoding.EncodeToString(hashed.Sum(nil)) +} + +func sha256hex(s string) string { + b := sha256.Sum256([]byte(s)) + return hex.EncodeToString(b[:]) +} + +func hmacsha256(s, key string) string { + hashed := hmac.New(sha256.New, []byte(key)) + hashed.Write([]byte(s)) + return string(hashed.Sum(nil)) +} + +func signRequest(request tchttp.Request, credential CredentialIface, method string) (err error) { + if method != SHA256 { + method = SHA1 + } + checkAuthParams(request, credential, method) + s := getStringToSign(request) + signature := Sign(s, credential.GetSecretKey(), method) + request.GetParams()["Signature"] = signature + return +} + +func checkAuthParams(request tchttp.Request, credential CredentialIface, method string) { + params := request.GetParams() + params["SecretId"] = credential.GetSecretId() + if token := credential.GetToken(); len(token) != 0 { + params["Token"] = token + } + params["SignatureMethod"] = method + delete(params, "Signature") +} + +func getStringToSign(request tchttp.Request) string { + method := request.GetHttpMethod() + domain := request.GetDomain() + path := request.GetPath() + + var buf bytes.Buffer + buf.WriteString(method) + buf.WriteString(domain) + buf.WriteString(path) + buf.WriteString("?") + + params := request.GetParams() + // sort params + keys := make([]string, 0, len(params)) + for k := range params { + keys = append(keys, k) + } + sort.Strings(keys) + + for i := range keys { + k := keys[i] + buf.WriteString(k) + buf.WriteString("=") + buf.WriteString(params[k]) + buf.WriteString("&") + } + buf.Truncate(buf.Len() - 1) + return buf.String() +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/testdata_invalid.ini b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/testdata_invalid.ini new file mode 100644 index 0000000000000000000000000000000000000000..c86745867516b3c8e8284e5764c1ad552af17320 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/testdata_invalid.ini @@ -0,0 +1,5 @@ +# wrong section name +[] +invalidKey1 = +;wrong section +[default diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/testdata_valid.ini b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/testdata_valid.ini new file mode 100644 index 0000000000000000000000000000000000000000..b120ba194d4dac95e6e6bed17074f033a42e8883 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/testdata_valid.ini @@ -0,0 +1,11 @@ +app=tencentcloud-sdk-go + +# default +[default] +key1 = value1 + key2 = 2 + +;section 2 +[custom] +customKey1 = 3.1415 +customKey2 = true diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/types.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/types.go new file mode 100644 index 0000000000000000000000000000000000000000..65d51155781ef30ab8e1f11839e7d834747c1881 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/types.go @@ -0,0 +1,111 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +func IntPtr(v int) *int { + return &v +} + +func Int64Ptr(v int64) *int64 { + return &v +} + +func UintPtr(v uint) *uint { + return &v +} + +func Uint64Ptr(v uint64) *uint64 { + return &v +} + +func Float64Ptr(v float64) *float64 { + return &v +} + +func BoolPtr(v bool) *bool { + return &v +} + +func StringPtr(v string) *string { + return &v +} + +func StringValues(ptrs []*string) []string { + values := make([]string, len(ptrs)) + for i := 0; i < len(ptrs); i++ { + if ptrs[i] != nil { + values[i] = *ptrs[i] + } + } + return values +} + +func IntPtrs(vals []int) []*int { + ptrs := make([]*int, len(vals)) + for i := 0; i < len(vals); i++ { + ptrs[i] = &vals[i] + } + return ptrs +} + +func Int64Ptrs(vals []int64) []*int64 { + ptrs := make([]*int64, len(vals)) + for i := 0; i < len(vals); i++ { + ptrs[i] = &vals[i] + } + return ptrs +} + +func UintPtrs(vals []uint) []*uint { + ptrs := make([]*uint, len(vals)) + for i := 0; i < len(vals); i++ { + ptrs[i] = &vals[i] + } + return ptrs +} + +func Uint64Ptrs(vals []uint64) []*uint64 { + ptrs := make([]*uint64, len(vals)) + for i := 0; i < len(vals); i++ { + ptrs[i] = &vals[i] + } + return ptrs +} + +func Float64Ptrs(vals []float64) []*float64 { + ptrs := make([]*float64, len(vals)) + for i := 0; i < len(vals); i++ { + ptrs[i] = &vals[i] + } + return ptrs +} + +func BoolPtrs(vals []bool) []*bool { + ptrs := make([]*bool, len(vals)) + for i := 0; i < len(vals); i++ { + ptrs[i] = &vals[i] + } + return ptrs +} + +func StringPtrs(vals []string) []*string { + ptrs := make([]*string, len(vals)) + for i := 0; i < len(vals); i++ { + ptrs[i] = &vals[i] + } + return ptrs +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/value.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/value.go new file mode 100644 index 0000000000000000000000000000000000000000..b0fa73abc9b1319ff37f57419dcd38c3aece1090 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/value.go @@ -0,0 +1,79 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 common + +import ( + "fmt" + "strconv" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" +) + +type value struct { + raw string +} + +func (v *value) int() (int, error) { + i, e := strconv.Atoi(v.raw) + if e != nil { + msg := fmt.Sprintf("failed to parsing %s to int: %s", v.raw, e.Error()) + e = tcerr.NewTencentCloudSDKError(iniErr, msg, "") + } + return i, e +} + +func (v *value) int64() (int64, error) { + i, e := strconv.ParseInt(v.raw, 10, 64) + if e != nil { + msg := fmt.Sprintf("failed to parsing %s to int64: %s", v.raw, e.Error()) + e = tcerr.NewTencentCloudSDKError(iniErr, msg, "") + } + return i, e +} + +func (v *value) string() string { + return v.raw +} + +func (v *value) bool() (bool, error) { + switch v.raw { + case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On": + return true, nil + case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off": + return false, nil + } + errorMsg := fmt.Sprintf("failed to parsing \"%s\" to Bool: invalid syntax", v.raw) + return false, tcerr.NewTencentCloudSDKError(iniErr, errorMsg, "") +} + +func (v *value) float32() (float32, error) { + f, e := strconv.ParseFloat(v.raw, 32) + if e != nil { + msg := fmt.Sprintf("failed to parse %s to Float32: %s", v.raw, e.Error()) + e = tcerr.NewTencentCloudSDKError(iniErr, msg, "") + } + return float32(f), e +} +func (v *value) float64() (float64, error) { + f, e := strconv.ParseFloat(v.raw, 64) + if e != nil { + msg := fmt.Sprintf("failed to parse %s to Float64: %s", v.raw, e.Error()) + e = tcerr.NewTencentCloudSDKError(iniErr, msg, "") + } + + return f, e +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/LICENSE b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..efc75a2253eac0053be445ee5f529090466b9faf --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/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/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go new file mode 100644 index 0000000000000000000000000000000000000000..fb0ac8207e5c3659acf49c2ffa7f9b6b2a226646 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/client.go @@ -0,0 +1,6962 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v20170312 + +import ( + "context" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const APIVersion = "2017-03-12" + +type Client struct { + common.Client +} + +// Deprecated +func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { + cpf := profile.NewClientProfile() + client = &Client{} + client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf) + return +} + +func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { + client = &Client{} + client.Init(region). + WithCredential(credential). + WithProfile(clientProfile) + return +} + +func NewAllocateHostsRequest() (request *AllocateHostsRequest) { + request = &AllocateHostsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "AllocateHosts") + + return +} + +func NewAllocateHostsResponse() (response *AllocateHostsResponse) { + response = &AllocateHostsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AllocateHosts +// 本接口 (AllocateHosts) 用于创建一个或多个指定配置的CDH实例。 +// +// * 当HostChargeType为PREPAID时,必须指定HostChargePrepaid参数。 +// +// 可能返回的错误码: +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// RESOURCEINSUFFICIENT_ZONESOLDOUTFORSPECIFIEDINSTANCE = "ResourceInsufficient.ZoneSoldOutForSpecifiedInstance" +func (c *Client) AllocateHosts(request *AllocateHostsRequest) (response *AllocateHostsResponse, err error) { + if request == nil { + request = NewAllocateHostsRequest() + } + + response = NewAllocateHostsResponse() + err = c.Send(request, response) + return +} + +// AllocateHosts +// 本接口 (AllocateHosts) 用于创建一个或多个指定配置的CDH实例。 +// +// * 当HostChargeType为PREPAID时,必须指定HostChargePrepaid参数。 +// +// 可能返回的错误码: +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// RESOURCEINSUFFICIENT_ZONESOLDOUTFORSPECIFIEDINSTANCE = "ResourceInsufficient.ZoneSoldOutForSpecifiedInstance" +func (c *Client) AllocateHostsWithContext(ctx context.Context, request *AllocateHostsRequest) (response *AllocateHostsResponse, err error) { + if request == nil { + request = NewAllocateHostsRequest() + } + request.SetContext(ctx) + + response = NewAllocateHostsResponse() + err = c.Send(request, response) + return +} + +func NewAssociateInstancesKeyPairsRequest() (request *AssociateInstancesKeyPairsRequest) { + request = &AssociateInstancesKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "AssociateInstancesKeyPairs") + + return +} + +func NewAssociateInstancesKeyPairsResponse() (response *AssociateInstancesKeyPairsResponse) { + response = &AssociateInstancesKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateInstancesKeyPairs +// 本接口 (AssociateInstancesKeyPairs) 用于将密钥绑定到实例上。 +// +// +// +// * 将密钥的公钥写入到实例的`SSH`配置当中,用户就可以通过该密钥的私钥来登录实例。 +// +// * 如果实例原来绑定过密钥,那么原来的密钥将失效。 +// +// * 如果实例原来是通过密码登录,绑定密钥后无法使用密码登录。 +// +// * 支持批量操作。每次请求批量实例的上限为100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) AssociateInstancesKeyPairs(request *AssociateInstancesKeyPairsRequest) (response *AssociateInstancesKeyPairsResponse, err error) { + if request == nil { + request = NewAssociateInstancesKeyPairsRequest() + } + + response = NewAssociateInstancesKeyPairsResponse() + err = c.Send(request, response) + return +} + +// AssociateInstancesKeyPairs +// 本接口 (AssociateInstancesKeyPairs) 用于将密钥绑定到实例上。 +// +// +// +// * 将密钥的公钥写入到实例的`SSH`配置当中,用户就可以通过该密钥的私钥来登录实例。 +// +// * 如果实例原来绑定过密钥,那么原来的密钥将失效。 +// +// * 如果实例原来是通过密码登录,绑定密钥后无法使用密码登录。 +// +// * 支持批量操作。每次请求批量实例的上限为100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) AssociateInstancesKeyPairsWithContext(ctx context.Context, request *AssociateInstancesKeyPairsRequest) (response *AssociateInstancesKeyPairsResponse, err error) { + if request == nil { + request = NewAssociateInstancesKeyPairsRequest() + } + request.SetContext(ctx) + + response = NewAssociateInstancesKeyPairsResponse() + err = c.Send(request, response) + return +} + +func NewAssociateSecurityGroupsRequest() (request *AssociateSecurityGroupsRequest) { + request = &AssociateSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "AssociateSecurityGroups") + + return +} + +func NewAssociateSecurityGroupsResponse() (response *AssociateSecurityGroupsResponse) { + response = &AssociateSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateSecurityGroups +// 本接口 (AssociateSecurityGroups) 用于绑定安全组到指定实例。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed" +// LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded" +// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded" +// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// SECGROUPACTIONFAILURE = "SecGroupActionFailure" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +func (c *Client) AssociateSecurityGroups(request *AssociateSecurityGroupsRequest) (response *AssociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewAssociateSecurityGroupsRequest() + } + + response = NewAssociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// AssociateSecurityGroups +// 本接口 (AssociateSecurityGroups) 用于绑定安全组到指定实例。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed" +// LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded" +// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded" +// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// SECGROUPACTIONFAILURE = "SecGroupActionFailure" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +func (c *Client) AssociateSecurityGroupsWithContext(ctx context.Context, request *AssociateSecurityGroupsRequest) (response *AssociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewAssociateSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewAssociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewCreateDisasterRecoverGroupRequest() (request *CreateDisasterRecoverGroupRequest) { + request = &CreateDisasterRecoverGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "CreateDisasterRecoverGroup") + + return +} + +func NewCreateDisasterRecoverGroupResponse() (response *CreateDisasterRecoverGroupResponse) { + response = &CreateDisasterRecoverGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateDisasterRecoverGroup +// 本接口 (CreateDisasterRecoverGroup)用于创建[分散置放群组](https://cloud.tencent.com/document/product/213/15486)。创建好的置放群组,可在[创建实例](https://cloud.tencent.com/document/api/213/15730)时指定。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +func (c *Client) CreateDisasterRecoverGroup(request *CreateDisasterRecoverGroupRequest) (response *CreateDisasterRecoverGroupResponse, err error) { + if request == nil { + request = NewCreateDisasterRecoverGroupRequest() + } + + response = NewCreateDisasterRecoverGroupResponse() + err = c.Send(request, response) + return +} + +// CreateDisasterRecoverGroup +// 本接口 (CreateDisasterRecoverGroup)用于创建[分散置放群组](https://cloud.tencent.com/document/product/213/15486)。创建好的置放群组,可在[创建实例](https://cloud.tencent.com/document/api/213/15730)时指定。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +func (c *Client) CreateDisasterRecoverGroupWithContext(ctx context.Context, request *CreateDisasterRecoverGroupRequest) (response *CreateDisasterRecoverGroupResponse, err error) { + if request == nil { + request = NewCreateDisasterRecoverGroupRequest() + } + request.SetContext(ctx) + + response = NewCreateDisasterRecoverGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateImageRequest() (request *CreateImageRequest) { + request = &CreateImageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "CreateImage") + + return +} + +func NewCreateImageResponse() (response *CreateImageResponse) { + response = &CreateImageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateImage +// 本接口(CreateImage)用于将实例的系统盘制作为新镜像,创建后的镜像可以用于创建实例。 +// +// 可能返回的错误码: +// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER_DATADISKIDCONTAINSROOTDISK = "InvalidParameter.DataDiskIdContainsRootDisk" +// INVALIDPARAMETER_DATADISKNOTBELONGSPECIFIEDINSTANCE = "InvalidParameter.DataDiskNotBelongSpecifiedInstance" +// INVALIDPARAMETER_DUPLICATESYSTEMSNAPSHOTS = "InvalidParameter.DuplicateSystemSnapshots" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_INVALIDDEPENDENCE = "InvalidParameter.InvalidDependence" +// INVALIDPARAMETER_LOCALDATADISKNOTSUPPORT = "InvalidParameter.LocalDataDiskNotSupport" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETER_SPECIFYONEPARAMETER = "InvalidParameter.SpecifyOneParameter" +// INVALIDPARAMETER_SWAPDISKNOTSUPPORT = "InvalidParameter.SwapDiskNotSupport" +// INVALIDPARAMETER_SYSTEMSNAPSHOTNOTFOUND = "InvalidParameter.SystemSnapshotNotFound" +// INVALIDPARAMETER_VALUETOOLARGE = "InvalidParameter.ValueTooLarge" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEUNAVAILABLE_SNAPSHOTCREATING = "ResourceUnavailable.SnapshotCreating" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_NOTSUPPORTINSTANCEIMAGE = "UnsupportedOperation.NotSupportInstanceImage" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) CreateImage(request *CreateImageRequest) (response *CreateImageResponse, err error) { + if request == nil { + request = NewCreateImageRequest() + } + + response = NewCreateImageResponse() + err = c.Send(request, response) + return +} + +// CreateImage +// 本接口(CreateImage)用于将实例的系统盘制作为新镜像,创建后的镜像可以用于创建实例。 +// +// 可能返回的错误码: +// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER_DATADISKIDCONTAINSROOTDISK = "InvalidParameter.DataDiskIdContainsRootDisk" +// INVALIDPARAMETER_DATADISKNOTBELONGSPECIFIEDINSTANCE = "InvalidParameter.DataDiskNotBelongSpecifiedInstance" +// INVALIDPARAMETER_DUPLICATESYSTEMSNAPSHOTS = "InvalidParameter.DuplicateSystemSnapshots" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_INVALIDDEPENDENCE = "InvalidParameter.InvalidDependence" +// INVALIDPARAMETER_LOCALDATADISKNOTSUPPORT = "InvalidParameter.LocalDataDiskNotSupport" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETER_SPECIFYONEPARAMETER = "InvalidParameter.SpecifyOneParameter" +// INVALIDPARAMETER_SWAPDISKNOTSUPPORT = "InvalidParameter.SwapDiskNotSupport" +// INVALIDPARAMETER_SYSTEMSNAPSHOTNOTFOUND = "InvalidParameter.SystemSnapshotNotFound" +// INVALIDPARAMETER_VALUETOOLARGE = "InvalidParameter.ValueTooLarge" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEUNAVAILABLE_SNAPSHOTCREATING = "ResourceUnavailable.SnapshotCreating" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_NOTSUPPORTINSTANCEIMAGE = "UnsupportedOperation.NotSupportInstanceImage" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) CreateImageWithContext(ctx context.Context, request *CreateImageRequest) (response *CreateImageResponse, err error) { + if request == nil { + request = NewCreateImageRequest() + } + request.SetContext(ctx) + + response = NewCreateImageResponse() + err = c.Send(request, response) + return +} + +func NewCreateKeyPairRequest() (request *CreateKeyPairRequest) { + request = &CreateKeyPairRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "CreateKeyPair") + + return +} + +func NewCreateKeyPairResponse() (response *CreateKeyPairResponse) { + response = &CreateKeyPairResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateKeyPair +// 本接口 (CreateKeyPair) 用于创建一个 `OpenSSH RSA` 密钥对,可以用于登录 `Linux` 实例。 +// +// +// +// * 开发者只需指定密钥对名称,即可由系统自动创建密钥对,并返回所生成的密钥对的 `ID` 及其公钥、私钥的内容。 +// +// * 密钥对名称不能和已经存在的密钥对的名称重复。 +// +// * 私钥的内容可以保存到文件中作为 `SSH` 的一种认证方式。 +// +// * 腾讯云不会保存用户的私钥,请妥善保管。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" +// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate" +// INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty" +// INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar" +// INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) CreateKeyPair(request *CreateKeyPairRequest) (response *CreateKeyPairResponse, err error) { + if request == nil { + request = NewCreateKeyPairRequest() + } + + response = NewCreateKeyPairResponse() + err = c.Send(request, response) + return +} + +// CreateKeyPair +// 本接口 (CreateKeyPair) 用于创建一个 `OpenSSH RSA` 密钥对,可以用于登录 `Linux` 实例。 +// +// +// +// * 开发者只需指定密钥对名称,即可由系统自动创建密钥对,并返回所生成的密钥对的 `ID` 及其公钥、私钥的内容。 +// +// * 密钥对名称不能和已经存在的密钥对的名称重复。 +// +// * 私钥的内容可以保存到文件中作为 `SSH` 的一种认证方式。 +// +// * 腾讯云不会保存用户的私钥,请妥善保管。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" +// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate" +// INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty" +// INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar" +// INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) CreateKeyPairWithContext(ctx context.Context, request *CreateKeyPairRequest) (response *CreateKeyPairResponse, err error) { + if request == nil { + request = NewCreateKeyPairRequest() + } + request.SetContext(ctx) + + response = NewCreateKeyPairResponse() + err = c.Send(request, response) + return +} + +func NewCreateLaunchTemplateRequest() (request *CreateLaunchTemplateRequest) { + request = &CreateLaunchTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "CreateLaunchTemplate") + + return +} + +func NewCreateLaunchTemplateResponse() (response *CreateLaunchTemplateResponse) { + response = &CreateLaunchTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateLaunchTemplate +// 本接口(CreateLaunchTemplate)用于创建实例启动模板。 +// +// +// +// 实例启动模板是一种配置数据并可用于创建实例,其内容包含创建实例所需的配置,比如实例类型,数据盘和系统盘的类型和大小,以及安全组等信息。 +// +// +// +// 初次创建实例模板后,其模板版本为默认版本1,新版本的创建可使用CreateLaunchTemplateVersion创建,版本号递增。默认情况下,在RunInstances中指定实例启动模板,若不指定模板版本号,则使用默认版本。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat" +// INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore" +// INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" +// INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue" +// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" +// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster" +// INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering" +// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateDescription" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist" +// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue" +// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPASSWORD = "InvalidPassword" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" +// LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota" +// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" +// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" +// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota" +// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" +// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient" +// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer" +// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" +// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" +// VPCIPISUSED = "VpcIpIsUsed" +func (c *Client) CreateLaunchTemplate(request *CreateLaunchTemplateRequest) (response *CreateLaunchTemplateResponse, err error) { + if request == nil { + request = NewCreateLaunchTemplateRequest() + } + + response = NewCreateLaunchTemplateResponse() + err = c.Send(request, response) + return +} + +// CreateLaunchTemplate +// 本接口(CreateLaunchTemplate)用于创建实例启动模板。 +// +// +// +// 实例启动模板是一种配置数据并可用于创建实例,其内容包含创建实例所需的配置,比如实例类型,数据盘和系统盘的类型和大小,以及安全组等信息。 +// +// +// +// 初次创建实例模板后,其模板版本为默认版本1,新版本的创建可使用CreateLaunchTemplateVersion创建,版本号递增。默认情况下,在RunInstances中指定实例启动模板,若不指定模板版本号,则使用默认版本。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat" +// INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore" +// INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" +// INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue" +// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" +// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster" +// INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering" +// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateDescription" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist" +// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue" +// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPASSWORD = "InvalidPassword" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" +// LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota" +// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" +// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" +// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota" +// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" +// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient" +// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer" +// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" +// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" +// VPCIPISUSED = "VpcIpIsUsed" +func (c *Client) CreateLaunchTemplateWithContext(ctx context.Context, request *CreateLaunchTemplateRequest) (response *CreateLaunchTemplateResponse, err error) { + if request == nil { + request = NewCreateLaunchTemplateRequest() + } + request.SetContext(ctx) + + response = NewCreateLaunchTemplateResponse() + err = c.Send(request, response) + return +} + +func NewCreateLaunchTemplateVersionRequest() (request *CreateLaunchTemplateVersionRequest) { + request = &CreateLaunchTemplateVersionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "CreateLaunchTemplateVersion") + + return +} + +func NewCreateLaunchTemplateVersionResponse() (response *CreateLaunchTemplateVersionResponse) { + response = &CreateLaunchTemplateVersionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateLaunchTemplateVersion +// 本接口(CreateLaunchTemplateVersion)根据指定的实例模板ID以及对应的模板版本号创建新的实例启动模板,若未指定模板版本号则使用默认版本号。每个实例启动模板最多创建30个版本。 +// +// 可能返回的错误码: +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat" +// INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" +// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist" +// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue" +// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPASSWORD = "InvalidPassword" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" +// LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota" +// LIMITEXCEEDED_LAUNCHTEMPLATEVERSIONQUOTA = "LimitExceeded.LaunchTemplateVersionQuota" +// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" +// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" +// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota" +// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" +// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient" +// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" +// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" +// VPCIPISUSED = "VpcIpIsUsed" +func (c *Client) CreateLaunchTemplateVersion(request *CreateLaunchTemplateVersionRequest) (response *CreateLaunchTemplateVersionResponse, err error) { + if request == nil { + request = NewCreateLaunchTemplateVersionRequest() + } + + response = NewCreateLaunchTemplateVersionResponse() + err = c.Send(request, response) + return +} + +// CreateLaunchTemplateVersion +// 本接口(CreateLaunchTemplateVersion)根据指定的实例模板ID以及对应的模板版本号创建新的实例启动模板,若未指定模板版本号则使用默认版本号。每个实例启动模板最多创建30个版本。 +// +// 可能返回的错误码: +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat" +// INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" +// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist" +// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue" +// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPASSWORD = "InvalidPassword" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" +// LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota" +// LIMITEXCEEDED_LAUNCHTEMPLATEVERSIONQUOTA = "LimitExceeded.LaunchTemplateVersionQuota" +// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" +// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" +// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota" +// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" +// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient" +// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" +// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" +// VPCIPISUSED = "VpcIpIsUsed" +func (c *Client) CreateLaunchTemplateVersionWithContext(ctx context.Context, request *CreateLaunchTemplateVersionRequest) (response *CreateLaunchTemplateVersionResponse, err error) { + if request == nil { + request = NewCreateLaunchTemplateVersionRequest() + } + request.SetContext(ctx) + + response = NewCreateLaunchTemplateVersionResponse() + err = c.Send(request, response) + return +} + +func NewDeleteDisasterRecoverGroupsRequest() (request *DeleteDisasterRecoverGroupsRequest) { + request = &DeleteDisasterRecoverGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DeleteDisasterRecoverGroups") + + return +} + +func NewDeleteDisasterRecoverGroupsResponse() (response *DeleteDisasterRecoverGroupsResponse) { + response = &DeleteDisasterRecoverGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteDisasterRecoverGroups +// 本接口 (DeleteDisasterRecoverGroups)用于删除[分散置放群组](https://cloud.tencent.com/document/product/213/15486)。只有空的置放群组才能被删除,非空的群组需要先销毁组内所有云服务器,才能执行删除操作,不然会产生删除置放群组失败的错误。 +// +// 可能返回的错误码: +// FAILEDOPERATION_PLACEMENTSETNOTEMPTY = "FailedOperation.PlacementSetNotEmpty" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet" +func (c *Client) DeleteDisasterRecoverGroups(request *DeleteDisasterRecoverGroupsRequest) (response *DeleteDisasterRecoverGroupsResponse, err error) { + if request == nil { + request = NewDeleteDisasterRecoverGroupsRequest() + } + + response = NewDeleteDisasterRecoverGroupsResponse() + err = c.Send(request, response) + return +} + +// DeleteDisasterRecoverGroups +// 本接口 (DeleteDisasterRecoverGroups)用于删除[分散置放群组](https://cloud.tencent.com/document/product/213/15486)。只有空的置放群组才能被删除,非空的群组需要先销毁组内所有云服务器,才能执行删除操作,不然会产生删除置放群组失败的错误。 +// +// 可能返回的错误码: +// FAILEDOPERATION_PLACEMENTSETNOTEMPTY = "FailedOperation.PlacementSetNotEmpty" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet" +func (c *Client) DeleteDisasterRecoverGroupsWithContext(ctx context.Context, request *DeleteDisasterRecoverGroupsRequest) (response *DeleteDisasterRecoverGroupsResponse, err error) { + if request == nil { + request = NewDeleteDisasterRecoverGroupsRequest() + } + request.SetContext(ctx) + + response = NewDeleteDisasterRecoverGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDeleteImagesRequest() (request *DeleteImagesRequest) { + request = &DeleteImagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DeleteImages") + + return +} + +func NewDeleteImagesResponse() (response *DeleteImagesResponse) { + response = &DeleteImagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteImages +// 本接口(DeleteImages)用于删除一个或多个镜像。 +// +// +// +// * 当[镜像状态](https://cloud.tencent.com/document/product/213/15753#Image)为`创建中`和`使用中`时, 不允许删除。镜像状态可以通过[DescribeImages](https://cloud.tencent.com/document/api/213/9418)获取。 +// +// * 每个地域最多只支持创建10个自定义镜像,删除镜像可以释放账户的配额。 +// +// * 当镜像正在被其它账户分享时,不允许删除。 +// +// 可能返回的错误码: +// INVALIDIMAGEID_INSHARED = "InvalidImageId.InShared" +// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +func (c *Client) DeleteImages(request *DeleteImagesRequest) (response *DeleteImagesResponse, err error) { + if request == nil { + request = NewDeleteImagesRequest() + } + + response = NewDeleteImagesResponse() + err = c.Send(request, response) + return +} + +// DeleteImages +// 本接口(DeleteImages)用于删除一个或多个镜像。 +// +// +// +// * 当[镜像状态](https://cloud.tencent.com/document/product/213/15753#Image)为`创建中`和`使用中`时, 不允许删除。镜像状态可以通过[DescribeImages](https://cloud.tencent.com/document/api/213/9418)获取。 +// +// * 每个地域最多只支持创建10个自定义镜像,删除镜像可以释放账户的配额。 +// +// * 当镜像正在被其它账户分享时,不允许删除。 +// +// 可能返回的错误码: +// INVALIDIMAGEID_INSHARED = "InvalidImageId.InShared" +// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +func (c *Client) DeleteImagesWithContext(ctx context.Context, request *DeleteImagesRequest) (response *DeleteImagesResponse, err error) { + if request == nil { + request = NewDeleteImagesRequest() + } + request.SetContext(ctx) + + response = NewDeleteImagesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteKeyPairsRequest() (request *DeleteKeyPairsRequest) { + request = &DeleteKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DeleteKeyPairs") + + return +} + +func NewDeleteKeyPairsResponse() (response *DeleteKeyPairsResponse) { + response = &DeleteKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteKeyPairs +// 本接口 (DeleteKeyPairs) 用于删除已在腾讯云托管的密钥对。 +// +// +// +// * 可以同时删除多个密钥对。 +// +// * 不能删除已被实例或镜像引用的密钥对,所以需要独立判断是否所有密钥对都被成功删除。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DeleteKeyPairs(request *DeleteKeyPairsRequest) (response *DeleteKeyPairsResponse, err error) { + if request == nil { + request = NewDeleteKeyPairsRequest() + } + + response = NewDeleteKeyPairsResponse() + err = c.Send(request, response) + return +} + +// DeleteKeyPairs +// 本接口 (DeleteKeyPairs) 用于删除已在腾讯云托管的密钥对。 +// +// +// +// * 可以同时删除多个密钥对。 +// +// * 不能删除已被实例或镜像引用的密钥对,所以需要独立判断是否所有密钥对都被成功删除。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DeleteKeyPairsWithContext(ctx context.Context, request *DeleteKeyPairsRequest) (response *DeleteKeyPairsResponse, err error) { + if request == nil { + request = NewDeleteKeyPairsRequest() + } + request.SetContext(ctx) + + response = NewDeleteKeyPairsResponse() + err = c.Send(request, response) + return +} + +func NewDeleteLaunchTemplateRequest() (request *DeleteLaunchTemplateRequest) { + request = &DeleteLaunchTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DeleteLaunchTemplate") + + return +} + +func NewDeleteLaunchTemplateResponse() (response *DeleteLaunchTemplateResponse) { + response = &DeleteLaunchTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteLaunchTemplate +// 本接口(DeleteLaunchTemplate)用于删除一个实例启动模板。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +func (c *Client) DeleteLaunchTemplate(request *DeleteLaunchTemplateRequest) (response *DeleteLaunchTemplateResponse, err error) { + if request == nil { + request = NewDeleteLaunchTemplateRequest() + } + + response = NewDeleteLaunchTemplateResponse() + err = c.Send(request, response) + return +} + +// DeleteLaunchTemplate +// 本接口(DeleteLaunchTemplate)用于删除一个实例启动模板。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +func (c *Client) DeleteLaunchTemplateWithContext(ctx context.Context, request *DeleteLaunchTemplateRequest) (response *DeleteLaunchTemplateResponse, err error) { + if request == nil { + request = NewDeleteLaunchTemplateRequest() + } + request.SetContext(ctx) + + response = NewDeleteLaunchTemplateResponse() + err = c.Send(request, response) + return +} + +func NewDeleteLaunchTemplateVersionsRequest() (request *DeleteLaunchTemplateVersionsRequest) { + request = &DeleteLaunchTemplateVersionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DeleteLaunchTemplateVersions") + + return +} + +func NewDeleteLaunchTemplateVersionsResponse() (response *DeleteLaunchTemplateVersionsResponse) { + response = &DeleteLaunchTemplateVersionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteLaunchTemplateVersions +// 本接口(DeleteLaunchTemplateVersions)用于删除一个或者多个实例启动模板版本。 +// +// 可能返回的错误码: +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEDEFAULTVERSION = "InvalidParameterValue.LaunchTemplateDefaultVersion" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// MISSINGPARAMETER = "MissingParameter" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DeleteLaunchTemplateVersions(request *DeleteLaunchTemplateVersionsRequest) (response *DeleteLaunchTemplateVersionsResponse, err error) { + if request == nil { + request = NewDeleteLaunchTemplateVersionsRequest() + } + + response = NewDeleteLaunchTemplateVersionsResponse() + err = c.Send(request, response) + return +} + +// DeleteLaunchTemplateVersions +// 本接口(DeleteLaunchTemplateVersions)用于删除一个或者多个实例启动模板版本。 +// +// 可能返回的错误码: +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEDEFAULTVERSION = "InvalidParameterValue.LaunchTemplateDefaultVersion" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// MISSINGPARAMETER = "MissingParameter" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DeleteLaunchTemplateVersionsWithContext(ctx context.Context, request *DeleteLaunchTemplateVersionsRequest) (response *DeleteLaunchTemplateVersionsResponse, err error) { + if request == nil { + request = NewDeleteLaunchTemplateVersionsRequest() + } + request.SetContext(ctx) + + response = NewDeleteLaunchTemplateVersionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAccountQuotaRequest() (request *DescribeAccountQuotaRequest) { + request = &DescribeAccountQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeAccountQuota") + + return +} + +func NewDescribeAccountQuotaResponse() (response *DescribeAccountQuotaResponse) { + response = &DescribeAccountQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAccountQuota +// 本接口(DescribeAccountQuota)用于查询用户配额详情。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +func (c *Client) DescribeAccountQuota(request *DescribeAccountQuotaRequest) (response *DescribeAccountQuotaResponse, err error) { + if request == nil { + request = NewDescribeAccountQuotaRequest() + } + + response = NewDescribeAccountQuotaResponse() + err = c.Send(request, response) + return +} + +// DescribeAccountQuota +// 本接口(DescribeAccountQuota)用于查询用户配额详情。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +func (c *Client) DescribeAccountQuotaWithContext(ctx context.Context, request *DescribeAccountQuotaRequest) (response *DescribeAccountQuotaResponse, err error) { + if request == nil { + request = NewDescribeAccountQuotaRequest() + } + request.SetContext(ctx) + + response = NewDescribeAccountQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDisasterRecoverGroupQuotaRequest() (request *DescribeDisasterRecoverGroupQuotaRequest) { + request = &DescribeDisasterRecoverGroupQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeDisasterRecoverGroupQuota") + + return +} + +func NewDescribeDisasterRecoverGroupQuotaResponse() (response *DescribeDisasterRecoverGroupQuotaResponse) { + response = &DescribeDisasterRecoverGroupQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDisasterRecoverGroupQuota +// 本接口 (DescribeDisasterRecoverGroupQuota)用于查询[分散置放群组](https://cloud.tencent.com/document/product/213/15486)配额。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +func (c *Client) DescribeDisasterRecoverGroupQuota(request *DescribeDisasterRecoverGroupQuotaRequest) (response *DescribeDisasterRecoverGroupQuotaResponse, err error) { + if request == nil { + request = NewDescribeDisasterRecoverGroupQuotaRequest() + } + + response = NewDescribeDisasterRecoverGroupQuotaResponse() + err = c.Send(request, response) + return +} + +// DescribeDisasterRecoverGroupQuota +// 本接口 (DescribeDisasterRecoverGroupQuota)用于查询[分散置放群组](https://cloud.tencent.com/document/product/213/15486)配额。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +func (c *Client) DescribeDisasterRecoverGroupQuotaWithContext(ctx context.Context, request *DescribeDisasterRecoverGroupQuotaRequest) (response *DescribeDisasterRecoverGroupQuotaResponse, err error) { + if request == nil { + request = NewDescribeDisasterRecoverGroupQuotaRequest() + } + request.SetContext(ctx) + + response = NewDescribeDisasterRecoverGroupQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDisasterRecoverGroupsRequest() (request *DescribeDisasterRecoverGroupsRequest) { + request = &DescribeDisasterRecoverGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeDisasterRecoverGroups") + + return +} + +func NewDescribeDisasterRecoverGroupsResponse() (response *DescribeDisasterRecoverGroupsResponse) { + response = &DescribeDisasterRecoverGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDisasterRecoverGroups +// 本接口 (DescribeDisasterRecoverGroups)用于查询[分散置放群组](https://cloud.tencent.com/document/product/213/15486)信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +func (c *Client) DescribeDisasterRecoverGroups(request *DescribeDisasterRecoverGroupsRequest) (response *DescribeDisasterRecoverGroupsResponse, err error) { + if request == nil { + request = NewDescribeDisasterRecoverGroupsRequest() + } + + response = NewDescribeDisasterRecoverGroupsResponse() + err = c.Send(request, response) + return +} + +// DescribeDisasterRecoverGroups +// 本接口 (DescribeDisasterRecoverGroups)用于查询[分散置放群组](https://cloud.tencent.com/document/product/213/15486)信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +func (c *Client) DescribeDisasterRecoverGroupsWithContext(ctx context.Context, request *DescribeDisasterRecoverGroupsRequest) (response *DescribeDisasterRecoverGroupsResponse, err error) { + if request == nil { + request = NewDescribeDisasterRecoverGroupsRequest() + } + request.SetContext(ctx) + + response = NewDescribeDisasterRecoverGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeHostsRequest() (request *DescribeHostsRequest) { + request = &DescribeHostsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeHosts") + + return +} + +func NewDescribeHostsResponse() (response *DescribeHostsResponse) { + response = &DescribeHostsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeHosts +// 本接口 (DescribeHosts) 用于获取一个或多个CDH实例的详细信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) DescribeHosts(request *DescribeHostsRequest) (response *DescribeHostsResponse, err error) { + if request == nil { + request = NewDescribeHostsRequest() + } + + response = NewDescribeHostsResponse() + err = c.Send(request, response) + return +} + +// DescribeHosts +// 本接口 (DescribeHosts) 用于获取一个或多个CDH实例的详细信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) DescribeHostsWithContext(ctx context.Context, request *DescribeHostsRequest) (response *DescribeHostsResponse, err error) { + if request == nil { + request = NewDescribeHostsRequest() + } + request.SetContext(ctx) + + response = NewDescribeHostsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImageQuotaRequest() (request *DescribeImageQuotaRequest) { + request = &DescribeImageQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeImageQuota") + + return +} + +func NewDescribeImageQuotaResponse() (response *DescribeImageQuotaResponse) { + response = &DescribeImageQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeImageQuota +// 本接口(DescribeImageQuota)用于查询用户帐号的镜像配额。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) DescribeImageQuota(request *DescribeImageQuotaRequest) (response *DescribeImageQuotaResponse, err error) { + if request == nil { + request = NewDescribeImageQuotaRequest() + } + + response = NewDescribeImageQuotaResponse() + err = c.Send(request, response) + return +} + +// DescribeImageQuota +// 本接口(DescribeImageQuota)用于查询用户帐号的镜像配额。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) DescribeImageQuotaWithContext(ctx context.Context, request *DescribeImageQuotaRequest) (response *DescribeImageQuotaResponse, err error) { + if request == nil { + request = NewDescribeImageQuotaRequest() + } + request.SetContext(ctx) + + response = NewDescribeImageQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImageSharePermissionRequest() (request *DescribeImageSharePermissionRequest) { + request = &DescribeImageSharePermissionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeImageSharePermission") + + return +} + +func NewDescribeImageSharePermissionResponse() (response *DescribeImageSharePermissionResponse) { + response = &DescribeImageSharePermissionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeImageSharePermission +// 本接口(DescribeImageSharePermission)用于查询镜像分享信息。 +// +// 可能返回的错误码: +// INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound" +// INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// OVERQUOTA = "OverQuota" +// UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount" +func (c *Client) DescribeImageSharePermission(request *DescribeImageSharePermissionRequest) (response *DescribeImageSharePermissionResponse, err error) { + if request == nil { + request = NewDescribeImageSharePermissionRequest() + } + + response = NewDescribeImageSharePermissionResponse() + err = c.Send(request, response) + return +} + +// DescribeImageSharePermission +// 本接口(DescribeImageSharePermission)用于查询镜像分享信息。 +// +// 可能返回的错误码: +// INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound" +// INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// OVERQUOTA = "OverQuota" +// UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount" +func (c *Client) DescribeImageSharePermissionWithContext(ctx context.Context, request *DescribeImageSharePermissionRequest) (response *DescribeImageSharePermissionResponse, err error) { + if request == nil { + request = NewDescribeImageSharePermissionRequest() + } + request.SetContext(ctx) + + response = NewDescribeImageSharePermissionResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImagesRequest() (request *DescribeImagesRequest) { + request = &DescribeImagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeImages") + + return +} + +func NewDescribeImagesResponse() (response *DescribeImagesResponse) { + response = &DescribeImagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeImages +// 本接口(DescribeImages) 用于查看镜像列表。 +// +// +// +// * 可以通过指定镜像ID来查询指定镜像的详细信息,或通过设定过滤器来查询满足过滤条件的镜像的详细信息。 +// +// * 指定偏移(Offset)和限制(Limit)来选择结果中的一部分,默认返回满足条件的前20个镜像信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { + if request == nil { + request = NewDescribeImagesRequest() + } + + response = NewDescribeImagesResponse() + err = c.Send(request, response) + return +} + +// DescribeImages +// 本接口(DescribeImages) 用于查看镜像列表。 +// +// +// +// * 可以通过指定镜像ID来查询指定镜像的详细信息,或通过设定过滤器来查询满足过滤条件的镜像的详细信息。 +// +// * 指定偏移(Offset)和限制(Limit)来选择结果中的一部分,默认返回满足条件的前20个镜像信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeImagesWithContext(ctx context.Context, request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { + if request == nil { + request = NewDescribeImagesRequest() + } + request.SetContext(ctx) + + response = NewDescribeImagesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImportImageOsRequest() (request *DescribeImportImageOsRequest) { + request = &DescribeImportImageOsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeImportImageOs") + + return +} + +func NewDescribeImportImageOsResponse() (response *DescribeImportImageOsResponse) { + response = &DescribeImportImageOsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeImportImageOs +// 查看可以导入的镜像操作系统信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeImportImageOs(request *DescribeImportImageOsRequest) (response *DescribeImportImageOsResponse, err error) { + if request == nil { + request = NewDescribeImportImageOsRequest() + } + + response = NewDescribeImportImageOsResponse() + err = c.Send(request, response) + return +} + +// DescribeImportImageOs +// 查看可以导入的镜像操作系统信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" +func (c *Client) DescribeImportImageOsWithContext(ctx context.Context, request *DescribeImportImageOsRequest) (response *DescribeImportImageOsResponse, err error) { + if request == nil { + request = NewDescribeImportImageOsRequest() + } + request.SetContext(ctx) + + response = NewDescribeImportImageOsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceFamilyConfigsRequest() (request *DescribeInstanceFamilyConfigsRequest) { + request = &DescribeInstanceFamilyConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstanceFamilyConfigs") + + return +} + +func NewDescribeInstanceFamilyConfigsResponse() (response *DescribeInstanceFamilyConfigsResponse) { + response = &DescribeInstanceFamilyConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstanceFamilyConfigs +// 本接口(DescribeInstanceFamilyConfigs)查询当前用户和地域所支持的机型族列表信息。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +func (c *Client) DescribeInstanceFamilyConfigs(request *DescribeInstanceFamilyConfigsRequest) (response *DescribeInstanceFamilyConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceFamilyConfigsRequest() + } + + response = NewDescribeInstanceFamilyConfigsResponse() + err = c.Send(request, response) + return +} + +// DescribeInstanceFamilyConfigs +// 本接口(DescribeInstanceFamilyConfigs)查询当前用户和地域所支持的机型族列表信息。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +func (c *Client) DescribeInstanceFamilyConfigsWithContext(ctx context.Context, request *DescribeInstanceFamilyConfigsRequest) (response *DescribeInstanceFamilyConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceFamilyConfigsRequest() + } + request.SetContext(ctx) + + response = NewDescribeInstanceFamilyConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceInternetBandwidthConfigsRequest() (request *DescribeInstanceInternetBandwidthConfigsRequest) { + request = &DescribeInstanceInternetBandwidthConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstanceInternetBandwidthConfigs") + + return +} + +func NewDescribeInstanceInternetBandwidthConfigsResponse() (response *DescribeInstanceInternetBandwidthConfigsResponse) { + response = &DescribeInstanceInternetBandwidthConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstanceInternetBandwidthConfigs +// 本接口 (DescribeInstanceInternetBandwidthConfigs) 用于查询实例带宽配置。 +// +// +// +// * 只支持查询`BANDWIDTH_PREPAID`( 预付费按带宽结算 )计费模式的带宽配置。 +// +// * 接口返回实例的所有带宽配置信息(包含历史的带宽配置信息)。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeInstanceInternetBandwidthConfigs(request *DescribeInstanceInternetBandwidthConfigsRequest) (response *DescribeInstanceInternetBandwidthConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceInternetBandwidthConfigsRequest() + } + + response = NewDescribeInstanceInternetBandwidthConfigsResponse() + err = c.Send(request, response) + return +} + +// DescribeInstanceInternetBandwidthConfigs +// 本接口 (DescribeInstanceInternetBandwidthConfigs) 用于查询实例带宽配置。 +// +// +// +// * 只支持查询`BANDWIDTH_PREPAID`( 预付费按带宽结算 )计费模式的带宽配置。 +// +// * 接口返回实例的所有带宽配置信息(包含历史的带宽配置信息)。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeInstanceInternetBandwidthConfigsWithContext(ctx context.Context, request *DescribeInstanceInternetBandwidthConfigsRequest) (response *DescribeInstanceInternetBandwidthConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceInternetBandwidthConfigsRequest() + } + request.SetContext(ctx) + + response = NewDescribeInstanceInternetBandwidthConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceTypeConfigsRequest() (request *DescribeInstanceTypeConfigsRequest) { + request = &DescribeInstanceTypeConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstanceTypeConfigs") + + return +} + +func NewDescribeInstanceTypeConfigsResponse() (response *DescribeInstanceTypeConfigsResponse) { + response = &DescribeInstanceTypeConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstanceTypeConfigs +// 本接口 (DescribeInstanceTypeConfigs) 用于查询实例机型配置。 +// +// +// +// * 可以根据`zone`、`instance-family`来查询实例机型配置。过滤条件详见过滤器[`Filter`](https://cloud.tencent.com/document/api/213/15753#Filter)。 +// +// * 如果参数为空,返回指定地域的所有实例机型配置。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +func (c *Client) DescribeInstanceTypeConfigs(request *DescribeInstanceTypeConfigsRequest) (response *DescribeInstanceTypeConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceTypeConfigsRequest() + } + + response = NewDescribeInstanceTypeConfigsResponse() + err = c.Send(request, response) + return +} + +// DescribeInstanceTypeConfigs +// 本接口 (DescribeInstanceTypeConfigs) 用于查询实例机型配置。 +// +// +// +// * 可以根据`zone`、`instance-family`来查询实例机型配置。过滤条件详见过滤器[`Filter`](https://cloud.tencent.com/document/api/213/15753#Filter)。 +// +// * 如果参数为空,返回指定地域的所有实例机型配置。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +func (c *Client) DescribeInstanceTypeConfigsWithContext(ctx context.Context, request *DescribeInstanceTypeConfigsRequest) (response *DescribeInstanceTypeConfigsResponse, err error) { + if request == nil { + request = NewDescribeInstanceTypeConfigsRequest() + } + request.SetContext(ctx) + + response = NewDescribeInstanceTypeConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceVncUrlRequest() (request *DescribeInstanceVncUrlRequest) { + request = &DescribeInstanceVncUrlRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", 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 +// +// ``` +// +// 可能返回的错误码: +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCESTATE = "InvalidInstanceState" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) DescribeInstanceVncUrl(request *DescribeInstanceVncUrlRequest) (response *DescribeInstanceVncUrlResponse, err error) { + if request == nil { + request = NewDescribeInstanceVncUrlRequest() + } + + response = NewDescribeInstanceVncUrlResponse() + err = c.Send(request, response) + 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 +// +// ``` +// +// 可能返回的错误码: +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCESTATE = "InvalidInstanceState" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) DescribeInstanceVncUrlWithContext(ctx context.Context, request *DescribeInstanceVncUrlRequest) (response *DescribeInstanceVncUrlResponse, err error) { + if request == nil { + request = NewDescribeInstanceVncUrlRequest() + } + request.SetContext(ctx) + + response = NewDescribeInstanceVncUrlResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesRequest() (request *DescribeInstancesRequest) { + request = &DescribeInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstances") + + return +} + +func NewDescribeInstancesResponse() (response *DescribeInstancesResponse) { + response = &DescribeInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstances +// 本接口 (DescribeInstances) 用于查询一个或多个实例的详细信息。 +// +// +// +// * 可以根据实例`ID`、实例名称或者实例计费模式等信息来查询实例的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的实例。 +// +// * 支持查询实例的最新操作(LatestOperation)以及最新操作状态(LatestOperationState)。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey" +// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed" +// INVALIDPARAMETERVALUE_IPV6ADDRESSMALFORMED = "InvalidParameterValue.IPv6AddressMalformed" +// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDVAGUENAME = "InvalidParameterValue.InvalidVagueName" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed" +// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound" +// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken" +func (c *Client) DescribeInstances(request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) { + if request == nil { + request = NewDescribeInstancesRequest() + } + + response = NewDescribeInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeInstances +// 本接口 (DescribeInstances) 用于查询一个或多个实例的详细信息。 +// +// +// +// * 可以根据实例`ID`、实例名称或者实例计费模式等信息来查询实例的详细信息。过滤信息详细请见过滤器`Filter`。 +// +// * 如果参数为空,返回当前用户一定数量(`Limit`所指定的数量,默认为20)的实例。 +// +// * 支持查询实例的最新操作(LatestOperation)以及最新操作状态(LatestOperationState)。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey" +// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed" +// INVALIDPARAMETERVALUE_IPV6ADDRESSMALFORMED = "InvalidParameterValue.IPv6AddressMalformed" +// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDVAGUENAME = "InvalidParameterValue.InvalidVagueName" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed" +// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound" +// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken" +func (c *Client) DescribeInstancesWithContext(ctx context.Context, request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) { + if request == nil { + request = NewDescribeInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesModificationRequest() (request *DescribeInstancesModificationRequest) { + request = &DescribeInstancesModificationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstancesModification") + + return +} + +func NewDescribeInstancesModificationResponse() (response *DescribeInstancesModificationResponse) { + response = &DescribeInstancesModificationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstancesModification +// 本接口 (DescribeInstancesModification) 用于查询指定实例支持调整的机型配置。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily" +func (c *Client) DescribeInstancesModification(request *DescribeInstancesModificationRequest) (response *DescribeInstancesModificationResponse, err error) { + if request == nil { + request = NewDescribeInstancesModificationRequest() + } + + response = NewDescribeInstancesModificationResponse() + err = c.Send(request, response) + return +} + +// DescribeInstancesModification +// 本接口 (DescribeInstancesModification) 用于查询指定实例支持调整的机型配置。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily" +func (c *Client) DescribeInstancesModificationWithContext(ctx context.Context, request *DescribeInstancesModificationRequest) (response *DescribeInstancesModificationResponse, err error) { + if request == nil { + request = NewDescribeInstancesModificationRequest() + } + request.SetContext(ctx) + + response = NewDescribeInstancesModificationResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesOperationLimitRequest() (request *DescribeInstancesOperationLimitRequest) { + request = &DescribeInstancesOperationLimitRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstancesOperationLimit") + + return +} + +func NewDescribeInstancesOperationLimitResponse() (response *DescribeInstancesOperationLimitResponse) { + response = &DescribeInstancesOperationLimitResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstancesOperationLimit +// 本接口(DescribeInstancesOperationLimit)用于查询实例操作限制。 +// +// +// +// * 目前支持调整配置操作限制次数查询。 +// +// 可能返回的错误码: +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +func (c *Client) DescribeInstancesOperationLimit(request *DescribeInstancesOperationLimitRequest) (response *DescribeInstancesOperationLimitResponse, err error) { + if request == nil { + request = NewDescribeInstancesOperationLimitRequest() + } + + response = NewDescribeInstancesOperationLimitResponse() + err = c.Send(request, response) + return +} + +// DescribeInstancesOperationLimit +// 本接口(DescribeInstancesOperationLimit)用于查询实例操作限制。 +// +// +// +// * 目前支持调整配置操作限制次数查询。 +// +// 可能返回的错误码: +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +func (c *Client) DescribeInstancesOperationLimitWithContext(ctx context.Context, request *DescribeInstancesOperationLimitRequest) (response *DescribeInstancesOperationLimitResponse, err error) { + if request == nil { + request = NewDescribeInstancesOperationLimitRequest() + } + request.SetContext(ctx) + + response = NewDescribeInstancesOperationLimitResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancesStatusRequest() (request *DescribeInstancesStatusRequest) { + request = &DescribeInstancesStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInstancesStatus") + + return +} + +func NewDescribeInstancesStatusResponse() (response *DescribeInstancesStatusResponse) { + response = &DescribeInstancesStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInstancesStatus +// 本接口 (DescribeInstancesStatus) 用于查询一个或多个实例的状态。 +// +// +// +// * 可以根据实例`ID`来查询实例的状态。 +// +// * 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的实例状态。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken" +func (c *Client) DescribeInstancesStatus(request *DescribeInstancesStatusRequest) (response *DescribeInstancesStatusResponse, err error) { + if request == nil { + request = NewDescribeInstancesStatusRequest() + } + + response = NewDescribeInstancesStatusResponse() + err = c.Send(request, response) + return +} + +// DescribeInstancesStatus +// 本接口 (DescribeInstancesStatus) 用于查询一个或多个实例的状态。 +// +// +// +// * 可以根据实例`ID`来查询实例的状态。 +// +// * 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的实例状态。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken" +func (c *Client) DescribeInstancesStatusWithContext(ctx context.Context, request *DescribeInstancesStatusRequest) (response *DescribeInstancesStatusResponse, err error) { + if request == nil { + request = NewDescribeInstancesStatusRequest() + } + request.SetContext(ctx) + + response = NewDescribeInstancesStatusResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInternetChargeTypeConfigsRequest() (request *DescribeInternetChargeTypeConfigsRequest) { + request = &DescribeInternetChargeTypeConfigsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeInternetChargeTypeConfigs") + + return +} + +func NewDescribeInternetChargeTypeConfigsResponse() (response *DescribeInternetChargeTypeConfigsResponse) { + response = &DescribeInternetChargeTypeConfigsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeInternetChargeTypeConfigs +// 本接口(DescribeInternetChargeTypeConfigs)用于查询网络的计费类型。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken" +func (c *Client) DescribeInternetChargeTypeConfigs(request *DescribeInternetChargeTypeConfigsRequest) (response *DescribeInternetChargeTypeConfigsResponse, err error) { + if request == nil { + request = NewDescribeInternetChargeTypeConfigsRequest() + } + + response = NewDescribeInternetChargeTypeConfigsResponse() + err = c.Send(request, response) + return +} + +// DescribeInternetChargeTypeConfigs +// 本接口(DescribeInternetChargeTypeConfigs)用于查询网络的计费类型。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken" +func (c *Client) DescribeInternetChargeTypeConfigsWithContext(ctx context.Context, request *DescribeInternetChargeTypeConfigsRequest) (response *DescribeInternetChargeTypeConfigsResponse, err error) { + if request == nil { + request = NewDescribeInternetChargeTypeConfigsRequest() + } + request.SetContext(ctx) + + response = NewDescribeInternetChargeTypeConfigsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeKeyPairsRequest() (request *DescribeKeyPairsRequest) { + request = &DescribeKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeKeyPairs") + + return +} + +func NewDescribeKeyPairsResponse() (response *DescribeKeyPairsResponse) { + response = &DescribeKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeKeyPairs +// 本接口 (DescribeKeyPairs) 用于查询密钥对信息。 +// +// +// +// * 密钥对是通过一种算法生成的一对密钥,在生成的密钥对中,一个向外界公开,称为公钥;另一个用户自己保留,称为私钥。密钥对的公钥内容可以通过这个接口查询,但私钥内容系统不保留。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit" +// INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset" +func (c *Client) DescribeKeyPairs(request *DescribeKeyPairsRequest) (response *DescribeKeyPairsResponse, err error) { + if request == nil { + request = NewDescribeKeyPairsRequest() + } + + response = NewDescribeKeyPairsResponse() + err = c.Send(request, response) + return +} + +// DescribeKeyPairs +// 本接口 (DescribeKeyPairs) 用于查询密钥对信息。 +// +// +// +// * 密钥对是通过一种算法生成的一对密钥,在生成的密钥对中,一个向外界公开,称为公钥;另一个用户自己保留,称为私钥。密钥对的公钥内容可以通过这个接口查询,但私钥内容系统不保留。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit" +// INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset" +func (c *Client) DescribeKeyPairsWithContext(ctx context.Context, request *DescribeKeyPairsRequest) (response *DescribeKeyPairsResponse, err error) { + if request == nil { + request = NewDescribeKeyPairsRequest() + } + request.SetContext(ctx) + + response = NewDescribeKeyPairsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeLaunchTemplateVersionsRequest() (request *DescribeLaunchTemplateVersionsRequest) { + request = &DescribeLaunchTemplateVersionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeLaunchTemplateVersions") + + return +} + +func NewDescribeLaunchTemplateVersionsResponse() (response *DescribeLaunchTemplateVersionsResponse) { + response = &DescribeLaunchTemplateVersionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeLaunchTemplateVersions +// 本接口(DescribeLaunchTemplateVersions)用于查询实例模板版本信息。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeLaunchTemplateVersions(request *DescribeLaunchTemplateVersionsRequest) (response *DescribeLaunchTemplateVersionsResponse, err error) { + if request == nil { + request = NewDescribeLaunchTemplateVersionsRequest() + } + + response = NewDescribeLaunchTemplateVersionsResponse() + err = c.Send(request, response) + return +} + +// DescribeLaunchTemplateVersions +// 本接口(DescribeLaunchTemplateVersions)用于查询实例模板版本信息。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeLaunchTemplateVersionsWithContext(ctx context.Context, request *DescribeLaunchTemplateVersionsRequest) (response *DescribeLaunchTemplateVersionsResponse, err error) { + if request == nil { + request = NewDescribeLaunchTemplateVersionsRequest() + } + request.SetContext(ctx) + + response = NewDescribeLaunchTemplateVersionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeLaunchTemplatesRequest() (request *DescribeLaunchTemplatesRequest) { + request = &DescribeLaunchTemplatesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeLaunchTemplates") + + return +} + +func NewDescribeLaunchTemplatesResponse() (response *DescribeLaunchTemplatesResponse) { + response = &DescribeLaunchTemplatesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeLaunchTemplates +// 本接口(DescribeLaunchTemplates)用于查询一个或者多个实例启动模板。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeLaunchTemplates(request *DescribeLaunchTemplatesRequest) (response *DescribeLaunchTemplatesResponse, err error) { + if request == nil { + request = NewDescribeLaunchTemplatesRequest() + } + + response = NewDescribeLaunchTemplatesResponse() + err = c.Send(request, response) + return +} + +// DescribeLaunchTemplates +// 本接口(DescribeLaunchTemplates)用于查询一个或者多个实例启动模板。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeLaunchTemplatesWithContext(ctx context.Context, request *DescribeLaunchTemplatesRequest) (response *DescribeLaunchTemplatesResponse, err error) { + if request == nil { + request = NewDescribeLaunchTemplatesRequest() + } + request.SetContext(ctx) + + response = NewDescribeLaunchTemplatesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) { + request = &DescribeRegionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeRegions") + + return +} + +func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) { + response = &DescribeRegionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRegions +// 本接口(DescribeRegions)用于查询地域信息。因平台策略原因,该接口暂时停止更新,为确保您正常调用,可切换至新链接:https://cloud.tencent.com/document/product/1278/55255。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { + if request == nil { + request = NewDescribeRegionsRequest() + } + + response = NewDescribeRegionsResponse() + err = c.Send(request, response) + return +} + +// DescribeRegions +// 本接口(DescribeRegions)用于查询地域信息。因平台策略原因,该接口暂时停止更新,为确保您正常调用,可切换至新链接:https://cloud.tencent.com/document/product/1278/55255。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { + if request == nil { + request = NewDescribeRegionsRequest() + } + request.SetContext(ctx) + + response = NewDescribeRegionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeReservedInstancesRequest() (request *DescribeReservedInstancesRequest) { + request = &DescribeReservedInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeReservedInstances") + + return +} + +func NewDescribeReservedInstancesResponse() (response *DescribeReservedInstancesResponse) { + response = &DescribeReservedInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeReservedInstances +// 本接口(DescribeReservedInstances)可提供列出用户已购买的预留实例 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" +func (c *Client) DescribeReservedInstances(request *DescribeReservedInstancesRequest) (response *DescribeReservedInstancesResponse, err error) { + if request == nil { + request = NewDescribeReservedInstancesRequest() + } + + response = NewDescribeReservedInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeReservedInstances +// 本接口(DescribeReservedInstances)可提供列出用户已购买的预留实例 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" +func (c *Client) DescribeReservedInstancesWithContext(ctx context.Context, request *DescribeReservedInstancesRequest) (response *DescribeReservedInstancesResponse, err error) { + if request == nil { + request = NewDescribeReservedInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeReservedInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeReservedInstancesConfigInfosRequest() (request *DescribeReservedInstancesConfigInfosRequest) { + request = &DescribeReservedInstancesConfigInfosRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeReservedInstancesConfigInfos") + + return +} + +func NewDescribeReservedInstancesConfigInfosResponse() (response *DescribeReservedInstancesConfigInfosResponse) { + response = &DescribeReservedInstancesConfigInfosResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeReservedInstancesConfigInfos +// 本接口(DescribeReservedInstancesConfigInfos)供用户列出可购买预留实例机型配置。预留实例当前只针对国际站白名单用户开放。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" +func (c *Client) DescribeReservedInstancesConfigInfos(request *DescribeReservedInstancesConfigInfosRequest) (response *DescribeReservedInstancesConfigInfosResponse, err error) { + if request == nil { + request = NewDescribeReservedInstancesConfigInfosRequest() + } + + response = NewDescribeReservedInstancesConfigInfosResponse() + err = c.Send(request, response) + return +} + +// DescribeReservedInstancesConfigInfos +// 本接口(DescribeReservedInstancesConfigInfos)供用户列出可购买预留实例机型配置。预留实例当前只针对国际站白名单用户开放。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" +func (c *Client) DescribeReservedInstancesConfigInfosWithContext(ctx context.Context, request *DescribeReservedInstancesConfigInfosRequest) (response *DescribeReservedInstancesConfigInfosResponse, err error) { + if request == nil { + request = NewDescribeReservedInstancesConfigInfosRequest() + } + request.SetContext(ctx) + + response = NewDescribeReservedInstancesConfigInfosResponse() + err = c.Send(request, response) + return +} + +func NewDescribeReservedInstancesOfferingsRequest() (request *DescribeReservedInstancesOfferingsRequest) { + request = &DescribeReservedInstancesOfferingsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeReservedInstancesOfferings") + + return +} + +func NewDescribeReservedInstancesOfferingsResponse() (response *DescribeReservedInstancesOfferingsResponse) { + response = &DescribeReservedInstancesOfferingsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeReservedInstancesOfferings +// 本接口(DescribeReservedInstancesOfferings)供用户列出可购买的预留实例配置 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" +func (c *Client) DescribeReservedInstancesOfferings(request *DescribeReservedInstancesOfferingsRequest) (response *DescribeReservedInstancesOfferingsResponse, err error) { + if request == nil { + request = NewDescribeReservedInstancesOfferingsRequest() + } + + response = NewDescribeReservedInstancesOfferingsResponse() + err = c.Send(request, response) + return +} + +// DescribeReservedInstancesOfferings +// 本接口(DescribeReservedInstancesOfferings)供用户列出可购买的预留实例配置 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" +func (c *Client) DescribeReservedInstancesOfferingsWithContext(ctx context.Context, request *DescribeReservedInstancesOfferingsRequest) (response *DescribeReservedInstancesOfferingsResponse, err error) { + if request == nil { + request = NewDescribeReservedInstancesOfferingsRequest() + } + request.SetContext(ctx) + + response = NewDescribeReservedInstancesOfferingsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeZoneInstanceConfigInfosRequest() (request *DescribeZoneInstanceConfigInfosRequest) { + request = &DescribeZoneInstanceConfigInfosRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeZoneInstanceConfigInfos") + + return +} + +func NewDescribeZoneInstanceConfigInfosResponse() (response *DescribeZoneInstanceConfigInfosResponse) { + response = &DescribeZoneInstanceConfigInfosResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeZoneInstanceConfigInfos +// 本接口(DescribeZoneInstanceConfigInfos) 获取可用区的机型信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut" +func (c *Client) DescribeZoneInstanceConfigInfos(request *DescribeZoneInstanceConfigInfosRequest) (response *DescribeZoneInstanceConfigInfosResponse, err error) { + if request == nil { + request = NewDescribeZoneInstanceConfigInfosRequest() + } + + response = NewDescribeZoneInstanceConfigInfosResponse() + err = c.Send(request, response) + return +} + +// DescribeZoneInstanceConfigInfos +// 本接口(DescribeZoneInstanceConfigInfos) 获取可用区的机型信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut" +func (c *Client) DescribeZoneInstanceConfigInfosWithContext(ctx context.Context, request *DescribeZoneInstanceConfigInfosRequest) (response *DescribeZoneInstanceConfigInfosResponse, err error) { + if request == nil { + request = NewDescribeZoneInstanceConfigInfosRequest() + } + request.SetContext(ctx) + + response = NewDescribeZoneInstanceConfigInfosResponse() + err = c.Send(request, response) + return +} + +func NewDescribeZonesRequest() (request *DescribeZonesRequest) { + request = &DescribeZonesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DescribeZones") + + return +} + +func NewDescribeZonesResponse() (response *DescribeZonesResponse) { + response = &DescribeZonesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeZones +// 本接口(DescribeZones)用于查询可用区信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut" +func (c *Client) DescribeZones(request *DescribeZonesRequest) (response *DescribeZonesResponse, err error) { + if request == nil { + request = NewDescribeZonesRequest() + } + + response = NewDescribeZonesResponse() + err = c.Send(request, response) + return +} + +// DescribeZones +// 本接口(DescribeZones)用于查询可用区信息。 +// +// 可能返回的错误码: +// INVALIDFILTER = "InvalidFilter" +// INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut" +func (c *Client) DescribeZonesWithContext(ctx context.Context, request *DescribeZonesRequest) (response *DescribeZonesResponse, err error) { + if request == nil { + request = NewDescribeZonesRequest() + } + request.SetContext(ctx) + + response = NewDescribeZonesResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateInstancesKeyPairsRequest() (request *DisassociateInstancesKeyPairsRequest) { + request = &DisassociateInstancesKeyPairsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DisassociateInstancesKeyPairs") + + return +} + +func NewDisassociateInstancesKeyPairsResponse() (response *DisassociateInstancesKeyPairsResponse) { + response = &DisassociateInstancesKeyPairsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateInstancesKeyPairs +// 本接口 (DisassociateInstancesKeyPairs) 用于解除实例的密钥绑定关系。 +// +// +// +// * 只支持[`STOPPED`](https://cloud.tencent.com/document/product/213/15753#InstanceStatus)状态的`Linux`操作系统的实例。 +// +// * 解绑密钥后,实例可以通过原来设置的密码登录。 +// +// * 如果原来没有设置密码,解绑后将无法使用 `SSH` 登录。可以调用 [ResetInstancesPassword](https://cloud.tencent.com/document/api/213/15736) 接口来设置登录密码。 +// +// * 支持批量操作。每次请求批量实例的上限为100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows" +// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) DisassociateInstancesKeyPairs(request *DisassociateInstancesKeyPairsRequest) (response *DisassociateInstancesKeyPairsResponse, err error) { + if request == nil { + request = NewDisassociateInstancesKeyPairsRequest() + } + + response = NewDisassociateInstancesKeyPairsResponse() + err = c.Send(request, response) + return +} + +// DisassociateInstancesKeyPairs +// 本接口 (DisassociateInstancesKeyPairs) 用于解除实例的密钥绑定关系。 +// +// +// +// * 只支持[`STOPPED`](https://cloud.tencent.com/document/product/213/15753#InstanceStatus)状态的`Linux`操作系统的实例。 +// +// * 解绑密钥后,实例可以通过原来设置的密码登录。 +// +// * 如果原来没有设置密码,解绑后将无法使用 `SSH` 登录。可以调用 [ResetInstancesPassword](https://cloud.tencent.com/document/api/213/15736) 接口来设置登录密码。 +// +// * 支持批量操作。每次请求批量实例的上限为100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows" +// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) DisassociateInstancesKeyPairsWithContext(ctx context.Context, request *DisassociateInstancesKeyPairsRequest) (response *DisassociateInstancesKeyPairsResponse, err error) { + if request == nil { + request = NewDisassociateInstancesKeyPairsRequest() + } + request.SetContext(ctx) + + response = NewDisassociateInstancesKeyPairsResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateSecurityGroupsRequest() (request *DisassociateSecurityGroupsRequest) { + request = &DisassociateSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "DisassociateSecurityGroups") + + return +} + +func NewDisassociateSecurityGroupsResponse() (response *DisassociateSecurityGroupsResponse) { + response = &DisassociateSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateSecurityGroups +// 本接口 (DisassociateSecurityGroups) 用于解绑实例的指定安全组。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// SECGROUPACTIONFAILURE = "SecGroupActionFailure" +func (c *Client) DisassociateSecurityGroups(request *DisassociateSecurityGroupsRequest) (response *DisassociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateSecurityGroupsRequest() + } + + response = NewDisassociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// DisassociateSecurityGroups +// 本接口 (DisassociateSecurityGroups) 用于解绑实例的指定安全组。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDSGID_MALFORMED = "InvalidSgId.Malformed" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// SECGROUPACTIONFAILURE = "SecGroupActionFailure" +func (c *Client) DisassociateSecurityGroupsWithContext(ctx context.Context, request *DisassociateSecurityGroupsRequest) (response *DisassociateSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewDisassociateSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewImportImageRequest() (request *ImportImageRequest) { + request = &ImportImageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ImportImage") + + return +} + +func NewImportImageResponse() (response *ImportImageResponse) { + response = &ImportImageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ImportImage +// 本接口(ImportImage)用于导入镜像,导入后的镜像可用于创建实例。目前支持 RAW、VHD、QCOW2、VMDK 镜像格式。 +// +// 可能返回的错误码: +// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded" +// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" +// INVALIDIMAGEOSTYPE_UNSUPPORTED = "InvalidImageOsType.Unsupported" +// INVALIDIMAGEOSVERSION_UNSUPPORTED = "InvalidImageOsVersion.Unsupported" +// INVALIDPARAMETER_INVALIDPARAMETERURLERROR = "InvalidParameter.InvalidParameterUrlError" +// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge" +// REGIONABILITYLIMIT_UNSUPPORTEDTOIMPORTIMAGE = "RegionAbilityLimit.UnsupportedToImportImage" +func (c *Client) ImportImage(request *ImportImageRequest) (response *ImportImageResponse, err error) { + if request == nil { + request = NewImportImageRequest() + } + + response = NewImportImageResponse() + err = c.Send(request, response) + return +} + +// ImportImage +// 本接口(ImportImage)用于导入镜像,导入后的镜像可用于创建实例。目前支持 RAW、VHD、QCOW2、VMDK 镜像格式。 +// +// 可能返回的错误码: +// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded" +// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" +// INVALIDIMAGEOSTYPE_UNSUPPORTED = "InvalidImageOsType.Unsupported" +// INVALIDIMAGEOSVERSION_UNSUPPORTED = "InvalidImageOsVersion.Unsupported" +// INVALIDPARAMETER_INVALIDPARAMETERURLERROR = "InvalidParameter.InvalidParameterUrlError" +// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge" +// REGIONABILITYLIMIT_UNSUPPORTEDTOIMPORTIMAGE = "RegionAbilityLimit.UnsupportedToImportImage" +func (c *Client) ImportImageWithContext(ctx context.Context, request *ImportImageRequest) (response *ImportImageResponse, err error) { + if request == nil { + request = NewImportImageRequest() + } + request.SetContext(ctx) + + response = NewImportImageResponse() + err = c.Send(request, response) + return +} + +func NewImportKeyPairRequest() (request *ImportKeyPairRequest) { + request = &ImportKeyPairRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ImportKeyPair") + + return +} + +func NewImportKeyPairResponse() (response *ImportKeyPairResponse) { + response = &ImportKeyPairResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ImportKeyPair +// 本接口 (ImportKeyPair) 用于导入密钥对。 +// +// +// +// * 本接口的功能是将密钥对导入到用户账户,并不会自动绑定到实例。如需绑定可以使用[AssociasteInstancesKeyPair](https://cloud.tencent.com/document/api/213/9404)接口。 +// +// * 需指定密钥对名称以及该密钥对的公钥文本。 +// +// * 如果用户只有私钥,可以通过 `SSL` 工具将私钥转换成公钥后再导入。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" +// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate" +// INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty" +// INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar" +// INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDPUBLICKEY_DUPLICATE = "InvalidPublicKey.Duplicate" +// INVALIDPUBLICKEY_MALFORMED = "InvalidPublicKey.Malformed" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) ImportKeyPair(request *ImportKeyPairRequest) (response *ImportKeyPairResponse, err error) { + if request == nil { + request = NewImportKeyPairRequest() + } + + response = NewImportKeyPairResponse() + err = c.Send(request, response) + return +} + +// ImportKeyPair +// 本接口 (ImportKeyPair) 用于导入密钥对。 +// +// +// +// * 本接口的功能是将密钥对导入到用户账户,并不会自动绑定到实例。如需绑定可以使用[AssociasteInstancesKeyPair](https://cloud.tencent.com/document/api/213/9404)接口。 +// +// * 需指定密钥对名称以及该密钥对的公钥文本。 +// +// * 如果用户只有私钥,可以通过 `SSL` 工具将私钥转换成公钥后再导入。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" +// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate" +// INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty" +// INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar" +// INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDPUBLICKEY_DUPLICATE = "InvalidPublicKey.Duplicate" +// INVALIDPUBLICKEY_MALFORMED = "InvalidPublicKey.Malformed" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) ImportKeyPairWithContext(ctx context.Context, request *ImportKeyPairRequest) (response *ImportKeyPairResponse, err error) { + if request == nil { + request = NewImportKeyPairRequest() + } + request.SetContext(ctx) + + response = NewImportKeyPairResponse() + err = c.Send(request, response) + return +} + +func NewInquirePricePurchaseReservedInstancesOfferingRequest() (request *InquirePricePurchaseReservedInstancesOfferingRequest) { + request = &InquirePricePurchaseReservedInstancesOfferingRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquirePricePurchaseReservedInstancesOffering") + + return +} + +func NewInquirePricePurchaseReservedInstancesOfferingResponse() (response *InquirePricePurchaseReservedInstancesOfferingResponse) { + response = &InquirePricePurchaseReservedInstancesOfferingResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquirePricePurchaseReservedInstancesOffering +// 本接口(InquirePricePurchaseReservedInstancesOffering)用于创建预留实例询价。本接口仅允许针对购买限制范围内的预留实例配置进行询价。预留实例当前只针对国际站白名单用户开放。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +func (c *Client) InquirePricePurchaseReservedInstancesOffering(request *InquirePricePurchaseReservedInstancesOfferingRequest) (response *InquirePricePurchaseReservedInstancesOfferingResponse, err error) { + if request == nil { + request = NewInquirePricePurchaseReservedInstancesOfferingRequest() + } + + response = NewInquirePricePurchaseReservedInstancesOfferingResponse() + err = c.Send(request, response) + return +} + +// InquirePricePurchaseReservedInstancesOffering +// 本接口(InquirePricePurchaseReservedInstancesOffering)用于创建预留实例询价。本接口仅允许针对购买限制范围内的预留实例配置进行询价。预留实例当前只针对国际站白名单用户开放。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +func (c *Client) InquirePricePurchaseReservedInstancesOfferingWithContext(ctx context.Context, request *InquirePricePurchaseReservedInstancesOfferingRequest) (response *InquirePricePurchaseReservedInstancesOfferingResponse, err error) { + if request == nil { + request = NewInquirePricePurchaseReservedInstancesOfferingRequest() + } + request.SetContext(ctx) + + response = NewInquirePricePurchaseReservedInstancesOfferingResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceModifyInstancesChargeTypeRequest() (request *InquiryPriceModifyInstancesChargeTypeRequest) { + request = &InquiryPriceModifyInstancesChargeTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceModifyInstancesChargeType") + + return +} + +func NewInquiryPriceModifyInstancesChargeTypeResponse() (response *InquiryPriceModifyInstancesChargeTypeResponse) { + response = &InquiryPriceModifyInstancesChargeTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceModifyInstancesChargeType +// 本接口 (InquiryPriceModifyInstancesChargeType) 用于切换实例的计费模式询价。 +// +// +// +// * 只支持从 `POSTPAID_BY_HOUR` 计费模式切换为`PREPAID`计费模式。 +// +// * 关机不收费的实例、`BC1`和`BS1`机型族的实例、设置定时销毁的实例、竞价实例不支持该操作。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +func (c *Client) InquiryPriceModifyInstancesChargeType(request *InquiryPriceModifyInstancesChargeTypeRequest) (response *InquiryPriceModifyInstancesChargeTypeResponse, err error) { + if request == nil { + request = NewInquiryPriceModifyInstancesChargeTypeRequest() + } + + response = NewInquiryPriceModifyInstancesChargeTypeResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceModifyInstancesChargeType +// 本接口 (InquiryPriceModifyInstancesChargeType) 用于切换实例的计费模式询价。 +// +// +// +// * 只支持从 `POSTPAID_BY_HOUR` 计费模式切换为`PREPAID`计费模式。 +// +// * 关机不收费的实例、`BC1`和`BS1`机型族的实例、设置定时销毁的实例、竞价实例不支持该操作。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +func (c *Client) InquiryPriceModifyInstancesChargeTypeWithContext(ctx context.Context, request *InquiryPriceModifyInstancesChargeTypeRequest) (response *InquiryPriceModifyInstancesChargeTypeResponse, err error) { + if request == nil { + request = NewInquiryPriceModifyInstancesChargeTypeRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceModifyInstancesChargeTypeResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceRenewInstancesRequest() (request *InquiryPriceRenewInstancesRequest) { + request = &InquiryPriceRenewInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceRenewInstances") + + return +} + +func NewInquiryPriceRenewInstancesResponse() (response *InquiryPriceRenewInstancesResponse) { + response = &InquiryPriceRenewInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceRenewInstances +// 本接口 (InquiryPriceRenewInstances) 用于续费包年包月实例询价。 +// +// +// +// * 只支持查询包年包月实例的续费价格。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INSTANCENOTSUPPORTEDMIXPRICINGMODEL = "InvalidParameterValue.InstanceNotSupportedMixPricingModel" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPERIOD = "InvalidPeriod" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +func (c *Client) InquiryPriceRenewInstances(request *InquiryPriceRenewInstancesRequest) (response *InquiryPriceRenewInstancesResponse, err error) { + if request == nil { + request = NewInquiryPriceRenewInstancesRequest() + } + + response = NewInquiryPriceRenewInstancesResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceRenewInstances +// 本接口 (InquiryPriceRenewInstances) 用于续费包年包月实例询价。 +// +// +// +// * 只支持查询包年包月实例的续费价格。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INSTANCENOTSUPPORTEDMIXPRICINGMODEL = "InvalidParameterValue.InstanceNotSupportedMixPricingModel" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPERIOD = "InvalidPeriod" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +func (c *Client) InquiryPriceRenewInstancesWithContext(ctx context.Context, request *InquiryPriceRenewInstancesRequest) (response *InquiryPriceRenewInstancesResponse, err error) { + if request == nil { + request = NewInquiryPriceRenewInstancesRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceRenewInstancesResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResetInstanceRequest() (request *InquiryPriceResetInstanceRequest) { + request = &InquiryPriceResetInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstance") + + return +} + +func NewInquiryPriceResetInstanceResponse() (response *InquiryPriceResetInstanceResponse) { + response = &InquiryPriceResetInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceResetInstance +// 本接口 (InquiryPriceResetInstance) 用于重装实例询价。 +// +// +// +// * 如果指定了`ImageId`参数,则使用指定的镜像进行重装询价;否则按照当前实例使用的镜像进行重装询价。 +// +// * 目前只支持[系统盘类型](https://cloud.tencent.com/document/api/213/15753#SystemDisk)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口实现`Linux`和`Windows`操作系统切换的重装询价。 +// +// * 目前不支持境外地域的实例使用该接口实现`Linux`和`Windows`操作系统切换的重装询价。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" +func (c *Client) InquiryPriceResetInstance(request *InquiryPriceResetInstanceRequest) (response *InquiryPriceResetInstanceResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstanceRequest() + } + + response = NewInquiryPriceResetInstanceResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceResetInstance +// 本接口 (InquiryPriceResetInstance) 用于重装实例询价。 +// +// +// +// * 如果指定了`ImageId`参数,则使用指定的镜像进行重装询价;否则按照当前实例使用的镜像进行重装询价。 +// +// * 目前只支持[系统盘类型](https://cloud.tencent.com/document/api/213/15753#SystemDisk)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口实现`Linux`和`Windows`操作系统切换的重装询价。 +// +// * 目前不支持境外地域的实例使用该接口实现`Linux`和`Windows`操作系统切换的重装询价。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" +func (c *Client) InquiryPriceResetInstanceWithContext(ctx context.Context, request *InquiryPriceResetInstanceRequest) (response *InquiryPriceResetInstanceResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstanceRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceResetInstanceResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResetInstancesInternetMaxBandwidthRequest() (request *InquiryPriceResetInstancesInternetMaxBandwidthRequest) { + request = &InquiryPriceResetInstancesInternetMaxBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstancesInternetMaxBandwidth") + + return +} + +func NewInquiryPriceResetInstancesInternetMaxBandwidthResponse() (response *InquiryPriceResetInstancesInternetMaxBandwidthResponse) { + response = &InquiryPriceResetInstancesInternetMaxBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceResetInstancesInternetMaxBandwidth +// 本接口 (InquiryPriceResetInstancesInternetMaxBandwidth) 用于调整实例公网带宽上限询价。 +// +// +// +// * 不同机型带宽上限范围不一致,具体限制详见[公网带宽上限](https://cloud.tencent.com/document/product/213/12523)。 +// +// * 对于`BANDWIDTH_PREPAID`计费方式的带宽,目前不支持调小带宽,且需要输入参数`StartTime`和`EndTime`,指定调整后的带宽的生效时间段。在这种场景下会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// * 对于 `TRAFFIC_POSTPAID_BY_HOUR`、 `BANDWIDTH_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽,使用该接口调整带宽上限是实时生效的,可以在带宽允许的范围内调大或者调小带宽,不支持输入参数 `StartTime` 和 `EndTime` 。 +// +// * 接口不支持调整`BANDWIDTH_POSTPAID_BY_MONTH`计费方式的带宽。 +// +// * 接口不支持批量调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽。 +// +// * 接口不支持批量调整混合计费方式的带宽。例如不支持同时调整`TRAFFIC_POSTPAID_BY_HOUR`和`BANDWIDTH_PACKAGE`计费方式的带宽。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPERMISSION = "InvalidPermission" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) InquiryPriceResetInstancesInternetMaxBandwidth(request *InquiryPriceResetInstancesInternetMaxBandwidthRequest) (response *InquiryPriceResetInstancesInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstancesInternetMaxBandwidthRequest() + } + + response = NewInquiryPriceResetInstancesInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceResetInstancesInternetMaxBandwidth +// 本接口 (InquiryPriceResetInstancesInternetMaxBandwidth) 用于调整实例公网带宽上限询价。 +// +// +// +// * 不同机型带宽上限范围不一致,具体限制详见[公网带宽上限](https://cloud.tencent.com/document/product/213/12523)。 +// +// * 对于`BANDWIDTH_PREPAID`计费方式的带宽,目前不支持调小带宽,且需要输入参数`StartTime`和`EndTime`,指定调整后的带宽的生效时间段。在这种场景下会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// * 对于 `TRAFFIC_POSTPAID_BY_HOUR`、 `BANDWIDTH_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽,使用该接口调整带宽上限是实时生效的,可以在带宽允许的范围内调大或者调小带宽,不支持输入参数 `StartTime` 和 `EndTime` 。 +// +// * 接口不支持调整`BANDWIDTH_POSTPAID_BY_MONTH`计费方式的带宽。 +// +// * 接口不支持批量调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽。 +// +// * 接口不支持批量调整混合计费方式的带宽。例如不支持同时调整`TRAFFIC_POSTPAID_BY_HOUR`和`BANDWIDTH_PACKAGE`计费方式的带宽。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPERMISSION = "InvalidPermission" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) InquiryPriceResetInstancesInternetMaxBandwidthWithContext(ctx context.Context, request *InquiryPriceResetInstancesInternetMaxBandwidthRequest) (response *InquiryPriceResetInstancesInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstancesInternetMaxBandwidthRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceResetInstancesInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResetInstancesTypeRequest() (request *InquiryPriceResetInstancesTypeRequest) { + request = &InquiryPriceResetInstancesTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResetInstancesType") + + return +} + +func NewInquiryPriceResetInstancesTypeResponse() (response *InquiryPriceResetInstancesTypeResponse) { + response = &InquiryPriceResetInstancesTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceResetInstancesType +// 本接口 (InquiryPriceResetInstancesType) 用于调整实例的机型询价。 +// +// +// +// * 目前只支持[系统盘类型](https://cloud.tencent.com/document/product/213/15753#SystemDisk)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口进行调整机型询价。 +// +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口调整机型询价。 +// +// * 对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYREFUNDPRICEFAILED = "FailedOperation.InquiryRefundPriceFailed" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPERMISSION = "InvalidPermission" +// LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// UNSUPPORTEDOPERATION_LOCALDATADISKCHANGEINSTANCEFAMILY = "UnsupportedOperation.LocalDataDiskChangeInstanceFamily" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOSA3 = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToSA3" +func (c *Client) InquiryPriceResetInstancesType(request *InquiryPriceResetInstancesTypeRequest) (response *InquiryPriceResetInstancesTypeResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstancesTypeRequest() + } + + response = NewInquiryPriceResetInstancesTypeResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceResetInstancesType +// 本接口 (InquiryPriceResetInstancesType) 用于调整实例的机型询价。 +// +// +// +// * 目前只支持[系统盘类型](https://cloud.tencent.com/document/product/213/15753#SystemDisk)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口进行调整机型询价。 +// +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口调整机型询价。 +// +// * 对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYREFUNDPRICEFAILED = "FailedOperation.InquiryRefundPriceFailed" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPERMISSION = "InvalidPermission" +// LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// UNSUPPORTEDOPERATION_LOCALDATADISKCHANGEINSTANCEFAMILY = "UnsupportedOperation.LocalDataDiskChangeInstanceFamily" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOSA3 = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToSA3" +func (c *Client) InquiryPriceResetInstancesTypeWithContext(ctx context.Context, request *InquiryPriceResetInstancesTypeRequest) (response *InquiryPriceResetInstancesTypeResponse, err error) { + if request == nil { + request = NewInquiryPriceResetInstancesTypeRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceResetInstancesTypeResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResizeInstanceDisksRequest() (request *InquiryPriceResizeInstanceDisksRequest) { + request = &InquiryPriceResizeInstanceDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceResizeInstanceDisks") + + return +} + +func NewInquiryPriceResizeInstanceDisksResponse() (response *InquiryPriceResizeInstanceDisksResponse) { + response = &InquiryPriceResizeInstanceDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceResizeInstanceDisks +// 本接口 (InquiryPriceResizeInstanceDisks) 用于扩容实例的数据盘询价。 +// +// +// +// * 目前只支持扩容非弹性数据盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性)询价,且[数据盘类型](https://cloud.tencent.com/document/product/213/15753#DataDisk)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。 +// +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口扩容数据盘询价。* 仅支持包年包月实例随机器购买的数据盘。* 目前只支持扩容一块数据盘询价。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +func (c *Client) InquiryPriceResizeInstanceDisks(request *InquiryPriceResizeInstanceDisksRequest) (response *InquiryPriceResizeInstanceDisksResponse, err error) { + if request == nil { + request = NewInquiryPriceResizeInstanceDisksRequest() + } + + response = NewInquiryPriceResizeInstanceDisksResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceResizeInstanceDisks +// 本接口 (InquiryPriceResizeInstanceDisks) 用于扩容实例的数据盘询价。 +// +// +// +// * 目前只支持扩容非弹性数据盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性)询价,且[数据盘类型](https://cloud.tencent.com/document/product/213/15753#DataDisk)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。 +// +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口扩容数据盘询价。* 仅支持包年包月实例随机器购买的数据盘。* 目前只支持扩容一块数据盘询价。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +func (c *Client) InquiryPriceResizeInstanceDisksWithContext(ctx context.Context, request *InquiryPriceResizeInstanceDisksRequest) (response *InquiryPriceResizeInstanceDisksResponse, err error) { + if request == nil { + request = NewInquiryPriceResizeInstanceDisksRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceResizeInstanceDisksResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceRunInstancesRequest() (request *InquiryPriceRunInstancesRequest) { + request = &InquiryPriceRunInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceRunInstances") + + return +} + +func NewInquiryPriceRunInstancesResponse() (response *InquiryPriceRunInstancesResponse) { + response = &InquiryPriceRunInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceRunInstances +// 本接口(InquiryPriceRunInstances)用于创建实例询价。本接口仅允许针对购买限制范围内的实例配置进行询价, 详见:[创建实例](https://cloud.tencent.com/document/api/213/15730)。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// FAILEDOPERATION_TATAGENTNOTSUPPORT = "FailedOperation.TatAgentNotSupport" +// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound" +// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" +// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster" +// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice" +// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPASSWORD = "InvalidPassword" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" +// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" +// UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser" +func (c *Client) InquiryPriceRunInstances(request *InquiryPriceRunInstancesRequest) (response *InquiryPriceRunInstancesResponse, err error) { + if request == nil { + request = NewInquiryPriceRunInstancesRequest() + } + + response = NewInquiryPriceRunInstancesResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceRunInstances +// 本接口(InquiryPriceRunInstances)用于创建实例询价。本接口仅允许针对购买限制范围内的实例配置进行询价, 详见:[创建实例](https://cloud.tencent.com/document/api/213/15730)。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// FAILEDOPERATION_TATAGENTNOTSUPPORT = "FailedOperation.TatAgentNotSupport" +// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound" +// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" +// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster" +// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice" +// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPASSWORD = "InvalidPassword" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" +// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" +// UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser" +func (c *Client) InquiryPriceRunInstancesWithContext(ctx context.Context, request *InquiryPriceRunInstancesRequest) (response *InquiryPriceRunInstancesResponse, err error) { + if request == nil { + request = NewInquiryPriceRunInstancesRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceRunInstancesResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceTerminateInstancesRequest() (request *InquiryPriceTerminateInstancesRequest) { + request = &InquiryPriceTerminateInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "InquiryPriceTerminateInstances") + + return +} + +func NewInquiryPriceTerminateInstancesResponse() (response *InquiryPriceTerminateInstancesResponse) { + response = &InquiryPriceTerminateInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceTerminateInstances +// 本接口 (InquiryPriceTerminateInstances) 用于退还实例询价。 +// +// +// +// * 查询退还实例可以返还的费用。 +// +// * 支持批量操作,每次请求批量实例的上限为100。如果批量实例存在不允许操作的实例,操作会以特定[错误码](#4.-.E9.94.99.E8.AF.AF.E7.A0.81)返回。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYREFUNDPRICEFAILED = "FailedOperation.InquiryRefundPriceFailed" +// FAILEDOPERATION_UNRETURNABLE = "FailedOperation.Unreturnable" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCENOTSUPPORTEDPREPAIDINSTANCE = "InvalidInstanceNotSupportedPrepaidInstance" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel" +// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region" +func (c *Client) InquiryPriceTerminateInstances(request *InquiryPriceTerminateInstancesRequest) (response *InquiryPriceTerminateInstancesResponse, err error) { + if request == nil { + request = NewInquiryPriceTerminateInstancesRequest() + } + + response = NewInquiryPriceTerminateInstancesResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceTerminateInstances +// 本接口 (InquiryPriceTerminateInstances) 用于退还实例询价。 +// +// +// +// * 查询退还实例可以返还的费用。 +// +// * 支持批量操作,每次请求批量实例的上限为100。如果批量实例存在不允许操作的实例,操作会以特定[错误码](#4.-.E9.94.99.E8.AF.AF.E7.A0.81)返回。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INQUIRYREFUNDPRICEFAILED = "FailedOperation.InquiryRefundPriceFailed" +// FAILEDOPERATION_UNRETURNABLE = "FailedOperation.Unreturnable" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCENOTSUPPORTEDPREPAIDINSTANCE = "InvalidInstanceNotSupportedPrepaidInstance" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel" +// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region" +func (c *Client) InquiryPriceTerminateInstancesWithContext(ctx context.Context, request *InquiryPriceTerminateInstancesRequest) (response *InquiryPriceTerminateInstancesResponse, err error) { + if request == nil { + request = NewInquiryPriceTerminateInstancesRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceTerminateInstancesResponse() + err = c.Send(request, response) + return +} + +func NewModifyDisasterRecoverGroupAttributeRequest() (request *ModifyDisasterRecoverGroupAttributeRequest) { + request = &ModifyDisasterRecoverGroupAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyDisasterRecoverGroupAttribute") + + return +} + +func NewModifyDisasterRecoverGroupAttributeResponse() (response *ModifyDisasterRecoverGroupAttributeResponse) { + response = &ModifyDisasterRecoverGroupAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyDisasterRecoverGroupAttribute +// 本接口 (ModifyDisasterRecoverGroupAttribute)用于修改[分散置放群组](https://cloud.tencent.com/document/product/213/15486)属性。 +// +// 可能返回的错误码: +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet" +func (c *Client) ModifyDisasterRecoverGroupAttribute(request *ModifyDisasterRecoverGroupAttributeRequest) (response *ModifyDisasterRecoverGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyDisasterRecoverGroupAttributeRequest() + } + + response = NewModifyDisasterRecoverGroupAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyDisasterRecoverGroupAttribute +// 本接口 (ModifyDisasterRecoverGroupAttribute)用于修改[分散置放群组](https://cloud.tencent.com/document/product/213/15486)属性。 +// +// 可能返回的错误码: +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet" +func (c *Client) ModifyDisasterRecoverGroupAttributeWithContext(ctx context.Context, request *ModifyDisasterRecoverGroupAttributeRequest) (response *ModifyDisasterRecoverGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyDisasterRecoverGroupAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyDisasterRecoverGroupAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyHostsAttributeRequest() (request *ModifyHostsAttributeRequest) { + request = &ModifyHostsAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyHostsAttribute") + + return +} + +func NewModifyHostsAttributeResponse() (response *ModifyHostsAttributeResponse) { + response = &ModifyHostsAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyHostsAttribute +// 本接口(ModifyHostsAttribute)用于修改CDH实例的属性,如实例名称和续费标记等。参数HostName和RenewFlag必须设置其中一个,但不能同时设置。 +// +// 可能返回的错误码: +// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +func (c *Client) ModifyHostsAttribute(request *ModifyHostsAttributeRequest) (response *ModifyHostsAttributeResponse, err error) { + if request == nil { + request = NewModifyHostsAttributeRequest() + } + + response = NewModifyHostsAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyHostsAttribute +// 本接口(ModifyHostsAttribute)用于修改CDH实例的属性,如实例名称和续费标记等。参数HostName和RenewFlag必须设置其中一个,但不能同时设置。 +// +// 可能返回的错误码: +// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +func (c *Client) ModifyHostsAttributeWithContext(ctx context.Context, request *ModifyHostsAttributeRequest) (response *ModifyHostsAttributeResponse, err error) { + if request == nil { + request = NewModifyHostsAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyHostsAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyImageAttributeRequest() (request *ModifyImageAttributeRequest) { + request = &ModifyImageAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyImageAttribute") + + return +} + +func NewModifyImageAttributeResponse() (response *ModifyImageAttributeResponse) { + response = &ModifyImageAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyImageAttribute +// 本接口(ModifyImageAttribute)用于修改镜像属性。 +// +// +// +// * 已分享的镜像无法修改属性。 +// +// 可能返回的错误码: +// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" +// INVALIDPARAMETER_VALUETOOLARGE = "InvalidParameter.ValueTooLarge" +// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge" +func (c *Client) ModifyImageAttribute(request *ModifyImageAttributeRequest) (response *ModifyImageAttributeResponse, err error) { + if request == nil { + request = NewModifyImageAttributeRequest() + } + + response = NewModifyImageAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyImageAttribute +// 本接口(ModifyImageAttribute)用于修改镜像属性。 +// +// +// +// * 已分享的镜像无法修改属性。 +// +// 可能返回的错误码: +// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" +// INVALIDPARAMETER_VALUETOOLARGE = "InvalidParameter.ValueTooLarge" +// INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge" +func (c *Client) ModifyImageAttributeWithContext(ctx context.Context, request *ModifyImageAttributeRequest) (response *ModifyImageAttributeResponse, err error) { + if request == nil { + request = NewModifyImageAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyImageAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyImageSharePermissionRequest() (request *ModifyImageSharePermissionRequest) { + request = &ModifyImageSharePermissionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyImageSharePermission") + + return +} + +func NewModifyImageSharePermissionResponse() (response *ModifyImageSharePermissionResponse) { + response = &ModifyImageSharePermissionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyImageSharePermission +// 本接口(ModifyImageSharePermission)用于修改镜像分享信息。 +// +// +// +// * 分享镜像后,被分享账户可以通过该镜像创建实例。 +// +// * 每个自定义镜像最多可共享给50个账户。 +// +// * 分享镜像无法更改名称,描述,仅可用于创建实例。 +// +// * 只支持分享到对方账户相同地域。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ACCOUNTALREADYEXISTS = "FailedOperation.AccountAlreadyExists" +// FAILEDOPERATION_ACCOUNTISYOURSELF = "FailedOperation.AccountIsYourSelf" +// FAILEDOPERATION_NOTMASTERACCOUNT = "FailedOperation.NotMasterAccount" +// FAILEDOPERATION_QIMAGESHAREFAILED = "FailedOperation.QImageShareFailed" +// FAILEDOPERATION_RIMAGESHAREFAILED = "FailedOperation.RImageShareFailed" +// INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound" +// INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// OVERQUOTA = "OverQuota" +// UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount" +func (c *Client) ModifyImageSharePermission(request *ModifyImageSharePermissionRequest) (response *ModifyImageSharePermissionResponse, err error) { + if request == nil { + request = NewModifyImageSharePermissionRequest() + } + + response = NewModifyImageSharePermissionResponse() + err = c.Send(request, response) + return +} + +// ModifyImageSharePermission +// 本接口(ModifyImageSharePermission)用于修改镜像分享信息。 +// +// +// +// * 分享镜像后,被分享账户可以通过该镜像创建实例。 +// +// * 每个自定义镜像最多可共享给50个账户。 +// +// * 分享镜像无法更改名称,描述,仅可用于创建实例。 +// +// * 只支持分享到对方账户相同地域。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ACCOUNTALREADYEXISTS = "FailedOperation.AccountAlreadyExists" +// FAILEDOPERATION_ACCOUNTISYOURSELF = "FailedOperation.AccountIsYourSelf" +// FAILEDOPERATION_NOTMASTERACCOUNT = "FailedOperation.NotMasterAccount" +// FAILEDOPERATION_QIMAGESHAREFAILED = "FailedOperation.QImageShareFailed" +// FAILEDOPERATION_RIMAGESHAREFAILED = "FailedOperation.RImageShareFailed" +// INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound" +// INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// OVERQUOTA = "OverQuota" +// UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount" +func (c *Client) ModifyImageSharePermissionWithContext(ctx context.Context, request *ModifyImageSharePermissionRequest) (response *ModifyImageSharePermissionResponse, err error) { + if request == nil { + request = NewModifyImageSharePermissionRequest() + } + request.SetContext(ctx) + + response = NewModifyImageSharePermissionResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstanceDiskTypeRequest() (request *ModifyInstanceDiskTypeRequest) { + request = &ModifyInstanceDiskTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstanceDiskType") + + return +} + +func NewModifyInstanceDiskTypeResponse() (response *ModifyInstanceDiskTypeResponse) { + response = &ModifyInstanceDiskTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstanceDiskType +// 本接口 (ModifyInstanceDiskType) 用于修改实例硬盘介质类型。 +// +// +// +// * 只支持实例的本地系统盘、本地数据盘转化成指定云硬盘介质。 +// +// * 只支持实例在关机状态下转换成指定云硬盘介质。 +// +// * 不支持竞价实例类型。 +// +// * 修改前请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397)接口查询账户余额。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDCLOUDDISKSOLDOUT = "InvalidParameter.InvalidCloudDiskSoldOut" +// INVALIDPARAMETER_INVALIDINSTANCENOTSUPPORTED = "InvalidParameter.InvalidInstanceNotSupported" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LOCALDISKSIZERANGE = "InvalidParameterValue.LocalDiskSizeRange" +// INVALIDPERMISSION = "InvalidPermission" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +func (c *Client) ModifyInstanceDiskType(request *ModifyInstanceDiskTypeRequest) (response *ModifyInstanceDiskTypeResponse, err error) { + if request == nil { + request = NewModifyInstanceDiskTypeRequest() + } + + response = NewModifyInstanceDiskTypeResponse() + err = c.Send(request, response) + return +} + +// ModifyInstanceDiskType +// 本接口 (ModifyInstanceDiskType) 用于修改实例硬盘介质类型。 +// +// +// +// * 只支持实例的本地系统盘、本地数据盘转化成指定云硬盘介质。 +// +// * 只支持实例在关机状态下转换成指定云硬盘介质。 +// +// * 不支持竞价实例类型。 +// +// * 修改前请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/378/4397)接口查询账户余额。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDCLOUDDISKSOLDOUT = "InvalidParameter.InvalidCloudDiskSoldOut" +// INVALIDPARAMETER_INVALIDINSTANCENOTSUPPORTED = "InvalidParameter.InvalidInstanceNotSupported" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LOCALDISKSIZERANGE = "InvalidParameterValue.LocalDiskSizeRange" +// INVALIDPERMISSION = "InvalidPermission" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +func (c *Client) ModifyInstanceDiskTypeWithContext(ctx context.Context, request *ModifyInstanceDiskTypeRequest) (response *ModifyInstanceDiskTypeResponse, err error) { + if request == nil { + request = NewModifyInstanceDiskTypeRequest() + } + request.SetContext(ctx) + + response = NewModifyInstanceDiskTypeResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesAttributeRequest() (request *ModifyInstancesAttributeRequest) { + request = &ModifyInstancesAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesAttribute") + + return +} + +func NewModifyInstancesAttributeResponse() (response *ModifyInstancesAttributeResponse) { + response = &ModifyInstancesAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstancesAttribute +// 本接口 (ModifyInstancesAttribute) 用于修改实例的属性(目前只支持修改实例的名称和关联的安全组)。 +// +// +// +// * 每次请求必须指定实例的一种属性用于修改。 +// +// * “实例名称”仅为方便用户自己管理之用,腾讯云并不以此名称作为在线支持或是进行实例管理操作的依据。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 修改关联安全组时,子机原来关联的安全组会被解绑。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded" +// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ModifyInstancesAttribute(request *ModifyInstancesAttributeRequest) (response *ModifyInstancesAttributeResponse, err error) { + if request == nil { + request = NewModifyInstancesAttributeRequest() + } + + response = NewModifyInstancesAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyInstancesAttribute +// 本接口 (ModifyInstancesAttribute) 用于修改实例的属性(目前只支持修改实例的名称和关联的安全组)。 +// +// +// +// * 每次请求必须指定实例的一种属性用于修改。 +// +// * “实例名称”仅为方便用户自己管理之用,腾讯云并不以此名称作为在线支持或是进行实例管理操作的依据。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 修改关联安全组时,子机原来关联的安全组会被解绑。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded" +// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ModifyInstancesAttributeWithContext(ctx context.Context, request *ModifyInstancesAttributeRequest) (response *ModifyInstancesAttributeResponse, err error) { + if request == nil { + request = NewModifyInstancesAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyInstancesAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesChargeTypeRequest() (request *ModifyInstancesChargeTypeRequest) { + request = &ModifyInstancesChargeTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesChargeType") + + return +} + +func NewModifyInstancesChargeTypeResponse() (response *ModifyInstancesChargeTypeResponse) { + response = &ModifyInstancesChargeTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstancesChargeType +// 本接口 (ModifyInstancesChargeType) 用于切换实例的计费模式。 +// +// +// +// * 只支持从 `POSTPAID_BY_HOUR` 计费模式切换为`PREPAID`计费模式。 +// +// * 关机不收费的实例、`BC1`和`BS1`机型族的实例、设置定时销毁的实例不支持该操作。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +func (c *Client) ModifyInstancesChargeType(request *ModifyInstancesChargeTypeRequest) (response *ModifyInstancesChargeTypeResponse, err error) { + if request == nil { + request = NewModifyInstancesChargeTypeRequest() + } + + response = NewModifyInstancesChargeTypeResponse() + err = c.Send(request, response) + return +} + +// ModifyInstancesChargeType +// 本接口 (ModifyInstancesChargeType) 用于切换实例的计费模式。 +// +// +// +// * 只支持从 `POSTPAID_BY_HOUR` 计费模式切换为`PREPAID`计费模式。 +// +// * 关机不收费的实例、`BC1`和`BS1`机型族的实例、设置定时销毁的实例不支持该操作。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +func (c *Client) ModifyInstancesChargeTypeWithContext(ctx context.Context, request *ModifyInstancesChargeTypeRequest) (response *ModifyInstancesChargeTypeResponse, err error) { + if request == nil { + request = NewModifyInstancesChargeTypeRequest() + } + request.SetContext(ctx) + + response = NewModifyInstancesChargeTypeResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesProjectRequest() (request *ModifyInstancesProjectRequest) { + request = &ModifyInstancesProjectRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesProject") + + return +} + +func NewModifyInstancesProjectResponse() (response *ModifyInstancesProjectResponse) { + response = &ModifyInstancesProjectResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstancesProject +// 本接口 (ModifyInstancesProject) 用于修改实例所属项目。 +// +// +// +// * 项目为一个虚拟概念,用户可以在一个账户下面建立多个项目,每个项目中管理不同的资源;将多个不同实例分属到不同项目中,后续使用 [`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口查询实例,项目ID可用于过滤结果。 +// +// * 绑定负载均衡的实例不支持修改实例所属项目,请先使用[`DeregisterInstancesFromLoadBalancer`](https://cloud.tencent.com/document/api/214/1258)接口解绑负载均衡。 +// +// [^_^]: # ( 修改实例所属项目会自动解关联实例原来关联的安全组,修改完成后可使用[`ModifyInstancesAttribute`](https://cloud.tencent.com/document/api/213/15739)接口关联安全组。) +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +func (c *Client) ModifyInstancesProject(request *ModifyInstancesProjectRequest) (response *ModifyInstancesProjectResponse, err error) { + if request == nil { + request = NewModifyInstancesProjectRequest() + } + + response = NewModifyInstancesProjectResponse() + err = c.Send(request, response) + return +} + +// ModifyInstancesProject +// 本接口 (ModifyInstancesProject) 用于修改实例所属项目。 +// +// +// +// * 项目为一个虚拟概念,用户可以在一个账户下面建立多个项目,每个项目中管理不同的资源;将多个不同实例分属到不同项目中,后续使用 [`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口查询实例,项目ID可用于过滤结果。 +// +// * 绑定负载均衡的实例不支持修改实例所属项目,请先使用[`DeregisterInstancesFromLoadBalancer`](https://cloud.tencent.com/document/api/214/1258)接口解绑负载均衡。 +// +// [^_^]: # ( 修改实例所属项目会自动解关联实例原来关联的安全组,修改完成后可使用[`ModifyInstancesAttribute`](https://cloud.tencent.com/document/api/213/15739)接口关联安全组。) +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +func (c *Client) ModifyInstancesProjectWithContext(ctx context.Context, request *ModifyInstancesProjectRequest) (response *ModifyInstancesProjectResponse, err error) { + if request == nil { + request = NewModifyInstancesProjectRequest() + } + request.SetContext(ctx) + + response = NewModifyInstancesProjectResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesRenewFlagRequest() (request *ModifyInstancesRenewFlagRequest) { + request = &ModifyInstancesRenewFlagRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesRenewFlag") + + return +} + +func NewModifyInstancesRenewFlagResponse() (response *ModifyInstancesRenewFlagResponse) { + response = &ModifyInstancesRenewFlagResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstancesRenewFlag +// 本接口 (ModifyInstancesRenewFlag) 用于修改包年包月实例续费标识。 +// +// +// +// * 实例被标识为自动续费后,每次在实例到期时,会自动续费一个月。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew" +func (c *Client) ModifyInstancesRenewFlag(request *ModifyInstancesRenewFlagRequest) (response *ModifyInstancesRenewFlagResponse, err error) { + if request == nil { + request = NewModifyInstancesRenewFlagRequest() + } + + response = NewModifyInstancesRenewFlagResponse() + err = c.Send(request, response) + return +} + +// ModifyInstancesRenewFlag +// 本接口 (ModifyInstancesRenewFlag) 用于修改包年包月实例续费标识。 +// +// +// +// * 实例被标识为自动续费后,每次在实例到期时,会自动续费一个月。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew" +func (c *Client) ModifyInstancesRenewFlagWithContext(ctx context.Context, request *ModifyInstancesRenewFlagRequest) (response *ModifyInstancesRenewFlagResponse, err error) { + if request == nil { + request = NewModifyInstancesRenewFlagRequest() + } + request.SetContext(ctx) + + response = NewModifyInstancesRenewFlagResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstancesVpcAttributeRequest() (request *ModifyInstancesVpcAttributeRequest) { + request = &ModifyInstancesVpcAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyInstancesVpcAttribute") + + return +} + +func NewModifyInstancesVpcAttributeResponse() (response *ModifyInstancesVpcAttributeResponse) { + response = &ModifyInstancesVpcAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyInstancesVpcAttribute +// 本接口(ModifyInstancesVpcAttribute)用于修改实例vpc属性,如私有网络ip。 +// +// * 此操作默认会关闭实例,完成后再启动。 +// +// * 当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。执行此操作前请确保指定的实例上没有绑定[弹性网卡](https://cloud.tencent.com/document/product/576)和[负载均衡](https://cloud.tencent.com/document/product/214)。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// ENINOTALLOWEDCHANGESUBNET = "EniNotAllowedChangeSubnet" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCESTATE = "InvalidInstanceState" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_IPV6NOTSUPPORTVPCMIGRATE = "UnsupportedOperation.IPv6NotSupportVpcMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_MODIFYVPCWITHCLB = "UnsupportedOperation.ModifyVPCWithCLB" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" +// VPCIPISUSED = "VpcIpIsUsed" +func (c *Client) ModifyInstancesVpcAttribute(request *ModifyInstancesVpcAttributeRequest) (response *ModifyInstancesVpcAttributeResponse, err error) { + if request == nil { + request = NewModifyInstancesVpcAttributeRequest() + } + + response = NewModifyInstancesVpcAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyInstancesVpcAttribute +// 本接口(ModifyInstancesVpcAttribute)用于修改实例vpc属性,如私有网络ip。 +// +// * 此操作默认会关闭实例,完成后再启动。 +// +// * 当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。执行此操作前请确保指定的实例上没有绑定[弹性网卡](https://cloud.tencent.com/document/product/576)和[负载均衡](https://cloud.tencent.com/document/product/214)。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// ENINOTALLOWEDCHANGESUBNET = "EniNotAllowedChangeSubnet" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCESTATE = "InvalidInstanceState" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_IPV6NOTSUPPORTVPCMIGRATE = "UnsupportedOperation.IPv6NotSupportVpcMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_MODIFYVPCWITHCLB = "UnsupportedOperation.ModifyVPCWithCLB" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" +// VPCIPISUSED = "VpcIpIsUsed" +func (c *Client) ModifyInstancesVpcAttributeWithContext(ctx context.Context, request *ModifyInstancesVpcAttributeRequest) (response *ModifyInstancesVpcAttributeResponse, err error) { + if request == nil { + request = NewModifyInstancesVpcAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyInstancesVpcAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyKeyPairAttributeRequest() (request *ModifyKeyPairAttributeRequest) { + request = &ModifyKeyPairAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyKeyPairAttribute") + + return +} + +func NewModifyKeyPairAttributeResponse() (response *ModifyKeyPairAttributeResponse) { + response = &ModifyKeyPairAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyKeyPairAttribute +// 本接口 (ModifyKeyPairAttribute) 用于修改密钥对属性。 +// +// +// +// * 修改密钥对ID所指定的密钥对的名称和描述信息。 +// +// * 密钥对名称不能和已经存在的密钥对的名称重复。 +// +// * 密钥对ID是密钥对的唯一标识,不可修改。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" +// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) ModifyKeyPairAttribute(request *ModifyKeyPairAttributeRequest) (response *ModifyKeyPairAttributeResponse, err error) { + if request == nil { + request = NewModifyKeyPairAttributeRequest() + } + + response = NewModifyKeyPairAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyKeyPairAttribute +// 本接口 (ModifyKeyPairAttribute) 用于修改密钥对属性。 +// +// +// +// * 修改密钥对ID所指定的密钥对的名称和描述信息。 +// +// * 密钥对名称不能和已经存在的密钥对的名称重复。 +// +// * 密钥对ID是密钥对的唯一标识,不可修改。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" +// INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" +// INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) ModifyKeyPairAttributeWithContext(ctx context.Context, request *ModifyKeyPairAttributeRequest) (response *ModifyKeyPairAttributeResponse, err error) { + if request == nil { + request = NewModifyKeyPairAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyKeyPairAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyLaunchTemplateDefaultVersionRequest() (request *ModifyLaunchTemplateDefaultVersionRequest) { + request = &ModifyLaunchTemplateDefaultVersionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ModifyLaunchTemplateDefaultVersion") + + return +} + +func NewModifyLaunchTemplateDefaultVersionResponse() (response *ModifyLaunchTemplateDefaultVersionResponse) { + response = &ModifyLaunchTemplateDefaultVersionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyLaunchTemplateDefaultVersion +// 本接口(ModifyLaunchTemplateDefaultVersion)用于修改实例启动模板默认版本。 +// +// 可能返回的错误码: +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERSETALREADY = "InvalidParameterValue.LaunchTemplateIdVerSetAlready" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// MISSINGPARAMETER = "MissingParameter" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) ModifyLaunchTemplateDefaultVersion(request *ModifyLaunchTemplateDefaultVersionRequest) (response *ModifyLaunchTemplateDefaultVersionResponse, err error) { + if request == nil { + request = NewModifyLaunchTemplateDefaultVersionRequest() + } + + response = NewModifyLaunchTemplateDefaultVersionResponse() + err = c.Send(request, response) + return +} + +// ModifyLaunchTemplateDefaultVersion +// 本接口(ModifyLaunchTemplateDefaultVersion)用于修改实例启动模板默认版本。 +// +// 可能返回的错误码: +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERSETALREADY = "InvalidParameterValue.LaunchTemplateIdVerSetAlready" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// MISSINGPARAMETER = "MissingParameter" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) ModifyLaunchTemplateDefaultVersionWithContext(ctx context.Context, request *ModifyLaunchTemplateDefaultVersionRequest) (response *ModifyLaunchTemplateDefaultVersionResponse, err error) { + if request == nil { + request = NewModifyLaunchTemplateDefaultVersionRequest() + } + request.SetContext(ctx) + + response = NewModifyLaunchTemplateDefaultVersionResponse() + err = c.Send(request, response) + return +} + +func NewProgramFpgaImageRequest() (request *ProgramFpgaImageRequest) { + request = &ProgramFpgaImageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ProgramFpgaImage") + + return +} + +func NewProgramFpgaImageResponse() (response *ProgramFpgaImageResponse) { + response = &ProgramFpgaImageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ProgramFpgaImage +// 本接口(ProgramFpgaImage)用于在线烧录由客户提供的FPGA镜像文件到指定实例的指定FPGA卡上。 +// +// * 只支持对单个实例发起在线烧录FPGA镜像的操作。 +// +// * 支持对单个实例的多块FPGA卡同时烧录FPGA镜像,DBDFs参数为空时,默认对指定实例的所有FPGA卡进行烧录。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNSUPPORTEDOPERATION_NOTFPGAINSTANCE = "UnsupportedOperation.NotFpgaInstance" +func (c *Client) ProgramFpgaImage(request *ProgramFpgaImageRequest) (response *ProgramFpgaImageResponse, err error) { + if request == nil { + request = NewProgramFpgaImageRequest() + } + + response = NewProgramFpgaImageResponse() + err = c.Send(request, response) + return +} + +// ProgramFpgaImage +// 本接口(ProgramFpgaImage)用于在线烧录由客户提供的FPGA镜像文件到指定实例的指定FPGA卡上。 +// +// * 只支持对单个实例发起在线烧录FPGA镜像的操作。 +// +// * 支持对单个实例的多块FPGA卡同时烧录FPGA镜像,DBDFs参数为空时,默认对指定实例的所有FPGA卡进行烧录。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// UNSUPPORTEDOPERATION_NOTFPGAINSTANCE = "UnsupportedOperation.NotFpgaInstance" +func (c *Client) ProgramFpgaImageWithContext(ctx context.Context, request *ProgramFpgaImageRequest) (response *ProgramFpgaImageResponse, err error) { + if request == nil { + request = NewProgramFpgaImageRequest() + } + request.SetContext(ctx) + + response = NewProgramFpgaImageResponse() + err = c.Send(request, response) + return +} + +func NewPurchaseReservedInstancesOfferingRequest() (request *PurchaseReservedInstancesOfferingRequest) { + request = &PurchaseReservedInstancesOfferingRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "PurchaseReservedInstancesOffering") + + return +} + +func NewPurchaseReservedInstancesOfferingResponse() (response *PurchaseReservedInstancesOfferingResponse) { + response = &PurchaseReservedInstancesOfferingResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// PurchaseReservedInstancesOffering +// 本接口(PurchaseReservedInstancesOffering)用于用户购买一个或者多个指定配置的预留实例 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEOUTOFQUATA = "UnsupportedOperation.ReservedInstanceOutofQuata" +func (c *Client) PurchaseReservedInstancesOffering(request *PurchaseReservedInstancesOfferingRequest) (response *PurchaseReservedInstancesOfferingResponse, err error) { + if request == nil { + request = NewPurchaseReservedInstancesOfferingRequest() + } + + response = NewPurchaseReservedInstancesOfferingResponse() + err = c.Send(request, response) + return +} + +// PurchaseReservedInstancesOffering +// 本接口(PurchaseReservedInstancesOffering)用于用户购买一个或者多个指定配置的预留实例 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" +// UNSUPPORTEDOPERATION_RESERVEDINSTANCEOUTOFQUATA = "UnsupportedOperation.ReservedInstanceOutofQuata" +func (c *Client) PurchaseReservedInstancesOfferingWithContext(ctx context.Context, request *PurchaseReservedInstancesOfferingRequest) (response *PurchaseReservedInstancesOfferingResponse, err error) { + if request == nil { + request = NewPurchaseReservedInstancesOfferingRequest() + } + request.SetContext(ctx) + + response = NewPurchaseReservedInstancesOfferingResponse() + err = c.Send(request, response) + return +} + +func NewRebootInstancesRequest() (request *RebootInstancesRequest) { + request = &RebootInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "RebootInstances") + + return +} + +func NewRebootInstancesResponse() (response *RebootInstancesResponse) { + response = &RebootInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RebootInstances +// 本接口 (RebootInstances) 用于重启实例。 +// +// +// +// * 只有状态为`RUNNING`的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入`REBOOTING`状态;重启实例成功时,实例会进入`RUNNING`状态。 +// +// * 支持强制重启。强制重启的效果等同于关闭物理计算机的电源开关再重新启动。强制重启可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常重启时使用。 +// +// * 支持批量操作,每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) RebootInstances(request *RebootInstancesRequest) (response *RebootInstancesResponse, err error) { + if request == nil { + request = NewRebootInstancesRequest() + } + + response = NewRebootInstancesResponse() + err = c.Send(request, response) + return +} + +// RebootInstances +// 本接口 (RebootInstances) 用于重启实例。 +// +// +// +// * 只有状态为`RUNNING`的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入`REBOOTING`状态;重启实例成功时,实例会进入`RUNNING`状态。 +// +// * 支持强制重启。强制重启的效果等同于关闭物理计算机的电源开关再重新启动。强制重启可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常重启时使用。 +// +// * 支持批量操作,每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) RebootInstancesWithContext(ctx context.Context, request *RebootInstancesRequest) (response *RebootInstancesResponse, err error) { + if request == nil { + request = NewRebootInstancesRequest() + } + request.SetContext(ctx) + + response = NewRebootInstancesResponse() + err = c.Send(request, response) + return +} + +func NewRenewHostsRequest() (request *RenewHostsRequest) { + request = &RenewHostsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "RenewHosts") + + return +} + +func NewRenewHostsResponse() (response *RenewHostsResponse) { + response = &RenewHostsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RenewHosts +// 本接口 (RenewHosts) 用于续费包年包月CDH实例。 +// +// +// +// * 只支持操作包年包月实例,否则操作会以特定[错误码](#6.-.E9.94.99.E8.AF.AF.E7.A0.81)返回。 +// +// * 续费时请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// 可能返回的错误码: +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDPERIOD = "InvalidPeriod" +func (c *Client) RenewHosts(request *RenewHostsRequest) (response *RenewHostsResponse, err error) { + if request == nil { + request = NewRenewHostsRequest() + } + + response = NewRenewHostsResponse() + err = c.Send(request, response) + return +} + +// RenewHosts +// 本接口 (RenewHosts) 用于续费包年包月CDH实例。 +// +// +// +// * 只支持操作包年包月实例,否则操作会以特定[错误码](#6.-.E9.94.99.E8.AF.AF.E7.A0.81)返回。 +// +// * 续费时请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// 可能返回的错误码: +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDPERIOD = "InvalidPeriod" +func (c *Client) RenewHostsWithContext(ctx context.Context, request *RenewHostsRequest) (response *RenewHostsResponse, err error) { + if request == nil { + request = NewRenewHostsRequest() + } + request.SetContext(ctx) + + response = NewRenewHostsResponse() + err = c.Send(request, response) + return +} + +func NewRenewInstancesRequest() (request *RenewInstancesRequest) { + request = &RenewInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "RenewInstances") + + return +} + +func NewRenewInstancesResponse() (response *RenewInstancesResponse) { + response = &RenewInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RenewInstances +// 本接口 (RenewInstances) 用于续费包年包月实例。 +// +// +// +// * 只支持操作包年包月实例。 +// +// * 续费时请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INSTANCENOTSUPPORTEDMIXPRICINGMODEL = "InvalidParameterValue.InstanceNotSupportedMixPricingModel" +// INVALIDPERIOD = "InvalidPeriod" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +func (c *Client) RenewInstances(request *RenewInstancesRequest) (response *RenewInstancesResponse, err error) { + if request == nil { + request = NewRenewInstancesRequest() + } + + response = NewRenewInstancesResponse() + err = c.Send(request, response) + return +} + +// RenewInstances +// 本接口 (RenewInstances) 用于续费包年包月实例。 +// +// +// +// * 只支持操作包年包月实例。 +// +// * 续费时请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INSTANCENOTSUPPORTEDMIXPRICINGMODEL = "InvalidParameterValue.InstanceNotSupportedMixPricingModel" +// INVALIDPERIOD = "InvalidPeriod" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +func (c *Client) RenewInstancesWithContext(ctx context.Context, request *RenewInstancesRequest) (response *RenewInstancesResponse, err error) { + if request == nil { + request = NewRenewInstancesRequest() + } + request.SetContext(ctx) + + response = NewRenewInstancesResponse() + err = c.Send(request, response) + return +} + +func NewResetInstanceRequest() (request *ResetInstanceRequest) { + request = &ResetInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResetInstance") + + return +} + +func NewResetInstanceResponse() (response *ResetInstanceResponse) { + response = &ResetInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetInstance +// 本接口 (ResetInstance) 用于重装指定实例上的操作系统。 +// +// +// +// * 如果指定了`ImageId`参数,则使用指定的镜像重装;否则按照当前实例使用的镜像进行重装。 +// +// * 系统盘将会被格式化,并重置;请确保系统盘中无重要文件。 +// +// * `Linux`和`Windows`系统互相切换时,该实例系统盘`ID`将发生变化,系统盘关联快照将无法回滚、恢复数据。 +// +// * 密码不指定将会通过站内信下发随机密码。 +// +// * 目前只支持[系统盘类型](https://cloud.tencent.com/document/api/213/9452#SystemDisk)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口实现`Linux`和`Windows`操作系统切换。 +// +// * 目前不支持境外地域的实例使用该接口实现`Linux`和`Windows`操作系统切换。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" +// INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPASSWORD = "InvalidPassword" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINUSE = "ResourceInUse" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" +// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ResetInstance(request *ResetInstanceRequest) (response *ResetInstanceResponse, err error) { + if request == nil { + request = NewResetInstanceRequest() + } + + response = NewResetInstanceResponse() + err = c.Send(request, response) + return +} + +// ResetInstance +// 本接口 (ResetInstance) 用于重装指定实例上的操作系统。 +// +// +// +// * 如果指定了`ImageId`参数,则使用指定的镜像重装;否则按照当前实例使用的镜像进行重装。 +// +// * 系统盘将会被格式化,并重置;请确保系统盘中无重要文件。 +// +// * `Linux`和`Windows`系统互相切换时,该实例系统盘`ID`将发生变化,系统盘关联快照将无法回滚、恢复数据。 +// +// * 密码不指定将会通过站内信下发随机密码。 +// +// * 目前只支持[系统盘类型](https://cloud.tencent.com/document/api/213/9452#SystemDisk)是`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`类型的实例使用该接口实现`Linux`和`Windows`操作系统切换。 +// +// * 目前不支持境外地域的实例使用该接口实现`Linux`和`Windows`操作系统切换。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" +// INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPASSWORD = "InvalidPassword" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINUSE = "ResourceInUse" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" +// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ResetInstanceWithContext(ctx context.Context, request *ResetInstanceRequest) (response *ResetInstanceResponse, err error) { + if request == nil { + request = NewResetInstanceRequest() + } + request.SetContext(ctx) + + response = NewResetInstanceResponse() + err = c.Send(request, response) + return +} + +func NewResetInstancesInternetMaxBandwidthRequest() (request *ResetInstancesInternetMaxBandwidthRequest) { + request = &ResetInstancesInternetMaxBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesInternetMaxBandwidth") + + return +} + +func NewResetInstancesInternetMaxBandwidthResponse() (response *ResetInstancesInternetMaxBandwidthResponse) { + response = &ResetInstancesInternetMaxBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetInstancesInternetMaxBandwidth +// 本接口 (ResetInstancesInternetMaxBandwidth) 用于调整实例公网带宽上限。 +// +// +// +// * 不同机型带宽上限范围不一致,具体限制详见[公网带宽上限](https://cloud.tencent.com/document/product/213/12523)。 +// +// * 对于 `BANDWIDTH_PREPAID` 计费方式的带宽,需要输入参数 `StartTime` 和 `EndTime` ,指定调整后的带宽的生效时间段。在这种场景下目前不支持调小带宽,会涉及扣费,请确保账户余额充足。可通过 [`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253) 接口查询账户余额。 +// +// * 对于 `TRAFFIC_POSTPAID_BY_HOUR` 、 `BANDWIDTH_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽,使用该接口调整带宽上限是实时生效的,可以在带宽允许的范围内调大或者调小带宽,不支持输入参数 `StartTime` 和 `EndTime` 。 +// +// * 接口不支持调整 `BANDWIDTH_POSTPAID_BY_MONTH` 计费方式的带宽。 +// +// * 接口不支持批量调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽。 +// +// * 接口不支持批量调整混合计费方式的带宽。例如不支持同时调整 `TRAFFIC_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPERMISSION = "InvalidPermission" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ResetInstancesInternetMaxBandwidth(request *ResetInstancesInternetMaxBandwidthRequest) (response *ResetInstancesInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewResetInstancesInternetMaxBandwidthRequest() + } + + response = NewResetInstancesInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +// ResetInstancesInternetMaxBandwidth +// 本接口 (ResetInstancesInternetMaxBandwidth) 用于调整实例公网带宽上限。 +// +// +// +// * 不同机型带宽上限范围不一致,具体限制详见[公网带宽上限](https://cloud.tencent.com/document/product/213/12523)。 +// +// * 对于 `BANDWIDTH_PREPAID` 计费方式的带宽,需要输入参数 `StartTime` 和 `EndTime` ,指定调整后的带宽的生效时间段。在这种场景下目前不支持调小带宽,会涉及扣费,请确保账户余额充足。可通过 [`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253) 接口查询账户余额。 +// +// * 对于 `TRAFFIC_POSTPAID_BY_HOUR` 、 `BANDWIDTH_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽,使用该接口调整带宽上限是实时生效的,可以在带宽允许的范围内调大或者调小带宽,不支持输入参数 `StartTime` 和 `EndTime` 。 +// +// * 接口不支持调整 `BANDWIDTH_POSTPAID_BY_MONTH` 计费方式的带宽。 +// +// * 接口不支持批量调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽。 +// +// * 接口不支持批量调整混合计费方式的带宽。例如不支持同时调整 `TRAFFIC_POSTPAID_BY_HOUR` 和 `BANDWIDTH_PACKAGE` 计费方式的带宽。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPERMISSION = "InvalidPermission" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ResetInstancesInternetMaxBandwidthWithContext(ctx context.Context, request *ResetInstancesInternetMaxBandwidthRequest) (response *ResetInstancesInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewResetInstancesInternetMaxBandwidthRequest() + } + request.SetContext(ctx) + + response = NewResetInstancesInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewResetInstancesPasswordRequest() (request *ResetInstancesPasswordRequest) { + request = &ResetInstancesPasswordRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesPassword") + + return +} + +func NewResetInstancesPasswordResponse() (response *ResetInstancesPasswordResponse) { + response = &ResetInstancesPasswordResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetInstancesPassword +// 本接口 (ResetInstancesPassword) 用于将实例操作系统的密码重置为用户指定的密码。 +// +// +// +// *如果是修改系统管理云密码:实例的操作系统不同,管理员帐号也会不一样(`Windows`为`Administrator`,`Ubuntu`为`ubuntu`,其它系统为`root`)。 +// +// * 重置处于运行中状态的实例密码,需要设置关机参数`ForceStop`为`TRUE`。如果没有显式指定强制关机参数,则只有处于关机状态的实例才允许执行重置密码操作。 +// +// * 支持批量操作。将多个实例操作系统的密码重置为相同的密码。每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPASSWORD = "InvalidPassword" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ResetInstancesPassword(request *ResetInstancesPasswordRequest) (response *ResetInstancesPasswordResponse, err error) { + if request == nil { + request = NewResetInstancesPasswordRequest() + } + + response = NewResetInstancesPasswordResponse() + err = c.Send(request, response) + return +} + +// ResetInstancesPassword +// 本接口 (ResetInstancesPassword) 用于将实例操作系统的密码重置为用户指定的密码。 +// +// +// +// *如果是修改系统管理云密码:实例的操作系统不同,管理员帐号也会不一样(`Windows`为`Administrator`,`Ubuntu`为`ubuntu`,其它系统为`root`)。 +// +// * 重置处于运行中状态的实例密码,需要设置关机参数`ForceStop`为`TRUE`。如果没有显式指定强制关机参数,则只有处于关机状态的实例才允许执行重置密码操作。 +// +// * 支持批量操作。将多个实例操作系统的密码重置为相同的密码。每次请求批量实例的上限为100。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPASSWORD = "InvalidPassword" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ResetInstancesPasswordWithContext(ctx context.Context, request *ResetInstancesPasswordRequest) (response *ResetInstancesPasswordResponse, err error) { + if request == nil { + request = NewResetInstancesPasswordRequest() + } + request.SetContext(ctx) + + response = NewResetInstancesPasswordResponse() + err = c.Send(request, response) + return +} + +func NewResetInstancesTypeRequest() (request *ResetInstancesTypeRequest) { + request = &ResetInstancesTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResetInstancesType") + + return +} + +func NewResetInstancesTypeResponse() (response *ResetInstancesTypeResponse) { + response = &ResetInstancesTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetInstancesType +// 本接口 (ResetInstancesType) 用于调整实例的机型。 +// +// +// +// * 目前只支持[系统盘类型](/document/api/213/9452#block_device)是CLOUD_BASIC、CLOUD_PREMIUM、CLOUD_SSD类型的实例使用该接口进行机型调整。 +// +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口调整机型。对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// * 本接口为异步接口,调整实例配置请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表调整实例配置操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_PROMOTIONALPERIORESTRICTION = "FailedOperation.PromotionalPerioRestriction" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_ENINUMLIMIT = "LimitExceeded.EniNumLimit" +// LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth" +// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// RESOURCESSOLDOUT_AVAILABLEZONE = "ResourcesSoldOut.AvailableZone" +// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOARM = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToARM" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOSA3 = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToSA3" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCETOTHISINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceToThisInstanceFamily" +func (c *Client) ResetInstancesType(request *ResetInstancesTypeRequest) (response *ResetInstancesTypeResponse, err error) { + if request == nil { + request = NewResetInstancesTypeRequest() + } + + response = NewResetInstancesTypeResponse() + err = c.Send(request, response) + return +} + +// ResetInstancesType +// 本接口 (ResetInstancesType) 用于调整实例的机型。 +// +// +// +// * 目前只支持[系统盘类型](/document/api/213/9452#block_device)是CLOUD_BASIC、CLOUD_PREMIUM、CLOUD_SSD类型的实例使用该接口进行机型调整。 +// +// * 目前不支持[CDH](https://cloud.tencent.com/document/product/416)实例使用该接口调整机型。对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// * 本接口为异步接口,调整实例配置请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表调整实例配置操作成功。 +// +// 可能返回的错误码: +// FAILEDOPERATION_PROMOTIONALPERIORESTRICTION = "FailedOperation.PromotionalPerioRestriction" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_ENINUMLIMIT = "LimitExceeded.EniNumLimit" +// LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth" +// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// RESOURCESSOLDOUT_AVAILABLEZONE = "ResourcesSoldOut.AvailableZone" +// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOARM = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToARM" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOSA3 = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToSA3" +// UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCETOTHISINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceToThisInstanceFamily" +func (c *Client) ResetInstancesTypeWithContext(ctx context.Context, request *ResetInstancesTypeRequest) (response *ResetInstancesTypeResponse, err error) { + if request == nil { + request = NewResetInstancesTypeRequest() + } + request.SetContext(ctx) + + response = NewResetInstancesTypeResponse() + err = c.Send(request, response) + return +} + +func NewResizeInstanceDisksRequest() (request *ResizeInstanceDisksRequest) { + request = &ResizeInstanceDisksRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "ResizeInstanceDisks") + + return +} + +func NewResizeInstanceDisksResponse() (response *ResizeInstanceDisksResponse) { + response = &ResizeInstanceDisksResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResizeInstanceDisks +// 本接口 (ResizeInstanceDisks) 用于扩容实例的数据盘。 +// +// +// +// * 目前只支持扩容非弹性盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性),且[数据盘类型](https://cloud.tencent.com/document/api/213/15753#DataDisk)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`和[CDH](https://cloud.tencent.com/document/product/416)实例的`LOCAL_BASIC`、`LOCAL_SSD`类型数据盘。 +// +// * 对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// * 目前只支持扩容一块数据盘。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// * 如果是系统盘,目前只支持扩容,不支持缩容。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ResizeInstanceDisks(request *ResizeInstanceDisksRequest) (response *ResizeInstanceDisksResponse, err error) { + if request == nil { + request = NewResizeInstanceDisksRequest() + } + + response = NewResizeInstanceDisksResponse() + err = c.Send(request, response) + return +} + +// ResizeInstanceDisks +// 本接口 (ResizeInstanceDisks) 用于扩容实例的数据盘。 +// +// +// +// * 目前只支持扩容非弹性盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性),且[数据盘类型](https://cloud.tencent.com/document/api/213/15753#DataDisk)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`和[CDH](https://cloud.tencent.com/document/product/416)实例的`LOCAL_BASIC`、`LOCAL_SSD`类型数据盘。 +// +// * 对于包年包月实例,使用该接口会涉及扣费,请确保账户余额充足。可通过[`DescribeAccountBalance`](https://cloud.tencent.com/document/product/555/20253)接口查询账户余额。 +// +// * 目前只支持扩容一块数据盘。 +// +// * 实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。 +// +// * 如果是系统盘,目前只支持扩容,不支持缩容。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) ResizeInstanceDisksWithContext(ctx context.Context, request *ResizeInstanceDisksRequest) (response *ResizeInstanceDisksResponse, err error) { + if request == nil { + request = NewResizeInstanceDisksRequest() + } + request.SetContext(ctx) + + response = NewResizeInstanceDisksResponse() + err = c.Send(request, response) + return +} + +func NewRunInstancesRequest() (request *RunInstancesRequest) { + request = &RunInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "RunInstances") + + return +} + +func NewRunInstancesResponse() (response *RunInstancesResponse) { + response = &RunInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RunInstances +// 本接口 (RunInstances) 用于创建一个或多个指定配置的实例。 +// +// +// +// * 实例创建成功后将自动开机启动,[实例状态](https://cloud.tencent.com/document/product/213/15753#InstanceStatus)变为“运行中”。 +// +// * 预付费实例的购买会预先扣除本次实例购买所需金额,按小时后付费实例购买会预先冻结本次实例购买一小时内所需金额,在调用本接口前请确保账户余额充足。 +// +// * 调用本接口创建实例,支持代金券自动抵扣(注意,代金券不可用于抵扣后付费冻结金额),详情请参考[代金券选用规则](https://cloud.tencent.com/document/product/555/7428)。 +// +// * 本接口允许购买的实例数量遵循[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664),所创建的实例和官网入口创建的实例共用配额。 +// +// * 本接口为异步接口,当创建实例请求下发成功后会返回一个实例`ID`列表和一个`RequestId`,此时创建实例操作并未立即完成。在此期间实例的状态将会处于“PENDING”,实例创建结果可以通过调用 [DescribeInstancesStatus](https://cloud.tencent.com/document/product/213/15738) 接口查询,如果实例状态(InstanceState)由“PENDING”变为“RUNNING”,则代表实例创建成功,“LAUNCH_FAILED”代表实例创建失败。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue" +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_NOAVAILABLEIPADDRESSCOUNTINSUBNET = "FailedOperation.NoAvailableIpAddressCountInSubnet" +// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" +// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize" +// FAILEDOPERATION_SNAPSHOTSIZELESSTHANDATASIZE = "FailedOperation.SnapshotSizeLessThanDataSize" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat" +// INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound" +// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound" +// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" +// INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed" +// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" +// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster" +// INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering" +// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice" +// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType" +// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" +// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed" +// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist" +// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound" +// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue" +// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed" +// INVALIDPARAMETERVALUE_VPCIDNOTEXIST = "InvalidParameterValue.VpcIdNotExist" +// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPASSWORD = "InvalidPassword" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded" +// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup" +// LIMITEXCEEDED_IPV6ADDRESSNUM = "LimitExceeded.IPv6AddressNum" +// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" +// LIMITEXCEEDED_PREPAYQUOTA = "LimitExceeded.PrepayQuota" +// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" +// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" +// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota" +// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork" +// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut" +// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" +// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient" +// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +// UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt" +// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer" +// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" +// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" +// UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser" +// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" +// VPCIPISUSED = "VpcIpIsUsed" +func (c *Client) RunInstances(request *RunInstancesRequest) (response *RunInstancesResponse, err error) { + if request == nil { + request = NewRunInstancesRequest() + } + + response = NewRunInstancesResponse() + err = c.Send(request, response) + return +} + +// RunInstances +// 本接口 (RunInstances) 用于创建一个或多个指定配置的实例。 +// +// +// +// * 实例创建成功后将自动开机启动,[实例状态](https://cloud.tencent.com/document/product/213/15753#InstanceStatus)变为“运行中”。 +// +// * 预付费实例的购买会预先扣除本次实例购买所需金额,按小时后付费实例购买会预先冻结本次实例购买一小时内所需金额,在调用本接口前请确保账户余额充足。 +// +// * 调用本接口创建实例,支持代金券自动抵扣(注意,代金券不可用于抵扣后付费冻结金额),详情请参考[代金券选用规则](https://cloud.tencent.com/document/product/555/7428)。 +// +// * 本接口允许购买的实例数量遵循[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664),所创建的实例和官网入口创建的实例共用配额。 +// +// * 本接口为异步接口,当创建实例请求下发成功后会返回一个实例`ID`列表和一个`RequestId`,此时创建实例操作并未立即完成。在此期间实例的状态将会处于“PENDING”,实例创建结果可以通过调用 [DescribeInstancesStatus](https://cloud.tencent.com/document/product/213/15738) 接口查询,如果实例状态(InstanceState)由“PENDING”变为“RUNNING”,则代表实例创建成功,“LAUNCH_FAILED”代表实例创建失败。 +// +// 可能返回的错误码: +// ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" +// AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" +// FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" +// FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue" +// FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" +// FAILEDOPERATION_NOAVAILABLEIPADDRESSCOUNTINSUBNET = "FailedOperation.NoAvailableIpAddressCountInSubnet" +// FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" +// FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize" +// FAILEDOPERATION_SNAPSHOTSIZELESSTHANDATASIZE = "FailedOperation.SnapshotSizeLessThanDataSize" +// FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" +// INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" +// INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" +// INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" +// INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" +// INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" +// INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat" +// INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore" +// INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" +// INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound" +// INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound" +// INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" +// INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed" +// INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" +// INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" +// INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster" +// INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering" +// INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice" +// INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType" +// INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" +// INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" +// INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat" +// INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" +// INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" +// INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" +// INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed" +// INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist" +// INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound" +// INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue" +// INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed" +// INVALIDPARAMETERVALUE_VPCIDNOTEXIST = "InvalidParameterValue.VpcIdNotExist" +// INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch" +// INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" +// INVALIDPASSWORD = "InvalidPassword" +// INVALIDPERIOD = "InvalidPeriod" +// INVALIDPERMISSION = "InvalidPermission" +// INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" +// INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" +// LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded" +// LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup" +// LIMITEXCEEDED_IPV6ADDRESSNUM = "LimitExceeded.IPv6AddressNum" +// LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" +// LIMITEXCEEDED_PREPAYQUOTA = "LimitExceeded.PrepayQuota" +// LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" +// LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" +// LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota" +// LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum" +// MISSINGPARAMETER = "MissingParameter" +// MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC" +// MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" +// OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork" +// RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut" +// RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" +// RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" +// RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" +// RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" +// RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" +// RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" +// RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" +// RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient" +// RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" +// UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt" +// UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" +// UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" +// UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer" +// UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" +// UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" +// UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser" +// VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" +// VPCIPISUSED = "VpcIpIsUsed" +func (c *Client) RunInstancesWithContext(ctx context.Context, request *RunInstancesRequest) (response *RunInstancesResponse, err error) { + if request == nil { + request = NewRunInstancesRequest() + } + request.SetContext(ctx) + + response = NewRunInstancesResponse() + err = c.Send(request, response) + return +} + +func NewStartInstancesRequest() (request *StartInstancesRequest) { + request = &StartInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "StartInstances") + + return +} + +func NewStartInstancesResponse() (response *StartInstancesResponse) { + response = &StartInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// StartInstances +// 本接口 (StartInstances) 用于启动一个或多个实例。 +// +// +// +// * 只有状态为`STOPPED`的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入`STARTING`状态;启动实例成功时,实例会进入`RUNNING`状态。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 本接口为异步接口,启动实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表启动实例操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +func (c *Client) StartInstances(request *StartInstancesRequest) (response *StartInstancesResponse, err error) { + if request == nil { + request = NewStartInstancesRequest() + } + + response = NewStartInstancesResponse() + err = c.Send(request, response) + return +} + +// StartInstances +// 本接口 (StartInstances) 用于启动一个或多个实例。 +// +// +// +// * 只有状态为`STOPPED`的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入`STARTING`状态;启动实例成功时,实例会进入`RUNNING`状态。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 本接口为异步接口,启动实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表启动实例操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +func (c *Client) StartInstancesWithContext(ctx context.Context, request *StartInstancesRequest) (response *StartInstancesResponse, err error) { + if request == nil { + request = NewStartInstancesRequest() + } + request.SetContext(ctx) + + response = NewStartInstancesResponse() + err = c.Send(request, response) + return +} + +func NewStopInstancesRequest() (request *StopInstancesRequest) { + request = &StopInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "StopInstances") + + return +} + +func NewStopInstancesResponse() (response *StopInstancesResponse) { + response = &StopInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// StopInstances +// 本接口 (StopInstances) 用于关闭一个或多个实例。 +// +// +// +// * 只有状态为`RUNNING`的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入`STOPPING`状态;关闭实例成功时,实例会进入`STOPPED`状态。 +// +// * 支持强制关闭。强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 本接口为异步接口,关闭实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表关闭实例操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) StopInstances(request *StopInstancesRequest) (response *StopInstancesResponse, err error) { + if request == nil { + request = NewStopInstancesRequest() + } + + response = NewStopInstancesResponse() + err = c.Send(request, response) + return +} + +// StopInstances +// 本接口 (StopInstances) 用于关闭一个或多个实例。 +// +// +// +// * 只有状态为`RUNNING`的实例才可以进行此操作。 +// +// * 接口调用成功时,实例会进入`STOPPING`状态;关闭实例成功时,实例会进入`STOPPED`状态。 +// +// * 支持强制关闭。强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 +// +// * 支持批量操作。每次请求批量实例的上限为100。 +// +// * 本接口为异步接口,关闭实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728#.E7.A4.BA.E4.BE.8B3-.E6.9F.A5.E8.AF.A2.E5.AE.9E.E4.BE.8B.E7.9A.84.E6.9C.80.E6.96.B0.E6.93.8D.E4.BD.9C.E6.83.85.E5.86.B5) 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表关闭实例操作成功。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" +func (c *Client) StopInstancesWithContext(ctx context.Context, request *StopInstancesRequest) (response *StopInstancesResponse, err error) { + if request == nil { + request = NewStopInstancesRequest() + } + request.SetContext(ctx) + + response = NewStopInstancesResponse() + err = c.Send(request, response) + return +} + +func NewSyncImagesRequest() (request *SyncImagesRequest) { + request = &SyncImagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "SyncImages") + + return +} + +func NewSyncImagesResponse() (response *SyncImagesResponse) { + response = &SyncImagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// SyncImages +// 本接口(SyncImages)用于将自定义镜像同步到其它地区。 +// +// +// +// * 该接口每次调用只支持同步一个镜像。 +// +// * 该接口支持多个同步地域。 +// +// * 单个帐号在每个地域最多支持存在10个自定义镜像。 +// +// 可能返回的错误码: +// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded" +// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDIMAGEID_TOOLARGE = "InvalidImageId.TooLarge" +// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +// INVALIDREGION_UNAVAILABLE = "InvalidRegion.Unavailable" +// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region" +func (c *Client) SyncImages(request *SyncImagesRequest) (response *SyncImagesResponse, err error) { + if request == nil { + request = NewSyncImagesRequest() + } + + response = NewSyncImagesResponse() + err = c.Send(request, response) + return +} + +// SyncImages +// 本接口(SyncImages)用于将自定义镜像同步到其它地区。 +// +// +// +// * 该接口每次调用只支持同步一个镜像。 +// +// * 该接口支持多个同步地域。 +// +// * 单个帐号在每个地域最多支持存在10个自定义镜像。 +// +// 可能返回的错误码: +// IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded" +// INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState" +// INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" +// INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" +// INVALIDIMAGEID_TOOLARGE = "InvalidImageId.TooLarge" +// INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" +// INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" +// INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" +// INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" +// INVALIDREGION_UNAVAILABLE = "InvalidRegion.Unavailable" +// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region" +func (c *Client) SyncImagesWithContext(ctx context.Context, request *SyncImagesRequest) (response *SyncImagesResponse, err error) { + if request == nil { + request = NewSyncImagesRequest() + } + request.SetContext(ctx) + + response = NewSyncImagesResponse() + err = c.Send(request, response) + return +} + +func NewTerminateInstancesRequest() (request *TerminateInstancesRequest) { + request = &TerminateInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("cvm", APIVersion, "TerminateInstances") + + return +} + +func NewTerminateInstancesResponse() (response *TerminateInstancesResponse) { + response = &TerminateInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// TerminateInstances +// 本接口 (TerminateInstances) 用于主动退还实例。 +// +// +// +// * 不再使用的实例,可通过本接口主动退还。 +// +// * 按量计费的实例通过本接口可直接退还;包年包月实例如符合[退还规则](https://cloud.tencent.com/document/product/213/9711),也可通过本接口主动退还。 +// +// * 包年包月实例首次调用本接口,实例将被移至回收站,再次调用本接口,实例将被销毁,且不可恢复。按量计费实例调用本接口将被直接销毁 +// +// * 支持批量操作,每次请求批量实例的上限为100。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr" +// FAILEDOPERATION_UNRETURNABLE = "FailedOperation.Unreturnable" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCENOTSUPPORTEDPREPAIDINSTANCE = "InvalidInstanceNotSupportedPrepaidInstance" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported" +// LIMITEXCEEDED_USERRETURNQUOTA = "LimitExceeded.UserReturnQuota" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_USERLIMITOPERATIONEXCEEDQUOTA = "UnsupportedOperation.UserLimitOperationExceedQuota" +func (c *Client) TerminateInstances(request *TerminateInstancesRequest) (response *TerminateInstancesResponse, err error) { + if request == nil { + request = NewTerminateInstancesRequest() + } + + response = NewTerminateInstancesResponse() + err = c.Send(request, response) + return +} + +// TerminateInstances +// 本接口 (TerminateInstances) 用于主动退还实例。 +// +// +// +// * 不再使用的实例,可通过本接口主动退还。 +// +// * 按量计费的实例通过本接口可直接退还;包年包月实例如符合[退还规则](https://cloud.tencent.com/document/product/213/9711),也可通过本接口主动退还。 +// +// * 包年包月实例首次调用本接口,实例将被移至回收站,再次调用本接口,实例将被销毁,且不可恢复。按量计费实例调用本接口将被直接销毁 +// +// * 支持批量操作,每次请求批量实例的上限为100。 +// +// 可能返回的错误码: +// FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr" +// FAILEDOPERATION_UNRETURNABLE = "FailedOperation.Unreturnable" +// INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDINSTANCENOTSUPPORTEDPREPAIDINSTANCE = "InvalidInstanceNotSupportedPrepaidInstance" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported" +// LIMITEXCEEDED_USERRETURNQUOTA = "LimitExceeded.UserReturnQuota" +// MISSINGPARAMETER = "MissingParameter" +// MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" +// OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" +// UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" +// UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" +// UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" +// UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel" +// UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" +// UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" +// UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" +// UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" +// UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" +// UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" +// UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" +// UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" +// UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region" +// UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" +// UNSUPPORTEDOPERATION_USERLIMITOPERATIONEXCEEDQUOTA = "UnsupportedOperation.UserLimitOperationExceedQuota" +func (c *Client) TerminateInstancesWithContext(ctx context.Context, request *TerminateInstancesRequest) (response *TerminateInstancesResponse, err error) { + if request == nil { + request = NewTerminateInstancesRequest() + } + request.SetContext(ctx) + + response = NewTerminateInstancesResponse() + err = c.Send(request, response) + return +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/errors.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/errors.go new file mode 100644 index 0000000000000000000000000000000000000000..49ff21b131009de253ef0b9d329b78927543df38 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/errors.go @@ -0,0 +1,786 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v20170312 + +const ( + // 此产品的特有错误码 + + // 该请求账户未通过资格审计。 + ACCOUNTQUALIFICATIONRESTRICTIONS = "AccountQualificationRestrictions" + + // 角色名鉴权失败 + AUTHFAILURE_CAMROLENAMEAUTHENTICATEFAILED = "AuthFailure.CamRoleNameAuthenticateFailed" + + // 弹性网卡不允许跨子网操作。 + ENINOTALLOWEDCHANGESUBNET = "EniNotAllowedChangeSubnet" + + // 账号已经存在 + FAILEDOPERATION_ACCOUNTALREADYEXISTS = "FailedOperation.AccountAlreadyExists" + + // 账号为当前用户 + FAILEDOPERATION_ACCOUNTISYOURSELF = "FailedOperation.AccountIsYourSelf" + + // 未找到指定的容灾组 + FAILEDOPERATION_DISASTERRECOVERGROUPNOTFOUND = "FailedOperation.DisasterRecoverGroupNotFound" + + // 标签键存在不合法字符 + FAILEDOPERATION_ILLEGALTAGKEY = "FailedOperation.IllegalTagKey" + + // 标签值存在不合法字符。 + FAILEDOPERATION_ILLEGALTAGVALUE = "FailedOperation.IllegalTagValue" + + // 询价失败 + FAILEDOPERATION_INQUIRYPRICEFAILED = "FailedOperation.InquiryPriceFailed" + + // 查询退换价格失败,找不到付款订单,请检查设备 `ins-xxxxxxx` 是否已过期。 + FAILEDOPERATION_INQUIRYREFUNDPRICEFAILED = "FailedOperation.InquiryRefundPriceFailed" + + // 请求不支持`EMR`的实例`ins-xxxxxxxx`。 + FAILEDOPERATION_INVALIDINSTANCEAPPLICATIONROLEEMR = "FailedOperation.InvalidInstanceApplicationRoleEmr" + + // 子网可用IP已耗尽。 + FAILEDOPERATION_NOAVAILABLEIPADDRESSCOUNTINSUBNET = "FailedOperation.NoAvailableIpAddressCountInSubnet" + + // 当前实例没有弹性IP + FAILEDOPERATION_NOTFOUNDEIP = "FailedOperation.NotFoundEIP" + + // 账号为协作者,请填写主账号 + FAILEDOPERATION_NOTMASTERACCOUNT = "FailedOperation.NotMasterAccount" + + // 指定的置放群组非空。 + FAILEDOPERATION_PLACEMENTSETNOTEMPTY = "FailedOperation.PlacementSetNotEmpty" + + // 促销期内购买的实例不允许调整配置或计费模式。 + FAILEDOPERATION_PROMOTIONALPERIORESTRICTION = "FailedOperation.PromotionalPerioRestriction" + + // 镜像共享失败。 + FAILEDOPERATION_QIMAGESHAREFAILED = "FailedOperation.QImageShareFailed" + + // 镜像共享失败。 + FAILEDOPERATION_RIMAGESHAREFAILED = "FailedOperation.RImageShareFailed" + + // 安全组操作失败。 + FAILEDOPERATION_SECURITYGROUPACTIONFAILED = "FailedOperation.SecurityGroupActionFailed" + + // 快照容量大于磁盘大小,请选用更大的磁盘空间。 + FAILEDOPERATION_SNAPSHOTSIZELARGERTHANDATASIZE = "FailedOperation.SnapshotSizeLargerThanDataSize" + + // 不支持快照size小于云盘size。 + FAILEDOPERATION_SNAPSHOTSIZELESSTHANDATASIZE = "FailedOperation.SnapshotSizeLessThanDataSize" + + // 请求中指定的标签键为系统预留标签,禁止创建 + FAILEDOPERATION_TAGKEYRESERVED = "FailedOperation.TagKeyReserved" + + // 镜像是公共镜像并且启用了自动化助手服务,但它不符合 Linux&x86_64。 + FAILEDOPERATION_TATAGENTNOTSUPPORT = "FailedOperation.TatAgentNotSupport" + + // 实例无法退还。 + FAILEDOPERATION_UNRETURNABLE = "FailedOperation.Unreturnable" + + // 镜像配额超过了限制。 + IMAGEQUOTALIMITEXCEEDED = "ImageQuotaLimitExceeded" + + // 表示当前创建的实例个数超过了该账户允许购买的剩余配额数。 + INSTANCESQUOTALIMITEXCEEDED = "InstancesQuotaLimitExceeded" + + // 内部错误。 + INTERNALERROR = "InternalError" + + // 内部错误 + INTERNALERROR_TRADEUNKNOWNERROR = "InternalError.TradeUnknownError" + + // 操作内部错误。 + INTERNALSERVERERROR = "InternalServerError" + + // 账户余额不足。 + INVALIDACCOUNT_INSUFFICIENTBALANCE = "InvalidAccount.InsufficientBalance" + + // 账户有未支付订单。 + INVALIDACCOUNT_UNPAIDORDER = "InvalidAccount.UnpaidOrder" + + // 无效的账户Id。 + INVALIDACCOUNTID_NOTFOUND = "InvalidAccountId.NotFound" + + // 您无法共享镜像给自己。 + INVALIDACCOUNTIS_YOURSELF = "InvalidAccountIs.YourSelf" + + // 指定的ClientToken字符串长度超出限制,必须小于等于64字节。 + INVALIDCLIENTTOKEN_TOOLONG = "InvalidClientToken.TooLong" + + // 无效的过滤器。 + INVALIDFILTER = "InvalidFilter" + + // [`Filter`](/document/api/213/15753#Filter)。 + INVALIDFILTERVALUE_LIMITEXCEEDED = "InvalidFilterValue.LimitExceeded" + + // 不支持该宿主机实例执行指定的操作。 + INVALIDHOST_NOTSUPPORTED = "InvalidHost.NotSupported" + + // 无效[CDH](https://cloud.tencent.com/document/product/416) `ID`。指定的[CDH](https://cloud.tencent.com/document/product/416) `ID`格式错误。例如`ID`长度错误`host-1122`。 + INVALIDHOSTID_MALFORMED = "InvalidHostId.Malformed" + + // 指定的HostId不存在,或不属于该请求账号所有。 + INVALIDHOSTID_NOTFOUND = "InvalidHostId.NotFound" + + // 镜像处于共享中。 + INVALIDIMAGEID_INSHARED = "InvalidImageId.InShared" + + // 镜像状态不合法。 + INVALIDIMAGEID_INCORRECTSTATE = "InvalidImageId.IncorrectState" + + // 错误的镜像Id格式。 + INVALIDIMAGEID_MALFORMED = "InvalidImageId.Malformed" + + // 未找到该镜像。 + INVALIDIMAGEID_NOTFOUND = "InvalidImageId.NotFound" + + // 镜像大小超过限制。 + INVALIDIMAGEID_TOOLARGE = "InvalidImageId.TooLarge" + + // 镜像名称与原有镜像重复。 + INVALIDIMAGENAME_DUPLICATE = "InvalidImageName.Duplicate" + + // 不支持的操作系统类型。 + INVALIDIMAGEOSTYPE_UNSUPPORTED = "InvalidImageOsType.Unsupported" + + // 不支持的操作系统版本。 + INVALIDIMAGEOSVERSION_UNSUPPORTED = "InvalidImageOsVersion.Unsupported" + + // 不被支持的实例。 + INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" + + // 无效实例`ID`。指定的实例`ID`格式错误。例如实例`ID`长度错误`ins-1122`。 + INVALIDINSTANCEID_MALFORMED = "InvalidInstanceId.Malformed" + + // 没有找到相应实例。 + INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" + + // 指定的InstanceName字符串长度超出限制,必须小于等于60字节。 + INVALIDINSTANCENAME_TOOLONG = "InvalidInstanceName.TooLong" + + // 该实例不满足包月[退还规则](https://cloud.tencent.com/document/product/213/9711)。 + INVALIDINSTANCENOTSUPPORTEDPREPAIDINSTANCE = "InvalidInstanceNotSupportedPrepaidInstance" + + // 指定实例的当前状态不能进行该操作。 + INVALIDINSTANCESTATE = "InvalidInstanceState" + + // 指定InstanceType参数格式不合法。 + INVALIDINSTANCETYPE_MALFORMED = "InvalidInstanceType.Malformed" + + // 密钥对数量超过限制。 + INVALIDKEYPAIR_LIMITEXCEEDED = "InvalidKeyPair.LimitExceeded" + + // 无效密钥对ID。指定的密钥对ID格式错误,例如 `ID` 长度错误`skey-1122`。 + INVALIDKEYPAIRID_MALFORMED = "InvalidKeyPairId.Malformed" + + // 无效密钥对ID。指定的密钥对ID不存在。 + INVALIDKEYPAIRID_NOTFOUND = "InvalidKeyPairId.NotFound" + + // 密钥对名称重复。 + INVALIDKEYPAIRNAME_DUPLICATE = "InvalidKeyPairName.Duplicate" + + // 密钥名称为空。 + INVALIDKEYPAIRNAMEEMPTY = "InvalidKeyPairNameEmpty" + + // 密钥名称包含非法字符。密钥名称只支持英文、数字和下划线。 + INVALIDKEYPAIRNAMEINCLUDEILLEGALCHAR = "InvalidKeyPairNameIncludeIllegalChar" + + // 密钥名称超过25个字符。 + INVALIDKEYPAIRNAMETOOLONG = "InvalidKeyPairNameTooLong" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + + // DataDiskIds不应该传入RootDisk的Id。 + INVALIDPARAMETER_DATADISKIDCONTAINSROOTDISK = "InvalidParameter.DataDiskIdContainsRootDisk" + + // 指定的数据盘不属于指定的实例。 + INVALIDPARAMETER_DATADISKNOTBELONGSPECIFIEDINSTANCE = "InvalidParameter.DataDiskNotBelongSpecifiedInstance" + + // 只能包含一个系统盘快照。 + INVALIDPARAMETER_DUPLICATESYSTEMSNAPSHOTS = "InvalidParameter.DuplicateSystemSnapshots" + + // 该主机当前状态不支持该操作。 + INVALIDPARAMETER_HOSTIDSTATUSNOTSUPPORT = "InvalidParameter.HostIdStatusNotSupport" + + // 指定的hostName不符合规范。 + INVALIDPARAMETER_HOSTNAMEILLEGAL = "InvalidParameter.HostNameIllegal" + + // 当前接口不支持实例镜像。 + INVALIDPARAMETER_INSTANCEIMAGENOTSUPPORT = "InvalidParameter.InstanceImageNotSupport" + + // 云盘资源售罄。 + INVALIDPARAMETER_INVALIDCLOUDDISKSOLDOUT = "InvalidParameter.InvalidCloudDiskSoldOut" + + // 参数依赖不正确。 + INVALIDPARAMETER_INVALIDDEPENDENCE = "InvalidParameter.InvalidDependence" + + // 当前操作不支持该类型实例。 + INVALIDPARAMETER_INVALIDINSTANCENOTSUPPORTED = "InvalidParameter.InvalidInstanceNotSupported" + + // 指定的私有网络ip格式不正确。 + INVALIDPARAMETER_INVALIDIPFORMAT = "InvalidParameter.InvalidIpFormat" + + // 不能同时指定ImageIds和Filters。 + INVALIDPARAMETER_INVALIDPARAMETERCOEXISTIMAGEIDSFILTERS = "InvalidParameter.InvalidParameterCoexistImageIdsFilters" + + // 错误的url地址。 + INVALIDPARAMETER_INVALIDPARAMETERURLERROR = "InvalidParameter.InvalidParameterUrlError" + + // CoreCount和ThreadPerCore必须同时提供。 + INVALIDPARAMETER_LACKCORECOUNTORTHREADPERCORE = "InvalidParameter.LackCoreCountOrThreadPerCore" + + // 本地数据盘不支持创建实例镜像。 + INVALIDPARAMETER_LOCALDATADISKNOTSUPPORT = "InvalidParameter.LocalDataDiskNotSupport" + + // 不支持同时指定密钥登陆和保持镜像登陆方式。 + INVALIDPARAMETER_PARAMETERCONFLICT = "InvalidParameter.ParameterConflict" + + // 不支持设置登陆密码。 + INVALIDPARAMETER_PASSWORDNOTSUPPORTED = "InvalidParameter.PasswordNotSupported" + + // 指定的快照不存在。 + INVALIDPARAMETER_SNAPSHOTNOTFOUND = "InvalidParameter.SnapshotNotFound" + + // 多选一必选参数缺失。 + INVALIDPARAMETER_SPECIFYONEPARAMETER = "InvalidParameter.SpecifyOneParameter" + + // 不支持Swap盘。 + INVALIDPARAMETER_SWAPDISKNOTSUPPORT = "InvalidParameter.SwapDiskNotSupport" + + // 参数不包含系统盘快照。 + INVALIDPARAMETER_SYSTEMSNAPSHOTNOTFOUND = "InvalidParameter.SystemSnapshotNotFound" + + // 参数长度超过限制。 + INVALIDPARAMETER_VALUETOOLARGE = "InvalidParameter.ValueTooLarge" + + // 表示参数组合不正确。 + INVALIDPARAMETERCOMBINATION = "InvalidParameterCombination" + + // 指定的两个参数冲突,不能同时存在。 EIP只能绑定在实例上或指定网卡的指定内网 IP 上。 + INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" + + // 参数取值错误。 + INVALIDPARAMETERVALUE = "InvalidParameterValue" + + // 共享带宽包ID不合要求,请提供规范的共享带宽包ID,类似bwp-xxxxxxxx,字母x代表小写字符或者数字。 + INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" + + // 请确认指定的带宽包是否存在。 + INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDNOTFOUND = "InvalidParameterValue.BandwidthPackageIdNotFound" + + // 找不到对应的CHC物理服务器。 + INVALIDPARAMETERVALUE_CHCHOSTSNOTFOUND = "InvalidParameterValue.ChcHostsNotFound" + + // SSD云硬盘为数据盘时,购买大小不得小于100GB + INVALIDPARAMETERVALUE_CLOUDSSDDATADISKSIZETOOSMALL = "InvalidParameterValue.CloudSsdDataDiskSizeTooSmall" + + // 核心计数不合法。 + INVALIDPARAMETERVALUE_CORECOUNTVALUE = "InvalidParameterValue.CoreCountValue" + + // 参数值重复。 + INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" + + // 非GPU实例不允许转为GPU实例。 + INVALIDPARAMETERVALUE_GPUINSTANCEFAMILY = "InvalidParameterValue.GPUInstanceFamily" + + // IP格式非法。 + INVALIDPARAMETERVALUE_IPADDRESSMALFORMED = "InvalidParameterValue.IPAddressMalformed" + + // ipv6地址无效 + INVALIDPARAMETERVALUE_IPV6ADDRESSMALFORMED = "InvalidParameterValue.IPv6AddressMalformed" + + // HostName参数值不合法 + INVALIDPARAMETERVALUE_ILLEGALHOSTNAME = "InvalidParameterValue.IllegalHostName" + + // 传参格式不对。 + INVALIDPARAMETERVALUE_INCORRECTFORMAT = "InvalidParameterValue.IncorrectFormat" + + // 不支持操作不同计费方式的实例。 + INVALIDPARAMETERVALUE_INSTANCENOTSUPPORTEDMIXPRICINGMODEL = "InvalidParameterValue.InstanceNotSupportedMixPricingModel" + + // 指定机型不存在 + INVALIDPARAMETERVALUE_INSTANCETYPENOTFOUND = "InvalidParameterValue.InstanceTypeNotFound" + + // 实例类型不可加入高性能计算集群。 + INVALIDPARAMETERVALUE_INSTANCETYPENOTSUPPORTHPCCLUSTER = "InvalidParameterValue.InstanceTypeNotSupportHpcCluster" + + // 高性能计算实例需指定对应的高性能计算集群。 + INVALIDPARAMETERVALUE_INSTANCETYPEREQUIREDHPCCLUSTER = "InvalidParameterValue.InstanceTypeRequiredHpcCluster" + + // 竞价数量不足。 + INVALIDPARAMETERVALUE_INSUFFICIENTOFFERING = "InvalidParameterValue.InsufficientOffering" + + // 竞价失败。 + INVALIDPARAMETERVALUE_INSUFFICIENTPRICE = "InvalidParameterValue.InsufficientPrice" + + // 无效的appid。 + INVALIDPARAMETERVALUE_INVALIDAPPIDFORMAT = "InvalidParameterValue.InvalidAppIdFormat" + + // 镜像ID不支持指定的实例机型。 + INVALIDPARAMETERVALUE_INVALIDIMAGEFORGIVENINSTANCETYPE = "InvalidParameterValue.InvalidImageForGivenInstanceType" + + // 当前镜像为RAW格式,无法创建CVM,建议您选择其他镜像。 + INVALIDPARAMETERVALUE_INVALIDIMAGEFORMAT = "InvalidParameterValue.InvalidImageFormat" + + // 镜像不允许执行该操作 + INVALIDPARAMETERVALUE_INVALIDIMAGEID = "InvalidParameterValue.InvalidImageId" + + // 当前地域不支持指定镜像所包含的操作系统。 + INVALIDPARAMETERVALUE_INVALIDIMAGEOSNAME = "InvalidParameterValue.InvalidImageOsName" + + // 镜像被其他操作占用,请检查,并稍后重试。 + INVALIDPARAMETERVALUE_INVALIDIMAGESTATE = "InvalidParameterValue.InvalidImageState" + + // IP地址不符合规范 + INVALIDPARAMETERVALUE_INVALIDIPFORMAT = "InvalidParameterValue.InvalidIpFormat" + + // 实例启动模板描述格式错误。 + INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateDescription" + + // 实例启动模板名称格式错误。 + INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATENAME = "InvalidParameterValue.InvalidLaunchTemplateName" + + // 实例启动模板描述格式错误。 + INVALIDPARAMETERVALUE_INVALIDLAUNCHTEMPLATEVERSIONDESCRIPTION = "InvalidParameterValue.InvalidLaunchTemplateVersionDescription" + + // 参数值错误。 + INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUELIMIT = "InvalidParameterValue.InvalidParameterValueLimit" + + // 无效密码。指定的密码不符合密码复杂度限制。例如密码长度不符合限制等。 + INVALIDPARAMETERVALUE_INVALIDPASSWORD = "InvalidParameterValue.InvalidPassword" + + // 时间格式不合法。 + INVALIDPARAMETERVALUE_INVALIDTIMEFORMAT = "InvalidParameterValue.InvalidTimeFormat" + + // UserData格式错误, 需要base64编码格式 + INVALIDPARAMETERVALUE_INVALIDUSERDATAFORMAT = "InvalidParameterValue.InvalidUserDataFormat" + + // 无效的模糊查询字符串。 + INVALIDPARAMETERVALUE_INVALIDVAGUENAME = "InvalidParameterValue.InvalidVagueName" + + // 请确认密钥是否存在。 + INVALIDPARAMETERVALUE_KEYPAIRNOTFOUND = "InvalidParameterValue.KeyPairNotFound" + + // 指定的密钥不支持当前操作。 + INVALIDPARAMETERVALUE_KEYPAIRNOTSUPPORTED = "InvalidParameterValue.KeyPairNotSupported" + + // 不支持删除默认启动模板版本。 + INVALIDPARAMETERVALUE_LAUNCHTEMPLATEDEFAULTVERSION = "InvalidParameterValue.LaunchTemplateDefaultVersion" + + // 实例启动模板ID格式错误。 + INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDMALFORMED = "InvalidParameterValue.LaunchTemplateIdMalformed" + + // 实例启动模板ID不存在。 + INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdNotExisted" + + // 实例启动模板和版本ID组合不存在。 + INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERNOTEXISTED = "InvalidParameterValue.LaunchTemplateIdVerNotExisted" + + // 指定的实例启动模板id不存在。 + INVALIDPARAMETERVALUE_LAUNCHTEMPLATEIDVERSETALREADY = "InvalidParameterValue.LaunchTemplateIdVerSetAlready" + + // 实例启动模板未找到。 + INVALIDPARAMETERVALUE_LAUNCHTEMPLATENOTFOUND = "InvalidParameterValue.LaunchTemplateNotFound" + + // 无效的实例启动模板版本号。 + INVALIDPARAMETERVALUE_LAUNCHTEMPLATEVERSION = "InvalidParameterValue.LaunchTemplateVersion" + + // 参数值数量超过限制。 + INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" + + // 本地盘的限制范围。 + INVALIDPARAMETERVALUE_LOCALDISKSIZERANGE = "InvalidParameterValue.LocalDiskSizeRange" + + // 参数值必须为开启DHCP的VPC + INVALIDPARAMETERVALUE_MUSTDHCPENABLEDVPC = "InvalidParameterValue.MustDhcpEnabledVpc" + + // 不支持的操作。 + INVALIDPARAMETERVALUE_NOTSUPPORTED = "InvalidParameterValue.NotSupported" + + // 无效参数值。参数值取值范围不合法。 + INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" + + // 快照ID不合要求,请提供规范的快照ID,类似snap-xxxxxxxx,字母x代表小写字符或者数字 + INVALIDPARAMETERVALUE_SNAPSHOTIDMALFORMED = "InvalidParameterValue.SnapshotIdMalformed" + + // 子网ID不合要求,请提供规范的子网ID,类似subnet-xxxxxxxx,字母x代表小写字符或者数字 + INVALIDPARAMETERVALUE_SUBNETIDMALFORMED = "InvalidParameterValue.SubnetIdMalformed" + + // 创建失败,您指定的子网不存在,请您重新指定 + INVALIDPARAMETERVALUE_SUBNETNOTEXIST = "InvalidParameterValue.SubnetNotExist" + + // 指定的标签不存在。 + INVALIDPARAMETERVALUE_TAGKEYNOTFOUND = "InvalidParameterValue.TagKeyNotFound" + + // 每核心线程数不合法。 + INVALIDPARAMETERVALUE_THREADPERCOREVALUE = "InvalidParameterValue.ThreadPerCoreValue" + + // 参数值超过最大限制。 + INVALIDPARAMETERVALUE_TOOLARGE = "InvalidParameterValue.TooLarge" + + // 无效参数值。参数值太长。 + INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" + + // VPC ID`xxx`不合要求,请提供规范的Vpc ID, 类似vpc-xxxxxxxx,字母x代表小写字符或者数字。 + INVALIDPARAMETERVALUE_VPCIDMALFORMED = "InvalidParameterValue.VpcIdMalformed" + + // 指定的VpcId不存在。 + INVALIDPARAMETERVALUE_VPCIDNOTEXIST = "InvalidParameterValue.VpcIdNotExist" + + // VPC网络与实例不在同一可用区 + INVALIDPARAMETERVALUE_VPCIDZONEIDNOTMATCH = "InvalidParameterValue.VpcIdZoneIdNotMatch" + + // 请求不支持该可用区 + INVALIDPARAMETERVALUE_ZONENOTSUPPORTED = "InvalidParameterValue.ZoneNotSupported" + + // 参数值数量超过限制。 + INVALIDPARAMETERVALUELIMIT = "InvalidParameterValueLimit" + + // 无效参数值。指定的 `Offset` 无效。 + INVALIDPARAMETERVALUEOFFSET = "InvalidParameterValueOffset" + + // 无效密码。指定的密码不符合密码复杂度限制。例如密码长度不符合限制等。 + INVALIDPASSWORD = "InvalidPassword" + + // 无效时长。目前只支持时长:[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36],单位:月。 + INVALIDPERIOD = "InvalidPeriod" + + // 账户不支持该操作。 + INVALIDPERMISSION = "InvalidPermission" + + // 无效的项目ID,指定的项目ID不存在。 + INVALIDPROJECTID_NOTFOUND = "InvalidProjectId.NotFound" + + // 无效密钥公钥。指定公钥已经存在。 + INVALIDPUBLICKEY_DUPLICATE = "InvalidPublicKey.Duplicate" + + // 无效密钥公钥。指定公钥格式错误,不符合`OpenSSH RSA`格式要求。 + INVALIDPUBLICKEY_MALFORMED = "InvalidPublicKey.Malformed" + + // 未找到该区域。 + INVALIDREGION_NOTFOUND = "InvalidRegion.NotFound" + + // 该区域目前不支持同步镜像。 + INVALIDREGION_UNAVAILABLE = "InvalidRegion.Unavailable" + + // 指定的`安全组ID`不存在。 + INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupId.NotFound" + + // 指定的`安全组ID`格式错误,例如`实例ID`长度错误`sg-ide32`。 + INVALIDSGID_MALFORMED = "InvalidSgId.Malformed" + + // 指定的`zone`不存在。 + INVALIDZONE_MISMATCHREGION = "InvalidZone.MismatchRegion" + + // 一个实例绑定安全组数量不能超过5个 + LIMITEXCEEDED_ASSOCIATEUSGLIMITEXCEEDED = "LimitExceeded.AssociateUSGLimitExceeded" + + // 安全组关联云主机弹性网卡配额超限。 + LIMITEXCEEDED_CVMSVIFSPERSECGROUPLIMITEXCEEDED = "LimitExceeded.CvmsVifsPerSecGroupLimitExceeded" + + // 指定置放群组配额不足。 + LIMITEXCEEDED_DISASTERRECOVERGROUP = "LimitExceeded.DisasterRecoverGroup" + + // 特定实例当前ENI数量已超过目标实例类型的ENI允许的最大值,需删除部分ENI后重试。 + LIMITEXCEEDED_ENINUMLIMIT = "LimitExceeded.EniNumLimit" + + // IP数量超过网卡上限。 + LIMITEXCEEDED_IPV6ADDRESSNUM = "LimitExceeded.IPv6AddressNum" + + // 当前配额不足够生产指定数量的实例 + LIMITEXCEEDED_INSTANCEQUOTA = "LimitExceeded.InstanceQuota" + + // 目标实例规格不支持当前规格的外网带宽上限,不支持调整。具体可参考[公网网络带宽上限](https://cloud.tencent.com/document/product/213/12523)。 + LIMITEXCEEDED_INSTANCETYPEBANDWIDTH = "LimitExceeded.InstanceTypeBandwidth" + + // 实例启动模板数量超限。 + LIMITEXCEEDED_LAUNCHTEMPLATEQUOTA = "LimitExceeded.LaunchTemplateQuota" + + // 实例启动模板版本数量超限。 + LIMITEXCEEDED_LAUNCHTEMPLATEVERSIONQUOTA = "LimitExceeded.LaunchTemplateVersionQuota" + + // 预付费实例已购买数量已达到最大配额,请提升配额后重试。 + LIMITEXCEEDED_PREPAYQUOTA = "LimitExceeded.PrepayQuota" + + // 安全组限额不足 + LIMITEXCEEDED_SINGLEUSGQUOTA = "LimitExceeded.SingleUSGQuota" + + // 竞价实例类型配额不足 + LIMITEXCEEDED_SPOTQUOTA = "LimitExceeded.SpotQuota" + + // 退还失败,退还配额已达上限。 + LIMITEXCEEDED_USERRETURNQUOTA = "LimitExceeded.UserReturnQuota" + + // 竞价实例配额不足 + LIMITEXCEEDED_USERSPOTQUOTA = "LimitExceeded.UserSpotQuota" + + // 子网IP不足 + LIMITEXCEEDED_VPCSUBNETNUM = "LimitExceeded.VpcSubnetNum" + + // 缺少参数错误。 + MISSINGPARAMETER = "MissingParameter" + + // 缺少必要参数,请至少提供一个参数。 + MISSINGPARAMETER_ATLEASTONE = "MissingParameter.AtLeastOne" + + // DPDK实例机型要求VPC网络 + MISSINGPARAMETER_DPDKINSTANCETYPEREQUIREDVPC = "MissingParameter.DPDKInstanceTypeRequiredVPC" + + // 该实例类型必须开启云监控服务 + MISSINGPARAMETER_MONITORSERVICE = "MissingParameter.MonitorService" + + // 同样的任务正在运行。 + MUTEXOPERATION_TASKRUNNING = "MutexOperation.TaskRunning" + + // 不允许未配置部署网络的CHC安装云上镜像。 + OPERATIONDENIED_CHCINSTALLCLOUDIMAGEWITHOUTDEPLOYNETWORK = "OperationDenied.ChcInstallCloudImageWithoutDeployNetwork" + + // 实例正在执行其他操作,请稍后再试。 + OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = "OperationDenied.InstanceOperationInProgress" + + // 镜像共享超过配额。 + OVERQUOTA = "OverQuota" + + // 该地域不支持导入镜像。 + REGIONABILITYLIMIT_UNSUPPORTEDTOIMPORTIMAGE = "RegionAbilityLimit.UnsupportedToImportImage" + + // 资源被占用。 + RESOURCEINUSE = "ResourceInUse" + + // 该可用区已售罄 + RESOURCEINSUFFICIENT_AVAILABILITYZONESOLDOUT = "ResourceInsufficient.AvailabilityZoneSoldOut" + + // 指定的云盘规格已售罄 + RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT = "ResourceInsufficient.CloudDiskSoldOut" + + // 云盘参数不符合规范 + RESOURCEINSUFFICIENT_CLOUDDISKUNAVAILABLE = "ResourceInsufficient.CloudDiskUnavailable" + + // 实例个数超过容灾组的配额 + RESOURCEINSUFFICIENT_DISASTERRECOVERGROUPCVMQUOTA = "ResourceInsufficient.DisasterRecoverGroupCvmQuota" + + // 指定的实例类型库存不足。 + RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" + + // 指定的实例类型在选择的可用区已售罄。 + RESOURCEINSUFFICIENT_ZONESOLDOUTFORSPECIFIEDINSTANCE = "ResourceInsufficient.ZoneSoldOutForSpecifiedInstance" + + // 高性能计算集群不存在。 + RESOURCENOTFOUND_HPCCLUSTER = "ResourceNotFound.HpcCluster" + + // 指定的置放群组不存在。 + RESOURCENOTFOUND_INVALIDPLACEMENTSET = "ResourceNotFound.InvalidPlacementSet" + + // 无可用的缺省类型的CBS资源。 + RESOURCENOTFOUND_NODEFAULTCBS = "ResourceNotFound.NoDefaultCbs" + + // 无可用的缺省类型的CBS资源。 + RESOURCENOTFOUND_NODEFAULTCBSWITHREASON = "ResourceNotFound.NoDefaultCbsWithReason" + + // 该可用区不售卖此机型 + RESOURCEUNAVAILABLE_INSTANCETYPE = "ResourceUnavailable.InstanceType" + + // 快照正在创建过程中。 + RESOURCEUNAVAILABLE_SNAPSHOTCREATING = "ResourceUnavailable.SnapshotCreating" + + // 该可用区已售罄 + RESOURCESSOLDOUT_AVAILABLEZONE = "ResourcesSoldOut.AvailableZone" + + // 公网IP已售罄。 + RESOURCESSOLDOUT_EIPINSUFFICIENT = "ResourcesSoldOut.EipInsufficient" + + // 指定的实例类型已售罄。 + RESOURCESSOLDOUT_SPECIFIEDINSTANCETYPE = "ResourcesSoldOut.SpecifiedInstanceType" + + // 安全组服务接口调用通用错误。 + SECGROUPACTIONFAILURE = "SecGroupActionFailure" + + // 未授权操作。 + UNAUTHORIZEDOPERATION = "UnauthorizedOperation" + + // 指定的镜像不属于用户。 + UNAUTHORIZEDOPERATION_IMAGENOTBELONGTOACCOUNT = "UnauthorizedOperation.ImageNotBelongToAccount" + + // 请确认Token是否有效。 + UNAUTHORIZEDOPERATION_INVALIDTOKEN = "UnauthorizedOperation.InvalidToken" + + // 您无法进行当前操作,请确认多因子认证(MFA)是否失效。 + UNAUTHORIZEDOPERATION_MFAEXPIRED = "UnauthorizedOperation.MFAExpired" + + // 没有权限进行此操作,请确认是否存在多因子认证(MFA)。 + UNAUTHORIZEDOPERATION_MFANOTFOUND = "UnauthorizedOperation.MFANotFound" + + // 无权操作指定的资源,请正确配置CAM策略。 + UNAUTHORIZEDOPERATION_PERMISSIONDENIED = "UnauthorizedOperation.PermissionDenied" + + // 未知参数错误。 + UNKNOWNPARAMETER = "UnknownParameter" + + // 操作不支持。 + UNSUPPORTEDOPERATION = "UnsupportedOperation" + + // 指定的实例付费模式或者网络付费模式不支持共享带宽包 + UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" + + // IPv6实例不支持VPC迁移 + UNSUPPORTEDOPERATION_IPV6NOTSUPPORTVPCMIGRATE = "UnsupportedOperation.IPv6NotSupportVpcMigrate" + + // 请求不支持该实例计费模式 + UNSUPPORTEDOPERATION_INSTANCECHARGETYPE = "UnsupportedOperation.InstanceChargeType" + + // 不支持混合付费模式。 + UNSUPPORTEDOPERATION_INSTANCEMIXEDPRICINGMODEL = "UnsupportedOperation.InstanceMixedPricingModel" + + // 请求不支持操作系统为`Xserver windows2012cndatacenterx86_64`的实例`ins-xxxxxx` 。 + UNSUPPORTEDOPERATION_INSTANCEOSWINDOWS = "UnsupportedOperation.InstanceOsWindows" + + // 该子机处于封禁状态,请联系相关人员处理。 + UNSUPPORTEDOPERATION_INSTANCESTATEBANNING = "UnsupportedOperation.InstanceStateBanning" + + // 请求不支持永久故障的实例。 + UNSUPPORTEDOPERATION_INSTANCESTATECORRUPTED = "UnsupportedOperation.InstanceStateCorrupted" + + // 请求不支持进入救援模式的实例 + UNSUPPORTEDOPERATION_INSTANCESTATEENTERRESCUEMODE = "UnsupportedOperation.InstanceStateEnterRescueMode" + + // 不支持状态为 `ENTER_SERVICE_LIVE_MIGRATE`.的实例 `ins-xxxxxx` 。 + UNSUPPORTEDOPERATION_INSTANCESTATEENTERSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateEnterServiceLiveMigrate" + + // 请求不支持正在退出救援模式的实例 + UNSUPPORTEDOPERATION_INSTANCESTATEEXITRESCUEMODE = "UnsupportedOperation.InstanceStateExitRescueMode" + + // 不支持状态为 `EXIT_SERVICE_LIVE_MIGRATE`.的实例 `ins-xxxxxx` 。 + UNSUPPORTEDOPERATION_INSTANCESTATEEXITSERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateExitServiceLiveMigrate" + + // 操作不支持已冻结的实例。 + UNSUPPORTEDOPERATION_INSTANCESTATEFREEZING = "UnsupportedOperation.InstanceStateFreezing" + + // 请求不支持正在隔离状态的实例。 + UNSUPPORTEDOPERATION_INSTANCESTATEISOLATING = "UnsupportedOperation.InstanceStateIsolating" + + // 请求不支持创建未完成的实例 + UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = "UnsupportedOperation.InstanceStatePending" + + // 请求不支持正在重启的实例 + UNSUPPORTEDOPERATION_INSTANCESTATEREBOOTING = "UnsupportedOperation.InstanceStateRebooting" + + // 请求不支持救援模式的实例 + UNSUPPORTEDOPERATION_INSTANCESTATERESCUEMODE = "UnsupportedOperation.InstanceStateRescueMode" + + // 请求不支持开机状态的实例 + UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = "UnsupportedOperation.InstanceStateRunning" + + // 不支持正在服务迁移的实例,请稍后再试 + UNSUPPORTEDOPERATION_INSTANCESTATESERVICELIVEMIGRATE = "UnsupportedOperation.InstanceStateServiceLiveMigrate" + + // 请求不支持隔离状态的实例 + UNSUPPORTEDOPERATION_INSTANCESTATESHUTDOWN = "UnsupportedOperation.InstanceStateShutdown" + + // 实例开机中,不允许该操作。 + UNSUPPORTEDOPERATION_INSTANCESTATESTARTING = "UnsupportedOperation.InstanceStateStarting" + + // 请求不支持已关机的实例 + UNSUPPORTEDOPERATION_INSTANCESTATESTOPPED = "UnsupportedOperation.InstanceStateStopped" + + // 请求不支持正在关机的实例 + UNSUPPORTEDOPERATION_INSTANCESTATESTOPPING = "UnsupportedOperation.InstanceStateStopping" + + // 不支持已销毁的实例 + UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = "UnsupportedOperation.InstanceStateTerminated" + + // 请求不支持正在销毁的实例 + UNSUPPORTEDOPERATION_INSTANCESTATETERMINATING = "UnsupportedOperation.InstanceStateTerminating" + + // 不支持指定的磁盘 + UNSUPPORTEDOPERATION_INVALIDDISK = "UnsupportedOperation.InvalidDisk" + + // 当前操作只支持国际版用户。 + UNSUPPORTEDOPERATION_INVALIDPERMISSIONNONINTERNATIONALACCOUNT = "UnsupportedOperation.InvalidPermissionNonInternationalAccount" + + // 指定的地域不支持加密盘。 + UNSUPPORTEDOPERATION_INVALIDREGIONDISKENCRYPT = "UnsupportedOperation.InvalidRegionDiskEncrypt" + + // 密钥不支持Windows操作系统 + UNSUPPORTEDOPERATION_KEYPAIRUNSUPPORTEDWINDOWS = "UnsupportedOperation.KeyPairUnsupportedWindows" + + // 机型数据盘全为本地盘不支持跨机型调整。 + UNSUPPORTEDOPERATION_LOCALDATADISKCHANGEINSTANCEFAMILY = "UnsupportedOperation.LocalDataDiskChangeInstanceFamily" + + // 绑定负载均衡的实例,不支持修改vpc属性。 + UNSUPPORTEDOPERATION_MODIFYVPCWITHCLB = "UnsupportedOperation.ModifyVPCWithCLB" + + // 该实例类型不支持竞价计费 + UNSUPPORTEDOPERATION_NOINSTANCETYPESUPPORTSPOT = "UnsupportedOperation.NoInstanceTypeSupportSpot" + + // 当前实例不是FPGA机型。 + UNSUPPORTEDOPERATION_NOTFPGAINSTANCE = "UnsupportedOperation.NotFpgaInstance" + + // 针对当前实例设置定时任务失败。 + UNSUPPORTEDOPERATION_NOTSUPPORTIMPORTINSTANCESACTIONTIMER = "UnsupportedOperation.NotSupportImportInstancesActionTimer" + + // 操作不支持当前实例 + UNSUPPORTEDOPERATION_NOTSUPPORTINSTANCEIMAGE = "UnsupportedOperation.NotSupportInstanceImage" + + // 该操作仅支持预付费账户 + UNSUPPORTEDOPERATION_ONLYFORPREPAIDACCOUNT = "UnsupportedOperation.OnlyForPrepaidAccount" + + // 当前镜像不支持对该实例的重装操作。 + UNSUPPORTEDOPERATION_RAWLOCALDISKINSREINSTALLTOQCOW2 = "UnsupportedOperation.RawLocalDiskInsReinstalltoQcow2" + + // 不支持该地域 + UNSUPPORTEDOPERATION_REGION = "UnsupportedOperation.Region" + + // 当前用户暂不支持购买预留实例计费。 + UNSUPPORTEDOPERATION_RESERVEDINSTANCEINVISIBLEFORUSER = "UnsupportedOperation.ReservedInstanceInvisibleForUser" + + // 用户预留实例计费配额已达上限。 + UNSUPPORTEDOPERATION_RESERVEDINSTANCEOUTOFQUATA = "UnsupportedOperation.ReservedInstanceOutofQuata" + + // 请求不支持特殊机型的实例 + UNSUPPORTEDOPERATION_SPECIALINSTANCETYPE = "UnsupportedOperation.SpecialInstanceType" + + // 不支持关机不收费特性 + UNSUPPORTEDOPERATION_STOPPEDMODESTOPCHARGING = "UnsupportedOperation.StoppedModeStopCharging" + + // 该机型为包销机型,RenewFlag的值只允许设置为NOTIFY_AND_AUTO_RENEW。 + UNSUPPORTEDOPERATION_UNDERWRITINGINSTANCETYPEONLYSUPPORTAUTORENEW = "UnsupportedOperation.UnderwritingInstanceTypeOnlySupportAutoRenew" + + // 指定机型不支持跨机型调整配置。 + UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceFamily" + + // 非ARM机型不支持调整到ARM机型。 + UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOARM = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToARM" + + // 目标机型是SA3, 不支持变配。 + UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCEFAMILYTOSA3 = "UnsupportedOperation.UnsupportedChangeInstanceFamilyToSA3" + + // 不支持实例变配到此类型机型。 + UNSUPPORTEDOPERATION_UNSUPPORTEDCHANGEINSTANCETOTHISINSTANCEFAMILY = "UnsupportedOperation.UnsupportedChangeInstanceToThisInstanceFamily" + + // 请求不支持国际版账号 + UNSUPPORTEDOPERATION_UNSUPPORTEDINTERNATIONALUSER = "UnsupportedOperation.UnsupportedInternationalUser" + + // 用户限额操作的配额不足。 + UNSUPPORTEDOPERATION_USERLIMITOPERATIONEXCEEDQUOTA = "UnsupportedOperation.UserLimitOperationExceedQuota" + + // 私有网络ip不在子网内。 + VPCADDRNOTINSUBNET = "VpcAddrNotInSubNet" + + // 私有网络ip已经被使用。 + VPCIPISUSED = "VpcIpIsUsed" +) diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go new file mode 100644 index 0000000000000000000000000000000000000000..7c7b208a36ed54f777fb9409472a699e4ef9dd3b --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312/models.go @@ -0,0 +1,6378 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v20170312 + +import ( + "encoding/json" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +type AccountQuota struct { + + // 后付费配额列表 + PostPaidQuotaSet []*PostPaidQuota `json:"PostPaidQuotaSet,omitempty" name:"PostPaidQuotaSet"` + + // 预付费配额列表 + PrePaidQuotaSet []*PrePaidQuota `json:"PrePaidQuotaSet,omitempty" name:"PrePaidQuotaSet"` + + // spot配额列表 + SpotPaidQuotaSet []*SpotPaidQuota `json:"SpotPaidQuotaSet,omitempty" name:"SpotPaidQuotaSet"` + + // 镜像配额列表 + ImageQuotaSet []*ImageQuota `json:"ImageQuotaSet,omitempty" name:"ImageQuotaSet"` + + // 置放群组配额列表 + DisasterRecoverGroupQuotaSet []*DisasterRecoverGroupQuota `json:"DisasterRecoverGroupQuotaSet,omitempty" name:"DisasterRecoverGroupQuotaSet"` +} + +type AccountQuotaOverview struct { + + // 地域 + Region *string `json:"Region,omitempty" name:"Region"` + + // 配额数据 + AccountQuota *AccountQuota `json:"AccountQuota,omitempty" name:"AccountQuota"` +} + +type ActionTimer struct { + + // 扩展数据 + Externals *Externals `json:"Externals,omitempty" name:"Externals"` + + // 定时器名称,目前仅支持销毁一个值:TerminateInstances。 + TimerAction *string `json:"TimerAction,omitempty" name:"TimerAction"` + + // 执行时间,格式形如:2018-5-29 11:26:40,执行时间必须大于当前时间5分钟。 + ActionTime *string `json:"ActionTime,omitempty" name:"ActionTime"` +} + +type AllocateHostsRequest struct { + *tchttp.BaseRequest + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 用于保证请求幂等性的字符串。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + HostChargePrepaid *ChargePrepaid `json:"HostChargePrepaid,omitempty" name:"HostChargePrepaid"` + + // 实例计费类型。目前仅支持:PREPAID(预付费,即包年包月模式),默认为:'PREPAID'。 + HostChargeType *string `json:"HostChargeType,omitempty" name:"HostChargeType"` + + // CDH实例机型,默认为:'HS1'。 + HostType *string `json:"HostType,omitempty" name:"HostType"` + + // 购买CDH实例数量,默认为:1。 + HostCount *uint64 `json:"HostCount,omitempty" name:"HostCount"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` +} + +func (r *AllocateHostsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AllocateHostsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Placement") + delete(f, "ClientToken") + delete(f, "HostChargePrepaid") + delete(f, "HostChargeType") + delete(f, "HostType") + delete(f, "HostCount") + delete(f, "TagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AllocateHostsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AllocateHostsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 新创建云子机的实例id列表。 + HostIdSet []*string `json:"HostIdSet,omitempty" name:"HostIdSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AllocateHostsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AllocateHostsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateInstancesKeyPairsRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID,每次请求批量实例的上限为100。<br>可以通过以下方式获取可用的实例ID:<br><li>通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询实例ID。<br><li>通过调用接口 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) ,取返回信息中的`InstanceId`获取实例ID。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 一个或多个待操作的密钥对ID,每次请求批量密钥对的上限为100。密钥对ID形如:`skey-3glfot13`。<br>可以通过以下方式获取可用的密钥ID:<br><li>通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。<br><li>通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的`KeyId`获取密钥对ID。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再绑定密钥。取值范围:<br><li>TRUE:表示在正常关机失败后进行强制关机。<br><li>FALSE:表示在正常关机失败后不进行强制关机。<br>默认取值:FALSE。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *AssociateInstancesKeyPairsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateInstancesKeyPairsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "KeyIds") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateInstancesKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +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 AssociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 要绑定的`安全组ID`,类似sg-efil73jd,只支持绑定单个安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 被绑定的`实例ID`,类似ins-lesecurk,支持指定多个实例,每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *AssociateSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupIds") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ChargePrepaid struct { + + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36。 + Period *uint64 `json:"Period,omitempty" name:"Period"` + + // 自动续费标识。取值范围:<br><li>NOTIFY_AND_AUTO_RENEW:通知过期且自动续费<br><li>NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费<br><li>DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费<br><br>默认取值:NOTIFY_AND_AUTO_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +type CreateDisasterRecoverGroupRequest struct { + *tchttp.BaseRequest + + // 分散置放群组名称,长度1-60个字符,支持中、英文。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 分散置放群组类型,取值范围:<br><li>HOST:物理机<br><li>SW:交换机<br><li>RACK:机架 + Type *string `json:"Type,omitempty" name:"Type"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。<br>更多详细信息请参阅:如何保证幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` +} + +func (r *CreateDisasterRecoverGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDisasterRecoverGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Name") + delete(f, "Type") + delete(f, "ClientToken") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDisasterRecoverGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateDisasterRecoverGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 分散置放群组ID列表。 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitempty" name:"DisasterRecoverGroupId"` + + // 分散置放群组类型,取值范围:<br><li>HOST:物理机<br><li>SW:交换机<br><li>RACK:机架 + Type *string `json:"Type,omitempty" name:"Type"` + + // 分散置放群组名称,长度1-60个字符,支持中、英文。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 置放群组内可容纳的云服务器数量。 + CvmQuotaTotal *int64 `json:"CvmQuotaTotal,omitempty" name:"CvmQuotaTotal"` + + // 置放群组内已有的云服务器数量。 + CurrentNum *int64 `json:"CurrentNum,omitempty" name:"CurrentNum"` + + // 置放群组创建时间。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateDisasterRecoverGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDisasterRecoverGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateImageRequest struct { + *tchttp.BaseRequest + + // 镜像名称 + ImageName *string `json:"ImageName,omitempty" name:"ImageName"` + + // 需要制作镜像的实例ID。基于实例创建镜像时,为必填参数。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 镜像描述 + ImageDescription *string `json:"ImageDescription,omitempty" name:"ImageDescription"` + + // 是否执行强制关机以制作镜像。 + // 取值范围:<br><li>TRUE:表示关机之后制作镜像<br><li>FALSE:表示开机状态制作镜像<br><br>默认取值:FALSE。<br><br>开机状态制作镜像,可能导致部分数据未备份,影响数据安全。 + ForcePoweroff *string `json:"ForcePoweroff,omitempty" name:"ForcePoweroff"` + + // 创建Windows镜像时是否启用Sysprep。 + // 取值范围:TRUE或FALSE,默认取值为FALSE。 + // + // 关于Sysprep的详情请参考[链接](https://cloud.tencent.com/document/product/213/43498)。 + Sysprep *string `json:"Sysprep,omitempty" name:"Sysprep"` + + // 基于实例创建整机镜像时,指定包含在镜像里的数据盘Id + DataDiskIds []*string `json:"DataDiskIds,omitempty" name:"DataDiskIds"` + + // 基于快照创建镜像,指定快照ID,必须包含一个系统盘快照。不可与InstanceId同时传入。 + SnapshotIds []*string `json:"SnapshotIds,omitempty" name:"SnapshotIds"` + + // 检测本次请求的是否成功,但不会对操作的资源产生任何影响 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到自定义镜像。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` +} + +func (r *CreateImageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateImageRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageName") + delete(f, "InstanceId") + delete(f, "ImageDescription") + delete(f, "ForcePoweroff") + delete(f, "Sysprep") + delete(f, "DataDiskIds") + delete(f, "SnapshotIds") + delete(f, "DryRun") + delete(f, "TagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateImageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateImageResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 镜像ID + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateImageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateImageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateKeyPairRequest struct { + *tchttp.BaseRequest + + // 密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 密钥对创建后所属的项目ID。 + // 可以通过以下方式获取项目ID: + // <li>通过项目列表查询项目ID。 + // <li>通过调用接口DescribeProject,取返回信息中的`projectId `获取项目ID。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` +} + +func (r *CreateKeyPairRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateKeyPairRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyName") + delete(f, "ProjectId") + 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 CreateLaunchTemplateRequest struct { + *tchttp.BaseRequest + + // 实例启动模板名称。长度为2~128个英文或中文字符。 + LaunchTemplateName *string `json:"LaunchTemplateName,omitempty" name:"LaunchTemplateName"` + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目,所属宿主机(在专用宿主机上创建子机时指定)等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,传入InstanceType获取当前机型支持的镜像列表,取返回信息中的`ImageId`字段。</li> + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例启动模板版本描述。长度为2~256个英文或中文字符。 + LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitempty" name:"LaunchTemplateVersionDescription"` + + // 实例机型。不同实例机型指定了不同的资源规格。 + // <br><li>对于付费模式为PREPAID或POSTPAID\_BY\_HOUR的实例创建,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例规格](https://cloud.tencent.com/document/product/213/11518)描述。若不指定该参数,则系统将根据当前地域的资源售卖情况动态指定默认机型。<br><li>对于付费模式为CDHPAID的实例创建,该参数以"CDH_"为前缀,根据CPU和内存配置生成,具体形式为:CDH_XCXG,例如对于创建CPU为1核,内存为1G大小的专用宿主机的实例,该参数应该为CDH_1C1G。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定21块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含20块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。若不指定该参数,则默认使用基础网络。若在此参数中指定了私有网络IP,即表示每个实例的主网卡IP;同时,InstanceCount参数必须与私有网络IP的个数一致且不能大于20。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 实例显示名称。<br><li>不指定实例显示名称则默认显示‘未命名’。</li><li>购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。</li><li>购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。</li><li>最多支持60个字符(包含模式串)。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认公共镜像开启云监控、云安全服务;自定义镜像与镜像市场镜像默认不开启云监控,云安全服务,而使用镜像里保留的服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 云服务器的主机名。<br><li>点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。<br><li>Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。<br><li>其他类型(Linux 等)实例:字符长度为[2, 60],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 定时任务。通过该参数可以为实例指定定时任务,目前仅支持定时销毁。 + ActionTimer *ActionTimer `json:"ActionTimer,omitempty" name:"ActionTimer"` + + // 置放群组id,仅支持指定一个。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到云服务器实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` + + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 提供给实例使用的用户数据,需要以 base64 方式编码,支持的最大数据大小为 16KB。关于获取此参数的详细介绍,请参阅[Windows](https://cloud.tencent.com/document/product/213/17526)和[Linux](https://cloud.tencent.com/document/product/213/17525)启动时运行命令。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 是否只预检此次请求。 + // true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制和云服务器库存。 + // 如果检查不通过,则返回对应错误码; + // 如果检查通过,则返回RequestId. + // false(默认):发送正常请求,通过检查后直接创建实例。 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // CAM角色名称。可通过[`DescribeRoleList`](https://cloud.tencent.com/document/product/598/13887)接口返回值中的`roleName`获取。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 高性能计算集群ID。若创建的实例为高性能计算实例,需指定实例放置的集群,否则不可指定。 + HpcClusterId *string `json:"HpcClusterId,omitempty" name:"HpcClusterId"` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。<br><li>PREPAID:预付费,即包年包月<br><li>POSTPAID_BY_HOUR:按小时后付费<br><li>CDHPAID:独享子机(基于专用宿主机创建,宿主机部分的资源不收费)<br><li>SPOTPAID:竞价付费<br>默认值:POSTPAID_BY_HOUR。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *CreateLaunchTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLaunchTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateName") + delete(f, "Placement") + delete(f, "ImageId") + delete(f, "LaunchTemplateVersionDescription") + delete(f, "InstanceType") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "VirtualPrivateCloud") + delete(f, "InternetAccessible") + delete(f, "InstanceCount") + delete(f, "InstanceName") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "ClientToken") + delete(f, "HostName") + delete(f, "ActionTimer") + delete(f, "DisasterRecoverGroupIds") + delete(f, "TagSpecification") + delete(f, "InstanceMarketOptions") + delete(f, "UserData") + delete(f, "DryRun") + delete(f, "CamRoleName") + delete(f, "HpcClusterId") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLaunchTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateLaunchTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 当通过本接口来创建实例启动模板时会返回该参数,表示创建成功的实例启动模板`ID`。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateLaunchTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLaunchTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateLaunchTemplateVersionRequest struct { + *tchttp.BaseRequest + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目,所属宿主机(在专用宿主机上创建子机时指定)等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 启动模板ID,新版本将基于该实例启动模板ID创建。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` + + // 若给定,新实例启动模板将基于给定的版本号创建。若未指定则使用默认版本。 + LaunchTemplateVersion *int64 `json:"LaunchTemplateVersion,omitempty" name:"LaunchTemplateVersion"` + + // 实例启动模板版本描述。长度为2~256个英文或中文字符。 + LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitempty" name:"LaunchTemplateVersionDescription"` + + // 实例机型。不同实例机型指定了不同的资源规格。 + // <br><li>对于付费模式为PREPAID或POSTPAID\_BY\_HOUR的实例创建,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例规格](https://cloud.tencent.com/document/product/213/11518)描述。若不指定该参数,则系统将根据当前地域的资源售卖情况动态指定默认机型。<br><li>对于付费模式为CDHPAID的实例创建,该参数以"CDH_"为前缀,根据CPU和内存配置生成,具体形式为:CDH_XCXG,例如对于创建CPU为1核,内存为1G大小的专用宿主机的实例,该参数应该为CDH_1C1G。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,传入InstanceType获取当前机型支持的镜像列表,取返回信息中的`ImageId`字段。</li> + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定21块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含20块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。若不指定该参数,则默认使用基础网络。若在此参数中指定了私有网络IP,即表示每个实例的主网卡IP;同时,InstanceCount参数必须与私有网络IP的个数一致且不能大于20。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 实例显示名称。<br><li>不指定实例显示名称则默认显示‘未命名’。</li><li>购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。</li><li>购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。</li><li>最多支持60个字符(包含模式串)。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认公共镜像开启云监控、云安全服务;自定义镜像与镜像市场镜像默认不开启云监控,云安全服务,而使用镜像里保留的服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 云服务器的主机名。<br><li>点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。<br><li>Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。<br><li>其他类型(Linux 等)实例:字符长度为[2, 60],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 定时任务。通过该参数可以为实例指定定时任务,目前仅支持定时销毁。 + ActionTimer *ActionTimer `json:"ActionTimer,omitempty" name:"ActionTimer"` + + // 置放群组id,仅支持指定一个。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到云服务器实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` + + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 提供给实例使用的用户数据,需要以 base64 方式编码,支持的最大数据大小为 16KB。关于获取此参数的详细介绍,请参阅[Windows](https://cloud.tencent.com/document/product/213/17526)和[Linux](https://cloud.tencent.com/document/product/213/17525)启动时运行命令。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 是否只预检此次请求。 + // true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制和云服务器库存。 + // 如果检查不通过,则返回对应错误码; + // 如果检查通过,则返回RequestId. + // false(默认):发送正常请求,通过检查后直接创建实例。 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // CAM角色名称。可通过[`DescribeRoleList`](https://cloud.tencent.com/document/product/598/13887)接口返回值中的`roleName`获取。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 高性能计算集群ID。若创建的实例为高性能计算实例,需指定实例放置的集群,否则不可指定。 + HpcClusterId *string `json:"HpcClusterId,omitempty" name:"HpcClusterId"` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。<br><li>PREPAID:预付费,即包年包月<br><li>POSTPAID_BY_HOUR:按小时后付费<br><li>CDHPAID:独享子机(基于专用宿主机创建,宿主机部分的资源不收费)<br><li>SPOTPAID:竞价付费<br>默认值:POSTPAID_BY_HOUR。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *CreateLaunchTemplateVersionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLaunchTemplateVersionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Placement") + delete(f, "LaunchTemplateId") + delete(f, "LaunchTemplateVersion") + delete(f, "LaunchTemplateVersionDescription") + delete(f, "InstanceType") + delete(f, "ImageId") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "VirtualPrivateCloud") + delete(f, "InternetAccessible") + delete(f, "InstanceCount") + delete(f, "InstanceName") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "ClientToken") + delete(f, "HostName") + delete(f, "ActionTimer") + delete(f, "DisasterRecoverGroupIds") + delete(f, "TagSpecification") + delete(f, "InstanceMarketOptions") + delete(f, "UserData") + delete(f, "DryRun") + delete(f, "CamRoleName") + delete(f, "HpcClusterId") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLaunchTemplateVersionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateLaunchTemplateVersionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 新创建的实例启动模板版本号。 + LaunchTemplateVersionNumber *int64 `json:"LaunchTemplateVersionNumber,omitempty" name:"LaunchTemplateVersionNumber"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateLaunchTemplateVersionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLaunchTemplateVersionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DataDisk struct { + + // 数据盘大小,单位:GB。最小调整步长为10G,不同数据盘类型取值范围不同,具体限制详见:[存储概述](https://cloud.tencent.com/document/product/213/4952)。默认值为0,表示不购买数据盘。更多限制详见产品文档。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 数据盘类型。数据盘类型限制详见[存储概述](https://cloud.tencent.com/document/product/213/4952)。取值范围:<br><li>LOCAL_BASIC:本地硬盘<br><li>LOCAL_SSD:本地SSD硬盘<br><li>LOCAL_NVME:本地NVME硬盘,与InstanceType强相关,不支持指定<br><li>LOCAL_PRO:本地HDD硬盘,与InstanceType强相关,不支持指定<br><li>CLOUD_BASIC:普通云硬盘<br><li>CLOUD_PREMIUM:高性能云硬盘<br><li>CLOUD_SSD:SSD云硬盘<br><li>CLOUD_HSSD:增强型SSD云硬盘<br><li>CLOUD_TSSD:极速型SSD云硬盘<br><br>默认取值:LOCAL_BASIC。<br><br>该参数对`ResizeInstanceDisk`接口无效。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 数据盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID,暂时不支持该参数。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 数据盘是否随子机销毁。取值范围: + // <li>TRUE:子机销毁时,销毁数据盘,只支持按小时后付费云盘 + // <li>FALSE:子机销毁时,保留数据盘<br> + // 默认取值:TRUE<br> + // 该参数目前仅用于 `RunInstances` 接口。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DeleteWithInstance *bool `json:"DeleteWithInstance,omitempty" name:"DeleteWithInstance"` + + // 数据盘快照ID。选择的数据盘快照大小需小于数据盘大小。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` + + // 数据盘是加密。取值范围: + // <li>TRUE:加密 + // <li>FALSE:不加密<br> + // 默认取值:FALSE<br> + // 该参数目前仅用于 `RunInstances` 接口。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Encrypt *bool `json:"Encrypt,omitempty" name:"Encrypt"` + + // 自定义CMK对应的ID,取值为UUID或者类似kms-abcd1234。用于加密云盘。 + // + // 该参数目前仅用于 `RunInstances` 接口。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KmsKeyId *string `json:"KmsKeyId,omitempty" name:"KmsKeyId"` + + // 云硬盘性能,单位:MB/s + // 注意:此字段可能返回 null,表示取不到有效值。 + ThroughputPerformance *int64 `json:"ThroughputPerformance,omitempty" name:"ThroughputPerformance"` + + // 所属的独享集群ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` +} + +type DeleteDisasterRecoverGroupsRequest struct { + *tchttp.BaseRequest + + // 分散置放群组ID列表,可通过[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。每次请求允许操作的分散置放群组数量上限是100。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds"` +} + +func (r *DeleteDisasterRecoverGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteDisasterRecoverGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DisasterRecoverGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteDisasterRecoverGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDisasterRecoverGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteDisasterRecoverGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteDisasterRecoverGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteImagesRequest struct { + *tchttp.BaseRequest + + // 准备删除的镜像Id列表 + ImageIds []*string `json:"ImageIds,omitempty" name:"ImageIds"` +} + +func (r *DeleteImagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteImagesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteImagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteImagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteKeyPairsRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的密钥对ID。每次请求批量密钥对的上限为100。<br>可以通过以下方式获取可用的密钥ID:<br><li>通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。<br><li>通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的 `KeyId` 获取密钥对ID。 + 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 DeleteLaunchTemplateRequest struct { + *tchttp.BaseRequest + + // 启动模板ID。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` +} + +func (r *DeleteLaunchTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLaunchTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteLaunchTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLaunchTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteLaunchTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLaunchTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLaunchTemplateVersionsRequest struct { + *tchttp.BaseRequest + + // 启动模板ID。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` + + // 实例启动模板版本列表。 + LaunchTemplateVersions []*int64 `json:"LaunchTemplateVersions,omitempty" name:"LaunchTemplateVersions"` +} + +func (r *DeleteLaunchTemplateVersionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLaunchTemplateVersionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateId") + delete(f, "LaunchTemplateVersions") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteLaunchTemplateVersionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLaunchTemplateVersionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteLaunchTemplateVersionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLaunchTemplateVersionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAccountQuotaRequest struct { + *tchttp.BaseRequest + + // <li><strong>zone</strong></li> + // <p style="padding-left: 30px;">按照【<strong>可用区</strong>】进行过滤。可用区形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> + // <li><strong>quota-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>配额类型</strong>】进行过滤。配额类型形如:PostPaidQuotaSet。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:PostPaidQuotaSet,DisasterRecoverGroupQuotaSet,PrePaidQuotaSet,SpotPaidQuotaSet</p> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeAccountQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAccountQuotaRequest) 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", "DescribeAccountQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAccountQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 用户appid + AppId *string `json:"AppId,omitempty" name:"AppId"` + + // 配额数据 + AccountQuotaOverview *AccountQuotaOverview `json:"AccountQuotaOverview,omitempty" name:"AccountQuotaOverview"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAccountQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAccountQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisasterRecoverGroupQuotaRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeDisasterRecoverGroupQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDisasterRecoverGroupQuotaRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDisasterRecoverGroupQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisasterRecoverGroupQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可创建置放群组数量的上限。 + GroupQuota *int64 `json:"GroupQuota,omitempty" name:"GroupQuota"` + + // 当前用户已经创建的置放群组数量。 + CurrentNum *int64 `json:"CurrentNum,omitempty" name:"CurrentNum"` + + // 物理机类型容灾组内实例的配额数。 + CvmInHostGroupQuota *int64 `json:"CvmInHostGroupQuota,omitempty" name:"CvmInHostGroupQuota"` + + // 交换机类型容灾组内实例的配额数。 + CvmInSwGroupQuota *int64 `json:"CvmInSwGroupQuota,omitempty" name:"CvmInSwGroupQuota"` + + // 机架类型容灾组内实例的配额数。 + CvmInRackGroupQuota *int64 `json:"CvmInRackGroupQuota,omitempty" name:"CvmInRackGroupQuota"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDisasterRecoverGroupQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDisasterRecoverGroupQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisasterRecoverGroupsRequest struct { + *tchttp.BaseRequest + + // 分散置放群组ID列表。每次请求允许操作的分散置放群组数量上限是100。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds"` + + // 分散置放群组名称,支持模糊匹配。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeDisasterRecoverGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDisasterRecoverGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DisasterRecoverGroupIds") + delete(f, "Name") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDisasterRecoverGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDisasterRecoverGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 分散置放群组信息列表。 + DisasterRecoverGroupSet []*DisasterRecoverGroup `json:"DisasterRecoverGroupSet,omitempty" name:"DisasterRecoverGroupSet"` + + // 用户置放群组总量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDisasterRecoverGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDisasterRecoverGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeHostsRequest struct { + *tchttp.BaseRequest + + // <li><strong>zone</strong></li> + // <p style="padding-left: 30px;">按照【<strong>可用区</strong>】进行过滤。可用区形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> + // <li><strong>project-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>项目ID</strong>】进行过滤,可通过调用[DescribeProject](https://cloud.tencent.com/document/api/378/4400)查询已创建的项目列表或登录[控制台](https://console.cloud.tencent.com/cvm/index)进行查看;也可以调用[AddProject](https://cloud.tencent.com/document/api/378/4398)创建新的项目。项目ID形如:1002189。</p><p style="padding-left: 30px;">类型:Integer</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>host-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>[CDH](https://cloud.tencent.com/document/product/416) ID</strong>】进行过滤。[CDH](https://cloud.tencent.com/document/product/416) ID形如:host-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>host-name</strong></li> + // <p style="padding-left: 30px;">按照【<strong>CDH实例名称</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>host-state</strong></li> + // <p style="padding-left: 30px;">按照【<strong>CDH实例状态</strong>】进行过滤。(PENDING:创建中 | LAUNCH_FAILURE:创建失败 | RUNNING:运行中 | EXPIRED:已过期)</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeHostsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeHostsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHostsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeHostsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合查询条件的cdh实例总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // cdh实例详细信息列表 + HostSet []*HostItem `json:"HostSet,omitempty" name:"HostSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeHostsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeHostsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageQuotaRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeImageQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageQuotaRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImageQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 账户的镜像配额 + ImageNumQuota *int64 `json:"ImageNumQuota,omitempty" name:"ImageNumQuota"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImageQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageSharePermissionRequest struct { + *tchttp.BaseRequest + + // 需要共享的镜像Id + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` +} + +func (r *DescribeImageSharePermissionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageSharePermissionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImageSharePermissionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageSharePermissionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 镜像共享信息 + SharePermissionSet []*SharePermission `json:"SharePermissionSet,omitempty" name:"SharePermissionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImageSharePermissionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImageSharePermissionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImagesRequest struct { + *tchttp.BaseRequest + + // 镜像ID列表 。镜像ID如:`img-gvbnzy6f`。array型参数的格式可以参考[API简介](https://cloud.tencent.com/document/api/213/15688)。镜像ID可以通过如下方式获取:<br><li>通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。<br><li>通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 + ImageIds []*string `json:"ImageIds,omitempty" name:"ImageIds"` + + // 过滤条件,每次请求的`Filters`的上限为10,`Filters.Values`的上限为5。参数不可以同时指定`ImageIds`和`Filters`。详细的过滤条件如下: + // + // <li><strong>image-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>镜像ID</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>image-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>镜像类型</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:</p><p style="padding-left: 30px;">PRIVATE_IMAGE: 私有镜像 (本账户创建的镜像)</p><p style="padding-left: 30px;">PUBLIC_IMAGE: 公共镜像 (腾讯云官方镜像)</p><p style="padding-left: 30px;">SHARED_IMAGE: 共享镜像(其他账户共享给本账户的镜像)</p> + // <li><strong>image-name</strong></li> + // <p style="padding-left: 30px;">按照【<strong>镜像名称</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>platform</strong></li> + // <p style="padding-left: 30px;">按照【<strong>镜像平台</strong>】进行过滤,如CentOS。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>tag-key</strong></li> + // <p style="padding-left: 30px;">按照【<strong>标签键</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>tag:tag-key</strong></li> + // <p style="padding-left: 30px;">按照【<strong>标签键值对</strong>】进行过滤。tag-key使用具体的标签键进行替换。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于Offset详见[API简介](/document/api/213/568#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89)。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 数量限制,默认为20,最大值为100。关于Limit详见[API简介](/document/api/213/568#.E8.BE.93.E5.85.A5.E5.8F.82.E6.95.B0.E4.B8.8E.E8.BF.94.E5.9B.9E.E5.8F.82.E6.95.B0.E9.87.8A.E4.B9.89)。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 实例类型,如 `S1.SMALL1` + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` +} + +func (r *DescribeImagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImagesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "InstanceType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 一个关于镜像详细信息的结构体,主要包括镜像的主要状态与属性。 + ImageSet []*Image `json:"ImageSet,omitempty" name:"ImageSet"` + + // 符合要求的镜像数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImportImageOsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeImportImageOsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImportImageOsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImportImageOsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImportImageOsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 支持的导入镜像的操作系统类型。 + ImportImageOsListSupported *ImageOsList `json:"ImportImageOsListSupported,omitempty" name:"ImportImageOsListSupported"` + + // 支持的导入镜像的操作系统版本。 + ImportImageOsVersionSet []*OsVersion `json:"ImportImageOsVersionSet,omitempty" name:"ImportImageOsVersionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImportImageOsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImportImageOsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceFamilyConfigsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeInstanceFamilyConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstanceFamilyConfigsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstanceFamilyConfigsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceFamilyConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例机型组配置的列表信息 + InstanceFamilyConfigSet []*InstanceFamilyConfig `json:"InstanceFamilyConfigSet,omitempty" name:"InstanceFamilyConfigSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceFamilyConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstanceFamilyConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceInternetBandwidthConfigsRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribeInstanceInternetBandwidthConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstanceInternetBandwidthConfigsRequest) 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", "DescribeInstanceInternetBandwidthConfigsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceInternetBandwidthConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 带宽配置信息列表。 + InternetBandwidthConfigSet []*InternetBandwidthConfig `json:"InternetBandwidthConfigSet,omitempty" name:"InternetBandwidthConfigSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceInternetBandwidthConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstanceInternetBandwidthConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceTypeConfigsRequest struct { + *tchttp.BaseRequest + + // <li><strong>zone</strong></li> + // <p style="padding-left: 30px;">按照【<strong>可用区</strong>】进行过滤。可用区形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> + // <li><strong>instance-family</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例机型系列</strong>】进行过滤。实例机型系列形如:S1、I1、M1等。</p><p style="padding-left: 30px;">类型:Integer</p><p style="padding-left: 30px;">必选:否</p> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为1。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeInstanceTypeConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstanceTypeConfigsRequest) 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", "DescribeInstanceTypeConfigsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceTypeConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例机型配置列表。 + InstanceTypeConfigSet []*InstanceTypeConfig `json:"InstanceTypeConfigSet,omitempty" name:"InstanceTypeConfigSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstanceTypeConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstanceTypeConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstanceVncUrlRequest struct { + *tchttp.BaseRequest + + // 一个操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`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 DescribeInstancesModificationRequest struct { + *tchttp.BaseRequest + + // 一个或多个待查询的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为20。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // <li><strong>status</strong></li> + // <p style="padding-left: 30px;">按照【<strong>配置规格状态</strong>】进行过滤。配置规格状态形如:SELL、UNAVAILABLE。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为2。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeInstancesModificationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstancesModificationRequest) 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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstancesModificationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesModificationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例调整的机型配置的数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 实例支持调整的机型配置列表。 + InstanceTypeConfigStatusSet []*InstanceTypeConfigStatus `json:"InstanceTypeConfigStatusSet,omitempty" name:"InstanceTypeConfigStatusSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesModificationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstancesModificationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesOperationLimitRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个实例ID查询,可通过[DescribeInstances](https://cloud.tencent.com/document/api/213/15728)API返回值中的InstanceId获取。实例ID形如:ins-xxxxxxxx。(此参数的具体格式可参考API[简介](https://cloud.tencent.com/document/api/213/15688)的ids.N一节)。每次请求的实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例操作。 + // <li> INSTANCE_DEGRADE:实例降配操作</li> + Operation *string `json:"Operation,omitempty" name:"Operation"` +} + +func (r *DescribeInstancesOperationLimitRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstancesOperationLimitRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "Operation") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstancesOperationLimitRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesOperationLimitResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示调整配置操作(降配)限制次数查询。 + InstanceOperationLimitSet []*OperationCountLimit `json:"InstanceOperationLimitSet,omitempty" name:"InstanceOperationLimitSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesOperationLimitResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstancesOperationLimitResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个实例ID查询。实例ID形如:`ins-xxxxxxxx`。(此参数的具体格式可参考API[简介](https://cloud.tencent.com/document/api/213/15688)的`ids.N`一节)。每次请求的实例的上限为100。参数不支持同时指定`InstanceIds`和`Filters`。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // <li><strong>zone</strong></li> + // <p style="padding-left: 30px;">按照【<strong>可用区</strong>】进行过滤。可用区形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> + // <li><strong>project-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>项目ID</strong>】进行过滤,可通过调用[DescribeProject](https://cloud.tencent.com/document/api/378/4400)查询已创建的项目列表或登录[控制台](https://console.cloud.tencent.com/cvm/index)进行查看;也可以调用[AddProject](https://cloud.tencent.com/document/api/378/4398)创建新的项目。项目ID形如:1002189。</p><p style="padding-left: 30px;">类型:Integer</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>host-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>[CDH](https://cloud.tencent.com/document/product/416) ID</strong>】进行过滤。[CDH](https://cloud.tencent.com/document/product/416) ID形如:host-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>vpc-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>VPC ID</strong>】进行过滤。VPC ID形如:vpc-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>subnet-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>子网ID</strong>】进行过滤。子网ID形如:subnet-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>instance-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例ID</strong>】进行过滤。实例ID形如:ins-xxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>uuid</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例UUID</strong>】进行过滤。实例UUID形如:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>security-group-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>安全组ID</strong>】进行过滤。安全组ID形如: sg-8jlk3f3r。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>instance-name</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例名称</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>instance-charge-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例计费模式</strong>】进行过滤。(PREPAID:表示预付费,即包年包月 | POSTPAID_BY_HOUR:表示后付费,即按量计费 | CDHPAID:表示[CDH](https://cloud.tencent.com/document/product/416)付费,即只对[CDH](https://cloud.tencent.com/document/product/416)计费,不对[CDH](https://cloud.tencent.com/document/product/416)上的实例计费。)</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>instance-state</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例状态</strong>】进行过滤。状态类型详见[实例状态表](https://cloud.tencent.com/document/api/213/15753#InstanceStatus)</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>private-ip-address</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例主网卡的内网IP</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>public-ip-address</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例主网卡的公网IP</strong>】进行过滤,包含实例创建时自动分配的IP和实例创建后手动绑定的弹性IP。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>ipv6-address</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例的IPv6地址</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>tag-key</strong></li> + // <p style="padding-left: 30px;">按照【<strong>标签键</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>tag-value</strong></li> + // <p style="padding-left: 30px;">按照【<strong>标签值</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>tag:tag-key</strong></li> + // <p style="padding-left: 30px;">按照【<strong>标签键值对</strong>】进行过滤。tag-key使用具体的标签键进行替换。使用请参考示例2。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`InstanceIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + 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 DescribeInstancesStatusRequest struct { + *tchttp.BaseRequest + + // 按照一个或者多个实例ID查询。实例ID形如:`ins-11112222`。此参数的具体格式可参考API[简介](https://cloud.tencent.com/document/api/213/15688)的`ids.N`一节)。每次请求的实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeInstancesStatusRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstancesStatusRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstancesStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInstancesStatusResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例状态数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // [实例状态](https://cloud.tencent.com/document/api/213/15753#InstanceStatus) 列表。 + InstanceStatusSet []*InstanceStatus `json:"InstanceStatusSet,omitempty" name:"InstanceStatusSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInstancesStatusResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInstancesStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInternetChargeTypeConfigsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeInternetChargeTypeConfigsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInternetChargeTypeConfigsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInternetChargeTypeConfigsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeInternetChargeTypeConfigsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 网络计费类型配置。 + InternetChargeTypeConfigSet []*InternetChargeTypeConfig `json:"InternetChargeTypeConfigSet,omitempty" name:"InternetChargeTypeConfigSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeInternetChargeTypeConfigsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeInternetChargeTypeConfigsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeKeyPairsRequest struct { + *tchttp.BaseRequest + + // 密钥对ID,密钥对ID形如:`skey-11112222`(此接口支持同时传入多个ID进行过滤。此参数的具体格式可参考 API [简介](https://cloud.tencent.com/document/api/213/15688)的 `id.N` 一节)。参数不支持同时指定 `KeyIds` 和 `Filters`。密钥对ID可以通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 过滤条件。 + // <li> project-id - Integer - 是否必填:否 -(过滤条件)按照项目ID过滤。可以通过[项目列表](https://console.cloud.tencent.com/project)查询项目ID,或者调用接口 [DescribeProject](https://cloud.tencent.com/document/api/378/4400),取返回信息中的projectId获取项目ID。</li> + // <li> key-name - String - 是否必填:否 -(过滤条件)按照密钥对名称过滤。</li>参数不支持同时指定 `KeyIds` 和 `Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于 `Offset` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。返回数量,默认为20,最大值为100。关于 `Limit` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于 `Limit` 的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeKeyPairsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeKeyPairsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +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 DescribeLaunchTemplateVersionsRequest struct { + *tchttp.BaseRequest + + // 启动模板ID。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` + + // 实例启动模板列表。 + LaunchTemplateVersions []*uint64 `json:"LaunchTemplateVersions,omitempty" name:"LaunchTemplateVersions"` + + // 通过范围指定版本时的最小版本号,默认为0。 + MinVersion *uint64 `json:"MinVersion,omitempty" name:"MinVersion"` + + // 过范围指定版本时的最大版本号,默认为30。 + MaxVersion *uint64 `json:"MaxVersion,omitempty" name:"MaxVersion"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 是否查询默认版本。该参数不可与LaunchTemplateVersions同时指定。 + DefaultVersion *bool `json:"DefaultVersion,omitempty" name:"DefaultVersion"` +} + +func (r *DescribeLaunchTemplateVersionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLaunchTemplateVersionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateId") + delete(f, "LaunchTemplateVersions") + delete(f, "MinVersion") + delete(f, "MaxVersion") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "DefaultVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLaunchTemplateVersionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLaunchTemplateVersionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例启动模板总数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 实例启动模板版本集合。 + LaunchTemplateVersionSet []*LaunchTemplateVersionInfo `json:"LaunchTemplateVersionSet,omitempty" name:"LaunchTemplateVersionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeLaunchTemplateVersionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLaunchTemplateVersionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLaunchTemplatesRequest struct { + *tchttp.BaseRequest + + // 启动模板ID,一个或者多个启动模板ID。若未指定,则显示用户所有模板。 + LaunchTemplateIds []*string `json:"LaunchTemplateIds,omitempty" name:"LaunchTemplateIds"` + + // <p style="padding-left: 30px;">按照【<strong>LaunchTemplateNames</strong>】进行过滤。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`LaunchTemplateIds`和`Filters`。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeLaunchTemplatesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLaunchTemplatesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLaunchTemplatesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLaunchTemplatesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例模板数量。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 实例详细信息列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LaunchTemplateSet []*LaunchTemplateInfo `json:"LaunchTemplateSet,omitempty" name:"LaunchTemplateSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeLaunchTemplatesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLaunchTemplatesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +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 *uint64 `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 DescribeReservedInstancesConfigInfosRequest struct { + *tchttp.BaseRequest + + // zone + // 按照预留实例计费可购买的可用区进行过滤。形如:ap-guangzhou-1。 + // 类型:String + // 必选:否 + // 可选项:各地域可用区列表 + // + // product-description + // 按照预留实例计费的平台描述(即操作系统)进行过滤。形如:linux。 + // 类型:String + // 必选:否 + // 可选项:linux + // + // duration + // 按照预留实例计费有效期,即预留实例计费购买时长进行过滤。形如:31536000。 + // 类型:Integer + // 计量单位:秒 + // 必选:否 + // 可选项:31536000 (1年) + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeReservedInstancesConfigInfosRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesConfigInfosRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeReservedInstancesConfigInfosRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeReservedInstancesConfigInfosResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 预留实例静态配置信息列表。 + ReservedInstanceConfigInfos []*ReservedInstanceConfigInfoItem `json:"ReservedInstanceConfigInfos,omitempty" name:"ReservedInstanceConfigInfos"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeReservedInstancesConfigInfosResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesConfigInfosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeReservedInstancesOfferingsRequest struct { + *tchttp.BaseRequest + + // 试运行, 默认为 false。 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 以最大有效期作为过滤参数。 + // 计量单位: 秒 + // 默认为 94608000。 + MaxDuration *int64 `json:"MaxDuration,omitempty" name:"MaxDuration"` + + // 以最小有效期作为过滤参数。 + // 计量单位: 秒 + // 默认为 2592000。 + MinDuration *int64 `json:"MinDuration,omitempty" name:"MinDuration"` + + // <li><strong>zone</strong></li> + // <p style="padding-left: 30px;">按照预留实例计费可购买的【<strong>可用区</strong>】进行过滤。形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> + // <li><strong>duration</strong></li> + // <p style="padding-left: 30px;">按照预留实例计费【<strong>有效期</strong>】即预留实例计费购买时长进行过滤。形如:31536000。</p><p style="padding-left: 30px;">类型:Integer</p><p style="padding-left: 30px;">计量单位:秒</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:31536000 (1年) | 94608000(3年)</p> + // <li><strong>instance-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>预留实例计费类型</strong>】进行过滤。形如:S3.MEDIUM4。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/11518">预留实例计费类型列表</a></p> + // <li><strong>offering-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>付款类型</strong>】进行过滤。形如:All Upfront (预付全部费用)。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:All Upfront (预付全部费用)</p> + // <li><strong>product-description</strong></li> + // <p style="padding-left: 30px;">按照预留实例计费的【<strong>平台描述</strong>】(即操作系统)进行过滤。形如:linux。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:linux</p> + // <li><strong>reserved-instances-offering-id</strong></li> + // <p style="padding-left: 30px;">按照【<strong>预留实例计费配置ID</strong>】进行过滤。形如:650c138f-ae7e-4750-952a-96841d6e9fc1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeReservedInstancesOfferingsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesOfferingsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DryRun") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "MaxDuration") + delete(f, "MinDuration") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeReservedInstancesOfferingsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeReservedInstancesOfferingsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的预留实例计费数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 符合条件的预留实例计费列表。 + ReservedInstancesOfferingsSet []*ReservedInstancesOffering `json:"ReservedInstancesOfferingsSet,omitempty" name:"ReservedInstancesOfferingsSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeReservedInstancesOfferingsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesOfferingsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeReservedInstancesRequest struct { + *tchttp.BaseRequest + + // 试运行。默认为 false。 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // <li><strong>zone</strong></li> + // <p style="padding-left: 30px;">按照预留实例计费可购买的【<strong>可用区</strong>】进行过滤。形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> + // <li><strong>duration</strong></li> + // <p style="padding-left: 30px;">按照预留实例计费【<strong>有效期</strong>】即预留实例计费购买时长进行过滤。形如:31536000。</p><p style="padding-left: 30px;">类型:Integer</p><p style="padding-left: 30px;">计量单位:秒</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:31536000 (1年) | 94608000(3年)</p> + // <li><strong>instance-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>预留实例规格</strong>】进行过滤。形如:S3.MEDIUM4。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/11518">预留实例规格列表</a></p> + // <li><strong>instance-family</strong></li> + // <p style="padding-left: 30px;">按照【<strong>预留实例类型</strong>】进行过滤。形如:S3。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/11518">预留实例类型列表</a></p> + // <li><strong>offering-type</strong></li> + // <li><strong>offering-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>付款类型</strong>】进行过滤。形如:All Upfront (全预付)。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:All Upfront (全预付) | Partial Upfront (部分预付) | No Upfront (零预付)</p> + // <li><strong>product-description</strong></li> + // <p style="padding-left: 30px;">按照预留实例计费的【<strong>平台描述</strong>】(即操作系统)进行过滤。形如:linux。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:linux</p> + // <li><strong>reserved-instances-id</strong></li> + // <p style="padding-left: 30px;">按照已购买【<strong>预留实例计费ID</strong>】进行过滤。形如:650c138f-ae7e-4750-952a-96841d6e9fc1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>state</strong></li> + // <p style="padding-left: 30px;">按照已购买【<strong>预留实例计费状态</strong>】进行过滤。形如:active。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:active (已创建) | pending (等待被创建) | retired (过期)</p> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeReservedInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DryRun") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeReservedInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeReservedInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的预留实例计费数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 符合条件的预留实例计费列表。 + ReservedInstancesSet []*ReservedInstances `json:"ReservedInstancesSet,omitempty" name:"ReservedInstancesSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeReservedInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeReservedInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZoneInstanceConfigInfosRequest struct { + *tchttp.BaseRequest + + // <li><strong>zone</strong></li> + // <p style="padding-left: 30px;">按照【<strong>可用区</strong>】进行过滤。可用区形如:ap-guangzhou-1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p><p style="padding-left: 30px;">可选项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a></p> + // <li><strong>instance-family</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例机型系列</strong>】进行过滤。实例机型系列形如:S1、I1、M1等。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>instance-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例机型</strong>】进行过滤。不同实例机型指定了不同的资源规格,具体取值可通过调用接口 [DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/product/213/15749) 来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。若不指定该参数,则默认机型为S1.SMALL1。</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // <li><strong>instance-charge-type</strong></li> + // <p style="padding-left: 30px;">按照【<strong>实例计费模式</strong>】进行过滤。(PREPAID:表示预付费,即包年包月 | POSTPAID_BY_HOUR:表示后付费,即按量计费 )</p><p style="padding-left: 30px;">类型:String</p><p style="padding-left: 30px;">必选:否</p> + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为100。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeZoneInstanceConfigInfosRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeZoneInstanceConfigInfosRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeZoneInstanceConfigInfosRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZoneInstanceConfigInfosResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可用区机型配置列表。 + InstanceTypeQuotaSet []*InstanceTypeQuotaItem `json:"InstanceTypeQuotaSet,omitempty" name:"InstanceTypeQuotaSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeZoneInstanceConfigInfosResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeZoneInstanceConfigInfosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZonesRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeZonesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeZonesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeZonesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeZonesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可用区数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 可用区列表信息。 + ZoneSet []*ZoneInfo `json:"ZoneSet,omitempty" name:"ZoneSet"` + + // 唯一请求 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 DisassociateInstancesKeyPairsRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID,每次请求批量实例的上限为100。<br><br>可以通过以下方式获取可用的实例ID:<br><li>通过登录[控制台](https://console.cloud.tencent.com/cvm/index)查询实例ID。<br><li>通过调用接口 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) ,取返回信息中的 `InstanceId` 获取实例ID。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 密钥对ID列表,每次请求批量密钥对的上限为100。密钥对ID形如:`skey-11112222`。<br><br>可以通过以下方式获取可用的密钥ID:<br><li>通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥ID。<br><li>通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699) ,取返回信息中的 `KeyId` 获取密钥对ID。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再解绑密钥。取值范围:<br><li>TRUE:表示在正常关机失败后进行强制关机。<br><li>FALSE:表示在正常关机失败后不进行强制关机。<br><br>默认取值:FALSE。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *DisassociateInstancesKeyPairsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateInstancesKeyPairsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "KeyIds") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateInstancesKeyPairsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +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 DisassociateSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 要解绑的`安全组ID`,类似sg-efil73jd,只支持解绑单个安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 被解绑的`实例ID`,类似ins-lesecurk,支持指定多个实例 。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *DisassociateSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupIds") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisasterRecoverGroup struct { + + // 分散置放群组id。 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitempty" name:"DisasterRecoverGroupId"` + + // 分散置放群组名称,长度1-60个字符。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 分散置放群组类型,取值范围:<br><li>HOST:物理机<br><li>SW:交换机<br><li>RACK:机架 + Type *string `json:"Type,omitempty" name:"Type"` + + // 分散置放群组内最大容纳云服务器数量。 + CvmQuotaTotal *int64 `json:"CvmQuotaTotal,omitempty" name:"CvmQuotaTotal"` + + // 分散置放群组内云服务器当前数量。 + CurrentNum *int64 `json:"CurrentNum,omitempty" name:"CurrentNum"` + + // 分散置放群组内,云服务器id列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 分散置放群组创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` +} + +type DisasterRecoverGroupQuota struct { + + // 可创建置放群组数量的上限。 + GroupQuota *int64 `json:"GroupQuota,omitempty" name:"GroupQuota"` + + // 当前用户已经创建的置放群组数量。 + CurrentNum *int64 `json:"CurrentNum,omitempty" name:"CurrentNum"` + + // 物理机类型容灾组内实例的配额数。 + CvmInHostGroupQuota *int64 `json:"CvmInHostGroupQuota,omitempty" name:"CvmInHostGroupQuota"` + + // 交换机类型容灾组内实例的配额数。 + CvmInSwitchGroupQuota *int64 `json:"CvmInSwitchGroupQuota,omitempty" name:"CvmInSwitchGroupQuota"` + + // 机架类型容灾组内实例的配额数。 + CvmInRackGroupQuota *int64 `json:"CvmInRackGroupQuota,omitempty" name:"CvmInRackGroupQuota"` +} + +type EnhancedService struct { + + // 开启云安全服务。若不指定该参数,则默认开启云安全服务。 + SecurityService *RunSecurityServiceEnabled `json:"SecurityService,omitempty" name:"SecurityService"` + + // 开启云监控服务。若不指定该参数,则默认开启云监控服务。 + MonitorService *RunMonitorServiceEnabled `json:"MonitorService,omitempty" name:"MonitorService"` + + // 开启云自动化助手服务。若不指定该参数,则默认不开启云自动化助手服务。 + AutomationService *RunAutomationServiceEnabled `json:"AutomationService,omitempty" name:"AutomationService"` +} + +type Externals struct { + + // 释放地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + ReleaseAddress *bool `json:"ReleaseAddress,omitempty" name:"ReleaseAddress"` + + // 不支持的网络类型,取值范围:<br><li>BASIC:基础网络<br><li>VPC1.0:私有网络VPC1.0 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnsupportNetworks []*string `json:"UnsupportNetworks,omitempty" name:"UnsupportNetworks"` + + // HDD本地存储属性 + // 注意:此字段可能返回 null,表示取不到有效值。 + StorageBlockAttr *StorageBlock `json:"StorageBlockAttr,omitempty" name:"StorageBlockAttr"` +} + +type Filter struct { + + // 需要过滤的字段。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 字段的过滤值。 + Values []*string `json:"Values,omitempty" name:"Values"` +} + +type HostItem struct { + + // cdh实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // cdh实例id + HostId *string `json:"HostId,omitempty" name:"HostId"` + + // cdh实例类型 + HostType *string `json:"HostType,omitempty" name:"HostType"` + + // cdh实例名称 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // cdh实例付费模式 + HostChargeType *string `json:"HostChargeType,omitempty" name:"HostChargeType"` + + // cdh实例自动续费标记 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // cdh实例创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // cdh实例过期时间 + ExpiredTime *string `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + + // cdh实例上已创建云子机的实例id列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // cdh实例状态 + HostState *string `json:"HostState,omitempty" name:"HostState"` + + // cdh实例ip + HostIp *string `json:"HostIp,omitempty" name:"HostIp"` + + // cdh实例资源信息 + HostResource *HostResource `json:"HostResource,omitempty" name:"HostResource"` + + // 专用宿主机所属的围笼ID。该字段仅对金融专区围笼内的专用宿主机有效。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CageId *string `json:"CageId,omitempty" name:"CageId"` +} + +type HostResource struct { + + // cdh实例总cpu核数 + CpuTotal *uint64 `json:"CpuTotal,omitempty" name:"CpuTotal"` + + // cdh实例可用cpu核数 + CpuAvailable *uint64 `json:"CpuAvailable,omitempty" name:"CpuAvailable"` + + // cdh实例总内存大小(单位为:GiB) + MemTotal *float64 `json:"MemTotal,omitempty" name:"MemTotal"` + + // cdh实例可用内存大小(单位为:GiB) + MemAvailable *float64 `json:"MemAvailable,omitempty" name:"MemAvailable"` + + // cdh实例总磁盘大小(单位为:GiB) + DiskTotal *uint64 `json:"DiskTotal,omitempty" name:"DiskTotal"` + + // cdh实例可用磁盘大小(单位为:GiB) + DiskAvailable *uint64 `json:"DiskAvailable,omitempty" name:"DiskAvailable"` + + // cdh实例磁盘类型 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` +} + +type Image struct { + + // 镜像ID + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 镜像操作系统 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 镜像类型 + ImageType *string `json:"ImageType,omitempty" name:"ImageType"` + + // 镜像创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 镜像名称 + ImageName *string `json:"ImageName,omitempty" name:"ImageName"` + + // 镜像描述 + ImageDescription *string `json:"ImageDescription,omitempty" name:"ImageDescription"` + + // 镜像大小 + ImageSize *int64 `json:"ImageSize,omitempty" name:"ImageSize"` + + // 镜像架构 + Architecture *string `json:"Architecture,omitempty" name:"Architecture"` + + // 镜像状态: + // CREATING-创建中 + // NORMAL-正常 + // CREATEFAILED-创建失败 + // USING-使用中 + // SYNCING-同步中 + // IMPORTING-导入中 + // IMPORTFAILED-导入失败 + ImageState *string `json:"ImageState,omitempty" name:"ImageState"` + + // 镜像来源平台 + Platform *string `json:"Platform,omitempty" name:"Platform"` + + // 镜像创建者 + ImageCreator *string `json:"ImageCreator,omitempty" name:"ImageCreator"` + + // 镜像来源 + ImageSource *string `json:"ImageSource,omitempty" name:"ImageSource"` + + // 同步百分比 + // 注意:此字段可能返回 null,表示取不到有效值。 + SyncPercent *int64 `json:"SyncPercent,omitempty" name:"SyncPercent"` + + // 镜像是否支持cloud-init + // 注意:此字段可能返回 null,表示取不到有效值。 + IsSupportCloudinit *bool `json:"IsSupportCloudinit,omitempty" name:"IsSupportCloudinit"` + + // 镜像关联的快照信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + SnapshotSet []*Snapshot `json:"SnapshotSet,omitempty" name:"SnapshotSet"` +} + +type ImageOsList struct { + + // 支持的windows操作系统。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Windows []*string `json:"Windows,omitempty" name:"Windows"` + + // 支持的linux操作系统 + // 注意:此字段可能返回 null,表示取不到有效值。 + Linux []*string `json:"Linux,omitempty" name:"Linux"` +} + +type ImageQuota struct { + + // 已使用配额 + UsedQuota *uint64 `json:"UsedQuota,omitempty" name:"UsedQuota"` + + // 总配额 + TotalQuota *uint64 `json:"TotalQuota,omitempty" name:"TotalQuota"` +} + +type ImportImageRequest struct { + *tchttp.BaseRequest + + // 导入镜像的操作系统架构,`x86_64` 或 `i386` + Architecture *string `json:"Architecture,omitempty" name:"Architecture"` + + // 导入镜像的操作系统类型,通过`DescribeImportImageOs`获取 + OsType *string `json:"OsType,omitempty" name:"OsType"` + + // 导入镜像的操作系统版本,通过`DescribeImportImageOs`获取 + OsVersion *string `json:"OsVersion,omitempty" name:"OsVersion"` + + // 导入镜像存放的cos地址 + ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"` + + // 镜像名称 + ImageName *string `json:"ImageName,omitempty" name:"ImageName"` + + // 镜像描述 + ImageDescription *string `json:"ImageDescription,omitempty" name:"ImageDescription"` + + // 只检查参数,不执行任务 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 是否强制导入,参考[强制导入镜像](https://cloud.tencent.com/document/product/213/12849) + Force *bool `json:"Force,omitempty" name:"Force"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到自定义镜像。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` +} + +func (r *ImportImageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ImportImageRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Architecture") + delete(f, "OsType") + delete(f, "OsVersion") + delete(f, "ImageUrl") + delete(f, "ImageName") + delete(f, "ImageDescription") + delete(f, "DryRun") + delete(f, "Force") + delete(f, "TagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ImportImageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ImportImageResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ImportImageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ImportImageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ImportKeyPairRequest struct { + *tchttp.BaseRequest + + // 密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 密钥对创建后所属的[项目](https://cloud.tencent.com/document/product/378/10861)ID。<br><br>可以通过以下方式获取项目ID:<br><li>通过[项目列表](https://console.cloud.tencent.com/project)查询项目ID。<br><li>通过调用接口 [DescribeProject](https://cloud.tencent.com/document/api/378/4400),取返回信息中的 `projectId ` 获取项目ID。 + // + // 如果是默认项目,直接填0就可以。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 密钥对的公钥内容,`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, "ProjectId") + 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 InquirePricePurchaseReservedInstancesOfferingRequest struct { + *tchttp.BaseRequest + + // 购买预留实例计费数量 + InstanceCount *uint64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 预留实例计费配置ID + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitempty" name:"ReservedInstancesOfferingId"` + + // 试运行 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。<br>更多详细信息请参阅:如何保证幂等性 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 预留实例显示名称。<br><li>不指定实例显示名称则默认显示‘未命名’。</li><li>最多支持60个字符(包含模式串)。</li> + ReservedInstanceName *string `json:"ReservedInstanceName,omitempty" name:"ReservedInstanceName"` +} + +func (r *InquirePricePurchaseReservedInstancesOfferingRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquirePricePurchaseReservedInstancesOfferingRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceCount") + delete(f, "ReservedInstancesOfferingId") + delete(f, "DryRun") + delete(f, "ClientToken") + delete(f, "ReservedInstanceName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquirePricePurchaseReservedInstancesOfferingRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquirePricePurchaseReservedInstancesOfferingResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 该参数表示对应配置预留实例的价格。 + Price *ReservedInstancePrice `json:"Price,omitempty" name:"Price"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquirePricePurchaseReservedInstancesOfferingResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquirePricePurchaseReservedInstancesOfferingResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceModifyInstancesChargeTypeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。<br><li>PREPAID:预付费,即包年包月。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *InquiryPriceModifyInstancesChargeTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceModifyInstancesChargeTypeRequest) 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, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceModifyInstancesChargeTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceModifyInstancesChargeTypeResponse 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 *InquiryPriceModifyInstancesChargeTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceModifyInstancesChargeTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRenewInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 试运行,测试使用,不执行具体逻辑。取值范围:<br><li>TRUE:跳过执行逻辑<br><li>FALSE:执行逻辑<br><br>默认取值:FALSE。 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 是否续费弹性数据盘。取值范围:<br><li>TRUE:表示续费包年包月实例同时续费其挂载的弹性数据盘<br><li>FALSE:表示续费包年包月实例同时不再续费其挂载的弹性数据盘<br><br>默认取值:TRUE。 + RenewPortableDataDisk *bool `json:"RenewPortableDataDisk,omitempty" name:"RenewPortableDataDisk"` +} + +func (r *InquiryPriceRenewInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceRenewInstancesRequest) 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, "DryRun") + delete(f, "RenewPortableDataDisk") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceRenewInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRenewInstancesResponse 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 *InquiryPriceRenewInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceRenewInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstanceRequest struct { + *tchttp.BaseRequest + + // 实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 指定有效的[镜像](/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。</li> + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例系统盘配置信息。系统盘为云盘的实例可以通过该参数指定重装后的系统盘大小来实现对系统盘的扩容操作,若不指定则默认系统盘大小保持不变。系统盘大小只支持扩容不支持缩容;重装只支持修改系统盘的大小,不能修改系统盘的类型。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` +} + +func (r *InquiryPriceResetInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResetInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "ImageId") + delete(f, "SystemDisk") + delete(f, "LoginSettings") + delete(f, "EnhancedService") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResetInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstanceResponse 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 *InquiryPriceResetInstanceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResetInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstancesInternetMaxBandwidthRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。当调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽时,只支持一个实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 公网出带宽配置。不同机型带宽上限范围不一致,具体限制详见带宽限制对账表。暂时只支持`InternetMaxBandwidthOut`参数。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 带宽生效的起始时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。起始时间不能早于当前时间。如果起始时间是今天则新设置的带宽立即生效。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 带宽生效的终止时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。新设置的带宽的有效期包含终止时间此日期。终止时间不能晚于包年包月实例的到期时间。实例的到期时间可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`ExpiredTime`获取。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` +} + +func (r *InquiryPriceResetInstancesInternetMaxBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResetInstancesInternetMaxBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InternetAccessible") + delete(f, "StartTime") + delete(f, "EndTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResetInstancesInternetMaxBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstancesInternetMaxBandwidthResponse 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 *InquiryPriceResetInstancesInternetMaxBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResetInstancesInternetMaxBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstancesTypeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。本接口每次请求批量实例的上限为1。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可参见附表[实例资源规格](https://cloud.tencent.com/document/product/213/11518)对照表,也可以调用查询[实例资源规格列表](https://cloud.tencent.com/document/product/213/15749)接口获得最新的规格表。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` +} + +func (r *InquiryPriceResetInstancesTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResetInstancesTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InstanceType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResetInstancesTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetInstancesTypeResponse 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 *InquiryPriceResetInstancesTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResetInstancesTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResizeInstanceDisksRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 待扩容的数据盘配置信息。只支持扩容非弹性数据盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性),且[数据盘类型](https://cloud.tencent.com/document/product/213/15753#DataDisk)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。数据盘容量单位:GB。最小扩容步长:10G。关于数据盘类型的选择请参考硬盘产品简介。可选数据盘类型受到实例类型`InstanceType`限制。另外允许扩容的最大容量也因数据盘类型的不同而有所差异。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:<br><li>TRUE:表示在正常关机失败后进行强制关机<br><li>FALSE:表示在正常关机失败后不进行强制关机<br><br>默认取值:FALSE。<br><br>强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *InquiryPriceResizeInstanceDisksRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResizeInstanceDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "DataDisks") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResizeInstanceDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResizeInstanceDisksResponse 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 *InquiryPriceResizeInstanceDisksResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResizeInstanceDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRunInstancesRequest struct { + *tchttp.BaseRequest + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目等属性。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。</li> + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。<br><li>PREPAID:预付费,即包年包月<br><li>POSTPAID_BY_HOUR:按小时后付费<br><li>SPOTPAID:竞价付费<br>默认值:POSTPAID_BY_HOUR。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例规格](https://cloud.tencent.com/document/product/213/11518)描述。若不指定该参数,则默认机型为S1.SMALL1。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定21块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含20块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。若不指定该参数,则默认使用基础网络。若在此参数中指定了私有网络IP,那么InstanceCount参数只能为1。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 购买实例数量。取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 实例显示名称。<br><li>不指定实例显示名称则默认显示‘未命名’。</li><li>购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。</li><li>购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。</li><li>最多支持60个字符(包含模式串)。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则默认不绑定安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。<br>更多详细信息请参阅:如何保证幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 云服务器的主机名。<br><li>点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。<br><li>Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。<br><li>其他类型(Linux 等)实例:字符长度为[2, 30],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到云服务器实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` + + // 实例的市场相关选项,如竞价实例相关参数 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 高性能计算集群ID。 + HpcClusterId *string `json:"HpcClusterId,omitempty" name:"HpcClusterId"` +} + +func (r *InquiryPriceRunInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceRunInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Placement") + delete(f, "ImageId") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + delete(f, "InstanceType") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "VirtualPrivateCloud") + delete(f, "InternetAccessible") + delete(f, "InstanceCount") + delete(f, "InstanceName") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "ClientToken") + delete(f, "HostName") + delete(f, "TagSpecification") + delete(f, "InstanceMarketOptions") + delete(f, "HpcClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceRunInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRunInstancesResponse 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 *InquiryPriceRunInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceRunInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceTerminateInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *InquiryPriceTerminateInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceTerminateInstancesRequest) 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", "InquiryPriceTerminateInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceTerminateInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 退款详情。 + InstanceRefundsSet []*InstanceRefund `json:"InstanceRefundsSet,omitempty" name:"InstanceRefundsSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquiryPriceTerminateInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceTerminateInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Instance struct { + + // 实例所在的位置。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 实例`ID`。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例机型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例的CPU核数,单位:核。 + CPU *int64 `json:"CPU,omitempty" name:"CPU"` + + // 实例内存容量,单位:`GB`。 + Memory *int64 `json:"Memory,omitempty" name:"Memory"` + + // 实例业务状态。取值范围:<br><li>NORMAL:表示正常状态的实例<br><li>EXPIRED:表示过期的实例<br><li>PROTECTIVELY_ISOLATED:表示被安全隔离的实例。 + RestrictState *string `json:"RestrictState,omitempty" name:"RestrictState"` + + // 实例名称。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例计费模式。取值范围:<br><li>`PREPAID`:表示预付费,即包年包月<br><li>`POSTPAID_BY_HOUR`:表示后付费,即按量计费<br><li>`CDHPAID`:`CDH`付费,即只对`CDH`计费,不对`CDH`上的实例计费。<br><li>`SPOTPAID`:表示竞价实例付费。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 实例系统盘信息。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘信息。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 实例主网卡的内网`IP`列表。 + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` + + // 实例主网卡的公网`IP`列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses"` + + // 实例带宽信息。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 实例所属虚拟私有网络信息。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 生产实例所使用的镜像`ID`。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 自动续费标识。取值范围:<br><li>`NOTIFY_AND_MANUAL_RENEW`:表示通知即将过期,但不自动续费<br><li>`NOTIFY_AND_AUTO_RENEW`:表示通知即将过期,而且自动续费<br><li>`DISABLE_NOTIFY_AND_MANUAL_RENEW`:表示不通知即将过期,也不自动续费。 + // <br><li>注意:后付费模式本项为null + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 到期时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。注意:后付费模式本项为null + ExpiredTime *string `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + + // 操作系统名称。 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 实例登录设置。目前只返回实例所关联的密钥。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例状态。取值范围:<br><li>PENDING:表示创建中<br></li><li>LAUNCH_FAILED:表示创建失败<br></li><li>RUNNING:表示运行中<br></li><li>STOPPED:表示关机<br></li><li>STARTING:表示开机中<br></li><li>STOPPING:表示关机中<br></li><li>REBOOTING:表示重启中<br></li><li>SHUTDOWN:表示停止待销毁<br></li><li>TERMINATING:表示销毁中。<br></li> + InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` + + // 实例关联的标签列表。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 实例的关机计费模式。 + // 取值范围:<br><li>KEEP_CHARGING:关机继续收费<br><li>STOP_CHARGING:关机停止收费<li>NOT_APPLICABLE:实例处于非关机状态或者不适用关机停止计费的条件<br> + StopChargingMode *string `json:"StopChargingMode,omitempty" name:"StopChargingMode"` + + // 实例全局唯一ID + Uuid *string `json:"Uuid,omitempty" name:"Uuid"` + + // 实例的最新操作。例:StopInstances、ResetInstance。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperation *string `json:"LatestOperation,omitempty" name:"LatestOperation"` + + // 实例的最新操作状态。取值范围:<br><li>SUCCESS:表示操作成功<br><li>OPERATING:表示操作执行中<br><li>FAILED:表示操作失败 + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperationState *string `json:"LatestOperationState,omitempty" name:"LatestOperationState"` + + // 实例最新操作的唯一请求 ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperationRequestId *string `json:"LatestOperationRequestId,omitempty" name:"LatestOperationRequestId"` + + // 分散置放群组ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitempty" name:"DisasterRecoverGroupId"` + + // 实例的IPv6地址。 + // 注意:此字段可能返回 null,表示取不到有效值。 + IPv6Addresses []*string `json:"IPv6Addresses,omitempty" name:"IPv6Addresses"` + + // CAM角色名。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 高性能计算集群`ID`。 + // 注意:此字段可能返回 null,表示取不到有效值。 + HpcClusterId *string `json:"HpcClusterId,omitempty" name:"HpcClusterId"` + + // 高性能计算集群`IP`列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RdmaIpAddresses []*string `json:"RdmaIpAddresses,omitempty" name:"RdmaIpAddresses"` + + // 实例隔离类型。取值范围:<br><li>ARREAR:表示欠费隔离<br></li><li>EXPIRE:表示到期隔离<br></li><li>MANMADE:表示主动退还隔离<br></li><li>NOTISOLATED:表示未隔离<br></li> + // 注意:此字段可能返回 null,表示取不到有效值。 + IsolatedSource *string `json:"IsolatedSource,omitempty" name:"IsolatedSource"` +} + +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"` + + // 自动续费标识。取值范围:<br><li>NOTIFY_AND_AUTO_RENEW:通知过期且自动续费<br><li>NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费<br><li>DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费<br><br>默认取值:NOTIFY_AND_MANUAL_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +type InstanceFamilyConfig struct { + + // 机型族名称的中文全称。 + InstanceFamilyName *string `json:"InstanceFamilyName,omitempty" name:"InstanceFamilyName"` + + // 机型族名称的英文简称。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` +} + +type InstanceMarketOptionsRequest struct { + + // 竞价相关选项 + SpotOptions *SpotMarketOptions `json:"SpotOptions,omitempty" name:"SpotOptions"` + + // 市场选项类型,当前只支持取值:spot + MarketType *string `json:"MarketType,omitempty" name:"MarketType"` +} + +type InstanceRefund struct { + + // 实例Id。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 退款数额。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Refunds *float64 `json:"Refunds,omitempty" name:"Refunds"` + + // 退款详情。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PriceDetail *string `json:"PriceDetail,omitempty" name:"PriceDetail"` +} + +type InstanceStatus struct { + + // 实例`ID`。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例状态。取值范围:<br><li>PENDING:表示创建中<br></li><li>LAUNCH_FAILED:表示创建失败<br></li><li>RUNNING:表示运行中<br></li><li>STOPPED:表示关机<br></li><li>STARTING:表示开机中<br></li><li>STOPPING:表示关机中<br></li><li>REBOOTING:表示重启中<br></li><li>SHUTDOWN:表示停止待销毁<br></li><li>TERMINATING:表示销毁中。<br></li> + InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` +} + +type InstanceTypeConfig struct { + + // 可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例机型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例机型系列。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // GPU核数,单位:核。 + GPU *int64 `json:"GPU,omitempty" name:"GPU"` + + // CPU核数,单位:核。 + CPU *int64 `json:"CPU,omitempty" name:"CPU"` + + // 内存容量,单位:`GB`。 + Memory *int64 `json:"Memory,omitempty" name:"Memory"` + + // FPGA核数,单位:核。 + FPGA *int64 `json:"FPGA,omitempty" name:"FPGA"` +} + +type InstanceTypeConfigStatus struct { + + // 状态描述 + Status *string `json:"Status,omitempty" name:"Status"` + + // 状态描述信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Message *string `json:"Message,omitempty" name:"Message"` + + // 配置信息 + InstanceTypeConfig *InstanceTypeConfig `json:"InstanceTypeConfig,omitempty" name:"InstanceTypeConfig"` +} + +type InstanceTypeQuotaItem struct { + + // 可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例机型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例计费模式。取值范围: <br><li>PREPAID:表示预付费,即包年包月<br><li>POSTPAID_BY_HOUR:表示后付费,即按量计费<br><li>CDHPAID:表示[CDH](https://cloud.tencent.com/document/product/416)付费,即只对CDH计费,不对CDH上的实例计费。<br><li>`SPOTPAID`:表示竞价实例付费。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 网卡类型,例如:25代表25G网卡 + NetworkCard *int64 `json:"NetworkCard,omitempty" name:"NetworkCard"` + + // 扩展属性。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Externals *Externals `json:"Externals,omitempty" name:"Externals"` + + // 实例的CPU核数,单位:核。 + Cpu *int64 `json:"Cpu,omitempty" name:"Cpu"` + + // 实例内存容量,单位:`GB`。 + Memory *int64 `json:"Memory,omitempty" name:"Memory"` + + // 实例机型系列。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // 机型名称。 + TypeName *string `json:"TypeName,omitempty" name:"TypeName"` + + // 本地磁盘规格列表。当该参数返回为空值时,表示当前情况下无法创建本地盘。 + LocalDiskTypeList []*LocalDiskType `json:"LocalDiskTypeList,omitempty" name:"LocalDiskTypeList"` + + // 实例是否售卖。取值范围: <br><li>SELL:表示实例可购买<br><li>SOLD_OUT:表示实例已售罄。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 实例的售卖价格。 + Price *ItemPrice `json:"Price,omitempty" name:"Price"` + + // 售罄原因。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SoldOutReason *string `json:"SoldOutReason,omitempty" name:"SoldOutReason"` + + // 内网带宽,单位Gbps。 + InstanceBandwidth *float64 `json:"InstanceBandwidth,omitempty" name:"InstanceBandwidth"` + + // 网络收发包能力,单位万PPS。 + InstancePps *int64 `json:"InstancePps,omitempty" name:"InstancePps"` + + // 本地存储块数量。 + StorageBlockAmount *int64 `json:"StorageBlockAmount,omitempty" name:"StorageBlockAmount"` + + // 处理器型号。 + CpuType *string `json:"CpuType,omitempty" name:"CpuType"` + + // 实例的GPU数量。 + Gpu *int64 `json:"Gpu,omitempty" name:"Gpu"` + + // 实例的FPGA数量。 + Fpga *int64 `json:"Fpga,omitempty" name:"Fpga"` + + // 实例备注信息。 + Remark *string `json:"Remark,omitempty" name:"Remark"` +} + +type InternetAccessible struct { + + // 网络计费类型。取值范围:<br><li>BANDWIDTH_PREPAID:预付费按带宽结算<br><li>TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费<br><li>BANDWIDTH_POSTPAID_BY_HOUR:带宽按小时后付费<br><li>BANDWIDTH_PACKAGE:带宽包用户<br>默认取值:非带宽包用户默认与子机付费类型保持一致。 + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 公网出带宽上限,单位:Mbps。默认值:0Mbps。不同机型带宽上限范围不一致,具体限制详见[购买网络带宽](https://cloud.tencent.com/document/product/213/12523)。 + InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 是否分配公网IP。取值范围:<br><li>TRUE:表示分配公网IP<br><li>FALSE:表示不分配公网IP<br><br>当公网带宽大于0Mbps时,可自由选择开通与否,默认开通公网IP;当公网带宽为0,则不允许分配公网IP。该参数仅在RunInstances接口中作为入参使用。 + PublicIpAssigned *bool `json:"PublicIpAssigned,omitempty" name:"PublicIpAssigned"` + + // 带宽包ID。可通过[`DescribeBandwidthPackages`](https://cloud.tencent.com/document/api/215/19209)接口返回值中的`BandwidthPackageId`获取。该参数仅在RunInstances接口中作为入参使用。 + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` +} + +type InternetBandwidthConfig struct { + + // 开始时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 结束时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // 实例带宽信息。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` +} + +type InternetChargeTypeConfig struct { + + // 网络计费模式。 + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 网络计费模式描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +type ItemPrice struct { + + // 后续合计费用的原价,后付费模式使用,单位:元。<br><li>如返回了其他时间区间项,如UnitPriceSecondStep,则本项代表时间区间在(0, 96)小时;若未返回其他时间区间项,则本项代表全时段,即(0, ∞)小时 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnitPrice *float64 `json:"UnitPrice,omitempty" name:"UnitPrice"` + + // 后续计价单元,后付费模式使用,可取值范围: <br><li>HOUR:表示计价单元是按每小时来计算。当前涉及该计价单元的场景有:实例按小时后付费(POSTPAID_BY_HOUR)、带宽按小时后付费(BANDWIDTH_POSTPAID_BY_HOUR):<br><li>GB:表示计价单元是按每GB来计算。当前涉及该计价单元的场景有:流量按小时后付费(TRAFFIC_POSTPAID_BY_HOUR)。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ChargeUnit *string `json:"ChargeUnit,omitempty" name:"ChargeUnit"` + + // 预支合计费用的原价,预付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OriginalPrice *float64 `json:"OriginalPrice,omitempty" name:"OriginalPrice"` + + // 预支合计费用的折扣价,预付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiscountPrice *float64 `json:"DiscountPrice,omitempty" name:"DiscountPrice"` + + // 折扣,如20.0代表2折。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Discount *float64 `json:"Discount,omitempty" name:"Discount"` + + // 后续合计费用的折扣价,后付费模式使用,单位:元<br><li>如返回了其他时间区间项,如UnitPriceDiscountSecondStep,则本项代表时间区间在(0, 96)小时;若未返回其他时间区间项,则本项代表全时段,即(0, ∞)小时 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnitPriceDiscount *float64 `json:"UnitPriceDiscount,omitempty" name:"UnitPriceDiscount"` + + // 使用时间区间在(96, 360)小时的后续合计费用的原价,后付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnitPriceSecondStep *float64 `json:"UnitPriceSecondStep,omitempty" name:"UnitPriceSecondStep"` + + // 使用时间区间在(96, 360)小时的后续合计费用的折扣价,后付费模式使用,单位:元 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnitPriceDiscountSecondStep *float64 `json:"UnitPriceDiscountSecondStep,omitempty" name:"UnitPriceDiscountSecondStep"` + + // 使用时间区间在(360, ∞)小时的后续合计费用的原价,后付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnitPriceThirdStep *float64 `json:"UnitPriceThirdStep,omitempty" name:"UnitPriceThirdStep"` + + // 使用时间区间在(360, ∞)小时的后续合计费用的折扣价,后付费模式使用,单位:元 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnitPriceDiscountThirdStep *float64 `json:"UnitPriceDiscountThirdStep,omitempty" name:"UnitPriceDiscountThirdStep"` + + // 预支三年合计费用的原价,预付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OriginalPriceThreeYear *float64 `json:"OriginalPriceThreeYear,omitempty" name:"OriginalPriceThreeYear"` + + // 预支三年合计费用的折扣价,预付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiscountPriceThreeYear *float64 `json:"DiscountPriceThreeYear,omitempty" name:"DiscountPriceThreeYear"` + + // 预支三年应用的折扣,如20.0代表2折。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiscountThreeYear *float64 `json:"DiscountThreeYear,omitempty" name:"DiscountThreeYear"` + + // 预支五年合计费用的原价,预付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OriginalPriceFiveYear *float64 `json:"OriginalPriceFiveYear,omitempty" name:"OriginalPriceFiveYear"` + + // 预支五年合计费用的折扣价,预付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiscountPriceFiveYear *float64 `json:"DiscountPriceFiveYear,omitempty" name:"DiscountPriceFiveYear"` + + // 预支五年应用的折扣,如20.0代表2折。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiscountFiveYear *float64 `json:"DiscountFiveYear,omitempty" name:"DiscountFiveYear"` + + // 预支一年合计费用的原价,预付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OriginalPriceOneYear *float64 `json:"OriginalPriceOneYear,omitempty" name:"OriginalPriceOneYear"` + + // 预支一年合计费用的折扣价,预付费模式使用,单位:元。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiscountPriceOneYear *float64 `json:"DiscountPriceOneYear,omitempty" name:"DiscountPriceOneYear"` + + // 预支一年应用的折扣,如20.0代表2折。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiscountOneYear *float64 `json:"DiscountOneYear,omitempty" name:"DiscountOneYear"` +} + +type KeyPair struct { + + // 密钥对的`ID`,是密钥对的唯一标识。 + KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + + // 密钥对名称。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 密钥对所属的项目`ID`。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 密钥对描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` + + // 密钥对的纯文本公钥。 + PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"` + + // 密钥对的纯文本私钥。腾讯云不会保管私钥,请用户自行妥善保存。 + PrivateKey *string `json:"PrivateKey,omitempty" name:"PrivateKey"` + + // 密钥关联的实例`ID`列表。 + AssociatedInstanceIds []*string `json:"AssociatedInstanceIds,omitempty" name:"AssociatedInstanceIds"` + + // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type LaunchTemplate struct { + + // 实例启动模板ID,通过该参数可使用实例模板中的预设参数创建实例。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` + + // 实例启动模板版本号,若给定,新实例启动模板将基于给定的版本号创建 + LaunchTemplateVersion *uint64 `json:"LaunchTemplateVersion,omitempty" name:"LaunchTemplateVersion"` +} + +type LaunchTemplateInfo struct { + + // 实例启动模版本号。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestVersionNumber *uint64 `json:"LatestVersionNumber,omitempty" name:"LatestVersionNumber"` + + // 实例启动模板ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` + + // 实例启动模板名。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LaunchTemplateName *string `json:"LaunchTemplateName,omitempty" name:"LaunchTemplateName"` + + // 实例启动模板默认版本号。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DefaultVersionNumber *uint64 `json:"DefaultVersionNumber,omitempty" name:"DefaultVersionNumber"` + + // 实例启动模板包含的版本总数量。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LaunchTemplateVersionCount *uint64 `json:"LaunchTemplateVersionCount,omitempty" name:"LaunchTemplateVersionCount"` + + // 创建该模板的用户UIN。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedBy *string `json:"CreatedBy,omitempty" name:"CreatedBy"` + + // 创建该模板的时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreationTime *string `json:"CreationTime,omitempty" name:"CreationTime"` +} + +type LaunchTemplateVersionData struct { + + // 实例所在的位置。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 实例机型。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例计费模式。取值范围:<br><li>`PREPAID`:表示预付费,即包年包月<br><li>`POSTPAID_BY_HOUR`:表示后付费,即按量计费<br><li>`CDHPAID`:`CDH`付费,即只对`CDH`计费,不对`CDH`上的实例计费。<br><li>`SPOTPAID`:表示竞价实例付费。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 实例系统盘信息。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘信息。只包含随实例购买的数据盘。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 实例带宽信息。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 实例所属虚拟私有网络信息。 + // 注意:此字段可能返回 null,表示取不到有效值。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 生产实例所使用的镜像`ID`。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 实例登录设置。目前只返回实例所关联的密钥。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // CAM角色名。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 高性能计算集群`ID`。 + // 注意:此字段可能返回 null,表示取不到有效值。 + HpcClusterId *string `json:"HpcClusterId,omitempty" name:"HpcClusterId"` + + // 购买实例数量。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceCount *uint64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 增强服务。 + // 注意:此字段可能返回 null,表示取不到有效值。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 提供给实例使用的用户数据,需要以 base64 方式编码,支持的最大数据大小为 16KB。 + // 注意:此字段可能返回 null,表示取不到有效值。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 置放群组id,仅支持指定一个。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds"` + + // 定时任务。通过该参数可以为实例指定定时任务,目前仅支持定时销毁。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ActionTimer *ActionTimer `json:"ActionTimer,omitempty" name:"ActionTimer"` + + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 云服务器的主机名。 + // 注意:此字段可能返回 null,表示取不到有效值。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 用于保证请求幂等性的字符串。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 预付费模式,即包年包月相关参数设置。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的云服务器、云硬盘实例。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` +} + +type LaunchTemplateVersionInfo struct { + + // 实例启动模板版本号。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LaunchTemplateVersion *uint64 `json:"LaunchTemplateVersion,omitempty" name:"LaunchTemplateVersion"` + + // 实例启动模板版本数据详情。 + LaunchTemplateVersionData *LaunchTemplateVersionData `json:"LaunchTemplateVersionData,omitempty" name:"LaunchTemplateVersionData"` + + // 实例启动模板版本创建时间。 + CreationTime *string `json:"CreationTime,omitempty" name:"CreationTime"` + + // 实例启动模板ID。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` + + // 是否为默认启动模板版本。 + IsDefaultVersion *bool `json:"IsDefaultVersion,omitempty" name:"IsDefaultVersion"` + + // 实例启动模板版本描述信息。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LaunchTemplateVersionDescription *string `json:"LaunchTemplateVersionDescription,omitempty" name:"LaunchTemplateVersionDescription"` + + // 创建者。 + CreatedBy *string `json:"CreatedBy,omitempty" name:"CreatedBy"` +} + +type LocalDiskType struct { + + // 本地磁盘类型。 + Type *string `json:"Type,omitempty" name:"Type"` + + // 本地磁盘属性。 + PartitionType *string `json:"PartitionType,omitempty" name:"PartitionType"` + + // 本地磁盘最小值。 + MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` + + // 本地磁盘最大值。 + MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` + + // 购买时本地盘是否为必选。取值范围:<br><li>REQUIRED:表示必选<br><li>OPTIONAL:表示可选。 + Required *string `json:"Required,omitempty" name:"Required"` +} + +type LoginSettings struct { + + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:<br><li>Linux实例密码必须8到30位,至少包括两项[a-z],[A-Z]、[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。<br><li>Windows实例密码必须12到30位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /]中的特殊符号。<br><br>若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Password *string `json:"Password,omitempty" name:"Password"` + + // 密钥ID列表。关联密钥后,就可以通过对应的私钥来访问实例;KeyId可通过接口[DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699)获取,密钥与密码不能同时指定,同时Windows操作系统不支持指定密钥。当前仅支持购买的时候指定一个密钥。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为TRUE。取值范围:<br><li>TRUE:表示保持镜像的登录设置<br><li>FALSE:表示不保持镜像的登录设置<br><br>默认取值:FALSE。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeepImageLogin *string `json:"KeepImageLogin,omitempty" name:"KeepImageLogin"` +} + +type ModifyDisasterRecoverGroupAttributeRequest struct { + *tchttp.BaseRequest + + // 分散置放群组ID,可使用[DescribeDisasterRecoverGroups](https://cloud.tencent.com/document/api/213/17810)接口获取。 + DisasterRecoverGroupId *string `json:"DisasterRecoverGroupId,omitempty" name:"DisasterRecoverGroupId"` + + // 分散置放群组名称,长度1-60个字符,支持中、英文。 + Name *string `json:"Name,omitempty" name:"Name"` +} + +func (r *ModifyDisasterRecoverGroupAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyDisasterRecoverGroupAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DisasterRecoverGroupId") + delete(f, "Name") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDisasterRecoverGroupAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDisasterRecoverGroupAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyDisasterRecoverGroupAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyDisasterRecoverGroupAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyHostsAttributeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的CDH实例ID。 + HostIds []*string `json:"HostIds,omitempty" name:"HostIds"` + + // CDH实例显示名称。可任意命名,但不得超过60个字符。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 自动续费标识。取值范围:<br><li>NOTIFY_AND_AUTO_RENEW:通知过期且自动续费<br><li>NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费<br><li>DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费<br><br>若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 项目ID。项目可以使用[AddProject](https://cloud.tencent.com/doc/api/403/4398)接口创建。可通过[`DescribeProject`](https://cloud.tencent.com/document/product/378/4400) API返回值中的`projectId`获取。后续使用[DescribeHosts](https://cloud.tencent.com/document/api/213/16474)接口查询实例时,项目ID可用于过滤结果。 + ProjectId *uint64 `json:"ProjectId,omitempty" name:"ProjectId"` +} + +func (r *ModifyHostsAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyHostsAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "HostIds") + delete(f, "HostName") + delete(f, "RenewFlag") + delete(f, "ProjectId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyHostsAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyHostsAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyHostsAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyHostsAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyImageAttributeRequest struct { + *tchttp.BaseRequest + + // 镜像ID,形如`img-gvbnzy6f`。镜像ID可以通过如下方式获取:<br><li>通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。<br><li>通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 设置新的镜像名称;必须满足下列限制:<br> <li> 不得超过20个字符。<br> <li> 镜像名称不能与已有镜像重复。 + ImageName *string `json:"ImageName,omitempty" name:"ImageName"` + + // 设置新的镜像描述;必须满足下列限制:<br> <li> 不得超过60个字符。 + ImageDescription *string `json:"ImageDescription,omitempty" name:"ImageDescription"` +} + +func (r *ModifyImageAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyImageAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageId") + delete(f, "ImageName") + delete(f, "ImageDescription") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyImageAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyImageAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyImageAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyImageAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyImageSharePermissionRequest struct { + *tchttp.BaseRequest + + // 镜像ID,形如`img-gvbnzy6f`。镜像Id可以通过如下方式获取:<br><li>通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。<br><li>通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。 <br>镜像ID必须指定为状态为`NORMAL`的镜像。镜像状态请参考[镜像数据表](https://cloud.tencent.com/document/product/213/15753#Image)。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 接收分享镜像的账号Id列表,array型参数的格式可以参考[API简介](/document/api/213/568)。帐号ID不同于QQ号,查询用户帐号ID请查看[帐号信息](https://console.cloud.tencent.com/developer)中的帐号ID栏。 + AccountIds []*string `json:"AccountIds,omitempty" name:"AccountIds"` + + // 操作,包括 `SHARE`,`CANCEL`。其中`SHARE`代表分享操作,`CANCEL`代表取消分享操作。 + Permission *string `json:"Permission,omitempty" name:"Permission"` +} + +func (r *ModifyImageSharePermissionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyImageSharePermissionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageId") + delete(f, "AccountIds") + delete(f, "Permission") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyImageSharePermissionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyImageSharePermissionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyImageSharePermissionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyImageSharePermissionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstanceDiskTypeRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例数据盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值,当前只支持一个数据盘转化。只支持CDHPAID类型实例指定CdcId参数。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 实例系统盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值。只支持CDHPAID类型实例指定CdcId参数。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` +} + +func (r *ModifyInstanceDiskTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstanceDiskTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "DataDisks") + delete(f, "SystemDisk") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstanceDiskTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstanceDiskTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstanceDiskTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstanceDiskTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesAttributeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例名称。可任意命名,但不得超过60个字符。 + // <dx-alert infotype="explain" title="">必须指定InstanceName与SecurityGroups的其中一个,但不能同时设置</dx-alert> + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 指定实例的安全组Id列表,子机将重新关联指定列表的安全组,原本关联的安全组会被解绑。<dx-alert infotype="explain" title="">必须指定SecurityGroups与InstanceName的其中一个,但不能同时设置</dx-alert> + SecurityGroups []*string `json:"SecurityGroups,omitempty" name:"SecurityGroups"` +} + +func (r *ModifyInstancesAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstancesAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InstanceName") + delete(f, "SecurityGroups") + 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 ModifyInstancesChargeTypeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。<br><li>PREPAID:预付费,即包年包月。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。<dx-alert infotype="explain" title="">若指定实例的付费模式为预付费则该参数必传。</dx-alert> + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *ModifyInstancesChargeTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstancesChargeTypeRequest) 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, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesChargeTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesChargeTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesChargeTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstancesChargeTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesProjectRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 项目ID。项目可以使用[AddProject](https://cloud.tencent.com/doc/api/403/4398)接口创建。可通过[`DescribeProject`](https://cloud.tencent.com/document/product/378/4400) API返回值中的`projectId`获取。后续使用[DescribeInstances](https://cloud.tencent.com/document/api/213/15728)接口查询实例时,项目ID可用于过滤结果。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` +} + +func (r *ModifyInstancesProjectRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstancesProjectRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "ProjectId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesProjectRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesProjectResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesProjectResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstancesProjectResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesRenewFlagRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 自动续费标识。取值范围:<br><li>NOTIFY_AND_AUTO_RENEW:通知过期且自动续费<br><li>NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费<br><li>DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费<br><br>若该参数指定为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 ModifyInstancesVpcAttributeRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID数组。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 私有网络相关信息配置,通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。<br><li>当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。<br><li>可通过`PrivateIpAddresses`指定私有网络子网IP,若需指定则所有已指定的实例均需要指定子网IP,此时`InstanceIds`与`PrivateIpAddresses`一一对应。<br><li>不指定`PrivateIpAddresses`时随机分配私有网络子网IP。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 是否对运行中的实例选择强制关机。默认为TRUE。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` + + // 是否保留主机名。默认为FALSE。 + ReserveHostName *bool `json:"ReserveHostName,omitempty" name:"ReserveHostName"` +} + +func (r *ModifyInstancesVpcAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstancesVpcAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "VirtualPrivateCloud") + delete(f, "ForceStop") + delete(f, "ReserveHostName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstancesVpcAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyInstancesVpcAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyInstancesVpcAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInstancesVpcAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyKeyPairAttributeRequest struct { + *tchttp.BaseRequest + + // 密钥对ID,密钥对ID形如:`skey-xxxxxxxx`。<br><br>可以通过以下方式获取可用的密钥 ID:<br><li>通过登录[控制台](https://console.cloud.tencent.com/cvm/sshkey)查询密钥 ID。<br><li>通过调用接口 [DescribeKeyPairs](https://cloud.tencent.com/document/api/213/9403) ,取返回信息中的 `KeyId` 获取密钥对 ID。 + KeyId *string `json:"KeyId,omitempty" name:"KeyId"` + + // 修改后的密钥对名称,可由数字,字母和下划线组成,长度不超过25个字符。 + KeyName *string `json:"KeyName,omitempty" name:"KeyName"` + + // 修改后的密钥对描述信息。可任意命名,但不得超过60个字符。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +func (r *ModifyKeyPairAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyKeyPairAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "KeyId") + delete(f, "KeyName") + delete(f, "Description") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyKeyPairAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyKeyPairAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyKeyPairAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyKeyPairAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLaunchTemplateDefaultVersionRequest struct { + *tchttp.BaseRequest + + // 启动模板ID。 + LaunchTemplateId *string `json:"LaunchTemplateId,omitempty" name:"LaunchTemplateId"` + + // 待设置的默认版本号。 + DefaultVersion *int64 `json:"DefaultVersion,omitempty" name:"DefaultVersion"` +} + +func (r *ModifyLaunchTemplateDefaultVersionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLaunchTemplateDefaultVersionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LaunchTemplateId") + delete(f, "DefaultVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyLaunchTemplateDefaultVersionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLaunchTemplateDefaultVersionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyLaunchTemplateDefaultVersionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLaunchTemplateDefaultVersionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type OperationCountLimit struct { + + // 实例操作。取值范围:<br><li>`INSTANCE_DEGRADE`:降配操作<br><li>`INTERNET_CHARGE_TYPE_CHANGE`:修改网络带宽计费模式 + Operation *string `json:"Operation,omitempty" name:"Operation"` + + // 实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 当前已使用次数,如果返回值为-1表示该操作无次数限制。 + CurrentCount *int64 `json:"CurrentCount,omitempty" name:"CurrentCount"` + + // 操作次数最高额度,如果返回值为-1表示该操作无次数限制,如果返回值为0表示不支持调整配置。 + LimitCount *int64 `json:"LimitCount,omitempty" name:"LimitCount"` +} + +type OsVersion struct { + + // 操作系统类型 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 支持的操作系统版本 + OsVersions []*string `json:"OsVersions,omitempty" name:"OsVersions"` + + // 支持的操作系统架构 + Architecture []*string `json:"Architecture,omitempty" name:"Architecture"` +} + +type Placement struct { + + // 实例所属的可用区ID。该参数可以通过调用 [DescribeZones](https://cloud.tencent.com/document/product/213/15707) 的返回值中的Zone字段来获取。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 实例所属项目ID。该参数可以通过调用 [DescribeProject](/document/api/378/4400) 的返回值中的 projectId 字段来获取。不填为默认项目。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 实例所属的专用宿主机ID列表,仅用于入参。如果您有购买专用宿主机并且指定了该参数,则您购买的实例就会随机的部署在这些专用宿主机上。 + HostIds []*string `json:"HostIds,omitempty" name:"HostIds"` + + // 指定母机ip生产子机 + HostIps []*string `json:"HostIps,omitempty" name:"HostIps"` + + // 实例所属的专用宿主机ID,仅用于出参。 + HostId *string `json:"HostId,omitempty" name:"HostId"` +} + +type PostPaidQuota struct { + + // 累计已使用配额 + UsedQuota *uint64 `json:"UsedQuota,omitempty" name:"UsedQuota"` + + // 剩余配额 + RemainingQuota *uint64 `json:"RemainingQuota,omitempty" name:"RemainingQuota"` + + // 总配额 + TotalQuota *uint64 `json:"TotalQuota,omitempty" name:"TotalQuota"` + + // 可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` +} + +type PrePaidQuota struct { + + // 当月已使用配额 + UsedQuota *uint64 `json:"UsedQuota,omitempty" name:"UsedQuota"` + + // 单次购买最大数量 + OnceQuota *uint64 `json:"OnceQuota,omitempty" name:"OnceQuota"` + + // 剩余配额 + RemainingQuota *uint64 `json:"RemainingQuota,omitempty" name:"RemainingQuota"` + + // 总配额 + TotalQuota *uint64 `json:"TotalQuota,omitempty" name:"TotalQuota"` + + // 可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` +} + +type Price struct { + + // 描述了实例价格。 + InstancePrice *ItemPrice `json:"InstancePrice,omitempty" name:"InstancePrice"` + + // 描述了网络价格。 + BandwidthPrice *ItemPrice `json:"BandwidthPrice,omitempty" name:"BandwidthPrice"` +} + +type ProgramFpgaImageRequest struct { + *tchttp.BaseRequest + + // 实例的ID信息。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // FPGA镜像文件的COS URL地址。 + FPGAUrl *string `json:"FPGAUrl,omitempty" name:"FPGAUrl"` + + // 实例上FPGA卡的DBDF号,不填默认烧录FPGA镜像到实例所拥有的所有FPGA卡。 + DBDFs []*string `json:"DBDFs,omitempty" name:"DBDFs"` + + // 试运行,不会执行实际的烧录动作,默认为False。 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` +} + +func (r *ProgramFpgaImageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ProgramFpgaImageRequest) 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, "FPGAUrl") + delete(f, "DBDFs") + delete(f, "DryRun") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ProgramFpgaImageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ProgramFpgaImageResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ProgramFpgaImageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ProgramFpgaImageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type PurchaseReservedInstancesOfferingRequest struct { + *tchttp.BaseRequest + + // 购买预留实例计费数量 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 预留实例计费配置ID + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitempty" name:"ReservedInstancesOfferingId"` + + // 试运行 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。<br>更多详细信息请参阅:如何保证幂等性 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 预留实例显示名称。<br><li>不指定实例显示名称则默认显示‘未命名’。</li><li>最多支持60个字符(包含模式串)。</li> + ReservedInstanceName *string `json:"ReservedInstanceName,omitempty" name:"ReservedInstanceName"` +} + +func (r *PurchaseReservedInstancesOfferingRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PurchaseReservedInstancesOfferingRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceCount") + delete(f, "ReservedInstancesOfferingId") + delete(f, "DryRun") + delete(f, "ClientToken") + delete(f, "ReservedInstanceName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "PurchaseReservedInstancesOfferingRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type PurchaseReservedInstancesOfferingResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 已购买预留实例计费ID + ReservedInstanceId *string `json:"ReservedInstanceId,omitempty" name:"ReservedInstanceId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *PurchaseReservedInstancesOfferingResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *PurchaseReservedInstancesOfferingResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RebootInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 本参数已弃用,推荐使用StopType,不可以与参数StopType同时使用。表示是否在正常重启失败后选择强制重启实例。取值范围:<br><li>TRUE:表示在正常重启失败后进行强制重启<br><li>FALSE:表示在正常重启失败后不进行强制重启<br><br>默认取值:FALSE。 + ForceReboot *bool `json:"ForceReboot,omitempty" name:"ForceReboot"` + + // 关机类型。取值范围:<br><li>SOFT:表示软关机<br><li>HARD:表示硬关机<br><li>SOFT_FIRST:表示优先软关机,失败再执行硬关机<br><br>默认取值:SOFT。 + StopType *string `json:"StopType,omitempty" name:"StopType"` +} + +func (r *RebootInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RebootInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "ForceReboot") + delete(f, "StopType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RebootInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +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"` + + // 地域是否可用状态 + RegionState *string `json:"RegionState,omitempty" name:"RegionState"` +} + +type RenewHostsRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的CDH实例ID。每次请求的CDH实例的上限为100。 + HostIds []*string `json:"HostIds,omitempty" name:"HostIds"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + HostChargePrepaid *ChargePrepaid `json:"HostChargePrepaid,omitempty" name:"HostChargePrepaid"` +} + +func (r *RenewHostsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RenewHostsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "HostIds") + delete(f, "HostChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RenewHostsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RenewHostsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RenewHostsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RenewHostsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RenewInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的续费时长、是否设置自动续费等属性。<dx-alert infotype="explain" title=""> + // 包年包月实例该参数为必传参数。</dx-alert> + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 是否续费弹性数据盘。取值范围:<br><li>TRUE:表示续费包年包月实例同时续费其挂载的弹性数据盘<br><li>FALSE:表示续费包年包月实例同时不再续费其挂载的弹性数据盘<br><br>默认取值:TRUE。 + RenewPortableDataDisk *bool `json:"RenewPortableDataDisk,omitempty" name:"RenewPortableDataDisk"` +} + +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, "RenewPortableDataDisk") + 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 ReservedInstanceConfigInfoItem struct { + + // 实例规格。 + Type *string `json:"Type,omitempty" name:"Type"` + + // 实例规格名称。 + TypeName *string `json:"TypeName,omitempty" name:"TypeName"` + + // 优先级。 + Order *int64 `json:"Order,omitempty" name:"Order"` + + // 实例族信息列表。 + InstanceFamilies []*ReservedInstanceFamilyItem `json:"InstanceFamilies,omitempty" name:"InstanceFamilies"` +} + +type ReservedInstanceFamilyItem struct { + + // 实例族。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // 优先级。 + Order *int64 `json:"Order,omitempty" name:"Order"` + + // 实例类型信息列表。 + InstanceTypes []*ReservedInstanceTypeItem `json:"InstanceTypes,omitempty" name:"InstanceTypes"` +} + +type ReservedInstancePrice struct { + + // 预支合计费用的原价,单位:元。 + OriginalFixedPrice *float64 `json:"OriginalFixedPrice,omitempty" name:"OriginalFixedPrice"` + + // 预支合计费用的折扣价,单位:元。 + DiscountFixedPrice *float64 `json:"DiscountFixedPrice,omitempty" name:"DiscountFixedPrice"` + + // 后续合计费用的原价,单位:元/小时 + OriginalUsagePrice *float64 `json:"OriginalUsagePrice,omitempty" name:"OriginalUsagePrice"` + + // 后续合计费用的折扣价,单位:元/小时 + DiscountUsagePrice *float64 `json:"DiscountUsagePrice,omitempty" name:"DiscountUsagePrice"` +} + +type ReservedInstancePriceItem struct { + + // 付费类型,如:"All Upfront","Partial Upfront","No Upfront" + OfferingType *string `json:"OfferingType,omitempty" name:"OfferingType"` + + // 预支合计费用,单位:元。 + FixedPrice *float64 `json:"FixedPrice,omitempty" name:"FixedPrice"` + + // 后续合计费用,单位:元/小时 + UsagePrice *float64 `json:"UsagePrice,omitempty" name:"UsagePrice"` + + // 预留实例配置ID + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitempty" name:"ReservedInstancesOfferingId"` + + // 预留实例计费可购买的可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 预留实例计费【有效期】即预留实例计费购买时长。形如:31536000。 + // 计量单位:秒 + Duration *uint64 `json:"Duration,omitempty" name:"Duration"` + + // 预留实例计费的平台描述(即操作系统)。形如:linux。 + // 返回项: linux 。 + ProductDescription *string `json:"ProductDescription,omitempty" name:"ProductDescription"` +} + +type ReservedInstanceTypeItem struct { + + // 实例类型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // CPU核数。 + Cpu *uint64 `json:"Cpu,omitempty" name:"Cpu"` + + // 内存大小。 + Memory *uint64 `json:"Memory,omitempty" name:"Memory"` + + // GPU数量。 + Gpu *uint64 `json:"Gpu,omitempty" name:"Gpu"` + + // FPGA数量。 + Fpga *uint64 `json:"Fpga,omitempty" name:"Fpga"` + + // 本地存储块数量。 + StorageBlock *uint64 `json:"StorageBlock,omitempty" name:"StorageBlock"` + + // 网卡数。 + NetworkCard *uint64 `json:"NetworkCard,omitempty" name:"NetworkCard"` + + // 最大带宽。 + MaxBandwidth *float64 `json:"MaxBandwidth,omitempty" name:"MaxBandwidth"` + + // 主频。 + Frequency *string `json:"Frequency,omitempty" name:"Frequency"` + + // CPU型号名称。 + CpuModelName *string `json:"CpuModelName,omitempty" name:"CpuModelName"` + + // 包转发率。 + Pps *uint64 `json:"Pps,omitempty" name:"Pps"` + + // 外部信息。 + Externals *Externals `json:"Externals,omitempty" name:"Externals"` + + // 备注信息。 + Remark *string `json:"Remark,omitempty" name:"Remark"` + + // 预留实例配置价格信息。 + Prices []*ReservedInstancePriceItem `json:"Prices,omitempty" name:"Prices"` +} + +type ReservedInstances struct { + + // 已购买的预留实例计费ID。形如:650c138f-ae7e-4750-952a-96841d6e9fc1。 + ReservedInstancesId *string `json:"ReservedInstancesId,omitempty" name:"ReservedInstancesId"` + + // 预留实例计费的规格。形如:S3.MEDIUM4。 + // 返回项:<a href="https://cloud.tencent.com/document/product/213/11518">预留实例计费规格列表</a> + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 预留实例计费可购买的可用区。形如:ap-guangzhou-1。 + // 返回项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a> + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 预留实例计费开始时间。形如:1949-10-01 00:00:00 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 预留实例计费到期时间。形如:1949-10-01 00:00:00 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // 预留实例计费【有效期】即预留实例计费购买时长。形如:31536000。 + // 计量单位:秒。 + Duration *int64 `json:"Duration,omitempty" name:"Duration"` + + // 已购买的预留实例计费个数。形如:10。 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 描述预留实例计费的平台描述(即操作系统)。形如:linux。 + // 返回项: linux 。 + ProductDescription *string `json:"ProductDescription,omitempty" name:"ProductDescription"` + + // 预留实例计费购买的状态。形如:active + // 返回项: active (以创建) | pending (等待被创建) | retired (过期)。 + State *string `json:"State,omitempty" name:"State"` + + // 可购买的预留实例计费类型的结算货币,使用ISO 4217标准货币代码。形如:USD。 + // 返回项:USD(美元)。 + CurrencyCode *string `json:"CurrencyCode,omitempty" name:"CurrencyCode"` + + // 预留实例计费的付款类型。形如:All Upfront。 + // 返回项: All Upfront (预付全部费用)。 + OfferingType *string `json:"OfferingType,omitempty" name:"OfferingType"` + + // 预留实例计费的类型。形如:S3。 + // 返回项:<a href="https://cloud.tencent.com/document/product/213/11518">预留实例计费类型列表</a> + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` +} + +type ReservedInstancesOffering struct { + + // 预留实例计费可购买的可用区。形如:ap-guangzhou-1。 + // 返回项:<a href="https://cloud.tencent.com/document/product/213/6091">可用区列表</a> + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 可购买的预留实例计费类型的结算货币,使用ISO 4217标准货币代码。 + // 返回项:USD(美元)。 + CurrencyCode *string `json:"CurrencyCode,omitempty" name:"CurrencyCode"` + + // 预留实例计费【有效期】即预留实例计费购买时长。形如:31536000。 + // 计量单位:秒 + Duration *int64 `json:"Duration,omitempty" name:"Duration"` + + // 预留实例计费的购买价格。形如:4000.0。 + // 计量单位:与 currencyCode 一致,目前支持 USD(美元) + FixedPrice *float64 `json:"FixedPrice,omitempty" name:"FixedPrice"` + + // 预留实例计费的实例类型。形如:S3.MEDIUM4。 + // 返回项:<a href="https://cloud.tencent.com/product/cvm/instances">预留实例计费类型列表</a> + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 预留实例计费的付款类型。形如:All Upfront。 + // 返回项: All Upfront (预付全部费用)。 + OfferingType *string `json:"OfferingType,omitempty" name:"OfferingType"` + + // 可购买的预留实例计费配置ID。形如:650c138f-ae7e-4750-952a-96841d6e9fc1。 + ReservedInstancesOfferingId *string `json:"ReservedInstancesOfferingId,omitempty" name:"ReservedInstancesOfferingId"` + + // 预留实例计费的平台描述(即操作系统)。形如:linux。 + // 返回项: linux 。 + ProductDescription *string `json:"ProductDescription,omitempty" name:"ProductDescription"` + + // 扣除预付费之后的使用价格 (按小时计费)。形如:0.0。 + // 目前,因为只支持 All Upfront 付款类型,所以默认为 0元/小时。 + // 计量单位:元/小时,货币单位与 currencyCode 一致,目前支持 USD(美元) + UsagePrice *float64 `json:"UsagePrice,omitempty" name:"UsagePrice"` +} + +type ResetInstanceRequest struct { + *tchttp.BaseRequest + + // 实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。</li> + // <br>默认取值:默认使用当前镜像。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例系统盘配置信息。系统盘为云盘的实例可以通过该参数指定重装后的系统盘大小来实现对系统盘的扩容操作。系统盘大小只支持扩容不支持缩容;重装只支持修改系统盘的大小,不能修改系统盘的类型。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 重装系统时,可以指定修改实例的主机名。<br><li>点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。<br><li>Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。<br><li>其他类型(Linux 等)实例:字符长度为[2, 60],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。 + HostName *string `json:"HostName,omitempty" name:"HostName"` +} + +func (r *ResetInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "ImageId") + delete(f, "SystemDisk") + delete(f, "LoginSettings") + delete(f, "EnhancedService") + delete(f, "HostName") + 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 ResetInstancesInternetMaxBandwidthRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的 `InstanceId` 获取。 每次请求批量实例的上限为100。当调整 `BANDWIDTH_PREPAID` 和 `BANDWIDTH_POSTPAID_BY_HOUR` 计费方式的带宽时,只支持一个实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 公网出带宽配置。不同机型带宽上限范围不一致,具体限制详见带宽限制对账表。暂时只支持 `InternetMaxBandwidthOut` 参数。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 带宽生效的起始时间。格式:`YYYY-MM-DD`,例如:`2016-10-30`。起始时间不能早于当前时间。如果起始时间是今天则新设置的带宽立即生效。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 带宽生效的终止时间。格式: `YYYY-MM-DD` ,例如:`2016-10-30` 。新设置的带宽的有效期包含终止时间此日期。终止时间不能晚于包年包月实例的到期时间。实例的到期时间可通过 [`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`ExpiredTime`获取。该参数只对包年包月带宽有效,其他模式带宽不支持该参数,否则接口会以相应错误码返回。 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` +} + +func (r *ResetInstancesInternetMaxBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetInstancesInternetMaxBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InternetAccessible") + delete(f, "StartTime") + delete(f, "EndTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstancesInternetMaxBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesInternetMaxBandwidthResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetInstancesInternetMaxBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetInstancesInternetMaxBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesPasswordRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。每次请求允许操作的实例数量上限是100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下: + // Linux 实例密码必须8-30位,推荐使用12位以上密码,不能以“/”开头,至少包含以下字符中的三种不同字符,字符种类:<br><li>小写字母:[a-z]<br><li>大写字母:[A-Z]<br><li>数字:0-9<br><li>特殊字符: ()\`\~!@#$%^&\*-+=\_|{}[]:;'<>,.?/ + // Windows 实例密码必须12\~30位,不能以“/”开头且不包括用户名,至少包含以下字符中的三种不同字符<br><li>小写字母:[a-z]<br><li>大写字母:[A-Z]<br><li>数字: 0-9<br><li>特殊字符:()\`\~!@#$%^&\*-+=\_|{}[]:;' <>,.?/<br><li>如果实例即包含 `Linux` 实例又包含 `Windows` 实例,则密码复杂度限制按照 `Windows` 实例的限制。 + Password *string `json:"Password,omitempty" name:"Password"` + + // 待重置密码的实例操作系统的用户名。不得超过64个字符。 + UserName *string `json:"UserName,omitempty" name:"UserName"` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:<br><li>TRUE:表示在正常关机失败后进行强制关机<br><li>FALSE:表示在正常关机失败后不进行强制关机<br><br>默认取值:FALSE。<br><br>强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *ResetInstancesPasswordRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetInstancesPasswordRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "Password") + delete(f, "UserName") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstancesPasswordRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +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 ResetInstancesTypeRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。本接口目前仅支持每次操作1个实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口[`DescribeInstanceTypeConfigs`](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机。取值范围:<br><li>TRUE:表示在正常关机失败后进行强制关机<br><li>FALSE:表示在正常关机失败后不进行强制关机<br><br>默认取值:FALSE。<br><br>强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` +} + +func (r *ResetInstancesTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetInstancesTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "InstanceType") + delete(f, "ForceStop") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetInstancesTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetInstancesTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetInstancesTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetInstancesTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResizeInstanceDisksRequest struct { + *tchttp.BaseRequest + + // 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 待扩容的数据盘配置信息。只支持扩容非弹性数据盘([`DescribeDisks`](https://cloud.tencent.com/document/api/362/16315)接口返回值中的`Portable`为`false`表示非弹性),且[数据盘类型](/document/api/213/9452#block_device)为:`CLOUD_BASIC`、`CLOUD_PREMIUM`、`CLOUD_SSD`。数据盘容量单位:GB。最小扩容步长:10G。关于数据盘类型的选择请参考[硬盘产品简介](https://cloud.tencent.com/document/product/362/2353)。可选数据盘类型受到实例类型`InstanceType`限制。另外允许扩容的最大容量也因数据盘类型的不同而有所差异。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 是否对运行中的实例选择强制关机。建议对运行中的实例先手动关机,然后再重置用户密码。取值范围:<br><li>TRUE:表示在正常关机失败后进行强制关机<br><li>FALSE:表示在正常关机失败后不进行强制关机<br><br>默认取值:FALSE。<br><br>强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` + + // 待扩容的系统盘配置信息。只支持扩容云盘。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 扩容云盘的方式是否为在线扩容。 + ResizeOnline *bool `json:"ResizeOnline,omitempty" name:"ResizeOnline"` +} + +func (r *ResizeInstanceDisksRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResizeInstanceDisksRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "DataDisks") + delete(f, "ForceStop") + delete(f, "SystemDisk") + delete(f, "ResizeOnline") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResizeInstanceDisksRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResizeInstanceDisksResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResizeInstanceDisksResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResizeInstanceDisksResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RunAutomationServiceEnabled struct { + + // 是否开启云自动化助手。取值范围:<br><li>TRUE:表示开启云自动化助手服务<br><li>FALSE:表示不开启云自动化助手服务<br><br>默认取值:FALSE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type RunInstancesRequest struct { + *tchttp.BaseRequest + + // 实例[计费类型](https://cloud.tencent.com/document/product/213/2180)。<br><li>PREPAID:预付费,即包年包月<br><li>POSTPAID_BY_HOUR:按小时后付费<br><li>CDHPAID:独享子机(基于专用宿主机创建,宿主机部分的资源不收费)<br><li>SPOTPAID:竞价付费<br><li>CDCPAID:专用集群付费<br>默认值:POSTPAID_BY_HOUR。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目,所属宿主机(在专用宿主机上创建子机时指定)等属性。 + // <b>注:本数据结构中的Zone为必填参数。</b> + // 如果您不指定LaunchTemplate参数,则Placement为必选参数。若同时传递该参数和LaunchTemplate,则默认覆盖LaunchTemplate中对应的值。 + Placement *Placement `json:"Placement,omitempty" name:"Placement"` + + // 实例机型。不同实例机型指定了不同的资源规格。 + // <br><li>对于付费模式为PREPAID或POSTPAID\_BY\_HOUR的实例创建,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例规格](https://cloud.tencent.com/document/product/213/11518)描述。若不指定该参数,则系统将根据当前地域的资源售卖情况动态指定默认机型。<br><li>对于付费模式为CDHPAID的实例创建,该参数以"CDH_"为前缀,根据CPU和内存配置生成,具体形式为:CDH_XCXG,例如对于创建CPU为1核,内存为1G大小的专用宿主机的实例,该参数应该为CDH_1C1G。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,传入InstanceType获取当前机型支持的镜像列表,取返回信息中的`ImageId`字段。</li> + // 如果您不指定LaunchTemplate参数,则ImageId为必选参数。若同时传递该参数和LaunchTemplate,则默认覆盖LaunchTemplate中对应的值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。 + SystemDisk *SystemDisk `json:"SystemDisk,omitempty" name:"SystemDisk"` + + // 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定21块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含20块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。若不指定该参数,则默认使用基础网络。若在此参数中指定了私有网络IP,即表示每个实例的主网卡IP;同时,InstanceCount参数必须与私有网络IP的个数一致且不能大于20。 + VirtualPrivateCloud *VirtualPrivateCloud `json:"VirtualPrivateCloud,omitempty" name:"VirtualPrivateCloud"` + + // 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。 + InternetAccessible *InternetAccessible `json:"InternetAccessible,omitempty" name:"InternetAccessible"` + + // 购买实例数量。包年包月实例取值范围:[1,300],按量计费实例取值范围:[1,100]。默认取值:1。指定购买实例的数量不能超过用户所能购买的剩余配额数量,具体配额相关限制详见[CVM实例购买限制](https://cloud.tencent.com/document/product/213/2664)。 + InstanceCount *int64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 实例显示名称。<br><li>不指定实例显示名称则默认显示‘未命名’。</li><li>购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server_{R:3}`,购买1台时,实例显示名称为`server_3`;购买2台时,实例显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。</li><li>购买多台实例,如果不指定模式串,则在实例显示名称添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server_`,购买2台时,实例显示名称分别为`server_1`,`server_2`。</li><li>最多支持60个字符(包含模式串)。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。 + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认公共镜像开启云监控、云安全服务;自定义镜像与镜像市场镜像默认不开启云监控,云安全服务,而使用镜像里保留的服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。 + ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"` + + // 实例主机名。<br><li>点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。<br><li>Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。<br><li>其他类型(Linux 等)实例:字符长度为[2, 60],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。<br><li>购买多台实例,如果指定模式串`{R:x}`,表示生成数字`[x, x+n-1]`,其中`n`表示购买实例的数量,例如`server{R:3}`,购买1台时,实例主机名为`server3`;购买2台时,实例主机名分别为`server3`,`server4`。支持指定多个模式串`{R:x}`。</li><br><li>购买多台实例,如果不指定模式串,则在实例主机名添加后缀`1、2...n`,其中`n`表示购买实例的数量,例如`server`,购买2台时,实例主机名分别为`server1`,`server2`。 + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 定时任务。通过该参数可以为实例指定定时任务,目前仅支持定时销毁。 + ActionTimer *ActionTimer `json:"ActionTimer,omitempty" name:"ActionTimer"` + + // 置放群组id,仅支持指定一个。 + DisasterRecoverGroupIds []*string `json:"DisasterRecoverGroupIds,omitempty" name:"DisasterRecoverGroupIds"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的云服务器、云硬盘实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` + + // 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费但没有传递该参数时,默认按当前固定折扣价格出价。 + InstanceMarketOptions *InstanceMarketOptionsRequest `json:"InstanceMarketOptions,omitempty" name:"InstanceMarketOptions"` + + // 提供给实例使用的用户数据,需要以 base64 方式编码,支持的最大数据大小为 16KB。关于获取此参数的详细介绍,请参阅[Windows](https://cloud.tencent.com/document/product/213/17526)和[Linux](https://cloud.tencent.com/document/product/213/17525)启动时运行命令。 + UserData *string `json:"UserData,omitempty" name:"UserData"` + + // 是否只预检此次请求。 + // true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制和云服务器库存。 + // 如果检查不通过,则返回对应错误码; + // 如果检查通过,则返回RequestId. + // false(默认):发送正常请求,通过检查后直接创建实例 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` + + // CAM角色名称。可通过[`DescribeRoleList`](https://cloud.tencent.com/document/product/598/13887)接口返回值中的`roleName`获取。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 高性能计算集群ID。若创建的实例为高性能计算实例,需指定实例放置的集群,否则不可指定。 + HpcClusterId *string `json:"HpcClusterId,omitempty" name:"HpcClusterId"` + + // 实例启动模板。 + LaunchTemplate *LaunchTemplate `json:"LaunchTemplate,omitempty" name:"LaunchTemplate"` +} + +func (r *RunInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RunInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + delete(f, "Placement") + delete(f, "InstanceType") + delete(f, "ImageId") + delete(f, "SystemDisk") + delete(f, "DataDisks") + delete(f, "VirtualPrivateCloud") + delete(f, "InternetAccessible") + delete(f, "InstanceCount") + delete(f, "InstanceName") + delete(f, "LoginSettings") + delete(f, "SecurityGroupIds") + delete(f, "EnhancedService") + delete(f, "ClientToken") + delete(f, "HostName") + delete(f, "ActionTimer") + delete(f, "DisasterRecoverGroupIds") + delete(f, "TagSpecification") + delete(f, "InstanceMarketOptions") + delete(f, "UserData") + delete(f, "DryRun") + delete(f, "CamRoleName") + delete(f, "HpcClusterId") + delete(f, "LaunchTemplate") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RunInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RunInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 当通过本接口来创建实例时会返回该参数,表示一个或多个实例`ID`。返回实例`ID`列表并不代表实例创建成功,可根据 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口查询返回的InstancesSet中对应实例的`ID`的状态来判断创建是否完成;如果实例状态由“准备中”变为“正在运行”,则为创建成功。 + InstanceIdSet []*string `json:"InstanceIdSet,omitempty" name:"InstanceIdSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RunInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RunInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RunMonitorServiceEnabled struct { + + // 是否开启[云监控](/document/product/248)服务。取值范围:<br><li>TRUE:表示开启云监控服务<br><li>FALSE:表示不开启云监控服务<br><br>默认取值:TRUE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type RunSecurityServiceEnabled struct { + + // 是否开启[云安全](/document/product/296)服务。取值范围:<br><li>TRUE:表示开启云安全服务<br><li>FALSE:表示不开启云安全服务<br><br>默认取值:TRUE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type SharePermission struct { + + // 镜像分享时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 镜像分享的账户ID + AccountId *string `json:"AccountId,omitempty" name:"AccountId"` +} + +type Snapshot struct { + + // 快照Id。 + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` + + // 创建此快照的云硬盘类型。取值范围: + // SYSTEM_DISK:系统盘 + // DATA_DISK:数据盘。 + DiskUsage *string `json:"DiskUsage,omitempty" name:"DiskUsage"` + + // 创建此快照的云硬盘大小,单位GB。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` +} + +type SpotMarketOptions struct { + + // 竞价出价 + MaxPrice *string `json:"MaxPrice,omitempty" name:"MaxPrice"` + + // 竞价请求类型,当前仅支持类型:one-time + SpotInstanceType *string `json:"SpotInstanceType,omitempty" name:"SpotInstanceType"` +} + +type SpotPaidQuota struct { + + // 已使用配额,单位:vCPU核心数 + UsedQuota *uint64 `json:"UsedQuota,omitempty" name:"UsedQuota"` + + // 剩余配额,单位:vCPU核心数 + RemainingQuota *uint64 `json:"RemainingQuota,omitempty" name:"RemainingQuota"` + + // 总配额,单位:vCPU核心数 + TotalQuota *uint64 `json:"TotalQuota,omitempty" name:"TotalQuota"` + + // 可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` +} + +type StartInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + 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。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 本参数已弃用,推荐使用StopType,不可以与参数StopType同时使用。表示是否在正常关闭失败后选择强制关闭实例。取值范围:<br><li>TRUE:表示在正常关闭失败后进行强制关闭<br><li>FALSE:表示在正常关闭失败后不进行强制关闭<br><br>默认取值:FALSE。 + ForceStop *bool `json:"ForceStop,omitempty" name:"ForceStop"` + + // 实例的关闭模式。取值范围:<br><li>SOFT_FIRST:表示在正常关闭失败后进行强制关闭<br><li>HARD:直接强制关闭<br><li>SOFT:仅软关机<br>默认取值:SOFT。 + StopType *string `json:"StopType,omitempty" name:"StopType"` + + // 按量计费实例关机收费模式。 + // 取值范围:<br><li>KEEP_CHARGING:关机继续收费<br><li>STOP_CHARGING:关机停止收费<br>默认取值:KEEP_CHARGING。 + // 该参数只针对部分按量计费云硬盘实例生效,详情参考[按量计费实例关机不收费说明](https://cloud.tencent.com/document/product/213/19918) + StoppedMode *string `json:"StoppedMode,omitempty" name:"StoppedMode"` +} + +func (r *StopInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *StopInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceIds") + delete(f, "ForceStop") + delete(f, "StopType") + delete(f, "StoppedMode") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "StopInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +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 StorageBlock struct { + + // HDD本地存储类型,值为:LOCAL_PRO. + // 注意:此字段可能返回 null,表示取不到有效值。 + Type *string `json:"Type,omitempty" name:"Type"` + + // HDD本地存储的最小容量 + // 注意:此字段可能返回 null,表示取不到有效值。 + MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` + + // HDD本地存储的最大容量 + // 注意:此字段可能返回 null,表示取不到有效值。 + MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` +} + +type SyncImagesRequest struct { + *tchttp.BaseRequest + + // 镜像ID列表 ,镜像ID可以通过如下方式获取:<br><li>通过[DescribeImages](https://cloud.tencent.com/document/api/213/15715)接口返回的`ImageId`获取。<br><li>通过[镜像控制台](https://console.cloud.tencent.com/cvm/image)获取。<br>镜像ID必须满足限制:<br><li>镜像ID对应的镜像状态必须为`NORMAL`。<br>镜像状态请参考[镜像数据表](https://cloud.tencent.com/document/product/213/15753#Image)。 + ImageIds []*string `json:"ImageIds,omitempty" name:"ImageIds"` + + // 目的同步地域列表;必须满足限制:<br><li>不能为源地域,<br><li>必须是一个合法的Region。<br><li>暂不支持部分地域同步。<br>具体地域参数请参考[Region](https://cloud.tencent.com/document/product/213/6091)。 + DestinationRegions []*string `json:"DestinationRegions,omitempty" name:"DestinationRegions"` +} + +func (r *SyncImagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SyncImagesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageIds") + delete(f, "DestinationRegions") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SyncImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type SyncImagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SyncImagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SyncImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SystemDisk struct { + + // 系统盘类型。系统盘类型限制详见[存储概述](https://cloud.tencent.com/document/product/213/4952)。取值范围:<br><li>LOCAL_BASIC:本地硬盘<br><li>LOCAL_SSD:本地SSD硬盘<br><li>CLOUD_BASIC:普通云硬盘<br><li>CLOUD_SSD:SSD云硬盘<br><li>CLOUD_PREMIUM:高性能云硬盘<br><br>默认取值:当前有库存的硬盘类型。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 系统盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID。暂时不支持该参数。 + DiskId *string `json:"DiskId,omitempty" name:"DiskId"` + + // 系统盘大小,单位:GB。默认值为 50 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 所属的独享集群ID。 + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` +} + +type Tag struct { + + // 标签键 + Key *string `json:"Key,omitempty" name:"Key"` + + // 标签值 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type TagSpecification struct { + + // 标签绑定的资源类型,云服务器为“instance”,专用宿主机为“host” + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 标签对列表 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +type TerminateInstancesRequest struct { + *tchttp.BaseRequest + + // 一个或多个待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/15728)接口返回值中的`InstanceId`获取。每次请求批量实例的上限为100。 + 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 VirtualPrivateCloud struct { + + // 私有网络ID,形如`vpc-xxx`。有效的VpcId可通过登录[控制台](https://console.cloud.tencent.com/vpc/vpc?rid=1)查询;也可以调用接口 [DescribeVpcEx](/document/api/215/1372) ,从接口返回中的`unVpcId`字段获取。若在创建子机时VpcId与SubnetId同时传入`DEFAULT`,则强制使用默认vpc网络。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 私有网络子网ID,形如`subnet-xxx`。有效的私有网络子网ID可通过登录[控制台](https://console.cloud.tencent.com/vpc/subnet?rid=1)查询;也可以调用接口 [DescribeSubnets](/document/api/215/15784) ,从接口返回中的`unSubnetId`字段获取。若在创建子机时SubnetId与VpcId同时传入`DEFAULT`,则强制使用默认vpc网络。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 是否用作公网网关。公网网关只有在实例拥有公网IP以及处于私有网络下时才能正常使用。取值范围:<br><li>TRUE:表示用作公网网关<br><li>FALSE:表示不作为公网网关<br><br>默认取值:FALSE。 + AsVpcGateway *bool `json:"AsVpcGateway,omitempty" name:"AsVpcGateway"` + + // 私有网络子网 IP 数组,在创建实例、修改实例vpc属性操作中可使用此参数。当前仅批量创建多台实例时支持传入相同子网的多个 IP。 + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` + + // 为弹性网卡指定随机生成的 IPv6 地址数量。 + Ipv6AddressCount *uint64 `json:"Ipv6AddressCount,omitempty" name:"Ipv6AddressCount"` +} + +type ZoneInfo struct { + + // 可用区名称,例如,ap-guangzhou-3 + // 全网可用区名称如下: + // <li> ap-chongqing-1 </li> + // <li> ap-seoul-1 </li> + // <li> ap-seoul-2 </li> + // <li> ap-chengdu-1 </li> + // <li> ap-chengdu-2 </li> + // <li> ap-hongkong-1(售罄) </li> + // <li> ap-hongkong-2 </li> + // <li> ap-hongkong-3 </li> + // <li> ap-shenzhen-fsi-1 </li> + // <li> ap-shenzhen-fsi-2 </li> + // <li> ap-shenzhen-fsi-3 </li> + // <li> ap-guangzhou-1(售罄)</li> + // <li> ap-guangzhou-2(售罄)</li> + // <li> ap-guangzhou-3 </li> + // <li> ap-guangzhou-4 </li> + // <li> ap-guangzhou-6 </li> + // <li> ap-guangzhou-7 </li> + // <li> ap-tokyo-1 </li> + // <li> ap-tokyo-2 </li> + // <li> ap-singapore-1 </li> + // <li> ap-singapore-2 </li> + // <li> ap-singapore-3 </li> + // <li> ap-shanghai-fsi-1 </li> + // <li> ap-shanghai-fsi-2 </li> + // <li> ap-shanghai-fsi-3 </li> + // <li> ap-bangkok-1 </li> + // <li> ap-bangkok-2 </li> + // <li> ap-shanghai-1(售罄) </li> + // <li> ap-shanghai-2 </li> + // <li> ap-shanghai-3 </li> + // <li> ap-shanghai-4 </li> + // <li> ap-shanghai-5 </li> + // <li> ap-mumbai-1 </li> + // <li> ap-mumbai-2 </li> + // <li> eu-moscow-1 </li> + // <li> ap-beijing-1(售罄)</li> + // <li> ap-beijing-2 </li> + // <li> ap-beijing-3 </li> + // <li> ap-beijing-4 </li> + // <li> ap-beijing-5 </li> + // <li> ap-beijing-6 </li> + // <li> ap-beijing-7 </li> + // <li> na-siliconvalley-1 </li> + // <li> na-siliconvalley-2 </li> + // <li> eu-frankfurt-1 </li> + // <li> eu-frankfurt-2 </li> + // <li> na-toronto-1 </li> + // <li> na-ashburn-1 </li> + // <li> na-ashburn-2 </li> + // <li> ap-nanjing-1 </li> + // <li> ap-nanjing-2 </li> + // <li> sa-saopaulo-1</li> + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 可用区描述,例如,广州三区 + ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"` + + // 可用区ID + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 可用区状态,包含AVAILABLE和UNAVAILABLE。AVAILABLE代表可用,UNAVAILABLE代表不可用。 + ZoneState *string `json:"ZoneState,omitempty" name:"ZoneState"` +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/LICENSE b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..efc75a2253eac0053be445ee5f529090466b9faf --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/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/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go new file mode 100644 index 0000000000000000000000000000000000000000..4168729065ef1583036d7971d628ab8f23ecc6ed --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go @@ -0,0 +1,6416 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 v20180525 + +import ( + "context" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const APIVersion = "2018-05-25" + +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 NewAcquireClusterAdminRoleRequest() (request *AcquireClusterAdminRoleRequest) { + request = &AcquireClusterAdminRoleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AcquireClusterAdminRole") + + return +} + +func NewAcquireClusterAdminRoleResponse() (response *AcquireClusterAdminRoleResponse) { + response = &AcquireClusterAdminRoleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AcquireClusterAdminRole +// 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) AcquireClusterAdminRole(request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) { + if request == nil { + request = NewAcquireClusterAdminRoleRequest() + } + + response = NewAcquireClusterAdminRoleResponse() + err = c.Send(request, response) + return +} + +// AcquireClusterAdminRole +// 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) AcquireClusterAdminRoleWithContext(ctx context.Context, request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) { + if request == nil { + request = NewAcquireClusterAdminRoleRequest() + } + request.SetContext(ctx) + + response = NewAcquireClusterAdminRoleResponse() + err = c.Send(request, response) + return +} + +func NewAddClusterCIDRRequest() (request *AddClusterCIDRRequest) { + request = &AddClusterCIDRRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AddClusterCIDR") + + return +} + +func NewAddClusterCIDRResponse() (response *AddClusterCIDRResponse) { + response = &AddClusterCIDRResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddClusterCIDR +// 给GR集群增加可用的ClusterCIDR +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddClusterCIDR(request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) { + if request == nil { + request = NewAddClusterCIDRRequest() + } + + response = NewAddClusterCIDRResponse() + err = c.Send(request, response) + return +} + +// AddClusterCIDR +// 给GR集群增加可用的ClusterCIDR +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddClusterCIDRWithContext(ctx context.Context, request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) { + if request == nil { + request = NewAddClusterCIDRRequest() + } + request.SetContext(ctx) + + response = NewAddClusterCIDRResponse() + err = c.Send(request, response) + return +} + +func NewAddExistedInstancesRequest() (request *AddExistedInstancesRequest) { + request = &AddExistedInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AddExistedInstances") + + return +} + +func NewAddExistedInstancesResponse() (response *AddExistedInstancesResponse) { + response = &AddExistedInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddExistedInstances +// 添加已经存在的实例到集群 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) AddExistedInstances(request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) { + if request == nil { + request = NewAddExistedInstancesRequest() + } + + response = NewAddExistedInstancesResponse() + err = c.Send(request, response) + return +} + +// AddExistedInstances +// 添加已经存在的实例到集群 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) AddExistedInstancesWithContext(ctx context.Context, request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) { + if request == nil { + request = NewAddExistedInstancesRequest() + } + request.SetContext(ctx) + + response = NewAddExistedInstancesResponse() + err = c.Send(request, response) + return +} + +func NewAddNodeToNodePoolRequest() (request *AddNodeToNodePoolRequest) { + request = &AddNodeToNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AddNodeToNodePool") + + return +} + +func NewAddNodeToNodePoolResponse() (response *AddNodeToNodePoolResponse) { + response = &AddNodeToNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddNodeToNodePool +// 将集群内节点移入节点池 +// +// 可能返回的错误码: +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddNodeToNodePool(request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) { + if request == nil { + request = NewAddNodeToNodePoolRequest() + } + + response = NewAddNodeToNodePoolResponse() + err = c.Send(request, response) + return +} + +// AddNodeToNodePool +// 将集群内节点移入节点池 +// +// 可能返回的错误码: +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddNodeToNodePoolWithContext(ctx context.Context, request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) { + if request == nil { + request = NewAddNodeToNodePoolRequest() + } + request.SetContext(ctx) + + response = NewAddNodeToNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewAddVpcCniSubnetsRequest() (request *AddVpcCniSubnetsRequest) { + request = &AddVpcCniSubnetsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AddVpcCniSubnets") + + return +} + +func NewAddVpcCniSubnetsResponse() (response *AddVpcCniSubnetsResponse) { + response = &AddVpcCniSubnetsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddVpcCniSubnets +// 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddVpcCniSubnets(request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) { + if request == nil { + request = NewAddVpcCniSubnetsRequest() + } + + response = NewAddVpcCniSubnetsResponse() + err = c.Send(request, response) + return +} + +// AddVpcCniSubnets +// 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddVpcCniSubnetsWithContext(ctx context.Context, request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) { + if request == nil { + request = NewAddVpcCniSubnetsRequest() + } + request.SetContext(ctx) + + response = NewAddVpcCniSubnetsResponse() + err = c.Send(request, response) + return +} + +func NewCheckInstancesUpgradeAbleRequest() (request *CheckInstancesUpgradeAbleRequest) { + request = &CheckInstancesUpgradeAbleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CheckInstancesUpgradeAble") + + return +} + +func NewCheckInstancesUpgradeAbleResponse() (response *CheckInstancesUpgradeAbleResponse) { + response = &CheckInstancesUpgradeAbleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CheckInstancesUpgradeAble +// 检查给定节点列表中哪些是可升级的 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) CheckInstancesUpgradeAble(request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) { + if request == nil { + request = NewCheckInstancesUpgradeAbleRequest() + } + + response = NewCheckInstancesUpgradeAbleResponse() + err = c.Send(request, response) + return +} + +// CheckInstancesUpgradeAble +// 检查给定节点列表中哪些是可升级的 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) CheckInstancesUpgradeAbleWithContext(ctx context.Context, request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) { + if request == nil { + request = NewCheckInstancesUpgradeAbleRequest() + } + request.SetContext(ctx) + + response = NewCheckInstancesUpgradeAbleResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterRequest() (request *CreateClusterRequest) { + request = &CreateClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateCluster") + + return +} + +func NewCreateClusterResponse() (response *CreateClusterResponse) { + response = &CreateClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateCluster +// 创建集群 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" +// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" +// INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" +// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" +// INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" +// INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" +// INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateClusterResponse, err error) { + if request == nil { + request = NewCreateClusterRequest() + } + + response = NewCreateClusterResponse() + err = c.Send(request, response) + return +} + +// CreateCluster +// 创建集群 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" +// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" +// INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" +// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" +// INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" +// INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" +// INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) CreateClusterWithContext(ctx context.Context, request *CreateClusterRequest) (response *CreateClusterResponse, err error) { + if request == nil { + request = NewCreateClusterRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterAsGroupRequest() (request *CreateClusterAsGroupRequest) { + request = &CreateClusterAsGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterAsGroup") + + return +} + +func NewCreateClusterAsGroupResponse() (response *CreateClusterAsGroupResponse) { + response = &CreateClusterAsGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterAsGroup +// 为已经存在的集群创建伸缩组 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterAsGroup(request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) { + if request == nil { + request = NewCreateClusterAsGroupRequest() + } + + response = NewCreateClusterAsGroupResponse() + err = c.Send(request, response) + return +} + +// CreateClusterAsGroup +// 为已经存在的集群创建伸缩组 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterAsGroupWithContext(ctx context.Context, request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) { + if request == nil { + request = NewCreateClusterAsGroupRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterAsGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterEndpointRequest() (request *CreateClusterEndpointRequest) { + request = &CreateClusterEndpointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpoint") + + return +} + +func NewCreateClusterEndpointResponse() (response *CreateClusterEndpointResponse) { + response = &CreateClusterEndpointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterEndpoint +// 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterEndpoint(request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) { + if request == nil { + request = NewCreateClusterEndpointRequest() + } + + response = NewCreateClusterEndpointResponse() + err = c.Send(request, response) + return +} + +// CreateClusterEndpoint +// 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterEndpointWithContext(ctx context.Context, request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) { + if request == nil { + request = NewCreateClusterEndpointRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterEndpointResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterEndpointVipRequest() (request *CreateClusterEndpointVipRequest) { + request = &CreateClusterEndpointVipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpointVip") + + return +} + +func NewCreateClusterEndpointVipResponse() (response *CreateClusterEndpointVipResponse) { + response = &CreateClusterEndpointVipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterEndpointVip +// 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterEndpointVip(request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) { + if request == nil { + request = NewCreateClusterEndpointVipRequest() + } + + response = NewCreateClusterEndpointVipResponse() + err = c.Send(request, response) + return +} + +// CreateClusterEndpointVip +// 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterEndpointVipWithContext(ctx context.Context, request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) { + if request == nil { + request = NewCreateClusterEndpointVipRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterEndpointVipResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterInstancesRequest() (request *CreateClusterInstancesRequest) { + request = &CreateClusterInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterInstances") + + return +} + +func NewCreateClusterInstancesResponse() (response *CreateClusterInstancesResponse) { + response = &CreateClusterInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterInstances +// 扩展(新建)集群节点 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterInstances(request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) { + if request == nil { + request = NewCreateClusterInstancesRequest() + } + + response = NewCreateClusterInstancesResponse() + err = c.Send(request, response) + return +} + +// CreateClusterInstances +// 扩展(新建)集群节点 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterInstancesWithContext(ctx context.Context, request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) { + if request == nil { + request = NewCreateClusterInstancesRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterInstancesResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterNodePoolRequest() (request *CreateClusterNodePoolRequest) { + request = &CreateClusterNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePool") + + return +} + +func NewCreateClusterNodePoolResponse() (response *CreateClusterNodePoolResponse) { + response = &CreateClusterNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterNodePool +// 创建节点池 +// +// 可能返回的错误码: +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) CreateClusterNodePool(request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) { + if request == nil { + request = NewCreateClusterNodePoolRequest() + } + + response = NewCreateClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +// CreateClusterNodePool +// 创建节点池 +// +// 可能返回的错误码: +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) CreateClusterNodePoolWithContext(ctx context.Context, request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) { + if request == nil { + request = NewCreateClusterNodePoolRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterNodePoolFromExistingAsgRequest() (request *CreateClusterNodePoolFromExistingAsgRequest) { + request = &CreateClusterNodePoolFromExistingAsgRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePoolFromExistingAsg") + + return +} + +func NewCreateClusterNodePoolFromExistingAsgResponse() (response *CreateClusterNodePoolFromExistingAsgResponse) { + response = &CreateClusterNodePoolFromExistingAsgResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterNodePoolFromExistingAsg +// 从伸缩组创建节点池 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) CreateClusterNodePoolFromExistingAsg(request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) { + if request == nil { + request = NewCreateClusterNodePoolFromExistingAsgRequest() + } + + response = NewCreateClusterNodePoolFromExistingAsgResponse() + err = c.Send(request, response) + return +} + +// CreateClusterNodePoolFromExistingAsg +// 从伸缩组创建节点池 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) CreateClusterNodePoolFromExistingAsgWithContext(ctx context.Context, request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) { + if request == nil { + request = NewCreateClusterNodePoolFromExistingAsgRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterNodePoolFromExistingAsgResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterRouteRequest() (request *CreateClusterRouteRequest) { + request = &CreateClusterRouteRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRoute") + + return +} + +func NewCreateClusterRouteResponse() (response *CreateClusterRouteResponse) { + response = &CreateClusterRouteResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterRoute +// 创建集群路由 +// +// 可能返回的错误码: +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" +// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" +func (c *Client) CreateClusterRoute(request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) { + if request == nil { + request = NewCreateClusterRouteRequest() + } + + response = NewCreateClusterRouteResponse() + err = c.Send(request, response) + return +} + +// CreateClusterRoute +// 创建集群路由 +// +// 可能返回的错误码: +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" +// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" +func (c *Client) CreateClusterRouteWithContext(ctx context.Context, request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) { + if request == nil { + request = NewCreateClusterRouteRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterRouteResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterRouteTableRequest() (request *CreateClusterRouteTableRequest) { + request = &CreateClusterRouteTableRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRouteTable") + + return +} + +func NewCreateClusterRouteTableResponse() (response *CreateClusterRouteTableResponse) { + response = &CreateClusterRouteTableResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterRouteTable +// 创建集群路由表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" +// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) CreateClusterRouteTable(request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) { + if request == nil { + request = NewCreateClusterRouteTableRequest() + } + + response = NewCreateClusterRouteTableResponse() + err = c.Send(request, response) + return +} + +// CreateClusterRouteTable +// 创建集群路由表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" +// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) CreateClusterRouteTableWithContext(ctx context.Context, request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) { + if request == nil { + request = NewCreateClusterRouteTableRequest() + } + request.SetContext(ctx) + + response = NewCreateClusterRouteTableResponse() + err = c.Send(request, response) + return +} + +func NewCreateEKSClusterRequest() (request *CreateEKSClusterRequest) { + request = &CreateEKSClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateEKSCluster") + + return +} + +func NewCreateEKSClusterResponse() (response *CreateEKSClusterResponse) { + response = &CreateEKSClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateEKSCluster +// 创建弹性集群 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateEKSCluster(request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) { + if request == nil { + request = NewCreateEKSClusterRequest() + } + + response = NewCreateEKSClusterResponse() + err = c.Send(request, response) + return +} + +// CreateEKSCluster +// 创建弹性集群 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateEKSClusterWithContext(ctx context.Context, request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) { + if request == nil { + request = NewCreateEKSClusterRequest() + } + request.SetContext(ctx) + + response = NewCreateEKSClusterResponse() + err = c.Send(request, response) + return +} + +func NewCreateEKSContainerInstancesRequest() (request *CreateEKSContainerInstancesRequest) { + request = &CreateEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateEKSContainerInstances") + + return +} + +func NewCreateEKSContainerInstancesResponse() (response *CreateEKSContainerInstancesResponse) { + response = &CreateEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateEKSContainerInstances +// 创建容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) CreateEKSContainerInstances(request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewCreateEKSContainerInstancesRequest() + } + + response = NewCreateEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +// CreateEKSContainerInstances +// 创建容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) CreateEKSContainerInstancesWithContext(ctx context.Context, request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewCreateEKSContainerInstancesRequest() + } + request.SetContext(ctx) + + response = NewCreateEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewCreatePrometheusAlertRuleRequest() (request *CreatePrometheusAlertRuleRequest) { + request = &CreatePrometheusAlertRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusAlertRule") + + return +} + +func NewCreatePrometheusAlertRuleResponse() (response *CreatePrometheusAlertRuleResponse) { + response = &CreatePrometheusAlertRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreatePrometheusAlertRule +// 创建告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreatePrometheusAlertRule(request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewCreatePrometheusAlertRuleRequest() + } + + response = NewCreatePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +// CreatePrometheusAlertRule +// 创建告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreatePrometheusAlertRuleWithContext(ctx context.Context, request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewCreatePrometheusAlertRuleRequest() + } + request.SetContext(ctx) + + response = NewCreatePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +func NewCreatePrometheusDashboardRequest() (request *CreatePrometheusDashboardRequest) { + request = &CreatePrometheusDashboardRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusDashboard") + + return +} + +func NewCreatePrometheusDashboardResponse() (response *CreatePrometheusDashboardResponse) { + response = &CreatePrometheusDashboardResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreatePrometheusDashboard +// 创建grafana监控面板 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) CreatePrometheusDashboard(request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) { + if request == nil { + request = NewCreatePrometheusDashboardRequest() + } + + response = NewCreatePrometheusDashboardResponse() + err = c.Send(request, response) + return +} + +// CreatePrometheusDashboard +// 创建grafana监控面板 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) CreatePrometheusDashboardWithContext(ctx context.Context, request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) { + if request == nil { + request = NewCreatePrometheusDashboardRequest() + } + request.SetContext(ctx) + + response = NewCreatePrometheusDashboardResponse() + err = c.Send(request, response) + return +} + +func NewCreatePrometheusTemplateRequest() (request *CreatePrometheusTemplateRequest) { + request = &CreatePrometheusTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusTemplate") + + return +} + +func NewCreatePrometheusTemplateResponse() (response *CreatePrometheusTemplateResponse) { + response = &CreatePrometheusTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreatePrometheusTemplate +// 创建一个云原生Prometheus模板实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) CreatePrometheusTemplate(request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) { + if request == nil { + request = NewCreatePrometheusTemplateRequest() + } + + response = NewCreatePrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +// CreatePrometheusTemplate +// 创建一个云原生Prometheus模板实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) CreatePrometheusTemplateWithContext(ctx context.Context, request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) { + if request == nil { + request = NewCreatePrometheusTemplateRequest() + } + request.SetContext(ctx) + + response = NewCreatePrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterRequest() (request *DeleteClusterRequest) { + request = &DeleteClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteCluster") + + return +} + +func NewDeleteClusterResponse() (response *DeleteClusterResponse) { + response = &DeleteClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteCluster +// 删除集群(YUNAPI V3版本) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +func (c *Client) DeleteCluster(request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) { + if request == nil { + request = NewDeleteClusterRequest() + } + + response = NewDeleteClusterResponse() + err = c.Send(request, response) + return +} + +// DeleteCluster +// 删除集群(YUNAPI V3版本) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +func (c *Client) DeleteClusterWithContext(ctx context.Context, request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) { + if request == nil { + request = NewDeleteClusterRequest() + } + request.SetContext(ctx) + + response = NewDeleteClusterResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterAsGroupsRequest() (request *DeleteClusterAsGroupsRequest) { + request = &DeleteClusterAsGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterAsGroups") + + return +} + +func NewDeleteClusterAsGroupsResponse() (response *DeleteClusterAsGroupsResponse) { + response = &DeleteClusterAsGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterAsGroups +// 删除集群伸缩组 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DeleteClusterAsGroups(request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) { + if request == nil { + request = NewDeleteClusterAsGroupsRequest() + } + + response = NewDeleteClusterAsGroupsResponse() + err = c.Send(request, response) + return +} + +// DeleteClusterAsGroups +// 删除集群伸缩组 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DeleteClusterAsGroupsWithContext(ctx context.Context, request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) { + if request == nil { + request = NewDeleteClusterAsGroupsRequest() + } + request.SetContext(ctx) + + response = NewDeleteClusterAsGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterEndpointRequest() (request *DeleteClusterEndpointRequest) { + request = &DeleteClusterEndpointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpoint") + + return +} + +func NewDeleteClusterEndpointResponse() (response *DeleteClusterEndpointResponse) { + response = &DeleteClusterEndpointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterEndpoint +// 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteClusterEndpoint(request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) { + if request == nil { + request = NewDeleteClusterEndpointRequest() + } + + response = NewDeleteClusterEndpointResponse() + err = c.Send(request, response) + return +} + +// DeleteClusterEndpoint +// 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteClusterEndpointWithContext(ctx context.Context, request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) { + if request == nil { + request = NewDeleteClusterEndpointRequest() + } + request.SetContext(ctx) + + response = NewDeleteClusterEndpointResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterEndpointVipRequest() (request *DeleteClusterEndpointVipRequest) { + request = &DeleteClusterEndpointVipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpointVip") + + return +} + +func NewDeleteClusterEndpointVipResponse() (response *DeleteClusterEndpointVipResponse) { + response = &DeleteClusterEndpointVipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterEndpointVip +// 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteClusterEndpointVip(request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) { + if request == nil { + request = NewDeleteClusterEndpointVipRequest() + } + + response = NewDeleteClusterEndpointVipResponse() + err = c.Send(request, response) + return +} + +// DeleteClusterEndpointVip +// 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteClusterEndpointVipWithContext(ctx context.Context, request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) { + if request == nil { + request = NewDeleteClusterEndpointVipRequest() + } + request.SetContext(ctx) + + response = NewDeleteClusterEndpointVipResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterInstancesRequest() (request *DeleteClusterInstancesRequest) { + request = &DeleteClusterInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterInstances") + + return +} + +func NewDeleteClusterInstancesResponse() (response *DeleteClusterInstancesResponse) { + response = &DeleteClusterInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterInstances +// 删除集群中的实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) DeleteClusterInstances(request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) { + if request == nil { + request = NewDeleteClusterInstancesRequest() + } + + response = NewDeleteClusterInstancesResponse() + err = c.Send(request, response) + return +} + +// DeleteClusterInstances +// 删除集群中的实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) DeleteClusterInstancesWithContext(ctx context.Context, request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) { + if request == nil { + request = NewDeleteClusterInstancesRequest() + } + request.SetContext(ctx) + + response = NewDeleteClusterInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterNodePoolRequest() (request *DeleteClusterNodePoolRequest) { + request = &DeleteClusterNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterNodePool") + + return +} + +func NewDeleteClusterNodePoolResponse() (response *DeleteClusterNodePoolResponse) { + response = &DeleteClusterNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterNodePool +// 删除节点池 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DeleteClusterNodePool(request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) { + if request == nil { + request = NewDeleteClusterNodePoolRequest() + } + + response = NewDeleteClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +// DeleteClusterNodePool +// 删除节点池 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DeleteClusterNodePoolWithContext(ctx context.Context, request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) { + if request == nil { + request = NewDeleteClusterNodePoolRequest() + } + request.SetContext(ctx) + + response = NewDeleteClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterRouteRequest() (request *DeleteClusterRouteRequest) { + request = &DeleteClusterRouteRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRoute") + + return +} + +func NewDeleteClusterRouteResponse() (response *DeleteClusterRouteResponse) { + response = &DeleteClusterRouteResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterRoute +// 删除集群路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DeleteClusterRoute(request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) { + if request == nil { + request = NewDeleteClusterRouteRequest() + } + + response = NewDeleteClusterRouteResponse() + err = c.Send(request, response) + return +} + +// DeleteClusterRoute +// 删除集群路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DeleteClusterRouteWithContext(ctx context.Context, request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) { + if request == nil { + request = NewDeleteClusterRouteRequest() + } + request.SetContext(ctx) + + response = NewDeleteClusterRouteResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterRouteTableRequest() (request *DeleteClusterRouteTableRequest) { + request = &DeleteClusterRouteTableRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRouteTable") + + return +} + +func NewDeleteClusterRouteTableResponse() (response *DeleteClusterRouteTableResponse) { + response = &DeleteClusterRouteTableResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterRouteTable +// 删除集群路由表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +func (c *Client) DeleteClusterRouteTable(request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) { + if request == nil { + request = NewDeleteClusterRouteTableRequest() + } + + response = NewDeleteClusterRouteTableResponse() + err = c.Send(request, response) + return +} + +// DeleteClusterRouteTable +// 删除集群路由表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +func (c *Client) DeleteClusterRouteTableWithContext(ctx context.Context, request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) { + if request == nil { + request = NewDeleteClusterRouteTableRequest() + } + request.SetContext(ctx) + + response = NewDeleteClusterRouteTableResponse() + err = c.Send(request, response) + return +} + +func NewDeleteEKSClusterRequest() (request *DeleteEKSClusterRequest) { + request = &DeleteEKSClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSCluster") + + return +} + +func NewDeleteEKSClusterResponse() (response *DeleteEKSClusterResponse) { + response = &DeleteEKSClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteEKSCluster +// 删除弹性集群(yunapiv3) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteEKSCluster(request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) { + if request == nil { + request = NewDeleteEKSClusterRequest() + } + + response = NewDeleteEKSClusterResponse() + err = c.Send(request, response) + return +} + +// DeleteEKSCluster +// 删除弹性集群(yunapiv3) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteEKSClusterWithContext(ctx context.Context, request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) { + if request == nil { + request = NewDeleteEKSClusterRequest() + } + request.SetContext(ctx) + + response = NewDeleteEKSClusterResponse() + err = c.Send(request, response) + return +} + +func NewDeleteEKSContainerInstancesRequest() (request *DeleteEKSContainerInstancesRequest) { + request = &DeleteEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSContainerInstances") + + return +} + +func NewDeleteEKSContainerInstancesResponse() (response *DeleteEKSContainerInstancesResponse) { + response = &DeleteEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteEKSContainerInstances +// 删除容器实例,可批量删除 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteEKSContainerInstances(request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewDeleteEKSContainerInstancesRequest() + } + + response = NewDeleteEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +// DeleteEKSContainerInstances +// 删除容器实例,可批量删除 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteEKSContainerInstancesWithContext(ctx context.Context, request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewDeleteEKSContainerInstancesRequest() + } + request.SetContext(ctx) + + response = NewDeleteEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDeletePrometheusAlertRuleRequest() (request *DeletePrometheusAlertRuleRequest) { + request = &DeletePrometheusAlertRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusAlertRule") + + return +} + +func NewDeletePrometheusAlertRuleResponse() (response *DeletePrometheusAlertRuleResponse) { + response = &DeletePrometheusAlertRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeletePrometheusAlertRule +// 删除告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DeletePrometheusAlertRule(request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewDeletePrometheusAlertRuleRequest() + } + + response = NewDeletePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +// DeletePrometheusAlertRule +// 删除告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DeletePrometheusAlertRuleWithContext(ctx context.Context, request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewDeletePrometheusAlertRuleRequest() + } + request.SetContext(ctx) + + response = NewDeletePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +func NewDeletePrometheusTemplateRequest() (request *DeletePrometheusTemplateRequest) { + request = &DeletePrometheusTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplate") + + return +} + +func NewDeletePrometheusTemplateResponse() (response *DeletePrometheusTemplateResponse) { + response = &DeletePrometheusTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeletePrometheusTemplate +// 删除一个云原生Prometheus配置模板 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DeletePrometheusTemplate(request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) { + if request == nil { + request = NewDeletePrometheusTemplateRequest() + } + + response = NewDeletePrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +// DeletePrometheusTemplate +// 删除一个云原生Prometheus配置模板 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DeletePrometheusTemplateWithContext(ctx context.Context, request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) { + if request == nil { + request = NewDeletePrometheusTemplateRequest() + } + request.SetContext(ctx) + + response = NewDeletePrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +func NewDeletePrometheusTemplateSyncRequest() (request *DeletePrometheusTemplateSyncRequest) { + request = &DeletePrometheusTemplateSyncRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplateSync") + + return +} + +func NewDeletePrometheusTemplateSyncResponse() (response *DeletePrometheusTemplateSyncResponse) { + response = &DeletePrometheusTemplateSyncResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeletePrometheusTemplateSync +// 取消模板同步,这将会删除目标中该模板所生产的配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DeletePrometheusTemplateSync(request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) { + if request == nil { + request = NewDeletePrometheusTemplateSyncRequest() + } + + response = NewDeletePrometheusTemplateSyncResponse() + err = c.Send(request, response) + return +} + +// DeletePrometheusTemplateSync +// 取消模板同步,这将会删除目标中该模板所生产的配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DeletePrometheusTemplateSyncWithContext(ctx context.Context, request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) { + if request == nil { + request = NewDeletePrometheusTemplateSyncRequest() + } + request.SetContext(ctx) + + response = NewDeletePrometheusTemplateSyncResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAvailableClusterVersionRequest() (request *DescribeAvailableClusterVersionRequest) { + request = &DescribeAvailableClusterVersionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeAvailableClusterVersion") + + return +} + +func NewDescribeAvailableClusterVersionResponse() (response *DescribeAvailableClusterVersionResponse) { + response = &DescribeAvailableClusterVersionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAvailableClusterVersion +// 获取集群可以升级的所有版本 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeAvailableClusterVersion(request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) { + if request == nil { + request = NewDescribeAvailableClusterVersionRequest() + } + + response = NewDescribeAvailableClusterVersionResponse() + err = c.Send(request, response) + return +} + +// DescribeAvailableClusterVersion +// 获取集群可以升级的所有版本 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeAvailableClusterVersionWithContext(ctx context.Context, request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) { + if request == nil { + request = NewDescribeAvailableClusterVersionRequest() + } + request.SetContext(ctx) + + response = NewDescribeAvailableClusterVersionResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterAsGroupOptionRequest() (request *DescribeClusterAsGroupOptionRequest) { + request = &DescribeClusterAsGroupOptionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroupOption") + + return +} + +func NewDescribeClusterAsGroupOptionResponse() (response *DescribeClusterAsGroupOptionResponse) { + response = &DescribeClusterAsGroupOptionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterAsGroupOption +// 集群弹性伸缩配置 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterAsGroupOption(request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) { + if request == nil { + request = NewDescribeClusterAsGroupOptionRequest() + } + + response = NewDescribeClusterAsGroupOptionResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterAsGroupOption +// 集群弹性伸缩配置 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterAsGroupOptionWithContext(ctx context.Context, request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) { + if request == nil { + request = NewDescribeClusterAsGroupOptionRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterAsGroupOptionResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterAsGroupsRequest() (request *DescribeClusterAsGroupsRequest) { + request = &DescribeClusterAsGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroups") + + return +} + +func NewDescribeClusterAsGroupsResponse() (response *DescribeClusterAsGroupsResponse) { + response = &DescribeClusterAsGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterAsGroups +// 集群关联的伸缩组列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +func (c *Client) DescribeClusterAsGroups(request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) { + if request == nil { + request = NewDescribeClusterAsGroupsRequest() + } + + response = NewDescribeClusterAsGroupsResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterAsGroups +// 集群关联的伸缩组列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +func (c *Client) DescribeClusterAsGroupsWithContext(ctx context.Context, request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) { + if request == nil { + request = NewDescribeClusterAsGroupsRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterAsGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterAuthenticationOptionsRequest() (request *DescribeClusterAuthenticationOptionsRequest) { + request = &DescribeClusterAuthenticationOptionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAuthenticationOptions") + + return +} + +func NewDescribeClusterAuthenticationOptionsResponse() (response *DescribeClusterAuthenticationOptionsResponse) { + response = &DescribeClusterAuthenticationOptionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterAuthenticationOptions +// 查看集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterAuthenticationOptions(request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) { + if request == nil { + request = NewDescribeClusterAuthenticationOptionsRequest() + } + + response = NewDescribeClusterAuthenticationOptionsResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterAuthenticationOptions +// 查看集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterAuthenticationOptionsWithContext(ctx context.Context, request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) { + if request == nil { + request = NewDescribeClusterAuthenticationOptionsRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterAuthenticationOptionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterCommonNamesRequest() (request *DescribeClusterCommonNamesRequest) { + request = &DescribeClusterCommonNamesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterCommonNames") + + return +} + +func NewDescribeClusterCommonNamesResponse() (response *DescribeClusterCommonNamesResponse) { + response = &DescribeClusterCommonNamesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterCommonNames +// 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) DescribeClusterCommonNames(request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) { + if request == nil { + request = NewDescribeClusterCommonNamesRequest() + } + + response = NewDescribeClusterCommonNamesResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterCommonNames +// 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) DescribeClusterCommonNamesWithContext(ctx context.Context, request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) { + if request == nil { + request = NewDescribeClusterCommonNamesRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterCommonNamesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterControllersRequest() (request *DescribeClusterControllersRequest) { + request = &DescribeClusterControllersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterControllers") + + return +} + +func NewDescribeClusterControllersResponse() (response *DescribeClusterControllersResponse) { + response = &DescribeClusterControllersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterControllers +// 用于查询Kubernetes的各个原生控制器是否开启 +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DescribeClusterControllers(request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) { + if request == nil { + request = NewDescribeClusterControllersRequest() + } + + response = NewDescribeClusterControllersResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterControllers +// 用于查询Kubernetes的各个原生控制器是否开启 +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DescribeClusterControllersWithContext(ctx context.Context, request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) { + if request == nil { + request = NewDescribeClusterControllersRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterControllersResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterEndpointStatusRequest() (request *DescribeClusterEndpointStatusRequest) { + request = &DescribeClusterEndpointStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointStatus") + + return +} + +func NewDescribeClusterEndpointStatusResponse() (response *DescribeClusterEndpointStatusResponse) { + response = &DescribeClusterEndpointStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterEndpointStatus +// 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterEndpointStatus(request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) { + if request == nil { + request = NewDescribeClusterEndpointStatusRequest() + } + + response = NewDescribeClusterEndpointStatusResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterEndpointStatus +// 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterEndpointStatusWithContext(ctx context.Context, request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) { + if request == nil { + request = NewDescribeClusterEndpointStatusRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterEndpointStatusResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterEndpointVipStatusRequest() (request *DescribeClusterEndpointVipStatusRequest) { + request = &DescribeClusterEndpointVipStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointVipStatus") + + return +} + +func NewDescribeClusterEndpointVipStatusResponse() (response *DescribeClusterEndpointVipStatusResponse) { + response = &DescribeClusterEndpointVipStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterEndpointVipStatus +// 查询集群开启端口流程状态(仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterEndpointVipStatus(request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) { + if request == nil { + request = NewDescribeClusterEndpointVipStatusRequest() + } + + response = NewDescribeClusterEndpointVipStatusResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterEndpointVipStatus +// 查询集群开启端口流程状态(仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterEndpointVipStatusWithContext(ctx context.Context, request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) { + if request == nil { + request = NewDescribeClusterEndpointVipStatusRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterEndpointVipStatusResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterInstancesRequest() (request *DescribeClusterInstancesRequest) { + request = &DescribeClusterInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterInstances") + + return +} + +func NewDescribeClusterInstancesResponse() (response *DescribeClusterInstancesResponse) { + response = &DescribeClusterInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterInstances +// 查询集群下节点实例信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterInstances(request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) { + if request == nil { + request = NewDescribeClusterInstancesRequest() + } + + response = NewDescribeClusterInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterInstances +// 查询集群下节点实例信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterInstancesWithContext(ctx context.Context, request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) { + if request == nil { + request = NewDescribeClusterInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterKubeconfigRequest() (request *DescribeClusterKubeconfigRequest) { + request = &DescribeClusterKubeconfigRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterKubeconfig") + + return +} + +func NewDescribeClusterKubeconfigResponse() (response *DescribeClusterKubeconfigResponse) { + response = &DescribeClusterKubeconfigResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterKubeconfig +// 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClusterKubeconfig(request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) { + if request == nil { + request = NewDescribeClusterKubeconfigRequest() + } + + response = NewDescribeClusterKubeconfigResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterKubeconfig +// 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClusterKubeconfigWithContext(ctx context.Context, request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) { + if request == nil { + request = NewDescribeClusterKubeconfigRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterKubeconfigResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterNodePoolDetailRequest() (request *DescribeClusterNodePoolDetailRequest) { + request = &DescribeClusterNodePoolDetailRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePoolDetail") + + return +} + +func NewDescribeClusterNodePoolDetailResponse() (response *DescribeClusterNodePoolDetailResponse) { + response = &DescribeClusterNodePoolDetailResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterNodePoolDetail +// 查询节点池详情 +// +// 可能返回的错误码: +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeClusterNodePoolDetail(request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) { + if request == nil { + request = NewDescribeClusterNodePoolDetailRequest() + } + + response = NewDescribeClusterNodePoolDetailResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterNodePoolDetail +// 查询节点池详情 +// +// 可能返回的错误码: +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeClusterNodePoolDetailWithContext(ctx context.Context, request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) { + if request == nil { + request = NewDescribeClusterNodePoolDetailRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterNodePoolDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterNodePoolsRequest() (request *DescribeClusterNodePoolsRequest) { + request = &DescribeClusterNodePoolsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePools") + + return +} + +func NewDescribeClusterNodePoolsResponse() (response *DescribeClusterNodePoolsResponse) { + response = &DescribeClusterNodePoolsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterNodePools +// 查询节点池列表 +// +// 可能返回的错误码: +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeClusterNodePools(request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) { + if request == nil { + request = NewDescribeClusterNodePoolsRequest() + } + + response = NewDescribeClusterNodePoolsResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterNodePools +// 查询节点池列表 +// +// 可能返回的错误码: +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeClusterNodePoolsWithContext(ctx context.Context, request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) { + if request == nil { + request = NewDescribeClusterNodePoolsRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterNodePoolsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterRouteTablesRequest() (request *DescribeClusterRouteTablesRequest) { + request = &DescribeClusterRouteTablesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRouteTables") + + return +} + +func NewDescribeClusterRouteTablesResponse() (response *DescribeClusterRouteTablesResponse) { + response = &DescribeClusterRouteTablesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterRouteTables +// 查询集群路由表 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +func (c *Client) DescribeClusterRouteTables(request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) { + if request == nil { + request = NewDescribeClusterRouteTablesRequest() + } + + response = NewDescribeClusterRouteTablesResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterRouteTables +// 查询集群路由表 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +func (c *Client) DescribeClusterRouteTablesWithContext(ctx context.Context, request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) { + if request == nil { + request = NewDescribeClusterRouteTablesRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterRouteTablesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterRoutesRequest() (request *DescribeClusterRoutesRequest) { + request = &DescribeClusterRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRoutes") + + return +} + +func NewDescribeClusterRoutesResponse() (response *DescribeClusterRoutesResponse) { + response = &DescribeClusterRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterRoutes +// 查询集群路由 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeClusterRoutes(request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) { + if request == nil { + request = NewDescribeClusterRoutesRequest() + } + + response = NewDescribeClusterRoutesResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterRoutes +// 查询集群路由 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeClusterRoutesWithContext(ctx context.Context, request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) { + if request == nil { + request = NewDescribeClusterRoutesRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterSecurityRequest() (request *DescribeClusterSecurityRequest) { + request = &DescribeClusterSecurityRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterSecurity") + + return +} + +func NewDescribeClusterSecurityResponse() (response *DescribeClusterSecurityResponse) { + response = &DescribeClusterSecurityResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterSecurity +// 集群的密钥信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_LBCOMMON = "InternalError.LbCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterSecurity(request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) { + if request == nil { + request = NewDescribeClusterSecurityRequest() + } + + response = NewDescribeClusterSecurityResponse() + err = c.Send(request, response) + return +} + +// DescribeClusterSecurity +// 集群的密钥信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_LBCOMMON = "InternalError.LbCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterSecurityWithContext(ctx context.Context, request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) { + if request == nil { + request = NewDescribeClusterSecurityRequest() + } + request.SetContext(ctx) + + response = NewDescribeClusterSecurityResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClustersRequest() (request *DescribeClustersRequest) { + request = &DescribeClustersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusters") + + return +} + +func NewDescribeClustersResponse() (response *DescribeClustersResponse) { + response = &DescribeClustersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusters +// 查询集群列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClusters(request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { + if request == nil { + request = NewDescribeClustersRequest() + } + + response = NewDescribeClustersResponse() + err = c.Send(request, response) + return +} + +// DescribeClusters +// 查询集群列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClustersWithContext(ctx context.Context, request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { + if request == nil { + request = NewDescribeClustersRequest() + } + request.SetContext(ctx) + + response = NewDescribeClustersResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSClusterCredentialRequest() (request *DescribeEKSClusterCredentialRequest) { + request = &DescribeEKSClusterCredentialRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusterCredential") + + return +} + +func NewDescribeEKSClusterCredentialResponse() (response *DescribeEKSClusterCredentialResponse) { + response = &DescribeEKSClusterCredentialResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSClusterCredential +// 获取弹性容器集群的接入认证信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSClusterCredential(request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) { + if request == nil { + request = NewDescribeEKSClusterCredentialRequest() + } + + response = NewDescribeEKSClusterCredentialResponse() + err = c.Send(request, response) + return +} + +// DescribeEKSClusterCredential +// 获取弹性容器集群的接入认证信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSClusterCredentialWithContext(ctx context.Context, request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) { + if request == nil { + request = NewDescribeEKSClusterCredentialRequest() + } + request.SetContext(ctx) + + response = NewDescribeEKSClusterCredentialResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSClustersRequest() (request *DescribeEKSClustersRequest) { + request = &DescribeEKSClustersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusters") + + return +} + +func NewDescribeEKSClustersResponse() (response *DescribeEKSClustersResponse) { + response = &DescribeEKSClustersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSClusters +// 查询弹性集群列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSClusters(request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) { + if request == nil { + request = NewDescribeEKSClustersRequest() + } + + response = NewDescribeEKSClustersResponse() + err = c.Send(request, response) + return +} + +// DescribeEKSClusters +// 查询弹性集群列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSClustersWithContext(ctx context.Context, request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) { + if request == nil { + request = NewDescribeEKSClustersRequest() + } + request.SetContext(ctx) + + response = NewDescribeEKSClustersResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSContainerInstanceEventRequest() (request *DescribeEKSContainerInstanceEventRequest) { + request = &DescribeEKSContainerInstanceEventRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceEvent") + + return +} + +func NewDescribeEKSContainerInstanceEventResponse() (response *DescribeEKSContainerInstanceEventResponse) { + response = &DescribeEKSContainerInstanceEventResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstanceEvent +// 查询容器实例的事件 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSContainerInstanceEvent(request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstanceEventRequest() + } + + response = NewDescribeEKSContainerInstanceEventResponse() + err = c.Send(request, response) + return +} + +// DescribeEKSContainerInstanceEvent +// 查询容器实例的事件 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSContainerInstanceEventWithContext(ctx context.Context, request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstanceEventRequest() + } + request.SetContext(ctx) + + response = NewDescribeEKSContainerInstanceEventResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSContainerInstanceRegionsRequest() (request *DescribeEKSContainerInstanceRegionsRequest) { + request = &DescribeEKSContainerInstanceRegionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceRegions") + + return +} + +func NewDescribeEKSContainerInstanceRegionsResponse() (response *DescribeEKSContainerInstanceRegionsResponse) { + response = &DescribeEKSContainerInstanceRegionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstanceRegions +// 查询容器实例支持的地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeEKSContainerInstanceRegions(request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstanceRegionsRequest() + } + + response = NewDescribeEKSContainerInstanceRegionsResponse() + err = c.Send(request, response) + return +} + +// DescribeEKSContainerInstanceRegions +// 查询容器实例支持的地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeEKSContainerInstanceRegionsWithContext(ctx context.Context, request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstanceRegionsRequest() + } + request.SetContext(ctx) + + response = NewDescribeEKSContainerInstanceRegionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSContainerInstancesRequest() (request *DescribeEKSContainerInstancesRequest) { + request = &DescribeEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstances") + + return +} + +func NewDescribeEKSContainerInstancesResponse() (response *DescribeEKSContainerInstancesResponse) { + response = &DescribeEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstances +// 查询容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeEKSContainerInstances(request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstancesRequest() + } + + response = NewDescribeEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeEKSContainerInstances +// 查询容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeEKSContainerInstancesWithContext(ctx context.Context, request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEksContainerInstanceLogRequest() (request *DescribeEksContainerInstanceLogRequest) { + request = &DescribeEksContainerInstanceLogRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEksContainerInstanceLog") + + return +} + +func NewDescribeEksContainerInstanceLogResponse() (response *DescribeEksContainerInstanceLogResponse) { + response = &DescribeEksContainerInstanceLogResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEksContainerInstanceLog +// 查询容器实例中容器日志 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" +func (c *Client) DescribeEksContainerInstanceLog(request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) { + if request == nil { + request = NewDescribeEksContainerInstanceLogRequest() + } + + response = NewDescribeEksContainerInstanceLogResponse() + err = c.Send(request, response) + return +} + +// DescribeEksContainerInstanceLog +// 查询容器实例中容器日志 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" +func (c *Client) DescribeEksContainerInstanceLogWithContext(ctx context.Context, request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) { + if request == nil { + request = NewDescribeEksContainerInstanceLogRequest() + } + request.SetContext(ctx) + + response = NewDescribeEksContainerInstanceLogResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEnableVpcCniProgressRequest() (request *DescribeEnableVpcCniProgressRequest) { + request = &DescribeEnableVpcCniProgressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEnableVpcCniProgress") + + return +} + +func NewDescribeEnableVpcCniProgressResponse() (response *DescribeEnableVpcCniProgressResponse) { + response = &DescribeEnableVpcCniProgressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEnableVpcCniProgress +// 本接口用于查询开启vpc-cni模式的任务进度 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribeEnableVpcCniProgress(request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { + if request == nil { + request = NewDescribeEnableVpcCniProgressRequest() + } + + response = NewDescribeEnableVpcCniProgressResponse() + err = c.Send(request, response) + return +} + +// DescribeEnableVpcCniProgress +// 本接口用于查询开启vpc-cni模式的任务进度 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribeEnableVpcCniProgressWithContext(ctx context.Context, request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { + if request == nil { + request = NewDescribeEnableVpcCniProgressRequest() + } + request.SetContext(ctx) + + response = NewDescribeEnableVpcCniProgressResponse() + err = c.Send(request, response) + return +} + +func NewDescribeExistedInstancesRequest() (request *DescribeExistedInstancesRequest) { + request = &DescribeExistedInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeExistedInstances") + + return +} + +func NewDescribeExistedInstancesResponse() (response *DescribeExistedInstancesResponse) { + response = &DescribeExistedInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeExistedInstances +// 查询已经存在的节点,判断是否可以加入集群 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeExistedInstances(request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) { + if request == nil { + request = NewDescribeExistedInstancesRequest() + } + + response = NewDescribeExistedInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeExistedInstances +// 查询已经存在的节点,判断是否可以加入集群 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeExistedInstancesWithContext(ctx context.Context, request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) { + if request == nil { + request = NewDescribeExistedInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeExistedInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeExternalClusterSpecRequest() (request *DescribeExternalClusterSpecRequest) { + request = &DescribeExternalClusterSpecRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeExternalClusterSpec") + + return +} + +func NewDescribeExternalClusterSpecResponse() (response *DescribeExternalClusterSpecResponse) { + response = &DescribeExternalClusterSpecResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeExternalClusterSpec +// 获取导入第三方集群YAML定义 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeExternalClusterSpec(request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) { + if request == nil { + request = NewDescribeExternalClusterSpecRequest() + } + + response = NewDescribeExternalClusterSpecResponse() + err = c.Send(request, response) + return +} + +// DescribeExternalClusterSpec +// 获取导入第三方集群YAML定义 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeExternalClusterSpecWithContext(ctx context.Context, request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) { + if request == nil { + request = NewDescribeExternalClusterSpecRequest() + } + request.SetContext(ctx) + + response = NewDescribeExternalClusterSpecResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImagesRequest() (request *DescribeImagesRequest) { + request = &DescribeImagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeImages") + + return +} + +func NewDescribeImagesResponse() (response *DescribeImagesResponse) { + response = &DescribeImagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeImages +// 获取镜像信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { + if request == nil { + request = NewDescribeImagesRequest() + } + + response = NewDescribeImagesResponse() + err = c.Send(request, response) + return +} + +// DescribeImages +// 获取镜像信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeImagesWithContext(ctx context.Context, request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { + if request == nil { + request = NewDescribeImagesRequest() + } + request.SetContext(ctx) + + response = NewDescribeImagesResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusAgentInstancesRequest() (request *DescribePrometheusAgentInstancesRequest) { + request = &DescribePrometheusAgentInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgentInstances") + + return +} + +func NewDescribePrometheusAgentInstancesResponse() (response *DescribePrometheusAgentInstancesResponse) { + response = &DescribePrometheusAgentInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusAgentInstances +// 获取关联目标集群的实例列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribePrometheusAgentInstances(request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) { + if request == nil { + request = NewDescribePrometheusAgentInstancesRequest() + } + + response = NewDescribePrometheusAgentInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusAgentInstances +// 获取关联目标集群的实例列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribePrometheusAgentInstancesWithContext(ctx context.Context, request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) { + if request == nil { + request = NewDescribePrometheusAgentInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusAgentInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusAgentsRequest() (request *DescribePrometheusAgentsRequest) { + request = &DescribePrometheusAgentsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgents") + + return +} + +func NewDescribePrometheusAgentsResponse() (response *DescribePrometheusAgentsResponse) { + response = &DescribePrometheusAgentsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusAgents +// 获取被关联集群列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DescribePrometheusAgents(request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) { + if request == nil { + request = NewDescribePrometheusAgentsRequest() + } + + response = NewDescribePrometheusAgentsResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusAgents +// 获取被关联集群列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DescribePrometheusAgentsWithContext(ctx context.Context, request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) { + if request == nil { + request = NewDescribePrometheusAgentsRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusAgentsResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusAlertHistoryRequest() (request *DescribePrometheusAlertHistoryRequest) { + request = &DescribePrometheusAlertHistoryRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertHistory") + + return +} + +func NewDescribePrometheusAlertHistoryResponse() (response *DescribePrometheusAlertHistoryResponse) { + response = &DescribePrometheusAlertHistoryResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusAlertHistory +// 获取告警历史 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusAlertHistory(request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) { + if request == nil { + request = NewDescribePrometheusAlertHistoryRequest() + } + + response = NewDescribePrometheusAlertHistoryResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusAlertHistory +// 获取告警历史 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusAlertHistoryWithContext(ctx context.Context, request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) { + if request == nil { + request = NewDescribePrometheusAlertHistoryRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusAlertHistoryResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusAlertRuleRequest() (request *DescribePrometheusAlertRuleRequest) { + request = &DescribePrometheusAlertRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertRule") + + return +} + +func NewDescribePrometheusAlertRuleResponse() (response *DescribePrometheusAlertRuleResponse) { + response = &DescribePrometheusAlertRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusAlertRule +// 获取告警规则列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusAlertRule(request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewDescribePrometheusAlertRuleRequest() + } + + response = NewDescribePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusAlertRule +// 获取告警规则列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusAlertRuleWithContext(ctx context.Context, request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewDescribePrometheusAlertRuleRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusInstanceRequest() (request *DescribePrometheusInstanceRequest) { + request = &DescribePrometheusInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusInstance") + + return +} + +func NewDescribePrometheusInstanceResponse() (response *DescribePrometheusInstanceResponse) { + response = &DescribePrometheusInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusInstance +// 获取实例详细信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusInstance(request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) { + if request == nil { + request = NewDescribePrometheusInstanceRequest() + } + + response = NewDescribePrometheusInstanceResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusInstance +// 获取实例详细信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusInstanceWithContext(ctx context.Context, request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) { + if request == nil { + request = NewDescribePrometheusInstanceRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusInstanceResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusOverviewsRequest() (request *DescribePrometheusOverviewsRequest) { + request = &DescribePrometheusOverviewsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusOverviews") + + return +} + +func NewDescribePrometheusOverviewsResponse() (response *DescribePrometheusOverviewsResponse) { + response = &DescribePrometheusOverviewsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusOverviews +// 获取实例列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribePrometheusOverviews(request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) { + if request == nil { + request = NewDescribePrometheusOverviewsRequest() + } + + response = NewDescribePrometheusOverviewsResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusOverviews +// 获取实例列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribePrometheusOverviewsWithContext(ctx context.Context, request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) { + if request == nil { + request = NewDescribePrometheusOverviewsRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusOverviewsResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusTargetsRequest() (request *DescribePrometheusTargetsRequest) { + request = &DescribePrometheusTargetsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTargets") + + return +} + +func NewDescribePrometheusTargetsResponse() (response *DescribePrometheusTargetsResponse) { + response = &DescribePrometheusTargetsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusTargets +// 获取targets信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusTargets(request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) { + if request == nil { + request = NewDescribePrometheusTargetsRequest() + } + + response = NewDescribePrometheusTargetsResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusTargets +// 获取targets信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusTargetsWithContext(ctx context.Context, request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) { + if request == nil { + request = NewDescribePrometheusTargetsRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusTargetsResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusTemplateSyncRequest() (request *DescribePrometheusTemplateSyncRequest) { + request = &DescribePrometheusTemplateSyncRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplateSync") + + return +} + +func NewDescribePrometheusTemplateSyncResponse() (response *DescribePrometheusTemplateSyncResponse) { + response = &DescribePrometheusTemplateSyncResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusTemplateSync +// 获取模板同步信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DescribePrometheusTemplateSync(request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) { + if request == nil { + request = NewDescribePrometheusTemplateSyncRequest() + } + + response = NewDescribePrometheusTemplateSyncResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusTemplateSync +// 获取模板同步信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DescribePrometheusTemplateSyncWithContext(ctx context.Context, request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) { + if request == nil { + request = NewDescribePrometheusTemplateSyncRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusTemplateSyncResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusTemplatesRequest() (request *DescribePrometheusTemplatesRequest) { + request = &DescribePrometheusTemplatesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplates") + + return +} + +func NewDescribePrometheusTemplatesResponse() (response *DescribePrometheusTemplatesResponse) { + response = &DescribePrometheusTemplatesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusTemplates +// 拉取模板列表,默认模板将总是在最前面 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribePrometheusTemplates(request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) { + if request == nil { + request = NewDescribePrometheusTemplatesRequest() + } + + response = NewDescribePrometheusTemplatesResponse() + err = c.Send(request, response) + return +} + +// DescribePrometheusTemplates +// 拉取模板列表,默认模板将总是在最前面 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribePrometheusTemplatesWithContext(ctx context.Context, request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) { + if request == nil { + request = NewDescribePrometheusTemplatesRequest() + } + request.SetContext(ctx) + + response = NewDescribePrometheusTemplatesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) { + request = &DescribeRegionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeRegions") + + return +} + +func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) { + response = &DescribeRegionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRegions +// 获取容器服务支持的所有地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { + if request == nil { + request = NewDescribeRegionsRequest() + } + + response = NewDescribeRegionsResponse() + err = c.Send(request, response) + return +} + +// DescribeRegions +// 获取容器服务支持的所有地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { + if request == nil { + request = NewDescribeRegionsRequest() + } + request.SetContext(ctx) + + response = NewDescribeRegionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRouteTableConflictsRequest() (request *DescribeRouteTableConflictsRequest) { + request = &DescribeRouteTableConflictsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeRouteTableConflicts") + + return +} + +func NewDescribeRouteTableConflictsResponse() (response *DescribeRouteTableConflictsResponse) { + response = &DescribeRouteTableConflictsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRouteTableConflicts +// 查询路由表冲突列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeRouteTableConflicts(request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) { + if request == nil { + request = NewDescribeRouteTableConflictsRequest() + } + + response = NewDescribeRouteTableConflictsResponse() + err = c.Send(request, response) + return +} + +// DescribeRouteTableConflicts +// 查询路由表冲突列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeRouteTableConflictsWithContext(ctx context.Context, request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) { + if request == nil { + request = NewDescribeRouteTableConflictsRequest() + } + request.SetContext(ctx) + + response = NewDescribeRouteTableConflictsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVersionsRequest() (request *DescribeVersionsRequest) { + request = &DescribeVersionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeVersions") + + return +} + +func NewDescribeVersionsResponse() (response *DescribeVersionsResponse) { + response = &DescribeVersionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVersions +// 获取集群版本信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVersions(request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) { + if request == nil { + request = NewDescribeVersionsRequest() + } + + response = NewDescribeVersionsResponse() + err = c.Send(request, response) + return +} + +// DescribeVersions +// 获取集群版本信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVersionsWithContext(ctx context.Context, request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) { + if request == nil { + request = NewDescribeVersionsRequest() + } + request.SetContext(ctx) + + response = NewDescribeVersionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcCniPodLimitsRequest() (request *DescribeVpcCniPodLimitsRequest) { + request = &DescribeVpcCniPodLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeVpcCniPodLimits") + + return +} + +func NewDescribeVpcCniPodLimitsResponse() (response *DescribeVpcCniPodLimitsResponse) { + response = &DescribeVpcCniPodLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcCniPodLimits +// 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVpcCniPodLimits(request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) { + if request == nil { + request = NewDescribeVpcCniPodLimitsRequest() + } + + response = NewDescribeVpcCniPodLimitsResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcCniPodLimits +// 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVpcCniPodLimitsWithContext(ctx context.Context, request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) { + if request == nil { + request = NewDescribeVpcCniPodLimitsRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcCniPodLimitsResponse() + err = c.Send(request, response) + return +} + +func NewDisableClusterDeletionProtectionRequest() (request *DisableClusterDeletionProtectionRequest) { + request = &DisableClusterDeletionProtectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DisableClusterDeletionProtection") + + return +} + +func NewDisableClusterDeletionProtectionResponse() (response *DisableClusterDeletionProtectionResponse) { + response = &DisableClusterDeletionProtectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisableClusterDeletionProtection +// 关闭集群删除保护 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DisableClusterDeletionProtection(request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) { + if request == nil { + request = NewDisableClusterDeletionProtectionRequest() + } + + response = NewDisableClusterDeletionProtectionResponse() + err = c.Send(request, response) + return +} + +// DisableClusterDeletionProtection +// 关闭集群删除保护 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DisableClusterDeletionProtectionWithContext(ctx context.Context, request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) { + if request == nil { + request = NewDisableClusterDeletionProtectionRequest() + } + request.SetContext(ctx) + + response = NewDisableClusterDeletionProtectionResponse() + err = c.Send(request, response) + return +} + +func NewDisableVpcCniNetworkTypeRequest() (request *DisableVpcCniNetworkTypeRequest) { + request = &DisableVpcCniNetworkTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DisableVpcCniNetworkType") + + return +} + +func NewDisableVpcCniNetworkTypeResponse() (response *DisableVpcCniNetworkTypeResponse) { + response = &DisableVpcCniNetworkTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisableVpcCniNetworkType +// 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DisableVpcCniNetworkType(request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) { + if request == nil { + request = NewDisableVpcCniNetworkTypeRequest() + } + + response = NewDisableVpcCniNetworkTypeResponse() + err = c.Send(request, response) + return +} + +// DisableVpcCniNetworkType +// 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DisableVpcCniNetworkTypeWithContext(ctx context.Context, request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) { + if request == nil { + request = NewDisableVpcCniNetworkTypeRequest() + } + request.SetContext(ctx) + + response = NewDisableVpcCniNetworkTypeResponse() + err = c.Send(request, response) + return +} + +func NewEnableClusterDeletionProtectionRequest() (request *EnableClusterDeletionProtectionRequest) { + request = &EnableClusterDeletionProtectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "EnableClusterDeletionProtection") + + return +} + +func NewEnableClusterDeletionProtectionResponse() (response *EnableClusterDeletionProtectionResponse) { + response = &EnableClusterDeletionProtectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableClusterDeletionProtection +// 启用集群删除保护 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) EnableClusterDeletionProtection(request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) { + if request == nil { + request = NewEnableClusterDeletionProtectionRequest() + } + + response = NewEnableClusterDeletionProtectionResponse() + err = c.Send(request, response) + return +} + +// EnableClusterDeletionProtection +// 启用集群删除保护 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) EnableClusterDeletionProtectionWithContext(ctx context.Context, request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) { + if request == nil { + request = NewEnableClusterDeletionProtectionRequest() + } + request.SetContext(ctx) + + response = NewEnableClusterDeletionProtectionResponse() + err = c.Send(request, response) + return +} + +func NewEnableVpcCniNetworkTypeRequest() (request *EnableVpcCniNetworkTypeRequest) { + request = &EnableVpcCniNetworkTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "EnableVpcCniNetworkType") + + return +} + +func NewEnableVpcCniNetworkTypeResponse() (response *EnableVpcCniNetworkTypeResponse) { + response = &EnableVpcCniNetworkTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableVpcCniNetworkType +// GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) EnableVpcCniNetworkType(request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { + if request == nil { + request = NewEnableVpcCniNetworkTypeRequest() + } + + response = NewEnableVpcCniNetworkTypeResponse() + err = c.Send(request, response) + return +} + +// EnableVpcCniNetworkType +// GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) EnableVpcCniNetworkTypeWithContext(ctx context.Context, request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { + if request == nil { + request = NewEnableVpcCniNetworkTypeRequest() + } + request.SetContext(ctx) + + response = NewEnableVpcCniNetworkTypeResponse() + err = c.Send(request, response) + return +} + +func NewForwardApplicationRequestV3Request() (request *ForwardApplicationRequestV3Request) { + request = &ForwardApplicationRequestV3Request{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ForwardApplicationRequestV3") + + return +} + +func NewForwardApplicationRequestV3Response() (response *ForwardApplicationRequestV3Response) { + response = &ForwardApplicationRequestV3Response{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ForwardApplicationRequestV3 +// 操作TKE集群的addon +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) ForwardApplicationRequestV3(request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) { + if request == nil { + request = NewForwardApplicationRequestV3Request() + } + + response = NewForwardApplicationRequestV3Response() + err = c.Send(request, response) + return +} + +// ForwardApplicationRequestV3 +// 操作TKE集群的addon +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) ForwardApplicationRequestV3WithContext(ctx context.Context, request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) { + if request == nil { + request = NewForwardApplicationRequestV3Request() + } + request.SetContext(ctx) + + response = NewForwardApplicationRequestV3Response() + err = c.Send(request, response) + return +} + +func NewGetTkeAppChartListRequest() (request *GetTkeAppChartListRequest) { + request = &GetTkeAppChartListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "GetTkeAppChartList") + + return +} + +func NewGetTkeAppChartListResponse() (response *GetTkeAppChartListResponse) { + response = &GetTkeAppChartListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// GetTkeAppChartList +// 获取TKE支持的App列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) GetTkeAppChartList(request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) { + if request == nil { + request = NewGetTkeAppChartListRequest() + } + + response = NewGetTkeAppChartListResponse() + err = c.Send(request, response) + return +} + +// GetTkeAppChartList +// 获取TKE支持的App列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) GetTkeAppChartListWithContext(ctx context.Context, request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) { + if request == nil { + request = NewGetTkeAppChartListRequest() + } + request.SetContext(ctx) + + response = NewGetTkeAppChartListResponse() + err = c.Send(request, response) + return +} + +func NewGetUpgradeInstanceProgressRequest() (request *GetUpgradeInstanceProgressRequest) { + request = &GetUpgradeInstanceProgressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "GetUpgradeInstanceProgress") + + return +} + +func NewGetUpgradeInstanceProgressResponse() (response *GetUpgradeInstanceProgressResponse) { + response = &GetUpgradeInstanceProgressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// GetUpgradeInstanceProgress +// 获得节点升级当前的进度 +// +// 可能返回的错误码: +// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) GetUpgradeInstanceProgress(request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) { + if request == nil { + request = NewGetUpgradeInstanceProgressRequest() + } + + response = NewGetUpgradeInstanceProgressResponse() + err = c.Send(request, response) + return +} + +// GetUpgradeInstanceProgress +// 获得节点升级当前的进度 +// +// 可能返回的错误码: +// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) GetUpgradeInstanceProgressWithContext(ctx context.Context, request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) { + if request == nil { + request = NewGetUpgradeInstanceProgressRequest() + } + request.SetContext(ctx) + + response = NewGetUpgradeInstanceProgressResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterAsGroupAttributeRequest() (request *ModifyClusterAsGroupAttributeRequest) { + request = &ModifyClusterAsGroupAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupAttribute") + + return +} + +func NewModifyClusterAsGroupAttributeResponse() (response *ModifyClusterAsGroupAttributeResponse) { + response = &ModifyClusterAsGroupAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAsGroupAttribute +// 修改集群伸缩组属性 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" +// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterAsGroupAttribute(request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAsGroupAttributeRequest() + } + + response = NewModifyClusterAsGroupAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyClusterAsGroupAttribute +// 修改集群伸缩组属性 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" +// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterAsGroupAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAsGroupAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyClusterAsGroupAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterAsGroupOptionAttributeRequest() (request *ModifyClusterAsGroupOptionAttributeRequest) { + request = &ModifyClusterAsGroupOptionAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupOptionAttribute") + + return +} + +func NewModifyClusterAsGroupOptionAttributeResponse() (response *ModifyClusterAsGroupOptionAttributeResponse) { + response = &ModifyClusterAsGroupOptionAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAsGroupOptionAttribute +// 修改集群弹性伸缩属性 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterAsGroupOptionAttribute(request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAsGroupOptionAttributeRequest() + } + + response = NewModifyClusterAsGroupOptionAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyClusterAsGroupOptionAttribute +// 修改集群弹性伸缩属性 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterAsGroupOptionAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAsGroupOptionAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyClusterAsGroupOptionAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterAttributeRequest() (request *ModifyClusterAttributeRequest) { + request = &ModifyClusterAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAttribute") + + return +} + +func NewModifyClusterAttributeResponse() (response *ModifyClusterAttributeResponse) { + response = &ModifyClusterAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAttribute +// 修改集群属性 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +func (c *Client) ModifyClusterAttribute(request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAttributeRequest() + } + + response = NewModifyClusterAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyClusterAttribute +// 修改集群属性 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +func (c *Client) ModifyClusterAttributeWithContext(ctx context.Context, request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyClusterAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterAuthenticationOptionsRequest() (request *ModifyClusterAuthenticationOptionsRequest) { + request = &ModifyClusterAuthenticationOptionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAuthenticationOptions") + + return +} + +func NewModifyClusterAuthenticationOptionsResponse() (response *ModifyClusterAuthenticationOptionsResponse) { + response = &ModifyClusterAuthenticationOptionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAuthenticationOptions +// 修改集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) ModifyClusterAuthenticationOptions(request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) { + if request == nil { + request = NewModifyClusterAuthenticationOptionsRequest() + } + + response = NewModifyClusterAuthenticationOptionsResponse() + err = c.Send(request, response) + return +} + +// ModifyClusterAuthenticationOptions +// 修改集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) ModifyClusterAuthenticationOptionsWithContext(ctx context.Context, request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) { + if request == nil { + request = NewModifyClusterAuthenticationOptionsRequest() + } + request.SetContext(ctx) + + response = NewModifyClusterAuthenticationOptionsResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterEndpointSPRequest() (request *ModifyClusterEndpointSPRequest) { + request = &ModifyClusterEndpointSPRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterEndpointSP") + + return +} + +func NewModifyClusterEndpointSPResponse() (response *ModifyClusterEndpointSPResponse) { + response = &ModifyClusterEndpointSPResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterEndpointSP +// 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterEndpointSP(request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) { + if request == nil { + request = NewModifyClusterEndpointSPRequest() + } + + response = NewModifyClusterEndpointSPResponse() + err = c.Send(request, response) + return +} + +// ModifyClusterEndpointSP +// 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterEndpointSPWithContext(ctx context.Context, request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) { + if request == nil { + request = NewModifyClusterEndpointSPRequest() + } + request.SetContext(ctx) + + response = NewModifyClusterEndpointSPResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterNodePoolRequest() (request *ModifyClusterNodePoolRequest) { + request = &ModifyClusterNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterNodePool") + + return +} + +func NewModifyClusterNodePoolResponse() (response *ModifyClusterNodePoolResponse) { + response = &ModifyClusterNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterNodePool +// 编辑节点池 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// OPERATIONDENIED = "OperationDenied" +// UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" +func (c *Client) ModifyClusterNodePool(request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) { + if request == nil { + request = NewModifyClusterNodePoolRequest() + } + + response = NewModifyClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +// ModifyClusterNodePool +// 编辑节点池 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// OPERATIONDENIED = "OperationDenied" +// UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" +func (c *Client) ModifyClusterNodePoolWithContext(ctx context.Context, request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) { + if request == nil { + request = NewModifyClusterNodePoolRequest() + } + request.SetContext(ctx) + + response = NewModifyClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewModifyNodePoolDesiredCapacityAboutAsgRequest() (request *ModifyNodePoolDesiredCapacityAboutAsgRequest) { + request = &ModifyNodePoolDesiredCapacityAboutAsgRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolDesiredCapacityAboutAsg") + + return +} + +func NewModifyNodePoolDesiredCapacityAboutAsgResponse() (response *ModifyNodePoolDesiredCapacityAboutAsgResponse) { + response = &ModifyNodePoolDesiredCapacityAboutAsgResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNodePoolDesiredCapacityAboutAsg +// 修改节点池关联伸缩组的期望实例数 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) ModifyNodePoolDesiredCapacityAboutAsg(request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) { + if request == nil { + request = NewModifyNodePoolDesiredCapacityAboutAsgRequest() + } + + response = NewModifyNodePoolDesiredCapacityAboutAsgResponse() + err = c.Send(request, response) + return +} + +// ModifyNodePoolDesiredCapacityAboutAsg +// 修改节点池关联伸缩组的期望实例数 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) ModifyNodePoolDesiredCapacityAboutAsgWithContext(ctx context.Context, request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) { + if request == nil { + request = NewModifyNodePoolDesiredCapacityAboutAsgRequest() + } + request.SetContext(ctx) + + response = NewModifyNodePoolDesiredCapacityAboutAsgResponse() + err = c.Send(request, response) + return +} + +func NewModifyNodePoolInstanceTypesRequest() (request *ModifyNodePoolInstanceTypesRequest) { + request = &ModifyNodePoolInstanceTypesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolInstanceTypes") + + return +} + +func NewModifyNodePoolInstanceTypesResponse() (response *ModifyNodePoolInstanceTypesResponse) { + response = &ModifyNodePoolInstanceTypesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNodePoolInstanceTypes +// 修改节点池的机型配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) ModifyNodePoolInstanceTypes(request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) { + if request == nil { + request = NewModifyNodePoolInstanceTypesRequest() + } + + response = NewModifyNodePoolInstanceTypesResponse() + err = c.Send(request, response) + return +} + +// ModifyNodePoolInstanceTypes +// 修改节点池的机型配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) ModifyNodePoolInstanceTypesWithContext(ctx context.Context, request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) { + if request == nil { + request = NewModifyNodePoolInstanceTypesRequest() + } + request.SetContext(ctx) + + response = NewModifyNodePoolInstanceTypesResponse() + err = c.Send(request, response) + return +} + +func NewModifyPrometheusAlertRuleRequest() (request *ModifyPrometheusAlertRuleRequest) { + request = &ModifyPrometheusAlertRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusAlertRule") + + return +} + +func NewModifyPrometheusAlertRuleResponse() (response *ModifyPrometheusAlertRuleResponse) { + response = &ModifyPrometheusAlertRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyPrometheusAlertRule +// 修改告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) ModifyPrometheusAlertRule(request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewModifyPrometheusAlertRuleRequest() + } + + response = NewModifyPrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +// ModifyPrometheusAlertRule +// 修改告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) ModifyPrometheusAlertRuleWithContext(ctx context.Context, request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewModifyPrometheusAlertRuleRequest() + } + request.SetContext(ctx) + + response = NewModifyPrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +func NewModifyPrometheusTemplateRequest() (request *ModifyPrometheusTemplateRequest) { + request = &ModifyPrometheusTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusTemplate") + + return +} + +func NewModifyPrometheusTemplateResponse() (response *ModifyPrometheusTemplateResponse) { + response = &ModifyPrometheusTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyPrometheusTemplate +// 修改模板内容 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) ModifyPrometheusTemplate(request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) { + if request == nil { + request = NewModifyPrometheusTemplateRequest() + } + + response = NewModifyPrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +// ModifyPrometheusTemplate +// 修改模板内容 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) ModifyPrometheusTemplateWithContext(ctx context.Context, request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) { + if request == nil { + request = NewModifyPrometheusTemplateRequest() + } + request.SetContext(ctx) + + response = NewModifyPrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +func NewRemoveNodeFromNodePoolRequest() (request *RemoveNodeFromNodePoolRequest) { + request = &RemoveNodeFromNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "RemoveNodeFromNodePool") + + return +} + +func NewRemoveNodeFromNodePoolResponse() (response *RemoveNodeFromNodePoolResponse) { + response = &RemoveNodeFromNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RemoveNodeFromNodePool +// 移出节点池节点,但保留在集群内 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) RemoveNodeFromNodePool(request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) { + if request == nil { + request = NewRemoveNodeFromNodePoolRequest() + } + + response = NewRemoveNodeFromNodePoolResponse() + err = c.Send(request, response) + return +} + +// RemoveNodeFromNodePool +// 移出节点池节点,但保留在集群内 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) RemoveNodeFromNodePoolWithContext(ctx context.Context, request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) { + if request == nil { + request = NewRemoveNodeFromNodePoolRequest() + } + request.SetContext(ctx) + + response = NewRemoveNodeFromNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewRestartEKSContainerInstancesRequest() (request *RestartEKSContainerInstancesRequest) { + request = &RestartEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "RestartEKSContainerInstances") + + return +} + +func NewRestartEKSContainerInstancesResponse() (response *RestartEKSContainerInstancesResponse) { + response = &RestartEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RestartEKSContainerInstances +// 重启弹性容器实例,支持批量操作 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) RestartEKSContainerInstances(request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewRestartEKSContainerInstancesRequest() + } + + response = NewRestartEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +// RestartEKSContainerInstances +// 重启弹性容器实例,支持批量操作 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) RestartEKSContainerInstancesWithContext(ctx context.Context, request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewRestartEKSContainerInstancesRequest() + } + request.SetContext(ctx) + + response = NewRestartEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewScaleInClusterMasterRequest() (request *ScaleInClusterMasterRequest) { + request = &ScaleInClusterMasterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ScaleInClusterMaster") + + return +} + +func NewScaleInClusterMasterResponse() (response *ScaleInClusterMasterResponse) { + response = &ScaleInClusterMasterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ScaleInClusterMaster +// 缩容独立集群master节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ScaleInClusterMaster(request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) { + if request == nil { + request = NewScaleInClusterMasterRequest() + } + + response = NewScaleInClusterMasterResponse() + err = c.Send(request, response) + return +} + +// ScaleInClusterMaster +// 缩容独立集群master节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ScaleInClusterMasterWithContext(ctx context.Context, request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) { + if request == nil { + request = NewScaleInClusterMasterRequest() + } + request.SetContext(ctx) + + response = NewScaleInClusterMasterResponse() + err = c.Send(request, response) + return +} + +func NewScaleOutClusterMasterRequest() (request *ScaleOutClusterMasterRequest) { + request = &ScaleOutClusterMasterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ScaleOutClusterMaster") + + return +} + +func NewScaleOutClusterMasterResponse() (response *ScaleOutClusterMasterResponse) { + response = &ScaleOutClusterMasterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ScaleOutClusterMaster +// 扩容独立集群master节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ScaleOutClusterMaster(request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) { + if request == nil { + request = NewScaleOutClusterMasterRequest() + } + + response = NewScaleOutClusterMasterResponse() + err = c.Send(request, response) + return +} + +// ScaleOutClusterMaster +// 扩容独立集群master节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ScaleOutClusterMasterWithContext(ctx context.Context, request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) { + if request == nil { + request = NewScaleOutClusterMasterRequest() + } + request.SetContext(ctx) + + response = NewScaleOutClusterMasterResponse() + err = c.Send(request, response) + return +} + +func NewSetNodePoolNodeProtectionRequest() (request *SetNodePoolNodeProtectionRequest) { + request = &SetNodePoolNodeProtectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "SetNodePoolNodeProtection") + + return +} + +func NewSetNodePoolNodeProtectionResponse() (response *SetNodePoolNodeProtectionResponse) { + response = &SetNodePoolNodeProtectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// SetNodePoolNodeProtection +// 仅能设置节点池中处于伸缩组的节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) SetNodePoolNodeProtection(request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) { + if request == nil { + request = NewSetNodePoolNodeProtectionRequest() + } + + response = NewSetNodePoolNodeProtectionResponse() + err = c.Send(request, response) + return +} + +// SetNodePoolNodeProtection +// 仅能设置节点池中处于伸缩组的节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) SetNodePoolNodeProtectionWithContext(ctx context.Context, request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) { + if request == nil { + request = NewSetNodePoolNodeProtectionRequest() + } + request.SetContext(ctx) + + response = NewSetNodePoolNodeProtectionResponse() + err = c.Send(request, response) + return +} + +func NewSyncPrometheusTemplateRequest() (request *SyncPrometheusTemplateRequest) { + request = &SyncPrometheusTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "SyncPrometheusTemplate") + + return +} + +func NewSyncPrometheusTemplateResponse() (response *SyncPrometheusTemplateResponse) { + response = &SyncPrometheusTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// SyncPrometheusTemplate +// 同步模板到实例或者集群 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) SyncPrometheusTemplate(request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) { + if request == nil { + request = NewSyncPrometheusTemplateRequest() + } + + response = NewSyncPrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +// SyncPrometheusTemplate +// 同步模板到实例或者集群 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) SyncPrometheusTemplateWithContext(ctx context.Context, request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) { + if request == nil { + request = NewSyncPrometheusTemplateRequest() + } + request.SetContext(ctx) + + response = NewSyncPrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +func NewUpdateClusterVersionRequest() (request *UpdateClusterVersionRequest) { + request = &UpdateClusterVersionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpdateClusterVersion") + + return +} + +func NewUpdateClusterVersionResponse() (response *UpdateClusterVersionResponse) { + response = &UpdateClusterVersionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpdateClusterVersion +// 升级集群 Master 组件到指定版本 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) UpdateClusterVersion(request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) { + if request == nil { + request = NewUpdateClusterVersionRequest() + } + + response = NewUpdateClusterVersionResponse() + err = c.Send(request, response) + return +} + +// UpdateClusterVersion +// 升级集群 Master 组件到指定版本 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) UpdateClusterVersionWithContext(ctx context.Context, request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) { + if request == nil { + request = NewUpdateClusterVersionRequest() + } + request.SetContext(ctx) + + response = NewUpdateClusterVersionResponse() + err = c.Send(request, response) + return +} + +func NewUpdateEKSClusterRequest() (request *UpdateEKSClusterRequest) { + request = &UpdateEKSClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSCluster") + + return +} + +func NewUpdateEKSClusterResponse() (response *UpdateEKSClusterResponse) { + response = &UpdateEKSClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpdateEKSCluster +// 修改弹性集群名称等属性 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateEKSCluster(request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) { + if request == nil { + request = NewUpdateEKSClusterRequest() + } + + response = NewUpdateEKSClusterResponse() + err = c.Send(request, response) + return +} + +// UpdateEKSCluster +// 修改弹性集群名称等属性 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateEKSClusterWithContext(ctx context.Context, request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) { + if request == nil { + request = NewUpdateEKSClusterRequest() + } + request.SetContext(ctx) + + response = NewUpdateEKSClusterResponse() + err = c.Send(request, response) + return +} + +func NewUpdateEKSContainerInstanceRequest() (request *UpdateEKSContainerInstanceRequest) { + request = &UpdateEKSContainerInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSContainerInstance") + + return +} + +func NewUpdateEKSContainerInstanceResponse() (response *UpdateEKSContainerInstanceResponse) { + response = &UpdateEKSContainerInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpdateEKSContainerInstance +// 更新容器实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateEKSContainerInstance(request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) { + if request == nil { + request = NewUpdateEKSContainerInstanceRequest() + } + + response = NewUpdateEKSContainerInstanceResponse() + err = c.Send(request, response) + return +} + +// UpdateEKSContainerInstance +// 更新容器实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateEKSContainerInstanceWithContext(ctx context.Context, request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) { + if request == nil { + request = NewUpdateEKSContainerInstanceRequest() + } + request.SetContext(ctx) + + response = NewUpdateEKSContainerInstanceResponse() + err = c.Send(request, response) + return +} + +func NewUpgradeClusterInstancesRequest() (request *UpgradeClusterInstancesRequest) { + request = &UpgradeClusterInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpgradeClusterInstances") + + return +} + +func NewUpgradeClusterInstancesResponse() (response *UpgradeClusterInstancesResponse) { + response = &UpgradeClusterInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpgradeClusterInstances +// 给集群的一批work节点进行升级 +// +// 可能返回的错误码: +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" +// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) UpgradeClusterInstances(request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) { + if request == nil { + request = NewUpgradeClusterInstancesRequest() + } + + response = NewUpgradeClusterInstancesResponse() + err = c.Send(request, response) + return +} + +// UpgradeClusterInstances +// 给集群的一批work节点进行升级 +// +// 可能返回的错误码: +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" +// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) UpgradeClusterInstancesWithContext(ctx context.Context, request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) { + if request == nil { + request = NewUpgradeClusterInstancesRequest() + } + request.SetContext(ctx) + + response = NewUpgradeClusterInstancesResponse() + err = c.Send(request, response) + return +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go new file mode 100644 index 0000000000000000000000000000000000000000..303637474b79a8b7329eef46090ccb5f7003e07e --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go @@ -0,0 +1,336 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 v20180525 + +const ( + // 此产品的特有错误码 + + // 操作失败。 + FAILEDOPERATION = "FailedOperation" + + // 子账户RBAC权限不足。 + FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" + + // 内部错误。 + INTERNALERROR = "InternalError" + + // 获取用户认证信息失败。 + INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" + + // 账户未通过认证。 + INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" + + // 伸缩组资源创建报错。 + INTERNALERROR_ASCOMMON = "InternalError.AsCommon" + + // 没有权限。 + INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" + + // CIDR和其他集群CIDR冲突。 + INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" + + // CIDR和其他路由冲突。 + INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" + + // CIDR和vpc冲突。 + INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" + + // CIDR和全局路由冲突。 + INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" + + // CIDR无效。 + INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" + + // CIDR掩码无效。 + INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" + + // CIDR不在路由表之内。 + INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" + + // 集群未找到。 + INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" + + // 集群状态错误。 + INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" + + // 集群节点版本过低。 + INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" + + // 执行命令超时。 + INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" + + // 内部HTTP客户端错误。 + INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" + + // 请求(http请求)其他云服务失败。 + INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" + + // 容器未找到。 + INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" + + // 创建集群失败。 + INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" + + // cvm创建节点报错。 + INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" + + // cvm不存在。 + INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" + + // 存在云服务器在CVM侧查询不到。 + INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" + + // cvm状态不正常。 + INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" + + // db错误。 + INTERNALERROR_DB = "InternalError.Db" + + // DB错误。 + INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" + + // 记录未找到。 + INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" + + // 获得当前安全组总数失败。 + INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" + + // 获得安全组配额失败。 + INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" + + // 不支持空集群。 + INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" + + // 下一跳地址已关联CIDR。 + INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" + + // 镜像未找到。 + INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" + + // 初始化master失败。 + INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" + + // 无效CIDR。 + INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" + + // 连接用户Kubernetes集群失败。 + INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" + + // 创建集群Client出错。 + INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" + + // KubernetesAPI错误。 + INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" + + // kubernetes client建立失败。 + INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" + + // 创建Kubernetes资源失败。 + INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" + + // 删除Kubernetes资源失败。 + INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" + + // 获取Kubernetes资源失败。 + INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" + + // Kubernetes未知错误。 + INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" + + // 底层调用CLB未知错误。 + INTERNALERROR_LBCOMMON = "InternalError.LbCommon" + + // 镜像OS不支持。 + INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" + + // Param。 + INTERNALERROR_PARAM = "InternalError.Param" + + // Pod未找到。 + INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" + + // 集群不支持当前操作。 + INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" + + // 超过配额限制。 + INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" + + // 超过配额限制。 + INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" + + // 超过配额限制。 + INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" + + // 安全组配额不足。 + INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" + + // 资源已存在。 + INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" + + // 路由表非空。 + INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" + + // 路由表不存在。 + INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" + + // 创建任务失败。 + INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" + + // 任务当前所处状态不支持此操作。 + INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" + + // 任务未找到。 + INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" + + // 内部错误。 + INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" + + // 未知的内部错误。 + INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" + + // VPC未知错误。 + INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" + + // VPC报错。 + INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" + + // 对等连接不存在。 + INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" + + // 未发现vpc记录。 + INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" + + // 白名单未知错误。 + INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + + // 弹性伸缩组创建参数错误。 + INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" + + // CIDR掩码超出范围(集群CIDR范围 最小值: 10 最大值: 24)。 + INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" + + // CIDR和其他集群CIDR冲突。 + INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" + + // 创建的路由与已存在的其他路由产生冲突。 + INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" + + // CIDR和vpc的CIDR冲突。 + INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" + + // 创建的路由与VPC下已存在的全局路由产生冲突。 + INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" + + // 参数错误,CIDR不符合规范。 + INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" + + // CIDR不在路由表之内。 + INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" + + // 集群ID不存在。 + INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" + + // 下一跳地址已关联CIDR。 + INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" + + // 无效的私有CIDR网段。 + INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" + + // 参数错误。 + INVALIDPARAMETER_PARAM = "InvalidParameter.Param" + + // Prometheus未关联本集群。 + INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" + + // Prometheus实例不存在。 + INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" + + // 资源未找到。 + INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" + + // 路由表非空。 + INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" + + // 超过配额限制。 + LIMITEXCEEDED = "LimitExceeded" + + // 缺少参数错误。 + MISSINGPARAMETER = "MissingParameter" + + // 操作被拒绝。 + OPERATIONDENIED = "OperationDenied" + + // 集群处于删除保护中,禁止删除。 + OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" + + // 资源被占用。 + RESOURCEINUSE = "ResourceInUse" + + // 资源不足。 + RESOURCEINSUFFICIENT = "ResourceInsufficient" + + // 资源不存在。 + RESOURCENOTFOUND = "ResourceNotFound" + + // 伸缩组不存在。 + RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" + + // 集群不存在。 + RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" + + // 用户Kubernetes集群中未找到指定资源。 + RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" + + // 未找到该kubernetes资源。 + RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" + + // 找不到对应路由表。 + RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" + + // 资源不可用。 + RESOURCEUNAVAILABLE = "ResourceUnavailable" + + // 集群状态不支持该操作。 + RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" + + // Eks Container Instance状态不支持改操作。 + RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" + + // 资源售罄。 + RESOURCESSOLDOUT = "ResourcesSoldOut" + + // 未授权操作。 + UNAUTHORIZEDOPERATION = "UnauthorizedOperation" + + // 无该接口CAM权限。 + UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" + + // 未知参数错误。 + UNKNOWNPARAMETER = "UnknownParameter" + + // 操作不支持。 + UNSUPPORTEDOPERATION = "UnsupportedOperation" + + // AS伸缩关闭导致无法开启CA。 + UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" + + // 非白名单用户。 + UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +) diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go new file mode 100644 index 0000000000000000000000000000000000000000..18602f7e13b44cd2c0e118e60a4ee2575c263a7f --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go @@ -0,0 +1,8078 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 v20180525 + +import ( + "encoding/json" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +type AcquireClusterAdminRoleRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *AcquireClusterAdminRoleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AcquireClusterAdminRoleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AcquireClusterAdminRoleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AcquireClusterAdminRoleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AcquireClusterAdminRoleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AcquireClusterAdminRoleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddClusterCIDRRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 增加的ClusterCIDR + ClusterCIDRs []*string `json:"ClusterCIDRs,omitempty" name:"ClusterCIDRs"` + + // 是否忽略ClusterCIDR与VPC路由表的冲突 + IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` +} + +func (r *AddClusterCIDRRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddClusterCIDRRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ClusterCIDRs") + delete(f, "IgnoreClusterCIDRConflict") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddClusterCIDRRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddClusterCIDRResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddClusterCIDRResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddClusterCIDRResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddExistedInstancesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 实例列表,不支持竞价实例 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例额外需要设置参数信息(默认值) + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 节点登录信息(目前仅支持使用Password或者单个KeyIds) + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 重装系统时,可以指定修改实例的HostName(集群为HostName模式时,此参数必传,规则名称除不支持大写字符外与[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口HostName一致) + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。(目前仅支持设置单个sgId) + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 节点池选项 + NodePool *NodePoolOption `json:"NodePool,omitempty" name:"NodePool"` + + // 校验规则相关选项,可配置跳过某些校验规则。目前支持GlobalRouteCIDRCheck(跳过GlobalRouter的相关校验),VpcCniCIDRCheck(跳过VpcCni相关校验) + SkipValidateOptions []*string `json:"SkipValidateOptions,omitempty" name:"SkipValidateOptions"` + + // 参数InstanceAdvancedSettingsOverride数组用于定制化地配置各台instance,与InstanceIds顺序对应。当传入InstanceAdvancedSettingsOverrides数组时,将覆盖默认参数InstanceAdvancedSettings;当没有传入参数InstanceAdvancedSettingsOverrides时,InstanceAdvancedSettings参数对每台instance生效。 + // + // 参数InstanceAdvancedSettingsOverride数组的长度应与InstanceIds数组一致;当长度大于InstanceIds数组长度时将报错;当长度小于InstanceIds数组时,没有对应配置的instace将使用默认配置。 + InstanceAdvancedSettingsOverrides []*InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverrides,omitempty" name:"InstanceAdvancedSettingsOverrides"` +} + +func (r *AddExistedInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddExistedInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "InstanceIds") + delete(f, "InstanceAdvancedSettings") + delete(f, "EnhancedService") + delete(f, "LoginSettings") + delete(f, "HostName") + delete(f, "SecurityGroupIds") + delete(f, "NodePool") + delete(f, "SkipValidateOptions") + delete(f, "InstanceAdvancedSettingsOverrides") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddExistedInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddExistedInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 失败的节点ID + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` + + // 成功的节点ID + // 注意:此字段可能返回 null,表示取不到有效值。 + SuccInstanceIds []*string `json:"SuccInstanceIds,omitempty" name:"SuccInstanceIds"` + + // 超时未返回出来节点的ID(可能失败,也可能成功) + // 注意:此字段可能返回 null,表示取不到有效值。 + TimeoutInstanceIds []*string `json:"TimeoutInstanceIds,omitempty" name:"TimeoutInstanceIds"` + + // 失败的节点的失败原因 + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedReasons []*string `json:"FailedReasons,omitempty" name:"FailedReasons"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddExistedInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddExistedInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddNodeToNodePoolRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点id + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *AddNodeToNodePoolRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddNodeToNodePoolRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "NodePoolId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddNodeToNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddNodeToNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddNodeToNodePoolResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddNodeToNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddVpcCniSubnetsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 为集群容器网络增加的子网列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 集群所属的VPC的ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *AddVpcCniSubnetsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddVpcCniSubnetsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "SubnetIds") + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddVpcCniSubnetsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddVpcCniSubnetsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddVpcCniSubnetsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddVpcCniSubnetsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AppChart struct { + + // chart名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // chart的标签 + // 注意:此字段可能返回 null,表示取不到有效值。 + Label *string `json:"Label,omitempty" name:"Label"` + + // chart的版本 + LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` +} + +type AutoScalingGroupRange struct { + + // 伸缩组最小实例数 + MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` + + // 伸缩组最大实例数 + MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` +} + +type AutoscalingAdded struct { + + // 正在加入中的节点数量 + Joining *int64 `json:"Joining,omitempty" name:"Joining"` + + // 初始化中的节点数量 + Initializing *int64 `json:"Initializing,omitempty" name:"Initializing"` + + // 正常的节点数量 + Normal *int64 `json:"Normal,omitempty" name:"Normal"` + + // 节点总数 + Total *int64 `json:"Total,omitempty" name:"Total"` +} + +type Capabilities struct { + + // 启用安全能力项列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Add []*string `json:"Add,omitempty" name:"Add"` + + // 禁用安全能力向列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Drop []*string `json:"Drop,omitempty" name:"Drop"` +} + +type CbsVolume struct { + + // cbs volume 数据卷名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 腾讯云cbs盘Id + CbsDiskId *string `json:"CbsDiskId,omitempty" name:"CbsDiskId"` +} + +type CheckInstancesUpgradeAbleRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点列表,空为全部节点 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 升级类型 + UpgradeType *string `json:"UpgradeType,omitempty" name:"UpgradeType"` + + // 分页Offset + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 分页Limit + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤 + Filter []*Filter `json:"Filter,omitempty" name:"Filter"` +} + +func (r *CheckInstancesUpgradeAbleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CheckInstancesUpgradeAbleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "InstanceIds") + delete(f, "UpgradeType") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filter") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CheckInstancesUpgradeAbleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CheckInstancesUpgradeAbleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群master当前小版本 + ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` + + // 集群master对应的大版本目前最新小版本 + LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` + + // 可升级节点列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + UpgradeAbleInstances []*UpgradeAbleInstancesItem `json:"UpgradeAbleInstances,omitempty" name:"UpgradeAbleInstances"` + + // 总数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Total *int64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CheckInstancesUpgradeAbleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CheckInstancesUpgradeAbleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Cluster struct { + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 集群描述 + ClusterDescription *string `json:"ClusterDescription,omitempty" name:"ClusterDescription"` + + // 集群版本(默认值为1.10.5) + ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` + + // 集群系统。centos7.2x86_64 或者 ubuntu16.04.1 LTSx86_64,默认取值为ubuntu16.04.1 LTSx86_64 + ClusterOs *string `json:"ClusterOs,omitempty" name:"ClusterOs"` + + // 集群类型,托管集群:MANAGED_CLUSTER,独立集群:INDEPENDENT_CLUSTER。 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 集群网络相关参数 + ClusterNetworkSettings *ClusterNetworkSettings `json:"ClusterNetworkSettings,omitempty" name:"ClusterNetworkSettings"` + + // 集群当前node数量 + ClusterNodeNum *uint64 `json:"ClusterNodeNum,omitempty" name:"ClusterNodeNum"` + + // 集群所属的项目ID + ProjectId *uint64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 标签描述列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` + + // 集群状态 (Running 运行中 Creating 创建中 Abnormal 异常 ) + ClusterStatus *string `json:"ClusterStatus,omitempty" name:"ClusterStatus"` + + // 集群属性(包括集群不同属性的MAP,属性字段包括NodeNameType (lan-ip模式和hostname 模式,默认无lan-ip模式)) + // 注意:此字段可能返回 null,表示取不到有效值。 + Property *string `json:"Property,omitempty" name:"Property"` + + // 集群当前master数量 + ClusterMaterNodeNum *uint64 `json:"ClusterMaterNodeNum,omitempty" name:"ClusterMaterNodeNum"` + + // 集群使用镜像id + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // OsCustomizeType 系统定制类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 集群运行环境docker或container + // 注意:此字段可能返回 null,表示取不到有效值。 + ContainerRuntime *string `json:"ContainerRuntime,omitempty" name:"ContainerRuntime"` + + // 创建时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 删除保护开关 + // 注意:此字段可能返回 null,表示取不到有效值。 + DeletionProtection *bool `json:"DeletionProtection,omitempty" name:"DeletionProtection"` + + // 集群是否开启第三方节点支持 + // 注意:此字段可能返回 null,表示取不到有效值。 + EnableExternalNode *bool `json:"EnableExternalNode,omitempty" name:"EnableExternalNode"` +} + +type ClusterAdvancedSettings struct { + + // 是否启用IPVS + IPVS *bool `json:"IPVS,omitempty" name:"IPVS"` + + // 是否启用集群节点自动扩缩容(创建集群流程不支持开启此功能) + AsEnabled *bool `json:"AsEnabled,omitempty" name:"AsEnabled"` + + // 集群使用的runtime类型,包括"docker"和"containerd"两种类型,默认为"docker" + ContainerRuntime *string `json:"ContainerRuntime,omitempty" name:"ContainerRuntime"` + + // 集群中节点NodeName类型(包括 hostname,lan-ip两种形式,默认为lan-ip。如果开启了hostname模式,创建节点时需要设置HostName参数,并且InstanceName需要和HostName一致) + NodeNameType *string `json:"NodeNameType,omitempty" name:"NodeNameType"` + + // 集群自定义参数 + ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 集群网络类型(包括GR(全局路由)和VPC-CNI两种模式,默认为GR。 + NetworkType *string `json:"NetworkType,omitempty" name:"NetworkType"` + + // 集群VPC-CNI模式是否为非固定IP,默认: FALSE 固定IP。 + IsNonStaticIpMode *bool `json:"IsNonStaticIpMode,omitempty" name:"IsNonStaticIpMode"` + + // 是否启用集群删除保护 + DeletionProtection *bool `json:"DeletionProtection,omitempty" name:"DeletionProtection"` + + // 集群的网络代理模型,目前tke集群支持的网络代理模式有三种:iptables,ipvs,ipvs-bpf,此参数仅在使用ipvs-bpf模式时使用,三种网络模式的参数设置关系如下: + // iptables模式:IPVS和KubeProxyMode都不设置 + // ipvs模式: 设置IPVS为true, KubeProxyMode不设置 + // ipvs-bpf模式: 设置KubeProxyMode为kube-proxy-bpf + // 使用ipvs-bpf的网络模式需要满足以下条件: + // 1. 集群版本必须为1.14及以上; + // 2. 系统镜像必须是: Tencent Linux 2.4; + KubeProxyMode *string `json:"KubeProxyMode,omitempty" name:"KubeProxyMode"` + + // 是否开启审计开关 + AuditEnabled *bool `json:"AuditEnabled,omitempty" name:"AuditEnabled"` + + // 审计日志上传到的logset日志集 + AuditLogsetId *string `json:"AuditLogsetId,omitempty" name:"AuditLogsetId"` + + // 审计日志上传到的topic + AuditLogTopicId *string `json:"AuditLogTopicId,omitempty" name:"AuditLogTopicId"` + + // 区分共享网卡多IP模式和独立网卡模式,共享网卡多 IP 模式填写"tke-route-eni",独立网卡模式填写"tke-direct-eni",默认为共享网卡模式 + VpcCniType *string `json:"VpcCniType,omitempty" name:"VpcCniType"` + + // 运行时版本 + RuntimeVersion *string `json:"RuntimeVersion,omitempty" name:"RuntimeVersion"` + + // 是否开节点podCIDR大小的自定义模式 + EnableCustomizedPodCIDR *bool `json:"EnableCustomizedPodCIDR,omitempty" name:"EnableCustomizedPodCIDR"` + + // 自定义模式下的基础pod数量 + BasePodNumber *int64 `json:"BasePodNumber,omitempty" name:"BasePodNumber"` + + // 启用 CiliumMode 的模式,空值表示不启用,“clusterIP” 表示启用 Cilium 支持 ClusterIP + CiliumMode *string `json:"CiliumMode,omitempty" name:"CiliumMode"` +} + +type ClusterAsGroup struct { + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 伸缩组状态(开启 enabled 开启中 enabling 关闭 disabled 关闭中 disabling 更新中 updating 删除中 deleting 开启缩容中 scaleDownEnabling 关闭缩容中 scaleDownDisabling) + Status *string `json:"Status,omitempty" name:"Status"` + + // 节点是否设置成不可调度 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsUnschedulable *bool `json:"IsUnschedulable,omitempty" name:"IsUnschedulable"` + + // 伸缩组的label列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type ClusterAsGroupAttribute struct { + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 是否开启 + AutoScalingGroupEnabled *bool `json:"AutoScalingGroupEnabled,omitempty" name:"AutoScalingGroupEnabled"` + + // 伸缩组最大最小实例数 + AutoScalingGroupRange *AutoScalingGroupRange `json:"AutoScalingGroupRange,omitempty" name:"AutoScalingGroupRange"` +} + +type ClusterAsGroupOption struct { + + // 是否开启缩容 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsScaleDownEnabled *bool `json:"IsScaleDownEnabled,omitempty" name:"IsScaleDownEnabled"` + + // 多伸缩组情况下扩容选择算法(random 随机选择,most-pods 最多类型的Pod least-waste 最少的资源浪费,默认为random) + // 注意:此字段可能返回 null,表示取不到有效值。 + Expander *string `json:"Expander,omitempty" name:"Expander"` + + // 最大并发缩容数 + // 注意:此字段可能返回 null,表示取不到有效值。 + MaxEmptyBulkDelete *int64 `json:"MaxEmptyBulkDelete,omitempty" name:"MaxEmptyBulkDelete"` + + // 集群扩容后多少分钟开始判断缩容(默认为10分钟) + // 注意:此字段可能返回 null,表示取不到有效值。 + ScaleDownDelay *int64 `json:"ScaleDownDelay,omitempty" name:"ScaleDownDelay"` + + // 节点连续空闲多少分钟后被缩容(默认为 10分钟) + // 注意:此字段可能返回 null,表示取不到有效值。 + ScaleDownUnneededTime *int64 `json:"ScaleDownUnneededTime,omitempty" name:"ScaleDownUnneededTime"` + + // 节点资源使用量低于多少(百分比)时认为空闲(默认: 50(百分比)) + // 注意:此字段可能返回 null,表示取不到有效值。 + ScaleDownUtilizationThreshold *int64 `json:"ScaleDownUtilizationThreshold,omitempty" name:"ScaleDownUtilizationThreshold"` + + // 含有本地存储Pod的节点是否不缩容(默认: FALSE) + // 注意:此字段可能返回 null,表示取不到有效值。 + SkipNodesWithLocalStorage *bool `json:"SkipNodesWithLocalStorage,omitempty" name:"SkipNodesWithLocalStorage"` + + // 含有kube-system namespace下非DaemonSet管理的Pod的节点是否不缩容 (默认: FALSE) + // 注意:此字段可能返回 null,表示取不到有效值。 + SkipNodesWithSystemPods *bool `json:"SkipNodesWithSystemPods,omitempty" name:"SkipNodesWithSystemPods"` + + // 计算资源使用量时是否默认忽略DaemonSet的实例(默认值: False,不忽略) + // 注意:此字段可能返回 null,表示取不到有效值。 + IgnoreDaemonSetsUtilization *bool `json:"IgnoreDaemonSetsUtilization,omitempty" name:"IgnoreDaemonSetsUtilization"` + + // CA做健康性判断的个数,默认3,即超过OkTotalUnreadyCount个数后,CA会进行健康性判断。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OkTotalUnreadyCount *int64 `json:"OkTotalUnreadyCount,omitempty" name:"OkTotalUnreadyCount"` + + // 未就绪节点的最大百分比,此后CA会停止操作 + // 注意:此字段可能返回 null,表示取不到有效值。 + MaxTotalUnreadyPercentage *int64 `json:"MaxTotalUnreadyPercentage,omitempty" name:"MaxTotalUnreadyPercentage"` + + // 表示未准备就绪的节点在有资格进行缩减之前应该停留多长时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + ScaleDownUnreadyTime *int64 `json:"ScaleDownUnreadyTime,omitempty" name:"ScaleDownUnreadyTime"` + + // CA删除未在Kubernetes中注册的节点之前等待的时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnregisteredNodeRemovalTime *int64 `json:"UnregisteredNodeRemovalTime,omitempty" name:"UnregisteredNodeRemovalTime"` +} + +type ClusterBasicSettings struct { + + // 集群系统。centos7.2x86_64 或者 ubuntu16.04.1 LTSx86_64,默认取值为ubuntu16.04.1 LTSx86_64 + ClusterOs *string `json:"ClusterOs,omitempty" name:"ClusterOs"` + + // 集群版本,默认值为1.10.5 + ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 集群描述 + ClusterDescription *string `json:"ClusterDescription,omitempty" name:"ClusterDescription"` + + // 私有网络ID,形如vpc-xxx。创建托管空集群时必传。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 集群内新增资源所属项目ID。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到集群实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` + + // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 是否开启节点的默认安全组(默认: 否,Aphla特性) + NeedWorkSecurityGroup *bool `json:"NeedWorkSecurityGroup,omitempty" name:"NeedWorkSecurityGroup"` + + // 当选择Cilium Overlay网络插件时,TKE会从该子网获取2个IP用来创建内网负载均衡 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` +} + +type ClusterCIDRSettings struct { + + // 用于分配集群容器和服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突。且网段范围必须在内网网段内,例如:10.1.0.0/14, 192.168.0.1/18,172.16.0.0/16。 + ClusterCIDR *string `json:"ClusterCIDR,omitempty" name:"ClusterCIDR"` + + // 是否忽略 ClusterCIDR 冲突错误, 默认不忽略 + IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` + + // 集群中每个Node上最大的Pod数量。取值范围4~256。不为2的幂值时会向上取最接近的2的幂值。 + MaxNodePodNum *uint64 `json:"MaxNodePodNum,omitempty" name:"MaxNodePodNum"` + + // 集群最大的service数量。取值范围32~32768,不为2的幂值时会向上取最接近的2的幂值。默认值256 + MaxClusterServiceNum *uint64 `json:"MaxClusterServiceNum,omitempty" name:"MaxClusterServiceNum"` + + // 用于分配集群服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突。且网段范围必须在内网网段内,例如:10.1.0.0/14, 192.168.0.1/18,172.16.0.0/16。 + ServiceCIDR *string `json:"ServiceCIDR,omitempty" name:"ServiceCIDR"` + + // VPC-CNI网络模式下,弹性网卡的子网Id。 + EniSubnetIds []*string `json:"EniSubnetIds,omitempty" name:"EniSubnetIds"` + + // VPC-CNI网络模式下,弹性网卡IP的回收时间,取值范围[300,15768000) + ClaimExpiredSeconds *int64 `json:"ClaimExpiredSeconds,omitempty" name:"ClaimExpiredSeconds"` +} + +type ClusterCredential struct { + + // CA 根证书 + CACert *string `json:"CACert,omitempty" name:"CACert"` + + // 认证用的Token + Token *string `json:"Token,omitempty" name:"Token"` +} + +type ClusterExtraArgs struct { + + // kube-apiserver自定义参数,参数格式为["k1=v1", "k1=v2"], 例如["max-requests-inflight=500","feature-gates=PodShareProcessNamespace=true,DynamicKubeletConfig=true"] + // 注意:此字段可能返回 null,表示取不到有效值。 + KubeAPIServer []*string `json:"KubeAPIServer,omitempty" name:"KubeAPIServer"` + + // kube-controller-manager自定义参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + KubeControllerManager []*string `json:"KubeControllerManager,omitempty" name:"KubeControllerManager"` + + // kube-scheduler自定义参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + KubeScheduler []*string `json:"KubeScheduler,omitempty" name:"KubeScheduler"` + + // etcd自定义参数,只支持独立集群 + // 注意:此字段可能返回 null,表示取不到有效值。 + Etcd []*string `json:"Etcd,omitempty" name:"Etcd"` +} + +type ClusterInternalLB struct { + + // 是否开启内网访问LB + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 内网访问LB关联的子网Id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` +} + +type ClusterNetworkSettings struct { + + // 用于分配集群容器和服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突 + ClusterCIDR *string `json:"ClusterCIDR,omitempty" name:"ClusterCIDR"` + + // 是否忽略 ClusterCIDR 冲突错误, 默认不忽略 + IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` + + // 集群中每个Node上最大的Pod数量(默认为256) + MaxNodePodNum *uint64 `json:"MaxNodePodNum,omitempty" name:"MaxNodePodNum"` + + // 集群最大的service数量(默认为256) + MaxClusterServiceNum *uint64 `json:"MaxClusterServiceNum,omitempty" name:"MaxClusterServiceNum"` + + // 是否启用IPVS(默认不开启) + Ipvs *bool `json:"Ipvs,omitempty" name:"Ipvs"` + + // 集群的VPCID(如果创建空集群,为必传值,否则自动设置为和集群的节点保持一致) + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 网络插件是否启用CNI(默认开启) + Cni *bool `json:"Cni,omitempty" name:"Cni"` + + // service的网络模式,当前参数只适用于ipvs+bpf模式 + // 注意:此字段可能返回 null,表示取不到有效值。 + KubeProxyMode *string `json:"KubeProxyMode,omitempty" name:"KubeProxyMode"` + + // 用于分配service的IP range,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceCIDR *string `json:"ServiceCIDR,omitempty" name:"ServiceCIDR"` + + // 集群关联的容器子网 + // 注意:此字段可能返回 null,表示取不到有效值。 + Subnets []*string `json:"Subnets,omitempty" name:"Subnets"` +} + +type ClusterPublicLB struct { + + // 是否开启公网访问LB + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 允许访问的来源CIDR列表 + AllowFromCidrs []*string `json:"AllowFromCidrs,omitempty" name:"AllowFromCidrs"` + + // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) + SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` + + // 外网访问相关的扩展参数,格式为json + ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` + + // 新内外网功能,需要传递安全组 + SecurityGroup *string `json:"SecurityGroup,omitempty" name:"SecurityGroup"` +} + +type ClusterVersion struct { + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群主版本号列表,例如1.18.4 + Versions []*string `json:"Versions,omitempty" name:"Versions"` +} + +type CommonName struct { + + // 子账户UIN + SubaccountUin *string `json:"SubaccountUin,omitempty" name:"SubaccountUin"` + + // 子账户客户端证书中的CommonName字段 + CN *string `json:"CN,omitempty" name:"CN"` +} + +type Container struct { + + // 镜像 + Image *string `json:"Image,omitempty" name:"Image"` + + // 容器名 + Name *string `json:"Name,omitempty" name:"Name"` + + // 容器启动命令 + Commands []*string `json:"Commands,omitempty" name:"Commands"` + + // 容器启动参数 + Args []*string `json:"Args,omitempty" name:"Args"` + + // 容器内操作系统的环境变量 + EnvironmentVars []*EnvironmentVariable `json:"EnvironmentVars,omitempty" name:"EnvironmentVars"` + + // CPU,制改容器最多可使用的核数,该值不可超过容器实例的总核数。单位:核。 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 内存,限制该容器最多可使用的内存值,该值不可超过容器实例的总内存值。单位:GiB + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // 数据卷挂载信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + VolumeMounts []*VolumeMount `json:"VolumeMounts,omitempty" name:"VolumeMounts"` + + // 当前状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + CurrentState *ContainerState `json:"CurrentState,omitempty" name:"CurrentState"` + + // 重启次数 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartCount *uint64 `json:"RestartCount,omitempty" name:"RestartCount"` + + // 容器工作目录 + // 注意:此字段可能返回 null,表示取不到有效值。 + WorkingDir *string `json:"WorkingDir,omitempty" name:"WorkingDir"` + + // 存活探针 + // 注意:此字段可能返回 null,表示取不到有效值。 + LivenessProbe *LivenessOrReadinessProbe `json:"LivenessProbe,omitempty" name:"LivenessProbe"` + + // 就绪探针 + // 注意:此字段可能返回 null,表示取不到有效值。 + ReadinessProbe *LivenessOrReadinessProbe `json:"ReadinessProbe,omitempty" name:"ReadinessProbe"` + + // Gpu限制 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuLimit *uint64 `json:"GpuLimit,omitempty" name:"GpuLimit"` +} + +type ContainerState struct { + + // 容器运行开始时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 容器状态:created, running, exited, unknown + State *string `json:"State,omitempty" name:"State"` + + // 容器运行结束时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + FinishTime *string `json:"FinishTime,omitempty" name:"FinishTime"` + + // 容器运行退出码 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExitCode *int64 `json:"ExitCode,omitempty" name:"ExitCode"` + + // 容器状态 Reason + // 注意:此字段可能返回 null,表示取不到有效值。 + Reason *string `json:"Reason,omitempty" name:"Reason"` + + // 容器状态信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Message *string `json:"Message,omitempty" name:"Message"` + + // 容器重启次数 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartCount *int64 `json:"RestartCount,omitempty" name:"RestartCount"` +} + +type ControllerStatus struct { + + // 控制器的名字 + Name *string `json:"Name,omitempty" name:"Name"` + + // 控制器是否开启 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type CreateClusterAsGroupRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 伸缩组创建透传参数,json化字符串格式,详见[伸缩组创建实例](https://cloud.tencent.com/document/api/377/20440)接口。LaunchConfigurationId由LaunchConfigurePara参数创建,不支持填写 + AutoScalingGroupPara *string `json:"AutoScalingGroupPara,omitempty" name:"AutoScalingGroupPara"` + + // 启动配置创建透传参数,json化字符串格式,详见[创建启动配置](https://cloud.tencent.com/document/api/377/20447)接口。另外ImageId参数由于集群维度已经有的ImageId信息,这个字段不需要填写。UserData字段设置通过UserScript设置,这个字段不需要填写。 + LaunchConfigurePara *string `json:"LaunchConfigurePara,omitempty" name:"LaunchConfigurePara"` + + // 节点高级配置信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 节点Label数组 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` +} + +func (r *CreateClusterAsGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterAsGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "AutoScalingGroupPara") + delete(f, "LaunchConfigurePara") + delete(f, "InstanceAdvancedSettings") + delete(f, "Labels") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterAsGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterAsGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 启动配置ID + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterAsGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterAsGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterEndpointRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群端口所在的子网ID (仅在开启非外网访问时需要填,必须为集群所在VPC内的子网) + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` +} + +func (r *CreateClusterEndpointRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterEndpointRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "SubnetId") + delete(f, "IsExtranet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterEndpointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterEndpointResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterEndpointResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterEndpointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterEndpointVipRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) + SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` +} + +func (r *CreateClusterEndpointVipRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterEndpointVipRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "SecurityPolicies") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterEndpointVipRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterEndpointVipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 请求任务的FlowId + RequestFlowId *int64 `json:"RequestFlowId,omitempty" name:"RequestFlowId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterEndpointVipResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterEndpointVipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterInstancesRequest struct { + *tchttp.BaseRequest + + // 集群 ID,请填写 查询集群列表 接口中返回的 clusterId 字段 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // CVM创建透传参数,json化字符串格式,如需要保证扩展集群节点请求幂等性需要在此参数添加ClientToken字段,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口。 + RunInstancePara *string `json:"RunInstancePara,omitempty" name:"RunInstancePara"` + + // 实例额外需要设置参数信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 校验规则相关选项,可配置跳过某些校验规则。目前支持GlobalRouteCIDRCheck(跳过GlobalRouter的相关校验),VpcCniCIDRCheck(跳过VpcCni相关校验) + SkipValidateOptions []*string `json:"SkipValidateOptions,omitempty" name:"SkipValidateOptions"` +} + +func (r *CreateClusterInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "RunInstancePara") + delete(f, "InstanceAdvancedSettings") + delete(f, "SkipValidateOptions") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 节点实例ID + InstanceIdSet []*string `json:"InstanceIdSet,omitempty" name:"InstanceIdSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterNodePoolFromExistingAsgRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 伸缩组ID + AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` +} + +func (r *CreateClusterNodePoolFromExistingAsgRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterNodePoolFromExistingAsgRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "AutoscalingGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterNodePoolFromExistingAsgRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterNodePoolFromExistingAsgResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 节点池ID + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterNodePoolFromExistingAsgResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterNodePoolFromExistingAsgResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterNodePoolRequest struct { + *tchttp.BaseRequest + + // cluster id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // AutoScalingGroupPara AS组参数 + AutoScalingGroupPara *string `json:"AutoScalingGroupPara,omitempty" name:"AutoScalingGroupPara"` + + // LaunchConfigurePara 运行参数 + LaunchConfigurePara *string `json:"LaunchConfigurePara,omitempty" name:"LaunchConfigurePara"` + + // InstanceAdvancedSettings 示例参数 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 是否启用自动伸缩 + EnableAutoscale *bool `json:"EnableAutoscale,omitempty" name:"EnableAutoscale"` + + // 节点池名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // Labels标签 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // Taints互斥 + Taints []*Taint `json:"Taints,omitempty" name:"Taints"` + + // 节点池os + NodePoolOs *string `json:"NodePoolOs,omitempty" name:"NodePoolOs"` + + // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 资源标签 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateClusterNodePoolRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterNodePoolRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "AutoScalingGroupPara") + delete(f, "LaunchConfigurePara") + delete(f, "InstanceAdvancedSettings") + delete(f, "EnableAutoscale") + delete(f, "Name") + delete(f, "Labels") + delete(f, "Taints") + delete(f, "NodePoolOs") + delete(f, "OsCustomizeType") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterNodePoolResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRequest struct { + *tchttp.BaseRequest + + // 集群容器网络配置信息 + ClusterCIDRSettings *ClusterCIDRSettings `json:"ClusterCIDRSettings,omitempty" name:"ClusterCIDRSettings"` + + // 集群类型,托管集群:MANAGED_CLUSTER,独立集群:INDEPENDENT_CLUSTER。 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // CVM创建透传参数,json化字符串格式,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口。总机型(包括地域)数量不超过10个,相同机型(地域)购买多台机器可以通过设置参数中RunInstances中InstanceCount来实现。 + RunInstancesForNode []*RunInstancesForNode `json:"RunInstancesForNode,omitempty" name:"RunInstancesForNode"` + + // 集群的基本配置信息 + ClusterBasicSettings *ClusterBasicSettings `json:"ClusterBasicSettings,omitempty" name:"ClusterBasicSettings"` + + // 集群高级配置信息 + ClusterAdvancedSettings *ClusterAdvancedSettings `json:"ClusterAdvancedSettings,omitempty" name:"ClusterAdvancedSettings"` + + // 节点高级配置信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 已存在实例的配置信息。所有实例必须在同一个VPC中,最大数量不超过100,不支持添加竞价实例。 + ExistedInstancesForNode []*ExistedInstancesForNode `json:"ExistedInstancesForNode,omitempty" name:"ExistedInstancesForNode"` + + // CVM类型和其对应的数据盘挂载配置信息 + InstanceDataDiskMountSettings []*InstanceDataDiskMountSetting `json:"InstanceDataDiskMountSettings,omitempty" name:"InstanceDataDiskMountSettings"` + + // 需要安装的扩展组件信息 + ExtensionAddons []*ExtensionAddon `json:"ExtensionAddons,omitempty" name:"ExtensionAddons"` +} + +func (r *CreateClusterRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterCIDRSettings") + delete(f, "ClusterType") + delete(f, "RunInstancesForNode") + delete(f, "ClusterBasicSettings") + delete(f, "ClusterAdvancedSettings") + delete(f, "InstanceAdvancedSettings") + delete(f, "ExistedInstancesForNode") + delete(f, "InstanceDataDiskMountSettings") + delete(f, "ExtensionAddons") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRouteRequest struct { + *tchttp.BaseRequest + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 目的端CIDR。 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 下一跳地址。 + GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` +} + +func (r *CreateClusterRouteRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterRouteRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + delete(f, "DestinationCidrBlock") + delete(f, "GatewayIp") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRouteRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRouteResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterRouteResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterRouteResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRouteTableRequest struct { + *tchttp.BaseRequest + + // 路由表名称 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 路由表CIDR + RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` + + // 路由表绑定的VPC + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 是否忽略CIDR冲突 + IgnoreClusterCidrConflict *int64 `json:"IgnoreClusterCidrConflict,omitempty" name:"IgnoreClusterCidrConflict"` +} + +func (r *CreateClusterRouteTableRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterRouteTableRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + delete(f, "RouteTableCidrBlock") + delete(f, "VpcId") + delete(f, "IgnoreClusterCidrConflict") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRouteTableRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRouteTableResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterRouteTableResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateClusterRouteTableResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSClusterRequest struct { + *tchttp.BaseRequest + + // k8s版本号。可为1.14.4, 1.12.8。 + K8SVersion *string `json:"K8SVersion,omitempty" name:"K8SVersion"` + + // vpc 的Id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 子网Id 列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 集群描述信息 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // Serivce 所在子网Id + ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` + + // 集群自定义的Dns服务器信息 + DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` + + // 扩展参数。须是map[string]string 的json 格式。 + ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` + + // 是否在用户集群内开启Dns。默认为true + EnableVpcCoreDNS *bool `json:"EnableVpcCoreDNS,omitempty" name:"EnableVpcCoreDNS"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到集群实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` +} + +func (r *CreateEKSClusterRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateEKSClusterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "K8SVersion") + delete(f, "VpcId") + delete(f, "ClusterName") + delete(f, "SubnetIds") + delete(f, "ClusterDesc") + delete(f, "ServiceSubnetId") + delete(f, "DnsServers") + delete(f, "ExtraParam") + delete(f, "EnableVpcCoreDNS") + delete(f, "TagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEKSClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 弹性集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateEKSClusterResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateEKSClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // 容器组 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // EKS Container Instance容器实例名称 + EksCiName *string `json:"EksCiName,omitempty" name:"EksCiName"` + + // 指定新创建实例所属于的安全组Id + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 实例所属子网Id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 实例所属VPC的Id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 内存,单位:GiB。可参考[资源规格](https://cloud.tencent.com/document/product/457/39808)文档 + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // CPU,单位:核。可参考[资源规格](https://cloud.tencent.com/document/product/457/39808)文档 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 实例重启策略: Always(总是重启)、Never(从不重启)、OnFailure(失败时重启),默认:Always。 + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 镜像仓库凭证数组 + ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` + + // 数据卷,包含NfsVolume数组和CbsVolume数组 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 实例副本数,默认为1 + Replicas *int64 `json:"Replicas,omitempty" name:"Replicas"` + + // Init 容器 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` + + // 自定义DNS配置 + DnsConfig *DNSConfig `json:"DnsConfig,omitempty" name:"DnsConfig"` + + // 用来绑定容器实例的已有EIP的列表。如传值,需要保证数值和Replicas相等。 + // 另外此参数和AutoCreateEipAttribute互斥。 + ExistedEipIds []*string `json:"ExistedEipIds,omitempty" name:"ExistedEipIds"` + + // 自动创建EIP的可选参数。若传此参数,则会自动创建EIP。 + // 另外此参数和ExistedEipIds互斥 + AutoCreateEipAttribute *EipAttribute `json:"AutoCreateEipAttribute,omitempty" name:"AutoCreateEipAttribute"` + + // 是否为容器实例自动创建EIP,默认为false。若传true,则此参数和ExistedEipIds互斥 + AutoCreateEip *bool `json:"AutoCreateEip,omitempty" name:"AutoCreateEip"` + + // Pod 所需的 CPU 资源型号,如果不填写则默认不强制指定 CPU 类型。目前支持型号如下: + // intel + // amd + // - 支持优先级顺序写法,如 “amd,intel” 表示优先创建 amd 资源 Pod,如果所选地域可用区 amd 资源不足,则会创建 intel 资源 Pod。 + CpuType *string `json:"CpuType,omitempty" name:"CpuType"` + + // 容器实例所需的 GPU 资源型号,目前支持型号如下: + // 1/4\*V100 + // 1/2\*V100 + // V100 + // 1/4\*T4 + // 1/2\*T4 + // T4 + GpuType *string `json:"GpuType,omitempty" name:"GpuType"` + + // Pod 所需的 GPU 数量,如填写,请确保为支持的规格。默认单位为卡,无需再次注明。 + GpuCount *uint64 `json:"GpuCount,omitempty" name:"GpuCount"` + + // 为容器实例关联 CAM 角色,value 填写 CAM 角色名称,容器实例可获取该 CAM 角色包含的权限策略,方便 容器实例 内的程序进行如购买资源、读写存储等云资源操作。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` +} + +func (r *CreateEKSContainerInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Containers") + delete(f, "EksCiName") + delete(f, "SecurityGroupIds") + delete(f, "SubnetId") + delete(f, "VpcId") + delete(f, "Memory") + delete(f, "Cpu") + delete(f, "RestartPolicy") + delete(f, "ImageRegistryCredentials") + delete(f, "EksCiVolume") + delete(f, "Replicas") + delete(f, "InitContainers") + delete(f, "DnsConfig") + delete(f, "ExistedEipIds") + delete(f, "AutoCreateEipAttribute") + delete(f, "AutoCreateEip") + delete(f, "CpuType") + delete(f, "GpuType") + delete(f, "GpuCount") + delete(f, "CamRoleName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // EKS Container Instance Id集合,格式为eksci-xxx,是容器实例的唯一标识。 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateEKSContainerInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusAlertRuleRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 告警配置 + AlertRule *PrometheusAlertRuleDetail `json:"AlertRule,omitempty" name:"AlertRule"` +} + +func (r *CreatePrometheusAlertRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrometheusAlertRuleRequest) 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, "AlertRule") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusAlertRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusAlertRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 告警id + Id *string `json:"Id,omitempty" name:"Id"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreatePrometheusAlertRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrometheusAlertRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusDashboardRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 面板组名称 + DashboardName *string `json:"DashboardName,omitempty" name:"DashboardName"` + + // 面板列表 + // 每一项是一个grafana dashboard的json定义 + Contents []*string `json:"Contents,omitempty" name:"Contents"` +} + +func (r *CreatePrometheusDashboardRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrometheusDashboardRequest) 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, "DashboardName") + delete(f, "Contents") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusDashboardRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusDashboardResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreatePrometheusDashboardResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrometheusDashboardResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusTemplateRequest struct { + *tchttp.BaseRequest + + // 模板设置 + Template *PrometheusTemplate `json:"Template,omitempty" name:"Template"` +} + +func (r *CreatePrometheusTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrometheusTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Template") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 模板Id + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreatePrometheusTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrometheusTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DNSConfig struct { + + // DNS 服务器IP地址列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Nameservers []*string `json:"Nameservers,omitempty" name:"Nameservers"` + + // DNS搜索域列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Searches []*string `json:"Searches,omitempty" name:"Searches"` + + // 对象选项列表,每个对象由name和value(可选)构成 + // 注意:此字段可能返回 null,表示取不到有效值。 + Options []*DNSConfigOption `json:"Options,omitempty" name:"Options"` +} + +type DNSConfigOption struct { + + // 配置项名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 项值 + // 注意:此字段可能返回 null,表示取不到有效值。 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type DataDisk struct { + + // 云盘类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 文件系统(ext3/ext4/xfs) + // 注意:此字段可能返回 null,表示取不到有效值。 + FileSystem *string `json:"FileSystem,omitempty" name:"FileSystem"` + + // 云盘大小(G) + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 是否自动化格式盘并挂载 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoFormatAndMount *bool `json:"AutoFormatAndMount,omitempty" name:"AutoFormatAndMount"` + + // 挂载目录 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountTarget *string `json:"MountTarget,omitempty" name:"MountTarget"` + + // 挂载设备名或分区名 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskPartition *string `json:"DiskPartition,omitempty" name:"DiskPartition"` +} + +type DeleteClusterAsGroupsRequest struct { + *tchttp.BaseRequest + + // 集群ID,通过[DescribeClusters](https://cloud.tencent.com/document/api/457/31862)接口获取。 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群伸缩组ID的列表 + AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` + + // 是否保留伸缩组中的节点(默认值: false(不保留)) + KeepInstance *bool `json:"KeepInstance,omitempty" name:"KeepInstance"` +} + +func (r *DeleteClusterAsGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterAsGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "AutoScalingGroupIds") + delete(f, "KeepInstance") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterAsGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterAsGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterAsGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterAsGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterEndpointRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` +} + +func (r *DeleteClusterEndpointRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterEndpointRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "IsExtranet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterEndpointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterEndpointResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterEndpointResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterEndpointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterEndpointVipRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DeleteClusterEndpointVipRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterEndpointVipRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterEndpointVipRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterEndpointVipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterEndpointVipResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterEndpointVipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterInstancesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 主机InstanceId列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 集群实例删除时的策略:terminate(销毁实例,仅支持按量计费云主机实例) retain (仅移除,保留实例) + InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` + + // 是否强制删除(当节点在初始化时,可以指定参数为TRUE) + ForceDelete *bool `json:"ForceDelete,omitempty" name:"ForceDelete"` +} + +func (r *DeleteClusterInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "InstanceIds") + delete(f, "InstanceDeleteMode") + delete(f, "ForceDelete") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 删除成功的实例ID列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + SuccInstanceIds []*string `json:"SuccInstanceIds,omitempty" name:"SuccInstanceIds"` + + // 删除失败的实例ID列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` + + // 未匹配到的实例ID列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + NotFoundInstanceIds []*string `json:"NotFoundInstanceIds,omitempty" name:"NotFoundInstanceIds"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterNodePoolRequest struct { + *tchttp.BaseRequest + + // 节点池对应的 ClusterId + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 需要删除的节点池 Id 列表 + NodePoolIds []*string `json:"NodePoolIds,omitempty" name:"NodePoolIds"` + + // 删除节点池时是否保留节点池内节点(节点仍然会被移出集群,但对应的实例不会被销毁) + KeepInstance *bool `json:"KeepInstance,omitempty" name:"KeepInstance"` +} + +func (r *DeleteClusterNodePoolRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterNodePoolRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "NodePoolIds") + delete(f, "KeepInstance") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterNodePoolResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群实例删除时的策略:terminate(销毁实例,仅支持按量计费云主机实例) retain (仅移除,保留实例) + InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` + + // 集群删除时资源的删除策略,目前支持CBS(默认保留CBS) + ResourceDeleteOptions []*ResourceDeleteOption `json:"ResourceDeleteOptions,omitempty" name:"ResourceDeleteOptions"` +} + +func (r *DeleteClusterRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "InstanceDeleteMode") + delete(f, "ResourceDeleteOptions") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRouteRequest struct { + *tchttp.BaseRequest + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 下一跳地址。 + GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` + + // 目的端CIDR。 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` +} + +func (r *DeleteClusterRouteRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterRouteRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + delete(f, "GatewayIp") + delete(f, "DestinationCidrBlock") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRouteRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRouteResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterRouteResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterRouteResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRouteTableRequest struct { + *tchttp.BaseRequest + + // 路由表名称 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` +} + +func (r *DeleteClusterRouteTableRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterRouteTableRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRouteTableRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRouteTableResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterRouteTableResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteClusterRouteTableResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSClusterRequest struct { + *tchttp.BaseRequest + + // 弹性集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DeleteEKSClusterRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteEKSClusterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteEKSClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteEKSClusterResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteEKSClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // 需要删除的EksCi的Id。 最大数量不超过20 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` + + // 是否释放为EksCi自动创建的Eip + ReleaseAutoCreatedEip *bool `json:"ReleaseAutoCreatedEip,omitempty" name:"ReleaseAutoCreatedEip"` +} + +func (r *DeleteEKSContainerInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiIds") + delete(f, "ReleaseAutoCreatedEip") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteEKSContainerInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusAlertRuleRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 告警规则id列表 + AlertIds []*string `json:"AlertIds,omitempty" name:"AlertIds"` +} + +func (r *DeletePrometheusAlertRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrometheusAlertRuleRequest) 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, "AlertIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusAlertRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusAlertRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeletePrometheusAlertRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrometheusAlertRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusTemplateRequest struct { + *tchttp.BaseRequest + + // 模板id + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` +} + +func (r *DeletePrometheusTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrometheusTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeletePrometheusTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrometheusTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusTemplateSyncRequest struct { + *tchttp.BaseRequest + + // 模板id + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 取消同步的对象列表 + Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` +} + +func (r *DeletePrometheusTemplateSyncRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrometheusTemplateSyncRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "Targets") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusTemplateSyncRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusTemplateSyncResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeletePrometheusTemplateSyncResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrometheusTemplateSyncResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAvailableClusterVersionRequest struct { + *tchttp.BaseRequest + + // 集群 Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群 Id 列表 + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` +} + +func (r *DescribeAvailableClusterVersionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAvailableClusterVersionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ClusterIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAvailableClusterVersionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAvailableClusterVersionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可升级的集群版本号 + // 注意:此字段可能返回 null,表示取不到有效值。 + Versions []*string `json:"Versions,omitempty" name:"Versions"` + + // 集群信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Clusters []*ClusterVersion `json:"Clusters,omitempty" name:"Clusters"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAvailableClusterVersionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAvailableClusterVersionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAsGroupOptionRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterAsGroupOptionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterAsGroupOptionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterAsGroupOptionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAsGroupOptionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群弹性伸缩属性 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterAsGroupOption *ClusterAsGroupOption `json:"ClusterAsGroupOption,omitempty" name:"ClusterAsGroupOption"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterAsGroupOptionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterAsGroupOptionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAsGroupsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 伸缩组ID列表,如果为空,表示拉取集群关联的所有伸缩组。 + AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeClusterAsGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterAsGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "AutoScalingGroupIds") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterAsGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAsGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群关联的伸缩组总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群关联的伸缩组列表 + ClusterAsGroupSet []*ClusterAsGroup `json:"ClusterAsGroupSet,omitempty" name:"ClusterAsGroupSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterAsGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterAsGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAuthenticationOptionsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterAuthenticationOptionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterAuthenticationOptionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterAuthenticationOptionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAuthenticationOptionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // ServiceAccount认证配置 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceAccounts *ServiceAccountAuthenticationOptions `json:"ServiceAccounts,omitempty" name:"ServiceAccounts"` + + // 最近一次修改操作结果,返回值可能为:Updating,Success,Failed,TimeOut + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperationState *string `json:"LatestOperationState,omitempty" name:"LatestOperationState"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterAuthenticationOptionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterAuthenticationOptionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterCommonNamesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 子账户列表,不可超出最大值50 + SubaccountUins []*string `json:"SubaccountUins,omitempty" name:"SubaccountUins"` + + // 角色ID列表,不可超出最大值50 + RoleIds []*string `json:"RoleIds,omitempty" name:"RoleIds"` +} + +func (r *DescribeClusterCommonNamesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterCommonNamesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "SubaccountUins") + delete(f, "RoleIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterCommonNamesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterCommonNamesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 子账户Uin与其客户端证书的CN字段映射 + CommonNames []*CommonName `json:"CommonNames,omitempty" name:"CommonNames"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterCommonNamesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterCommonNamesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterControllersRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterControllersRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterControllersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterControllersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterControllersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 描述集群中各个控制器的状态 + ControllerStatusSet []*ControllerStatus `json:"ControllerStatusSet,omitempty" name:"ControllerStatusSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterControllersResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterControllersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterEndpointStatusRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` +} + +func (r *DescribeClusterEndpointStatusRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterEndpointStatusRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "IsExtranet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterEndpointStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterEndpointStatusResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 查询集群访问端口状态(Created 开启成功,Creating 开启中,NotFound 未开启) + // 注意:此字段可能返回 null,表示取不到有效值。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 开启访问入口失败信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorMsg *string `json:"ErrorMsg,omitempty" name:"ErrorMsg"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterEndpointStatusResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterEndpointStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterEndpointVipStatusRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterEndpointVipStatusRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterEndpointVipStatusRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterEndpointVipStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterEndpointVipStatusResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 端口操作状态 (Creating 创建中 CreateFailed 创建失败 Created 创建完成 Deleting 删除中 DeletedFailed 删除失败 Deleted 已删除 NotFound 未发现操作 ) + Status *string `json:"Status,omitempty" name:"Status"` + + // 操作失败的原因 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorMsg *string `json:"ErrorMsg,omitempty" name:"ErrorMsg"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterEndpointVipStatusResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterEndpointVipStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterInstancesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 需要获取的节点实例Id列表。如果为空,表示拉取集群下所有节点实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 节点角色, MASTER, WORKER, ETCD, MASTER_ETCD,ALL, 默认为WORKER。默认为WORKER类型。 + InstanceRole *string `json:"InstanceRole,omitempty" name:"InstanceRole"` + + // 过滤条件列表;Name的可选值为nodepool-id、nodepool-instance-type;Name为nodepool-id表示根据节点池id过滤机器,Value的值为具体的节点池id,Name为nodepool-instance-type表示节点加入节点池的方式,Value的值为MANUALLY_ADDED(手动加入节点池)、AUTOSCALING_ADDED(伸缩组扩容方式加入节点池)、ALL(手动加入节点池 和 伸缩组扩容方式加入节点池) + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeClusterInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "InstanceIds") + delete(f, "InstanceRole") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群中实例总数 + TotalCount *uint64 `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 *DescribeClusterInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterKubeconfigRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 默认false 获取内网,是否获取外网访问的kubeconfig + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` +} + +func (r *DescribeClusterKubeconfigRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterKubeconfigRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "IsExtranet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterKubeconfigRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterKubeconfigResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 子账户kubeconfig文件,可用于直接访问集群kube-apiserver + Kubeconfig *string `json:"Kubeconfig,omitempty" name:"Kubeconfig"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterKubeconfigResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterKubeconfigResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterNodePoolDetailRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` +} + +func (r *DescribeClusterNodePoolDetailRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterNodePoolDetailRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "NodePoolId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterNodePoolDetailRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterNodePoolDetailResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 节点池详情 + NodePool *NodePool `json:"NodePool,omitempty" name:"NodePool"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterNodePoolDetailResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterNodePoolDetailResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterNodePoolsRequest struct { + *tchttp.BaseRequest + + // ClusterId(集群id) + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterNodePoolsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterNodePoolsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterNodePoolsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterNodePoolsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // NodePools(节点池列表) + // 注意:此字段可能返回 null,表示取不到有效值。 + NodePoolSet []*NodePool `json:"NodePoolSet,omitempty" name:"NodePoolSet"` + + // 资源总数 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterNodePoolsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterNodePoolsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterRouteTablesRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeClusterRouteTablesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterRouteTablesRequest) 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", "DescribeClusterRouteTablesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterRouteTablesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群路由表对象。 + RouteTableSet []*RouteTableInfo `json:"RouteTableSet,omitempty" name:"RouteTableSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterRouteTablesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterRouteTablesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 过滤条件,当前只支持按照单个条件GatewayIP进行过滤(可选) + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeClusterRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群路由对象。 + RouteSet []*RouteInfo `json:"RouteSet,omitempty" name:"RouteSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterSecurityRequest struct { + *tchttp.BaseRequest + + // 集群 ID,请填写 查询集群列表 接口中返回的 clusterId 字段 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterSecurityRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterSecurityRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterSecurityRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterSecurityResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群的账号名称 + UserName *string `json:"UserName,omitempty" name:"UserName"` + + // 集群的访问密码 + Password *string `json:"Password,omitempty" name:"Password"` + + // 集群访问CA证书 + CertificationAuthority *string `json:"CertificationAuthority,omitempty" name:"CertificationAuthority"` + + // 集群访问的地址 + ClusterExternalEndpoint *string `json:"ClusterExternalEndpoint,omitempty" name:"ClusterExternalEndpoint"` + + // 集群访问的域名 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // 集群Endpoint地址 + PgwEndpoint *string `json:"PgwEndpoint,omitempty" name:"PgwEndpoint"` + + // 集群访问策略组 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityPolicy []*string `json:"SecurityPolicy,omitempty" name:"SecurityPolicy"` + + // 集群Kubeconfig文件 + // 注意:此字段可能返回 null,表示取不到有效值。 + Kubeconfig *string `json:"Kubeconfig,omitempty" name:"Kubeconfig"` + + // 集群JnsGw的访问地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + JnsGwEndpoint *string `json:"JnsGwEndpoint,omitempty" name:"JnsGwEndpoint"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterSecurityResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterSecurityResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClustersRequest struct { + *tchttp.BaseRequest + + // 集群ID列表(为空时, + // 表示获取账号下所有集群) + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` + + // 偏移量,默认0 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 最大输出条数,默认20,最大为100 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // · ClusterName + // 按照【集群名】进行过滤。 + // 类型:String + // 必选:否 + // + // · Tags + // 按照【标签键值对】进行过滤。 + // 类型:String + // 必选:否 + // + // · vpc-id + // 按照【VPC】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag-key + // 按照【标签键】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag-value + // 按照【标签值】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag:tag-key + // 按照【标签键值对】进行过滤。 + // 类型:String + // 必选:否 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 集群类型,例如:MANAGED_CLUSTER + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` +} + +func (r *DescribeClustersRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClustersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterIds") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + delete(f, "ClusterType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClustersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClustersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群总个数 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群信息列表 + Clusters []*Cluster `json:"Clusters,omitempty" name:"Clusters"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClustersResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClustersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSClusterCredentialRequest struct { + *tchttp.BaseRequest + + // 集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeEKSClusterCredentialRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSClusterCredentialRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSClusterCredentialRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSClusterCredentialResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群的接入地址信息 + Addresses []*IPAddress `json:"Addresses,omitempty" name:"Addresses"` + + // 集群的认证信息 + Credential *ClusterCredential `json:"Credential,omitempty" name:"Credential"` + + // 集群的公网访问信息 + PublicLB *ClusterPublicLB `json:"PublicLB,omitempty" name:"PublicLB"` + + // 集群的内网访问信息 + InternalLB *ClusterInternalLB `json:"InternalLB,omitempty" name:"InternalLB"` + + // 标记是否新的内外网功能 + ProxyLB *bool `json:"ProxyLB,omitempty" name:"ProxyLB"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSClusterCredentialResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSClusterCredentialResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSClustersRequest struct { + *tchttp.BaseRequest + + // 集群ID列表(为空时, + // 表示获取账号下所有集群) + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` + + // 偏移量,默认0 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 最大输出条数,默认20 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤条件,当前只支持按照单个条件ClusterName进行过滤 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeEKSClustersRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSClustersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterIds") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSClustersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSClustersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群总个数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群信息列表 + Clusters []*EksCluster `json:"Clusters,omitempty" name:"Clusters"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSClustersResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSClustersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceEventRequest struct { + *tchttp.BaseRequest + + // 容器实例id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 最大事件数量。默认为50,最大取值100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeEKSContainerInstanceEventRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstanceEventRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiId") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstanceEventRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceEventResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 事件集合 + Events []*Event `json:"Events,omitempty" name:"Events"` + + // 容器实例id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSContainerInstanceEventResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstanceEventResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceRegionsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeEKSContainerInstanceRegionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstanceRegionsRequest) 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", "DescribeEKSContainerInstanceRegionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceRegionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // EKS Container Instance支持的地域信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Regions []*EksCiRegionInfo `json:"Regions,omitempty" name:"Regions"` + + // 总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSContainerInstanceRegionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstanceRegionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // 限定此次返回资源的数量。如果不设定,默认返回20,最大不能超过100 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认0 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 过滤条件,可条件: + // (1)实例名称 + // KeyName: eks-ci-name + // 类型:String + // + // (2)实例状态 + // KeyName: status + // 类型:String + // 可选值:"Pending", "Running", "Succeeded", "Failed" + // + // (3)内网ip + // KeyName: private-ip + // 类型:String + // + // (4)EIP地址 + // KeyName: eip-address + // 类型:String + // + // (5)VpcId + // KeyName: vpc-id + // 类型:String + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 容器实例 ID 数组 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` +} + +func (r *DescribeEKSContainerInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Limit") + delete(f, "Offset") + delete(f, "Filters") + delete(f, "EksCiIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器组总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 容器组列表 + EksCis []*EksCi `json:"EksCis,omitempty" name:"EksCis"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSContainerInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEksContainerInstanceLogRequest struct { + *tchttp.BaseRequest + + // Eks Container Instance Id,即容器实例Id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 容器名称,单容器的实例可选填。如果为多容器实例,请指定容器名称。 + ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` + + // 返回最新日志行数,默认500,最大2000。日志内容最大返回 1M 数据。 + Tail *uint64 `json:"Tail,omitempty" name:"Tail"` + + // UTC时间,RFC3339标准 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 是否是查上一个容器(如果容器退出重启了) + Previous *bool `json:"Previous,omitempty" name:"Previous"` + + // 查询最近多少秒内的日志 + SinceSeconds *uint64 `json:"SinceSeconds,omitempty" name:"SinceSeconds"` + + // 日志总大小限制 + LimitBytes *uint64 `json:"LimitBytes,omitempty" name:"LimitBytes"` +} + +func (r *DescribeEksContainerInstanceLogRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEksContainerInstanceLogRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiId") + delete(f, "ContainerName") + delete(f, "Tail") + delete(f, "StartTime") + delete(f, "Previous") + delete(f, "SinceSeconds") + delete(f, "LimitBytes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEksContainerInstanceLogRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEksContainerInstanceLogResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器名称 + ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` + + // 日志内容 + LogContent *string `json:"LogContent,omitempty" name:"LogContent"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEksContainerInstanceLogResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEksContainerInstanceLogResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEnableVpcCniProgressRequest struct { + *tchttp.BaseRequest + + // 开启vpc-cni的集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeEnableVpcCniProgressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEnableVpcCniProgressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEnableVpcCniProgressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEnableVpcCniProgressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 任务进度的描述:Running/Succeed/Failed + Status *string `json:"Status,omitempty" name:"Status"` + + // 当任务进度为Failed时,对任务状态的进一步描述,例如IPAMD组件安装失败 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorMessage *string `json:"ErrorMessage,omitempty" name:"ErrorMessage"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEnableVpcCniProgressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEnableVpcCniProgressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExistedInstancesRequest struct { + *tchttp.BaseRequest + + // 集群 ID,请填写查询集群列表 接口中返回的 ClusterId 字段(仅通过ClusterId获取需要过滤条件中的VPCID。节点状态比较时会使用该地域下所有集群中的节点进行比较。参数不支持同时指定InstanceIds和ClusterId。 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 按照一个或者多个实例ID查询。实例ID形如:ins-xxxxxxxx。(此参数的具体格式可参考API简介的id.N一节)。每次请求的实例的上限为100。参数不支持同时指定InstanceIds和Filters。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 过滤条件,字段和详见[CVM查询实例](https://cloud.tencent.com/document/api/213/15728)如果设置了ClusterId,会附加集群的VPCID作为查询字段,在此情况下如果在Filter中指定了"vpc-id"作为过滤字段,指定的VPCID必须与集群的VPCID相同。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 实例IP进行过滤(同时支持内网IP和外网IP) + VagueIpAddress *string `json:"VagueIpAddress,omitempty" name:"VagueIpAddress"` + + // 实例名称进行过滤 + VagueInstanceName *string `json:"VagueInstanceName,omitempty" name:"VagueInstanceName"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 根据多个实例IP进行过滤 + IpAddresses []*string `json:"IpAddresses,omitempty" name:"IpAddresses"` +} + +func (r *DescribeExistedInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeExistedInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "InstanceIds") + delete(f, "Filters") + delete(f, "VagueIpAddress") + delete(f, "VagueInstanceName") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "IpAddresses") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeExistedInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExistedInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 已经存在的实例信息数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExistedInstanceSet []*ExistedInstance `json:"ExistedInstanceSet,omitempty" name:"ExistedInstanceSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeExistedInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeExistedInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExternalClusterSpecRequest struct { + *tchttp.BaseRequest + + // 注册集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 默认false 获取内网,是否获取外网版注册命令 + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` + + // 默认false 不刷新有效时间 ,true刷新有效时间 + IsRefreshExpirationTime *bool `json:"IsRefreshExpirationTime,omitempty" name:"IsRefreshExpirationTime"` +} + +func (r *DescribeExternalClusterSpecRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeExternalClusterSpecRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "IsExtranet") + delete(f, "IsRefreshExpirationTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeExternalClusterSpecRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExternalClusterSpecResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 导入第三方集群YAML定义 + Spec *string `json:"Spec,omitempty" name:"Spec"` + + // agent.yaml文件过期时间字符串,时区UTC + Expiration *string `json:"Expiration,omitempty" name:"Expiration"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeExternalClusterSpecResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeExternalClusterSpecResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImagesRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeImagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImagesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 镜像数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 镜像信息列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageInstanceSet []*ImageInstance `json:"ImageInstanceSet,omitempty" name:"ImageInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAgentInstancesRequest struct { + *tchttp.BaseRequest + + // 集群id + // 可以是tke, eks, edge的集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribePrometheusAgentInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusAgentInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAgentInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAgentInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 关联该集群的实例列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Instances []*string `json:"Instances,omitempty" name:"Instances"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusAgentInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusAgentInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAgentsRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 用于分页 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 用于分页 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribePrometheusAgentsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusAgentsRequest) 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", "DescribePrometheusAgentsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAgentsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 被关联集群信息 + Agents []*PrometheusAgentOverview `json:"Agents,omitempty" name:"Agents"` + + // 被关联集群总量 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusAgentsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusAgentsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAlertHistoryRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 告警名称 + RuleName *string `json:"RuleName,omitempty" name:"RuleName"` + + // 开始时间 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 结束时间 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // label集合 + Labels *string `json:"Labels,omitempty" name:"Labels"` + + // 分片 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 分片 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribePrometheusAlertHistoryRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusAlertHistoryRequest) 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, "RuleName") + delete(f, "StartTime") + delete(f, "EndTime") + delete(f, "Labels") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAlertHistoryRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAlertHistoryResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 告警历史 + Items []*PrometheusAlertHistoryItem `json:"Items,omitempty" name:"Items"` + + // 总数 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusAlertHistoryResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusAlertHistoryResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAlertRuleRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 分页 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 分页 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤 + // 支持ID,Name + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribePrometheusAlertRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusAlertRuleRequest) 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", "DescribePrometheusAlertRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAlertRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 告警详情 + AlertRules []*PrometheusAlertRuleDetail `json:"AlertRules,omitempty" name:"AlertRules"` + + // 总数 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusAlertRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusAlertRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusInstanceRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribePrometheusInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusInstanceRequest) 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", "DescribePrometheusInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 私有网络id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // cos桶名称 + COSBucket *string `json:"COSBucket,omitempty" name:"COSBucket"` + + // 数据查询地址 + QueryAddress *string `json:"QueryAddress,omitempty" name:"QueryAddress"` + + // 实例中grafana相关的信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Grafana *PrometheusGrafanaInfo `json:"Grafana,omitempty" name:"Grafana"` + + // 用户自定义alertmanager + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertManagerUrl *string `json:"AlertManagerUrl,omitempty" name:"AlertManagerUrl"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusInstanceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusOverviewsRequest struct { + *tchttp.BaseRequest + + // 用于分页 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 用于分页 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤实例,目前支持: + // ID: 通过实例ID来过滤 + // Name: 通过实例名称来过滤 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribePrometheusOverviewsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusOverviewsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusOverviewsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusOverviewsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例列表 + Instances []*PrometheusInstanceOverview `json:"Instances,omitempty" name:"Instances"` + + // 实例总数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusOverviewsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusOverviewsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTargetsRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 集群类型 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 过滤条件,当前支持 + // Name=state + // Value=up, down, unknown + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribePrometheusTargetsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusTargetsRequest) 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, "ClusterType") + delete(f, "ClusterId") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTargetsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTargetsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 所有Job的targets信息 + Jobs []*PrometheusJobTargets `json:"Jobs,omitempty" name:"Jobs"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusTargetsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusTargetsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTemplateSyncRequest struct { + *tchttp.BaseRequest + + // 模板ID + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` +} + +func (r *DescribePrometheusTemplateSyncRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusTemplateSyncRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTemplateSyncRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTemplateSyncResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 同步目标详情 + Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusTemplateSyncResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusTemplateSyncResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTemplatesRequest struct { + *tchttp.BaseRequest + + // 模糊过滤条件,支持 + // Level 按模板级别过滤 + // Name 按名称过滤 + // Describe 按描述过滤 + // ID 按templateId过滤 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 分页偏移 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 总数限制 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribePrometheusTemplatesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusTemplatesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTemplatesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTemplatesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 模板列表 + Templates []*PrometheusTemplate `json:"Templates,omitempty" name:"Templates"` + + // 总数 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusTemplatesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrometheusTemplatesResponse) 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 { + + // 地域的数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 地域列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RegionInstanceSet []*RegionInstance `json:"RegionInstanceSet,omitempty" name:"RegionInstanceSet"` + + // 唯一请求 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 DescribeRouteTableConflictsRequest struct { + *tchttp.BaseRequest + + // 路由表CIDR + RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` + + // 路由表绑定的VPC + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *DescribeRouteTableConflictsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRouteTableConflictsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableCidrBlock") + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRouteTableConflictsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRouteTableConflictsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 路由表是否冲突。 + HasConflict *bool `json:"HasConflict,omitempty" name:"HasConflict"` + + // 路由表冲突列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableConflictSet []*RouteTableConflict `json:"RouteTableConflictSet,omitempty" name:"RouteTableConflictSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeRouteTableConflictsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRouteTableConflictsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVersionsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeVersionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVersionsRequest) 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", "DescribeVersionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVersionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 版本数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 版本列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + VersionInstanceSet []*VersionInstance `json:"VersionInstanceSet,omitempty" name:"VersionInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVersionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVersionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcCniPodLimitsRequest struct { + *tchttp.BaseRequest + + // 查询的机型所在可用区,如:ap-guangzhou-3,默认为空,即不按可用区过滤信息 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 查询的实例机型系列信息,如:S5,默认为空,即不按机型系列过滤信息 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // 查询的实例机型信息,如:S5.LARGE8,默认为空,即不按机型过滤信息 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` +} + +func (r *DescribeVpcCniPodLimitsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcCniPodLimitsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Zone") + delete(f, "InstanceFamily") + delete(f, "InstanceType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcCniPodLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcCniPodLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 机型数据数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 机型信息及其可支持的最大VPC-CNI模式Pod数量信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + PodLimitsInstanceSet []*PodLimitsInstance `json:"PodLimitsInstanceSet,omitempty" name:"PodLimitsInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcCniPodLimitsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcCniPodLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisableClusterDeletionProtectionRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DisableClusterDeletionProtectionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableClusterDeletionProtectionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableClusterDeletionProtectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisableClusterDeletionProtectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableClusterDeletionProtectionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableClusterDeletionProtectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisableVpcCniNetworkTypeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DisableVpcCniNetworkTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableVpcCniNetworkTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableVpcCniNetworkTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisableVpcCniNetworkTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableVpcCniNetworkTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableVpcCniNetworkTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DnsServerConf struct { + + // 域名。空字符串表示所有域名。 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // dns 服务器地址列表。地址格式 ip:port + DnsServers []*string `json:"DnsServers,omitempty" name:"DnsServers"` +} + +type EipAttribute struct { + + // 容器实例删除后,EIP是否释放。 + // Never表示不释放,其他任意值(包括空字符串)表示释放。 + DeletePolicy *string `json:"DeletePolicy,omitempty" name:"DeletePolicy"` + + // EIP线路类型。默认值:BGP。 + // 已开通静态单线IP白名单的用户,可选值: + // CMCC:中国移动 + // CTCC:中国电信 + // CUCC:中国联通 + // 注意:仅部分地域支持静态单线IP。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetServiceProvider *string `json:"InternetServiceProvider,omitempty" name:"InternetServiceProvider"` + + // EIP出带宽上限,单位:Mbps。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` +} + +type EksCi struct { + + // EKS Cotainer Instance Id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // EKS Cotainer Instance Name + EksCiName *string `json:"EksCiName,omitempty" name:"EksCiName"` + + // 内存大小 + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // CPU大小 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 安全组ID + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 容器组的重启策略 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 返回容器组创建状态:Pending,Running,Succeeded,Failed。其中: + // Failed (运行失败)指的容器组退出,RestartPolilcy为Never, 有容器exitCode非0; + // Succeeded(运行成功)指的是容器组退出了,RestartPolicy为Never或onFailure,所有容器exitCode都为0; + // Failed和Succeeded这两种状态都会停止运行,停止计费。 + // Pending是创建中,Running是 运行中。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 接到请求后的系统创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreationTime *string `json:"CreationTime,omitempty" name:"CreationTime"` + + // 容器全部成功退出后的时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + SucceededTime *string `json:"SucceededTime,omitempty" name:"SucceededTime"` + + // 容器列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // 数据卷信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 容器组运行的安全上下文 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityContext *SecurityContext `json:"SecurityContext,omitempty" name:"SecurityContext"` + + // 内网ip地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + PrivateIp *string `json:"PrivateIp,omitempty" name:"PrivateIp"` + + // 容器实例绑定的Eip地址,注意可能为空 + // 注意:此字段可能返回 null,表示取不到有效值。 + EipAddress *string `json:"EipAddress,omitempty" name:"EipAddress"` + + // GPU类型。如无使用GPU则不返回 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuType *string `json:"GpuType,omitempty" name:"GpuType"` + + // CPU类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + CpuType *string `json:"CpuType,omitempty" name:"CpuType"` + + // GPU卡数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuCount *uint64 `json:"GpuCount,omitempty" name:"GpuCount"` + + // 实例所属VPC的Id + // 注意:此字段可能返回 null,表示取不到有效值。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 实例所属子网Id + // 注意:此字段可能返回 null,表示取不到有效值。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 初始化容器列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` + + // 为容器实例关联 CAM 角色,value 填写 CAM 角色名称,容器实例可获取该 CAM 角色包含的权限策略,方便 容器实例 内的程序进行如购买资源、读写存储等云资源操作。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 自动为用户创建的EipId + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoCreatedEipId *string `json:"AutoCreatedEipId,omitempty" name:"AutoCreatedEipId"` + + // 容器状态是否持久化 + // 注意:此字段可能返回 null,表示取不到有效值。 + PersistStatus *bool `json:"PersistStatus,omitempty" name:"PersistStatus"` +} + +type EksCiRegionInfo struct { + + // 地域别名,形如gz + Alias *string `json:"Alias,omitempty" name:"Alias"` + + // 地域名,形如ap-guangzhou + RegionName *string `json:"RegionName,omitempty" name:"RegionName"` + + // 地域ID + RegionId *uint64 `json:"RegionId,omitempty" name:"RegionId"` +} + +type EksCiVolume struct { + + // Cbs Volume + // 注意:此字段可能返回 null,表示取不到有效值。 + CbsVolumes []*CbsVolume `json:"CbsVolumes,omitempty" name:"CbsVolumes"` + + // Nfs Volume + // 注意:此字段可能返回 null,表示取不到有效值。 + NfsVolumes []*NfsVolume `json:"NfsVolumes,omitempty" name:"NfsVolumes"` +} + +type EksCluster struct { + + // 集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // Vpc Id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // k8s 版本号 + K8SVersion *string `json:"K8SVersion,omitempty" name:"K8SVersion"` + + // 集群状态(running运行中,initializing 初始化中,failed异常) + Status *string `json:"Status,omitempty" name:"Status"` + + // 集群描述信息 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // 集群创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // Service 子网Id + ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` + + // 集群的自定义dns 服务器信息 + DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` + + // 将来删除集群时是否要删除cbs。默认为 FALSE + NeedDeleteCbs *bool `json:"NeedDeleteCbs,omitempty" name:"NeedDeleteCbs"` + + // 是否在用户集群内开启Dns。默认为TRUE + EnableVpcCoreDNS *bool `json:"EnableVpcCoreDNS,omitempty" name:"EnableVpcCoreDNS"` + + // 标签描述列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` +} + +type EnableClusterDeletionProtectionRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *EnableClusterDeletionProtectionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableClusterDeletionProtectionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableClusterDeletionProtectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableClusterDeletionProtectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableClusterDeletionProtectionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableClusterDeletionProtectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnableVpcCniNetworkTypeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 开启vpc-cni的模式,tke-route-eni开启的是策略路由模式,tke-direct-eni开启的是独立网卡模式 + VpcCniType *string `json:"VpcCniType,omitempty" name:"VpcCniType"` + + // 是否开启固定IP模式 + EnableStaticIp *bool `json:"EnableStaticIp,omitempty" name:"EnableStaticIp"` + + // 使用的容器子网 + Subnets []*string `json:"Subnets,omitempty" name:"Subnets"` + + // 在固定IP模式下,Pod销毁后退还IP的时间,传参必须大于300;不传默认IP永不销毁。 + ExpiredSeconds *uint64 `json:"ExpiredSeconds,omitempty" name:"ExpiredSeconds"` +} + +func (r *EnableVpcCniNetworkTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableVpcCniNetworkTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "VpcCniType") + delete(f, "EnableStaticIp") + delete(f, "Subnets") + delete(f, "ExpiredSeconds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableVpcCniNetworkTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableVpcCniNetworkTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableVpcCniNetworkTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableVpcCniNetworkTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnhancedService struct { + + // 开启云安全服务。若不指定该参数,则默认开启云安全服务。 + SecurityService *RunSecurityServiceEnabled `json:"SecurityService,omitempty" name:"SecurityService"` + + // 开启云监控服务。若不指定该参数,则默认开启云监控服务。 + MonitorService *RunMonitorServiceEnabled `json:"MonitorService,omitempty" name:"MonitorService"` + + // 开启云自动化助手服务。若不指定该参数,则默认不开启云自动化助手服务。 + AutomationService *RunAutomationServiceEnabled `json:"AutomationService,omitempty" name:"AutomationService"` +} + +type EnvironmentVariable struct { + + // key + Name *string `json:"Name,omitempty" name:"Name"` + + // val + Value *string `json:"Value,omitempty" name:"Value"` +} + +type Event struct { + + // pod名称 + PodName *string `json:"PodName,omitempty" name:"PodName"` + + // 事件原因内容 + Reason *string `json:"Reason,omitempty" name:"Reason"` + + // 事件类型 + Type *string `json:"Type,omitempty" name:"Type"` + + // 事件出现次数 + Count *int64 `json:"Count,omitempty" name:"Count"` + + // 事件第一次出现时间 + FirstTimestamp *string `json:"FirstTimestamp,omitempty" name:"FirstTimestamp"` + + // 事件最后一次出现时间 + LastTimestamp *string `json:"LastTimestamp,omitempty" name:"LastTimestamp"` + + // 事件内容 + Message *string `json:"Message,omitempty" name:"Message"` +} + +type Exec struct { + + // 容器内检测的命令 + // 注意:此字段可能返回 null,表示取不到有效值。 + Commands []*string `json:"Commands,omitempty" name:"Commands"` +} + +type ExistedInstance struct { + + // 实例是否支持加入集群(TRUE 可以加入 FALSE 不能加入)。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Usable *bool `json:"Usable,omitempty" name:"Usable"` + + // 实例不支持加入的原因。 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnusableReason *string `json:"UnusableReason,omitempty" name:"UnusableReason"` + + // 实例已经所在的集群ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlreadyInCluster *string `json:"AlreadyInCluster,omitempty" name:"AlreadyInCluster"` + + // 实例ID形如:ins-xxxxxxxx。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例主网卡的内网IP列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` + + // 实例主网卡的公网IP列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses"` + + // 创建时间。按照ISO8601标准表示,并且使用UTC时间。格式为:YYYY-MM-DDThh:mm:ssZ。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 实例的CPU核数,单位:核。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CPU *uint64 `json:"CPU,omitempty" name:"CPU"` + + // 实例内存容量,单位:GB。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Memory *uint64 `json:"Memory,omitempty" name:"Memory"` + + // 操作系统名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 实例机型。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 伸缩组ID + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` + + // 实例计费模式。取值范围: PREPAID:表示预付费,即包年包月 POSTPAID_BY_HOUR:表示后付费,即按量计费 CDHPAID:CDH付费,即只对CDH计费,不对CDH上的实例计费。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` +} + +type ExistedInstancesForNode struct { + + // 节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD最小配置为4C8G。 + NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` + + // 已存在实例的重装参数 + ExistedInstancesPara *ExistedInstancesPara `json:"ExistedInstancesPara,omitempty" name:"ExistedInstancesPara"` + + // 节点高级设置,会覆盖集群级别设置的InstanceAdvancedSettings(当前只对节点自定义参数ExtraArgs生效) + InstanceAdvancedSettingsOverride *InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverride,omitempty" name:"InstanceAdvancedSettingsOverride"` + + // 自定义模式集群,可指定每个节点的pod数量 + DesiredPodNumbers []*int64 `json:"DesiredPodNumbers,omitempty" name:"DesiredPodNumbers"` +} + +type ExistedInstancesPara struct { + + // 集群ID + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例额外需要设置参数信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 节点登录信息(目前仅支持使用Password或者单个KeyIds) + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 重装系统时,可以指定修改实例的HostName(集群为HostName模式时,此参数必传,规则名称除不支持大写字符外与[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口HostName一致) + HostName *string `json:"HostName,omitempty" name:"HostName"` +} + +type ExtensionAddon struct { + + // 扩展组件名称 + AddonName *string `json:"AddonName,omitempty" name:"AddonName"` + + // 扩展组件信息(扩展组件资源对象的json字符串描述) + AddonParam *string `json:"AddonParam,omitempty" name:"AddonParam"` +} + +type Filter struct { + + // 需要过滤的字段。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 字段的过滤值。 + Values []*string `json:"Values,omitempty" name:"Values"` +} + +type ForwardApplicationRequestV3Request struct { + *tchttp.BaseRequest + + // 请求集群addon的访问 + Method *string `json:"Method,omitempty" name:"Method"` + + // 请求集群addon的路径 + Path *string `json:"Path,omitempty" name:"Path"` + + // 请求集群addon后允许接收的数据格式 + Accept *string `json:"Accept,omitempty" name:"Accept"` + + // 请求集群addon的数据格式 + ContentType *string `json:"ContentType,omitempty" name:"ContentType"` + + // 请求集群addon的数据 + RequestBody *string `json:"RequestBody,omitempty" name:"RequestBody"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 是否编码请求内容 + EncodedBody *string `json:"EncodedBody,omitempty" name:"EncodedBody"` +} + +func (r *ForwardApplicationRequestV3Request) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ForwardApplicationRequestV3Request) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Method") + delete(f, "Path") + delete(f, "Accept") + delete(f, "ContentType") + delete(f, "RequestBody") + delete(f, "ClusterName") + delete(f, "EncodedBody") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ForwardApplicationRequestV3Request has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ForwardApplicationRequestV3Response struct { + *tchttp.BaseResponse + Response *struct { + + // 请求集群addon后返回的数据 + ResponseBody *string `json:"ResponseBody,omitempty" name:"ResponseBody"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ForwardApplicationRequestV3Response) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ForwardApplicationRequestV3Response) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type GetTkeAppChartListRequest struct { + *tchttp.BaseRequest + + // app类型,取值log,scheduler,network,storage,monitor,dns,image,other,invisible + Kind *string `json:"Kind,omitempty" name:"Kind"` + + // app支持的操作系统,取值arm32、arm64、amd64 + Arch *string `json:"Arch,omitempty" name:"Arch"` + + // 集群类型,取值tke、eks + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` +} + +func (r *GetTkeAppChartListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *GetTkeAppChartListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Kind") + delete(f, "Arch") + delete(f, "ClusterType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetTkeAppChartListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type GetTkeAppChartListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 所支持的chart列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + AppCharts []*AppChart `json:"AppCharts,omitempty" name:"AppCharts"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *GetTkeAppChartListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *GetTkeAppChartListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type GetUpgradeInstanceProgressRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 最多获取多少个节点的进度 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 从第几个节点开始获取进度 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *GetUpgradeInstanceProgressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *GetUpgradeInstanceProgressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetUpgradeInstanceProgressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type GetUpgradeInstanceProgressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 升级节点总数 + Total *int64 `json:"Total,omitempty" name:"Total"` + + // 已升级节点总数 + Done *int64 `json:"Done,omitempty" name:"Done"` + + // 升级任务生命周期 + // process 运行中 + // paused 已停止 + // pauing 正在停止 + // done 已完成 + // timeout 已超时 + // aborted 已取消 + LifeState *string `json:"LifeState,omitempty" name:"LifeState"` + + // 各节点升级进度详情 + Instances []*InstanceUpgradeProgressItem `json:"Instances,omitempty" name:"Instances"` + + // 集群当前状态 + ClusterStatus *InstanceUpgradeClusterStatus `json:"ClusterStatus,omitempty" name:"ClusterStatus"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *GetUpgradeInstanceProgressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *GetUpgradeInstanceProgressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type HttpGet struct { + + // HttpGet检测的路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + Path *string `json:"Path,omitempty" name:"Path"` + + // HttpGet检测的端口号 + // 注意:此字段可能返回 null,表示取不到有效值。 + Port *int64 `json:"Port,omitempty" name:"Port"` + + // HTTP or HTTPS + // 注意:此字段可能返回 null,表示取不到有效值。 + Scheme *string `json:"Scheme,omitempty" name:"Scheme"` +} + +type IPAddress struct { + + // Ip 地址的类型。可为 advertise, public 等 + Type *string `json:"Type,omitempty" name:"Type"` + + // Ip 地址 + Ip *string `json:"Ip,omitempty" name:"Ip"` + + // 网络端口 + Port *uint64 `json:"Port,omitempty" name:"Port"` +} + +type ImageInstance struct { + + // 镜像别名 + // 注意:此字段可能返回 null,表示取不到有效值。 + Alias *string `json:"Alias,omitempty" name:"Alias"` + + // 操作系统名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 镜像ID + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + // 注意:此字段可能返回 null,表示取不到有效值。 + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` +} + +type ImageRegistryCredential struct { + + // 镜像仓库地址 + Server *string `json:"Server,omitempty" name:"Server"` + + // 用户名 + Username *string `json:"Username,omitempty" name:"Username"` + + // 密码 + Password *string `json:"Password,omitempty" name:"Password"` + + // ImageRegistryCredential的名字 + Name *string `json:"Name,omitempty" name:"Name"` +} + +type Instance struct { + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 节点角色, MASTER, WORKER, ETCD, MASTER_ETCD,ALL, 默认为WORKER + InstanceRole *string `json:"InstanceRole,omitempty" name:"InstanceRole"` + + // 实例异常(或者处于初始化中)的原因 + FailedReason *string `json:"FailedReason,omitempty" name:"FailedReason"` + + // 实例的状态(running 运行中,initializing 初始化中,failed 异常) + InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` + + // 实例是否封锁状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + DrainStatus *string `json:"DrainStatus,omitempty" name:"DrainStatus"` + + // 节点配置 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 添加时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 节点内网IP + // 注意:此字段可能返回 null,表示取不到有效值。 + LanIP *string `json:"LanIP,omitempty" name:"LanIP"` + + // 资源池ID + // 注意:此字段可能返回 null,表示取不到有效值。 + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 自动伸缩组ID + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` +} + +type InstanceAdvancedSettings struct { + + // 数据盘挂载点, 默认不挂载数据盘. 已格式化的 ext3,ext4,xfs 文件系统的数据盘将直接挂载,其他文件系统或未格式化的数据盘将自动格式化为ext4 (tlinux系统格式化成xfs)并挂载,请注意备份数据! 无数据盘或有多块数据盘的云主机此设置不生效。 + // 注意,注意,多盘场景请使用下方的DataDisks数据结构,设置对应的云盘类型、云盘大小、挂载路径、是否格式化等信息。 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountTarget *string `json:"MountTarget,omitempty" name:"MountTarget"` + + // dockerd --graph 指定值, 默认为 /var/lib/docker + // 注意:此字段可能返回 null,表示取不到有效值。 + DockerGraphPath *string `json:"DockerGraphPath,omitempty" name:"DockerGraphPath"` + + // base64 编码的用户脚本, 此脚本会在 k8s 组件运行后执行, 需要用户保证脚本的可重入及重试逻辑, 脚本及其生成的日志文件可在节点的 /data/ccs_userscript/ 路径查看, 如果要求节点需要在进行初始化完成后才可加入调度, 可配合 unschedulable 参数使用, 在 userScript 最后初始化完成后, 添加 kubectl uncordon nodename --kubeconfig=/root/.kube/config 命令使节点加入调度 + // 注意:此字段可能返回 null,表示取不到有效值。 + UserScript *string `json:"UserScript,omitempty" name:"UserScript"` + + // 设置加入的节点是否参与调度,默认值为0,表示参与调度;非0表示不参与调度, 待节点初始化完成之后, 可执行kubectl uncordon nodename使node加入调度. + Unschedulable *int64 `json:"Unschedulable,omitempty" name:"Unschedulable"` + + // 节点Label数组 + // 注意:此字段可能返回 null,表示取不到有效值。 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 多盘数据盘挂载信息:新建节点时请确保购买CVM的参数传递了购买多个数据盘的信息,如CreateClusterInstances API的RunInstancesPara下的DataDisks也需要设置购买多个数据盘, 具体可以参考CreateClusterInstances接口的添加集群节点(多块数据盘)样例;添加已有节点时,请确保填写的分区信息在节点上真实存在 + // 注意:此字段可能返回 null,表示取不到有效值。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 节点相关的自定义参数信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 该节点属于podCIDR大小自定义模式时,可指定节点上运行的pod数量上限 + // 注意:此字段可能返回 null,表示取不到有效值。 + DesiredPodNumber *int64 `json:"DesiredPodNumber,omitempty" name:"DesiredPodNumber"` + + // base64 编码的用户脚本,在初始化节点之前执行,目前只对添加已有节点生效 + // 注意:此字段可能返回 null,表示取不到有效值。 + PreStartUserScript *string `json:"PreStartUserScript,omitempty" name:"PreStartUserScript"` +} + +type InstanceDataDiskMountSetting struct { + + // CVM实例类型 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 数据盘挂载信息 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // CVM实例所属可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` +} + +type InstanceExtraArgs struct { + + // kubelet自定义参数,参数格式为["k1=v1", "k1=v2"], 例如["root-dir=/var/lib/kubelet","feature-gates=PodShareProcessNamespace=true,DynamicKubeletConfig=true"] + // 注意:此字段可能返回 null,表示取不到有效值。 + Kubelet []*string `json:"Kubelet,omitempty" name:"Kubelet"` +} + +type InstanceUpgradeClusterStatus struct { + + // pod总数 + PodTotal *int64 `json:"PodTotal,omitempty" name:"PodTotal"` + + // NotReady pod总数 + NotReadyPod *int64 `json:"NotReadyPod,omitempty" name:"NotReadyPod"` +} + +type InstanceUpgradePreCheckResult struct { + + // 检查是否通过 + CheckPass *bool `json:"CheckPass,omitempty" name:"CheckPass"` + + // 检查项数组 + Items []*InstanceUpgradePreCheckResultItem `json:"Items,omitempty" name:"Items"` + + // 本节点独立pod列表 + SinglePods []*string `json:"SinglePods,omitempty" name:"SinglePods"` +} + +type InstanceUpgradePreCheckResultItem struct { + + // 工作负载的命名空间 + Namespace *string `json:"Namespace,omitempty" name:"Namespace"` + + // 工作负载类型 + WorkLoadKind *string `json:"WorkLoadKind,omitempty" name:"WorkLoadKind"` + + // 工作负载名称 + WorkLoadName *string `json:"WorkLoadName,omitempty" name:"WorkLoadName"` + + // 驱逐节点前工作负载running的pod数目 + Before *uint64 `json:"Before,omitempty" name:"Before"` + + // 驱逐节点后工作负载running的pod数目 + After *uint64 `json:"After,omitempty" name:"After"` + + // 工作负载在本节点上的pod列表 + Pods []*string `json:"Pods,omitempty" name:"Pods"` +} + +type InstanceUpgradeProgressItem struct { + + // 节点instanceID + InstanceID *string `json:"InstanceID,omitempty" name:"InstanceID"` + + // 任务生命周期 + // process 运行中 + // paused 已停止 + // pauing 正在停止 + // done 已完成 + // timeout 已超时 + // aborted 已取消 + // pending 还未开始 + LifeState *string `json:"LifeState,omitempty" name:"LifeState"` + + // 升级开始时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + StartAt *string `json:"StartAt,omitempty" name:"StartAt"` + + // 升级结束时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + EndAt *string `json:"EndAt,omitempty" name:"EndAt"` + + // 升级前检查结果 + CheckResult *InstanceUpgradePreCheckResult `json:"CheckResult,omitempty" name:"CheckResult"` + + // 升级步骤详情 + Detail []*TaskStepInfo `json:"Detail,omitempty" name:"Detail"` +} + +type Label struct { + + // map表中的Name + Name *string `json:"Name,omitempty" name:"Name"` + + // map表中的Value + Value *string `json:"Value,omitempty" name:"Value"` +} + +type LivenessOrReadinessProbe struct { + + // 探针参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Probe *Probe `json:"Probe,omitempty" name:"Probe"` + + // HttpGet检测参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + HttpGet *HttpGet `json:"HttpGet,omitempty" name:"HttpGet"` + + // 容器内检测命令参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Exec *Exec `json:"Exec,omitempty" name:"Exec"` + + // TcpSocket检测的端口参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + TcpSocket *TcpSocket `json:"TcpSocket,omitempty" name:"TcpSocket"` +} + +type LoginSettings struct { + + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:<br><li>Linux实例密码必须8到30位,至少包括两项[a-z],[A-Z]、[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。<br><li>Windows实例密码必须12到30位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /]中的特殊符号。<br><br>若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Password *string `json:"Password,omitempty" name:"Password"` + + // 密钥ID列表。关联密钥后,就可以通过对应的私钥来访问实例;KeyId可通过接口[DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699)获取,密钥与密码不能同时指定,同时Windows操作系统不支持指定密钥。当前仅支持购买的时候指定一个密钥。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为TRUE。取值范围:<br><li>TRUE:表示保持镜像的登录设置<br><li>FALSE:表示不保持镜像的登录设置<br><br>默认取值:FALSE。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeepImageLogin *string `json:"KeepImageLogin,omitempty" name:"KeepImageLogin"` +} + +type ManuallyAdded struct { + + // 加入中的节点数量 + Joining *int64 `json:"Joining,omitempty" name:"Joining"` + + // 初始化中的节点数量 + Initializing *int64 `json:"Initializing,omitempty" name:"Initializing"` + + // 正常的节点数量 + Normal *int64 `json:"Normal,omitempty" name:"Normal"` + + // 节点总数 + Total *int64 `json:"Total,omitempty" name:"Total"` +} + +type ModifyClusterAsGroupAttributeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群关联的伸缩组属性 + ClusterAsGroupAttribute *ClusterAsGroupAttribute `json:"ClusterAsGroupAttribute,omitempty" name:"ClusterAsGroupAttribute"` +} + +func (r *ModifyClusterAsGroupAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAsGroupAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ClusterAsGroupAttribute") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAsGroupAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAsGroupAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAsGroupAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAsGroupAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAsGroupOptionAttributeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群弹性伸缩属性 + ClusterAsGroupOption *ClusterAsGroupOption `json:"ClusterAsGroupOption,omitempty" name:"ClusterAsGroupOption"` +} + +func (r *ModifyClusterAsGroupOptionAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAsGroupOptionAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ClusterAsGroupOption") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAsGroupOptionAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAsGroupOptionAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAsGroupOptionAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAsGroupOptionAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAttributeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群所属项目 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 集群描述 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` +} + +func (r *ModifyClusterAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ProjectId") + delete(f, "ClusterName") + delete(f, "ClusterDesc") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群所属项目 + // 注意:此字段可能返回 null,表示取不到有效值。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 集群名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 集群描述 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAuthenticationOptionsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // ServiceAccount认证配置 + ServiceAccounts *ServiceAccountAuthenticationOptions `json:"ServiceAccounts,omitempty" name:"ServiceAccounts"` +} + +func (r *ModifyClusterAuthenticationOptionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAuthenticationOptionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ServiceAccounts") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAuthenticationOptionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAuthenticationOptionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAuthenticationOptionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAuthenticationOptionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterEndpointSPRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) + SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` +} + +func (r *ModifyClusterEndpointSPRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterEndpointSPRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "SecurityPolicies") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterEndpointSPRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterEndpointSPResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterEndpointSPResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterEndpointSPResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterNodePoolRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池ID + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 最大节点数 + MaxNodesNum *int64 `json:"MaxNodesNum,omitempty" name:"MaxNodesNum"` + + // 最小节点数 + MinNodesNum *int64 `json:"MinNodesNum,omitempty" name:"MinNodesNum"` + + // 标签 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 污点 + Taints []*Taint `json:"Taints,omitempty" name:"Taints"` + + // 是否开启伸缩 + EnableAutoscale *bool `json:"EnableAutoscale,omitempty" name:"EnableAutoscale"` + + // 操作系统名称 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 节点自定义参数 + ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 资源标签 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 设置加入的节点是否参与调度,默认值为0,表示参与调度;非0表示不参与调度, 待节点初始化完成之后, 可执行kubectl uncordon nodename使node加入调度. + Unschedulable *int64 `json:"Unschedulable,omitempty" name:"Unschedulable"` +} + +func (r *ModifyClusterNodePoolRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterNodePoolRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "NodePoolId") + delete(f, "Name") + delete(f, "MaxNodesNum") + delete(f, "MinNodesNum") + delete(f, "Labels") + delete(f, "Taints") + delete(f, "EnableAutoscale") + delete(f, "OsName") + delete(f, "OsCustomizeType") + delete(f, "ExtraArgs") + delete(f, "Tags") + delete(f, "Unschedulable") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterNodePoolResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNodePoolDesiredCapacityAboutAsgRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点池所关联的伸缩组的期望实例数 + DesiredCapacity *int64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` +} + +func (r *ModifyNodePoolDesiredCapacityAboutAsgRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNodePoolDesiredCapacityAboutAsgRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "NodePoolId") + delete(f, "DesiredCapacity") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNodePoolDesiredCapacityAboutAsgRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNodePoolDesiredCapacityAboutAsgResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNodePoolDesiredCapacityAboutAsgResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNodePoolDesiredCapacityAboutAsgResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNodePoolInstanceTypesRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 机型列表 + InstanceTypes []*string `json:"InstanceTypes,omitempty" name:"InstanceTypes"` +} + +func (r *ModifyNodePoolInstanceTypesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNodePoolInstanceTypesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "NodePoolId") + delete(f, "InstanceTypes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNodePoolInstanceTypesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNodePoolInstanceTypesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNodePoolInstanceTypesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNodePoolInstanceTypesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrometheusAlertRuleRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 告警配置 + AlertRule *PrometheusAlertRuleDetail `json:"AlertRule,omitempty" name:"AlertRule"` +} + +func (r *ModifyPrometheusAlertRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrometheusAlertRuleRequest) 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, "AlertRule") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrometheusAlertRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrometheusAlertRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyPrometheusAlertRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrometheusAlertRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrometheusTemplateRequest struct { + *tchttp.BaseRequest + + // 模板ID + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 修改内容 + Template *PrometheusTemplateModify `json:"Template,omitempty" name:"Template"` +} + +func (r *ModifyPrometheusTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrometheusTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "Template") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrometheusTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrometheusTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyPrometheusTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrometheusTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type NfsVolume struct { + + // nfs volume 数据卷名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // NFS 服务器地址 + Server *string `json:"Server,omitempty" name:"Server"` + + // NFS 数据卷路径 + Path *string `json:"Path,omitempty" name:"Path"` + + // 默认为 False + ReadOnly *bool `json:"ReadOnly,omitempty" name:"ReadOnly"` +} + +type NodeCountSummary struct { + + // 手动管理的节点 + // 注意:此字段可能返回 null,表示取不到有效值。 + ManuallyAdded *ManuallyAdded `json:"ManuallyAdded,omitempty" name:"ManuallyAdded"` + + // 自动管理的节点 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoscalingAdded *AutoscalingAdded `json:"AutoscalingAdded,omitempty" name:"AutoscalingAdded"` +} + +type NodePool struct { + + // NodePoolId 资源池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // Name 资源池名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // ClusterInstanceId 集群实例id + ClusterInstanceId *string `json:"ClusterInstanceId,omitempty" name:"ClusterInstanceId"` + + // LifeState 状态,当前节点池生命周期状态包括:creating,normal,updating,deleting,deleted + LifeState *string `json:"LifeState,omitempty" name:"LifeState"` + + // LaunchConfigurationId 配置 + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // AutoscalingGroupId 分组id + AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` + + // Labels 标签 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // Taints 污点标记 + Taints []*Taint `json:"Taints,omitempty" name:"Taints"` + + // NodeCountSummary 节点列表 + NodeCountSummary *NodeCountSummary `json:"NodeCountSummary,omitempty" name:"NodeCountSummary"` + + // 状态信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoscalingGroupStatus *string `json:"AutoscalingGroupStatus,omitempty" name:"AutoscalingGroupStatus"` + + // 最大节点数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + MaxNodesNum *int64 `json:"MaxNodesNum,omitempty" name:"MaxNodesNum"` + + // 最小节点数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + MinNodesNum *int64 `json:"MinNodesNum,omitempty" name:"MinNodesNum"` + + // 期望的节点数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + DesiredNodesNum *int64 `json:"DesiredNodesNum,omitempty" name:"DesiredNodesNum"` + + // 节点池osName + // 注意:此字段可能返回 null,表示取不到有效值。 + NodePoolOs *string `json:"NodePoolOs,omitempty" name:"NodePoolOs"` + + // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + // 注意:此字段可能返回 null,表示取不到有效值。 + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 镜像id + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 集群属于节点podCIDR大小自定义模式时,节点池需要带上pod数量属性 + // 注意:此字段可能返回 null,表示取不到有效值。 + DesiredPodNum *int64 `json:"DesiredPodNum,omitempty" name:"DesiredPodNum"` + + // 用户自定义脚本 + // 注意:此字段可能返回 null,表示取不到有效值。 + UserScript *string `json:"UserScript,omitempty" name:"UserScript"` + + // 资源标签 + // 注意:此字段可能返回 null,表示取不到有效值。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +type NodePoolOption struct { + + // 是否加入节点池 + AddToNodePool *bool `json:"AddToNodePool,omitempty" name:"AddToNodePool"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 是否继承节点池相关配置 + InheritConfigurationFromNodePool *bool `json:"InheritConfigurationFromNodePool,omitempty" name:"InheritConfigurationFromNodePool"` +} + +type PodLimitsByType struct { + + // TKE共享网卡非固定IP模式可支持的Pod数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TKERouteENINonStaticIP *int64 `json:"TKERouteENINonStaticIP,omitempty" name:"TKERouteENINonStaticIP"` + + // TKE共享网卡固定IP模式可支持的Pod数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TKERouteENIStaticIP *int64 `json:"TKERouteENIStaticIP,omitempty" name:"TKERouteENIStaticIP"` + + // TKE独立网卡模式可支持的Pod数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TKEDirectENI *int64 `json:"TKEDirectENI,omitempty" name:"TKEDirectENI"` +} + +type PodLimitsInstance struct { + + // 机型所在可用区 + // 注意:此字段可能返回 null,表示取不到有效值。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 机型所属机型族 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // 实例机型名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 机型可支持的最大VPC-CNI模式Pod数量信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + PodLimits *PodLimitsByType `json:"PodLimits,omitempty" name:"PodLimits"` +} + +type Probe struct { + + // Number of seconds after the container has started before liveness probes are initiated. + // 注意:此字段可能返回 null,表示取不到有效值。 + InitialDelaySeconds *int64 `json:"InitialDelaySeconds,omitempty" name:"InitialDelaySeconds"` + + // Number of seconds after which the probe times out. + // Defaults to 1 second. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + TimeoutSeconds *int64 `json:"TimeoutSeconds,omitempty" name:"TimeoutSeconds"` + + // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + PeriodSeconds *int64 `json:"PeriodSeconds,omitempty" name:"PeriodSeconds"` + + // Minimum consecutive successes for the probe to be considered successful after having failed.Defaults to 1. Must be 1 for liveness. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + SuccessThreshold *int64 `json:"SuccessThreshold,omitempty" name:"SuccessThreshold"` + + // Minimum consecutive failures for the probe to be considered failed after having succeeded.Defaults to 3. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + FailureThreshold *int64 `json:"FailureThreshold,omitempty" name:"FailureThreshold"` +} + +type PrometheusAgentOverview struct { + + // 集群类型 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // agent状态 + // normal = 正常 + // abnormal = 异常 + Status *string `json:"Status,omitempty" name:"Status"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 额外labels + // 本集群的所有指标都会带上这几个label + // 注意:此字段可能返回 null,表示取不到有效值。 + ExternalLabels []*Label `json:"ExternalLabels,omitempty" name:"ExternalLabels"` +} + +type PrometheusAlertHistoryItem struct { + + // 告警名称 + RuleName *string `json:"RuleName,omitempty" name:"RuleName"` + + // 告警开始时间 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 告警内容 + Content *string `json:"Content,omitempty" name:"Content"` + + // 告警状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + State *string `json:"State,omitempty" name:"State"` + + // 触发的规则名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + RuleItem *string `json:"RuleItem,omitempty" name:"RuleItem"` + + // 告警渠道的id + // 注意:此字段可能返回 null,表示取不到有效值。 + TopicId *string `json:"TopicId,omitempty" name:"TopicId"` + + // 告警渠道的名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + TopicName *string `json:"TopicName,omitempty" name:"TopicName"` +} + +type PrometheusAlertRule struct { + + // 规则名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // prometheus语句 + Rule *string `json:"Rule,omitempty" name:"Rule"` + + // 额外标签 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 告警发送模板 + Template *string `json:"Template,omitempty" name:"Template"` + + // 持续时间 + For *string `json:"For,omitempty" name:"For"` + + // 该条规则的描述信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Describe *string `json:"Describe,omitempty" name:"Describe"` + + // 参考prometheus rule中的annotations + // 注意:此字段可能返回 null,表示取不到有效值。 + Annotations []*Label `json:"Annotations,omitempty" name:"Annotations"` + + // 告警规则状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + RuleState *int64 `json:"RuleState,omitempty" name:"RuleState"` +} + +type PrometheusAlertRuleDetail struct { + + // 规则名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 规则列表 + Rules []*PrometheusAlertRule `json:"Rules,omitempty" name:"Rules"` + + // 最后修改时间 + UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + + // 告警渠道 + Notification *PrometheusNotification `json:"Notification,omitempty" name:"Notification"` + + // 告警 id + Id *string `json:"Id,omitempty" name:"Id"` + + // 如果该告警来至模板下发,则TemplateId为模板id + // 注意:此字段可能返回 null,表示取不到有效值。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 计算周期 + // 注意:此字段可能返回 null,表示取不到有效值。 + Interval *string `json:"Interval,omitempty" name:"Interval"` +} + +type PrometheusConfigItem struct { + + // 名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 配置内容 + Config *string `json:"Config,omitempty" name:"Config"` + + // 用于出参,如果该配置来至模板,则为模板id + // 注意:此字段可能返回 null,表示取不到有效值。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` +} + +type PrometheusGrafanaInfo struct { + + // 是否启用 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 域名,只有开启外网访问才有效果 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // 内网地址,或者外网地址 + Address *string `json:"Address,omitempty" name:"Address"` + + // 是否开启了外网访问 + // close = 未开启外网访问 + // opening = 正在开启外网访问 + // open = 已开启外网访问 + Internet *string `json:"Internet,omitempty" name:"Internet"` + + // grafana管理员用户名 + AdminUser *string `json:"AdminUser,omitempty" name:"AdminUser"` +} + +type PrometheusInstanceOverview struct { + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 实例vpcId + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 实例子网Id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 实例当前的状态 + // prepare_env = 初始化环境 + // install_suit = 安装组件 + // running = 运行中 + Status *string `json:"Status,omitempty" name:"Status"` + + // COS桶存储 + COSBucket *string `json:"COSBucket,omitempty" name:"COSBucket"` + + // grafana默认地址,如果开启外网访问得为域名,否则为内网地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + GrafanaURL *string `json:"GrafanaURL,omitempty" name:"GrafanaURL"` + + // 关联集群总数 + // 注意:此字段可能返回 null,表示取不到有效值。 + BoundTotal *uint64 `json:"BoundTotal,omitempty" name:"BoundTotal"` + + // 运行正常的集群数 + // 注意:此字段可能返回 null,表示取不到有效值。 + BoundNormal *uint64 `json:"BoundNormal,omitempty" name:"BoundNormal"` +} + +type PrometheusJobTargets struct { + + // 该Job的targets列表 + Targets []*PrometheusTarget `json:"Targets,omitempty" name:"Targets"` + + // job的名称 + JobName *string `json:"JobName,omitempty" name:"JobName"` + + // targets总数 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 健康的target总数 + Up *uint64 `json:"Up,omitempty" name:"Up"` +} + +type PrometheusNotification struct { + + // 是否启用 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 收敛时间 + RepeatInterval *string `json:"RepeatInterval,omitempty" name:"RepeatInterval"` + + // 生效起始时间 + TimeRangeStart *string `json:"TimeRangeStart,omitempty" name:"TimeRangeStart"` + + // 生效结束时间 + TimeRangeEnd *string `json:"TimeRangeEnd,omitempty" name:"TimeRangeEnd"` + + // 告警通知方式。目前有SMS、EMAIL、CALL、WECHAT方式。 + // 分别代表:短信、邮件、电话、微信 + // 注意:此字段可能返回 null,表示取不到有效值。 + NotifyWay []*string `json:"NotifyWay,omitempty" name:"NotifyWay"` + + // 告警接收组(用户组) + // 注意:此字段可能返回 null,表示取不到有效值。 + ReceiverGroups []*uint64 `json:"ReceiverGroups,omitempty" name:"ReceiverGroups"` + + // 电话告警顺序。 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneNotifyOrder []*uint64 `json:"PhoneNotifyOrder,omitempty" name:"PhoneNotifyOrder"` + + // 电话告警次数。 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneCircleTimes *int64 `json:"PhoneCircleTimes,omitempty" name:"PhoneCircleTimes"` + + // 电话告警轮内间隔。单位:秒 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneInnerInterval *int64 `json:"PhoneInnerInterval,omitempty" name:"PhoneInnerInterval"` + + // 电话告警轮外间隔。单位:秒 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneCircleInterval *int64 `json:"PhoneCircleInterval,omitempty" name:"PhoneCircleInterval"` + + // 电话告警触达通知 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneArriveNotice *bool `json:"PhoneArriveNotice,omitempty" name:"PhoneArriveNotice"` + + // 通道类型,默认为amp,支持以下 + // amp + // webhook + // 注意:此字段可能返回 null,表示取不到有效值。 + Type *string `json:"Type,omitempty" name:"Type"` + + // 如果Type为webhook, 则该字段为必填项 + // 注意:此字段可能返回 null,表示取不到有效值。 + WebHook *string `json:"WebHook,omitempty" name:"WebHook"` +} + +type PrometheusTarget struct { + + // 抓取目标的URL + Url *string `json:"Url,omitempty" name:"Url"` + + // target当前状态,当前支持 + // up = 健康 + // down = 不健康 + // unknown = 未知 + State *string `json:"State,omitempty" name:"State"` + + // target的元label + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 上一次抓取的时间 + LastScrape *string `json:"LastScrape,omitempty" name:"LastScrape"` + + // 上一次抓取的耗时,单位是s + ScrapeDuration *float64 `json:"ScrapeDuration,omitempty" name:"ScrapeDuration"` + + // 上一次抓取如果错误,该字段存储错误信息 + Error *string `json:"Error,omitempty" name:"Error"` +} + +type PrometheusTemplate struct { + + // 模板名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 模板维度,支持以下类型 + // instance 实例级别 + // cluster 集群级别 + Level *string `json:"Level,omitempty" name:"Level"` + + // 模板描述 + // 注意:此字段可能返回 null,表示取不到有效值。 + Describe *string `json:"Describe,omitempty" name:"Describe"` + + // 当Level为instance时有效, + // 模板中的告警配置列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertRules []*PrometheusAlertRule `json:"AlertRules,omitempty" name:"AlertRules"` + + // 当Level为instance时有效, + // 模板中的聚合规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RecordRules []*PrometheusConfigItem `json:"RecordRules,omitempty" name:"RecordRules"` + + // 当Level为cluster时有效, + // 模板中的ServiceMonitor规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceMonitors []*PrometheusConfigItem `json:"ServiceMonitors,omitempty" name:"ServiceMonitors"` + + // 当Level为cluster时有效, + // 模板中的PodMonitors规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + PodMonitors []*PrometheusConfigItem `json:"PodMonitors,omitempty" name:"PodMonitors"` + + // 当Level为cluster时有效, + // 模板中的RawJobs规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RawJobs []*PrometheusConfigItem `json:"RawJobs,omitempty" name:"RawJobs"` + + // 模板的ID, 用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 最近更新时间,用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` + + // 当前版本,用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + Version *string `json:"Version,omitempty" name:"Version"` + + // 是否系统提供的默认模板,用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsDefault *bool `json:"IsDefault,omitempty" name:"IsDefault"` + + // 当Level为instance时有效, + // 模板中的告警配置列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertDetailRules []*PrometheusAlertRuleDetail `json:"AlertDetailRules,omitempty" name:"AlertDetailRules"` +} + +type PrometheusTemplateModify struct { + + // 修改名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 修改描述 + // 注意:此字段可能返回 null,表示取不到有效值。 + Describe *string `json:"Describe,omitempty" name:"Describe"` + + // 修改内容,只有当模板类型是Alert时生效 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertRules []*PrometheusAlertRule `json:"AlertRules,omitempty" name:"AlertRules"` + + // 当Level为instance时有效, + // 模板中的聚合规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RecordRules []*PrometheusConfigItem `json:"RecordRules,omitempty" name:"RecordRules"` + + // 当Level为cluster时有效, + // 模板中的ServiceMonitor规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceMonitors []*PrometheusConfigItem `json:"ServiceMonitors,omitempty" name:"ServiceMonitors"` + + // 当Level为cluster时有效, + // 模板中的PodMonitors规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + PodMonitors []*PrometheusConfigItem `json:"PodMonitors,omitempty" name:"PodMonitors"` + + // 当Level为cluster时有效, + // 模板中的RawJobs规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RawJobs []*PrometheusConfigItem `json:"RawJobs,omitempty" name:"RawJobs"` + + // 修改内容,只有当模板类型是Alert时生效 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertDetailRules []*PrometheusAlertRuleDetail `json:"AlertDetailRules,omitempty" name:"AlertDetailRules"` +} + +type PrometheusTemplateSyncTarget struct { + + // 目标所在地域 + Region *string `json:"Region,omitempty" name:"Region"` + + // 目标实例 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 集群id,只有当采集模板的Level为cluster的时候需要 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 最后一次同步时间, 用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + SyncTime *string `json:"SyncTime,omitempty" name:"SyncTime"` + + // 当前使用的模板版本,用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + Version *string `json:"Version,omitempty" name:"Version"` + + // 集群类型,只有当采集模板的Level为cluster的时候需要 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 用于出参,实例名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 用于出参,集群名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` +} + +type RegionInstance struct { + + // 地域名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + RegionName *string `json:"RegionName,omitempty" name:"RegionName"` + + // 地域ID + // 注意:此字段可能返回 null,表示取不到有效值。 + RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` + + // 地域状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 地域特性开关(按照JSON的形式返回所有属性) + // 注意:此字段可能返回 null,表示取不到有效值。 + FeatureGates *string `json:"FeatureGates,omitempty" name:"FeatureGates"` + + // 地域简称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Alias *string `json:"Alias,omitempty" name:"Alias"` + + // 地域白名单 + // 注意:此字段可能返回 null,表示取不到有效值。 + Remark *string `json:"Remark,omitempty" name:"Remark"` +} + +type RemoveNodeFromNodePoolRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点id列表,一次最多支持100台 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *RemoveNodeFromNodePoolRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RemoveNodeFromNodePoolRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "NodePoolId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RemoveNodeFromNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RemoveNodeFromNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RemoveNodeFromNodePoolResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RemoveNodeFromNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResourceDeleteOption struct { + + // 资源类型,例如CBS + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 集群删除时资源的删除模式:terminate(销毁),retain (保留) + DeleteMode *string `json:"DeleteMode,omitempty" name:"DeleteMode"` +} + +type RestartEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // EKS instance ids + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` +} + +func (r *RestartEKSContainerInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RestartEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RestartEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RestartEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RestartEKSContainerInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RestartEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RouteInfo struct { + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 目的端CIDR。 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 下一跳地址。 + GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` +} + +type RouteTableConflict struct { + + // 路由表类型。 + RouteTableType *string `json:"RouteTableType,omitempty" name:"RouteTableType"` + + // 路由表CIDR。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` + + // 路由表名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 路由表ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` +} + +type RouteTableInfo struct { + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 路由表CIDR。 + RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +type RunAutomationServiceEnabled struct { + + // 是否开启云自动化助手。取值范围:<br><li>TRUE:表示开启云自动化助手服务<br><li>FALSE:表示不开启云自动化助手服务<br><br>默认取值:FALSE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type RunInstancesForNode struct { + + // 节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD节点最小配置为4C8G。 + NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` + + // CVM创建透传参数,json化字符串格式,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口,传入公共参数外的其他参数即可,其中ImageId会替换为TKE集群OS对应的镜像。 + RunInstancesPara []*string `json:"RunInstancesPara,omitempty" name:"RunInstancesPara"` + + // 节点高级设置,该参数会覆盖集群级别设置的InstanceAdvancedSettings,和上边的RunInstancesPara按照顺序一一对应(当前只对节点自定义参数ExtraArgs生效)。 + InstanceAdvancedSettingsOverrides []*InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverrides,omitempty" name:"InstanceAdvancedSettingsOverrides"` +} + +type RunMonitorServiceEnabled struct { + + // 是否开启[云监控](/document/product/248)服务。取值范围:<br><li>TRUE:表示开启云监控服务<br><li>FALSE:表示不开启云监控服务<br><br>默认取值:TRUE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type RunSecurityServiceEnabled struct { + + // 是否开启[云安全](/document/product/296)服务。取值范围:<br><li>TRUE:表示开启云安全服务<br><li>FALSE:表示不开启云安全服务<br><br>默认取值:TRUE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type ScaleInClusterMasterRequest struct { + *tchttp.BaseRequest + + // 集群实例ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // master缩容选项 + ScaleInMasters []*ScaleInMaster `json:"ScaleInMasters,omitempty" name:"ScaleInMasters"` +} + +func (r *ScaleInClusterMasterRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ScaleInClusterMasterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ScaleInMasters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScaleInClusterMasterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ScaleInClusterMasterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ScaleInClusterMasterResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ScaleInClusterMasterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ScaleInMaster struct { + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 缩容的实例角色:MASTER,ETCD,MASTER_ETCD + NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` + + // 实例的保留模式 + InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` +} + +type ScaleOutClusterMasterRequest struct { + *tchttp.BaseRequest + + // 集群实例ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 新建节点参数 + RunInstancesForNode []*RunInstancesForNode `json:"RunInstancesForNode,omitempty" name:"RunInstancesForNode"` + + // 添加已有节点相关参数 + ExistedInstancesForNode []*ExistedInstancesForNode `json:"ExistedInstancesForNode,omitempty" name:"ExistedInstancesForNode"` + + // 实例高级设置 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 集群master组件自定义参数 + ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` +} + +func (r *ScaleOutClusterMasterRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ScaleOutClusterMasterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "RunInstancesForNode") + delete(f, "ExistedInstancesForNode") + delete(f, "InstanceAdvancedSettings") + delete(f, "ExtraArgs") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScaleOutClusterMasterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ScaleOutClusterMasterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ScaleOutClusterMasterResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ScaleOutClusterMasterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SecurityContext struct { + + // 安全能力清单 + // 注意:此字段可能返回 null,表示取不到有效值。 + Capabilities *Capabilities `json:"Capabilities,omitempty" name:"Capabilities"` +} + +type ServiceAccountAuthenticationOptions struct { + + // service-account-issuer + // 注意:此字段可能返回 null,表示取不到有效值。 + Issuer *string `json:"Issuer,omitempty" name:"Issuer"` + + // service-account-jwks-uri + // 注意:此字段可能返回 null,表示取不到有效值。 + JWKSURI *string `json:"JWKSURI,omitempty" name:"JWKSURI"` + + // 如果为true,则会自动创建允许匿名用户访问'/.well-known/openid-configuration'和/openid/v1/jwks的rbac规则 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoCreateDiscoveryAnonymousAuth *bool `json:"AutoCreateDiscoveryAnonymousAuth,omitempty" name:"AutoCreateDiscoveryAnonymousAuth"` +} + +type SetNodePoolNodeProtectionRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点id + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 节点是否需要移出保护 + ProtectedFromScaleIn *bool `json:"ProtectedFromScaleIn,omitempty" name:"ProtectedFromScaleIn"` +} + +func (r *SetNodePoolNodeProtectionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SetNodePoolNodeProtectionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "NodePoolId") + delete(f, "InstanceIds") + delete(f, "ProtectedFromScaleIn") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SetNodePoolNodeProtectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type SetNodePoolNodeProtectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 成功设置的节点id + // 注意:此字段可能返回 null,表示取不到有效值。 + SucceedInstanceIds []*string `json:"SucceedInstanceIds,omitempty" name:"SucceedInstanceIds"` + + // 没有成功设置的节点id + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SetNodePoolNodeProtectionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SetNodePoolNodeProtectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SyncPrometheusTemplateRequest struct { + *tchttp.BaseRequest + + // 实例id + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 同步目标 + Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` +} + +func (r *SyncPrometheusTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SyncPrometheusTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "Targets") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SyncPrometheusTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type SyncPrometheusTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SyncPrometheusTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SyncPrometheusTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Tag struct { + + // 标签键 + Key *string `json:"Key,omitempty" name:"Key"` + + // 标签值 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type TagSpecification struct { + + // 标签绑定的资源类型,当前支持类型:"cluster" + // 注意:此字段可能返回 null,表示取不到有效值。 + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 标签对列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +type Taint struct { + + // Key + Key *string `json:"Key,omitempty" name:"Key"` + + // Value + Value *string `json:"Value,omitempty" name:"Value"` + + // Effect + Effect *string `json:"Effect,omitempty" name:"Effect"` +} + +type TaskStepInfo struct { + + // 步骤名称 + Step *string `json:"Step,omitempty" name:"Step"` + + // 生命周期 + // pending : 步骤未开始 + // running: 步骤执行中 + // success: 步骤成功完成 + // failed: 步骤失败 + LifeState *string `json:"LifeState,omitempty" name:"LifeState"` + + // 步骤开始时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + StartAt *string `json:"StartAt,omitempty" name:"StartAt"` + + // 步骤结束时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + EndAt *string `json:"EndAt,omitempty" name:"EndAt"` + + // 若步骤生命周期为failed,则此字段显示错误信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedMsg *string `json:"FailedMsg,omitempty" name:"FailedMsg"` +} + +type TcpSocket struct { + + // TcpSocket检测的端口 + // 注意:此字段可能返回 null,表示取不到有效值。 + Port *uint64 `json:"Port,omitempty" name:"Port"` +} + +type UpdateClusterVersionRequest struct { + *tchttp.BaseRequest + + // 集群 Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 需要升级到的版本 + DstVersion *string `json:"DstVersion,omitempty" name:"DstVersion"` + + // 集群自定义参数 + ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 可容忍的最大不可用pod数目 + MaxNotReadyPercent *float64 `json:"MaxNotReadyPercent,omitempty" name:"MaxNotReadyPercent"` + + // 是否跳过预检查阶段 + SkipPreCheck *bool `json:"SkipPreCheck,omitempty" name:"SkipPreCheck"` +} + +func (r *UpdateClusterVersionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateClusterVersionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "DstVersion") + delete(f, "ExtraArgs") + delete(f, "MaxNotReadyPercent") + delete(f, "SkipPreCheck") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateClusterVersionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateClusterVersionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateClusterVersionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateClusterVersionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSClusterRequest struct { + *tchttp.BaseRequest + + // 弹性集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 弹性集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 弹性集群描述信息 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // 子网Id 列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 弹性容器集群公网访问LB信息 + PublicLB *ClusterPublicLB `json:"PublicLB,omitempty" name:"PublicLB"` + + // 弹性容器集群内网访问LB信息 + InternalLB *ClusterInternalLB `json:"InternalLB,omitempty" name:"InternalLB"` + + // Service 子网Id + ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` + + // 集群自定义的dns 服务器信息 + DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` + + // 是否清空自定义dns 服务器设置。为1 表示 是。其他表示 否。 + ClearDnsServer *string `json:"ClearDnsServer,omitempty" name:"ClearDnsServer"` + + // 将来删除集群时是否要删除cbs。默认为 FALSE + NeedDeleteCbs *bool `json:"NeedDeleteCbs,omitempty" name:"NeedDeleteCbs"` + + // 标记是否是新的内外网。默认为false + ProxyLB *bool `json:"ProxyLB,omitempty" name:"ProxyLB"` + + // 扩展参数。须是map[string]string 的json 格式。 + ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` +} + +func (r *UpdateEKSClusterRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateEKSClusterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ClusterName") + delete(f, "ClusterDesc") + delete(f, "SubnetIds") + delete(f, "PublicLB") + delete(f, "InternalLB") + delete(f, "ServiceSubnetId") + delete(f, "DnsServers") + delete(f, "ClearDnsServer") + delete(f, "NeedDeleteCbs") + delete(f, "ProxyLB") + delete(f, "ExtraParam") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateEKSClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateEKSClusterResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateEKSClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSContainerInstanceRequest struct { + *tchttp.BaseRequest + + // 容器实例 ID + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 实例重启策略: Always(总是重启)、Never(从不重启)、OnFailure(失败时重启) + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 数据卷,包含NfsVolume数组和CbsVolume数组 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 容器组 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // Init 容器组 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` + + // 容器实例名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 镜像仓库凭证数组 + ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` +} + +func (r *UpdateEKSContainerInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateEKSContainerInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiId") + delete(f, "RestartPolicy") + delete(f, "EksCiVolume") + delete(f, "Containers") + delete(f, "InitContainers") + delete(f, "Name") + delete(f, "ImageRegistryCredentials") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateEKSContainerInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSContainerInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器实例 ID + // 注意:此字段可能返回 null,表示取不到有效值。 + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateEKSContainerInstanceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateEKSContainerInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeAbleInstancesItem struct { + + // 节点Id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 节点的当前版本 + Version *string `json:"Version,omitempty" name:"Version"` + + // 当前版本的最新小版本 + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` +} + +type UpgradeClusterInstancesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // create 表示开始一次升级任务 + // pause 表示停止任务 + // resume表示继续任务 + // abort表示终止任务 + Operation *string `json:"Operation,omitempty" name:"Operation"` + + // 升级类型,只有Operation是create需要设置 + // reset 大版本重装升级 + // hot 小版本热升级 + // major 大版本原地升级 + UpgradeType *string `json:"UpgradeType,omitempty" name:"UpgradeType"` + + // 需要升级的节点列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 当节点重新加入集群时候所使用的参数,参考添加已有节点接口 + ResetParam *UpgradeNodeResetParam `json:"ResetParam,omitempty" name:"ResetParam"` + + // 是否忽略节点升级前检查 + SkipPreCheck *bool `json:"SkipPreCheck,omitempty" name:"SkipPreCheck"` + + // 最大可容忍的不可用Pod比例 + MaxNotReadyPercent *float64 `json:"MaxNotReadyPercent,omitempty" name:"MaxNotReadyPercent"` +} + +func (r *UpgradeClusterInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpgradeClusterInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "Operation") + delete(f, "UpgradeType") + delete(f, "InstanceIds") + delete(f, "ResetParam") + delete(f, "SkipPreCheck") + delete(f, "MaxNotReadyPercent") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpgradeClusterInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeClusterInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpgradeClusterInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpgradeClusterInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeNodeResetParam struct { + + // 实例额外需要设置参数信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 节点登录信息(目前仅支持使用Password或者单个KeyIds) + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。(目前仅支持设置单个sgId) + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +type VersionInstance struct { + + // 版本名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 版本信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Version *string `json:"Version,omitempty" name:"Version"` + + // Remark + // 注意:此字段可能返回 null,表示取不到有效值。 + Remark *string `json:"Remark,omitempty" name:"Remark"` +} + +type VolumeMount struct { + + // volume名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 挂载路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountPath *string `json:"MountPath,omitempty" name:"MountPath"` + + // 是否只读 + // 注意:此字段可能返回 null,表示取不到有效值。 + ReadOnly *bool `json:"ReadOnly,omitempty" name:"ReadOnly"` + + // 子路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + SubPath *string `json:"SubPath,omitempty" name:"SubPath"` + + // 传播挂载方式 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountPropagation *string `json:"MountPropagation,omitempty" name:"MountPropagation"` + + // 子路径表达式 + // 注意:此字段可能返回 null,表示取不到有效值。 + SubPathExpr *string `json:"SubPathExpr,omitempty" name:"SubPathExpr"` +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/LICENSE b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..efc75a2253eac0053be445ee5f529090466b9faf --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/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/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go new file mode 100644 index 0000000000000000000000000000000000000000..c409fabfa06ee652737d4f62e36608a474595048 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go @@ -0,0 +1,15698 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v20170312 + +import ( + "context" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const APIVersion = "2017-03-12" + +type Client struct { + common.Client +} + +// Deprecated +func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { + cpf := profile.NewClientProfile() + client = &Client{} + client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf) + return +} + +func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { + client = &Client{} + client.Init(region). + WithCredential(credential). + WithProfile(clientProfile) + return +} + +func NewAcceptAttachCcnInstancesRequest() (request *AcceptAttachCcnInstancesRequest) { + request = &AcceptAttachCcnInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AcceptAttachCcnInstances") + + return +} + +func NewAcceptAttachCcnInstancesResponse() (response *AcceptAttachCcnInstancesResponse) { + response = &AcceptAttachCcnInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AcceptAttachCcnInstances +// 本接口(AcceptAttachCcnInstances)用于跨账号关联实例时,云联网所有者接受并同意关联操作。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_ISNOTFINANCEACCOUNT = "UnsupportedOperation.IsNotFinanceAccount" +// UNSUPPORTEDOPERATION_NOTPENDINGCCNINSTANCE = "UnsupportedOperation.NotPendingCcnInstance" +// UNSUPPORTEDOPERATION_UNABLECROSSFINANCE = "UnsupportedOperation.UnableCrossFinance" +func (c *Client) AcceptAttachCcnInstances(request *AcceptAttachCcnInstancesRequest) (response *AcceptAttachCcnInstancesResponse, err error) { + if request == nil { + request = NewAcceptAttachCcnInstancesRequest() + } + + response = NewAcceptAttachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +// AcceptAttachCcnInstances +// 本接口(AcceptAttachCcnInstances)用于跨账号关联实例时,云联网所有者接受并同意关联操作。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" +// UNSUPPORTEDOPERATION_ISNOTFINANCEACCOUNT = "UnsupportedOperation.IsNotFinanceAccount" +// UNSUPPORTEDOPERATION_NOTPENDINGCCNINSTANCE = "UnsupportedOperation.NotPendingCcnInstance" +// UNSUPPORTEDOPERATION_UNABLECROSSFINANCE = "UnsupportedOperation.UnableCrossFinance" +func (c *Client) AcceptAttachCcnInstancesWithContext(ctx context.Context, request *AcceptAttachCcnInstancesRequest) (response *AcceptAttachCcnInstancesResponse, err error) { + if request == nil { + request = NewAcceptAttachCcnInstancesRequest() + } + request.SetContext(ctx) + + response = NewAcceptAttachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +func NewAddBandwidthPackageResourcesRequest() (request *AddBandwidthPackageResourcesRequest) { + request = &AddBandwidthPackageResourcesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AddBandwidthPackageResources") + + return +} + +func NewAddBandwidthPackageResourcesResponse() (response *AddBandwidthPackageResourcesResponse) { + response = &AddBandwidthPackageResourcesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddBandwidthPackageResources +// 接口用于添加带宽包资源,包括[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)和[负载均衡](https://cloud.tencent.com/document/product/214/517)等 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RESOURCEALREADYEXISTED = "InvalidParameterValue.ResourceAlreadyExisted" +// INVALIDPARAMETERVALUE_RESOURCEIDMALFORMED = "InvalidParameterValue.ResourceIdMalformed" +// INVALIDPARAMETERVALUE_RESOURCENOTFOUND = "InvalidParameterValue.ResourceNotFound" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +// UNSUPPORTEDOPERATION_INVALIDRESOURCEINTERNETCHARGETYPE = "UnsupportedOperation.InvalidResourceInternetChargeType" +// UNSUPPORTEDOPERATION_INVALIDRESOURCEPROTOCOL = "UnsupportedOperation.InvalidResourceProtocol" +func (c *Client) AddBandwidthPackageResources(request *AddBandwidthPackageResourcesRequest) (response *AddBandwidthPackageResourcesResponse, err error) { + if request == nil { + request = NewAddBandwidthPackageResourcesRequest() + } + + response = NewAddBandwidthPackageResourcesResponse() + err = c.Send(request, response) + return +} + +// AddBandwidthPackageResources +// 接口用于添加带宽包资源,包括[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)和[负载均衡](https://cloud.tencent.com/document/product/214/517)等 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RESOURCEALREADYEXISTED = "InvalidParameterValue.ResourceAlreadyExisted" +// INVALIDPARAMETERVALUE_RESOURCEIDMALFORMED = "InvalidParameterValue.ResourceIdMalformed" +// INVALIDPARAMETERVALUE_RESOURCENOTFOUND = "InvalidParameterValue.ResourceNotFound" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +// UNSUPPORTEDOPERATION_INVALIDRESOURCEINTERNETCHARGETYPE = "UnsupportedOperation.InvalidResourceInternetChargeType" +// UNSUPPORTEDOPERATION_INVALIDRESOURCEPROTOCOL = "UnsupportedOperation.InvalidResourceProtocol" +func (c *Client) AddBandwidthPackageResourcesWithContext(ctx context.Context, request *AddBandwidthPackageResourcesRequest) (response *AddBandwidthPackageResourcesResponse, err error) { + if request == nil { + request = NewAddBandwidthPackageResourcesRequest() + } + request.SetContext(ctx) + + response = NewAddBandwidthPackageResourcesResponse() + err = c.Send(request, response) + return +} + +func NewAddIp6RulesRequest() (request *AddIp6RulesRequest) { + request = &AddIp6RulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AddIp6Rules") + + return +} + +func NewAddIp6RulesResponse() (response *AddIp6RulesResponse) { + response = &AddIp6RulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddIp6Rules +// 1. 该接口用于在转换实例下添加IPV6转换规则。 +// +// 2. 支持在同一个转换实例下批量添加转换规则,一个账户在一个地域最多50个。 +// +// 3. 一个完整的转换规则包括vip6:vport6:protocol:vip:vport,其中vip6:vport6:protocol必须是唯一。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) AddIp6Rules(request *AddIp6RulesRequest) (response *AddIp6RulesResponse, err error) { + if request == nil { + request = NewAddIp6RulesRequest() + } + + response = NewAddIp6RulesResponse() + err = c.Send(request, response) + return +} + +// AddIp6Rules +// 1. 该接口用于在转换实例下添加IPV6转换规则。 +// +// 2. 支持在同一个转换实例下批量添加转换规则,一个账户在一个地域最多50个。 +// +// 3. 一个完整的转换规则包括vip6:vport6:protocol:vip:vport,其中vip6:vport6:protocol必须是唯一。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) AddIp6RulesWithContext(ctx context.Context, request *AddIp6RulesRequest) (response *AddIp6RulesResponse, err error) { + if request == nil { + request = NewAddIp6RulesRequest() + } + request.SetContext(ctx) + + response = NewAddIp6RulesResponse() + err = c.Send(request, response) + return +} + +func NewAddTemplateMemberRequest() (request *AddTemplateMemberRequest) { + request = &AddTemplateMemberRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AddTemplateMember") + + return +} + +func NewAddTemplateMemberResponse() (response *AddTemplateMemberResponse) { + response = &AddTemplateMemberResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddTemplateMember +// 增加模版对象中的IP地址、协议端口、IP地址组、协议端口组。当前仅支持北京、泰国、北美地域请求。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) AddTemplateMember(request *AddTemplateMemberRequest) (response *AddTemplateMemberResponse, err error) { + if request == nil { + request = NewAddTemplateMemberRequest() + } + + response = NewAddTemplateMemberResponse() + err = c.Send(request, response) + return +} + +// AddTemplateMember +// 增加模版对象中的IP地址、协议端口、IP地址组、协议端口组。当前仅支持北京、泰国、北美地域请求。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) AddTemplateMemberWithContext(ctx context.Context, request *AddTemplateMemberRequest) (response *AddTemplateMemberResponse, err error) { + if request == nil { + request = NewAddTemplateMemberRequest() + } + request.SetContext(ctx) + + response = NewAddTemplateMemberResponse() + err = c.Send(request, response) + return +} + +func NewAllocateAddressesRequest() (request *AllocateAddressesRequest) { + request = &AllocateAddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AllocateAddresses") + + return +} + +func NewAllocateAddressesResponse() (response *AllocateAddressesResponse) { + response = &AllocateAddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AllocateAddresses +// 本接口 (AllocateAddresses) 用于申请一个或多个[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)。 +// +// * EIP 是专为动态云计算设计的静态 IP 地址。借助 EIP,您可以快速将 EIP 重新映射到您的另一个实例上,从而屏蔽实例故障。 +// +// * 您的 EIP 与腾讯云账户相关联,而不是与某个实例相关联。在您选择显式释放该地址,或欠费超过24小时之前,它会一直与您的腾讯云账户保持关联。 +// +// * 一个腾讯云账户在每个地域能申请的 EIP 最大配额有所限制,可参见 [EIP 产品简介](https://cloud.tencent.com/document/product/213/5733),上述配额可通过 DescribeAddressQuota 接口获取。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" +// ADDRESSQUOTALIMITEXCEEDED_DAILYALLOCATE = "AddressQuotaLimitExceeded.DailyAllocate" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTAVAILABLE = "InvalidParameterValue.AddressIpNotAvailable" +// INVALIDPARAMETERVALUE_BANDWIDTHOUTOFRANGE = "InvalidParameterValue.BandwidthOutOfRange" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_BANDWIDTHTOOSMALL = "InvalidParameterValue.BandwidthTooSmall" +// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" +// INVALIDPARAMETERVALUE_INVALIDDEDICATEDCLUSTERID = "InvalidParameterValue.InvalidDedicatedClusterId" +// INVALIDPARAMETERVALUE_INVALIDTAG = "InvalidParameterValue.InvalidTag" +// INVALIDPARAMETERVALUE_MIXEDADDRESSIPSETTYPE = "InvalidParameterValue.MixedAddressIpSetType" +// INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" +// INVALIDPARAMETERVALUE_TAGNOTEXISTED = "InvalidParameterValue.TagNotExisted" +// INVALIDPARAMETERVALUE_UNAVAILABLEZONE = "InvalidParameterValue.UnavailableZone" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +func (c *Client) AllocateAddresses(request *AllocateAddressesRequest) (response *AllocateAddressesResponse, err error) { + if request == nil { + request = NewAllocateAddressesRequest() + } + + response = NewAllocateAddressesResponse() + err = c.Send(request, response) + return +} + +// AllocateAddresses +// 本接口 (AllocateAddresses) 用于申请一个或多个[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)。 +// +// * EIP 是专为动态云计算设计的静态 IP 地址。借助 EIP,您可以快速将 EIP 重新映射到您的另一个实例上,从而屏蔽实例故障。 +// +// * 您的 EIP 与腾讯云账户相关联,而不是与某个实例相关联。在您选择显式释放该地址,或欠费超过24小时之前,它会一直与您的腾讯云账户保持关联。 +// +// * 一个腾讯云账户在每个地域能申请的 EIP 最大配额有所限制,可参见 [EIP 产品简介](https://cloud.tencent.com/document/product/213/5733),上述配额可通过 DescribeAddressQuota 接口获取。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" +// ADDRESSQUOTALIMITEXCEEDED_DAILYALLOCATE = "AddressQuotaLimitExceeded.DailyAllocate" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTAVAILABLE = "InvalidParameterValue.AddressIpNotAvailable" +// INVALIDPARAMETERVALUE_BANDWIDTHOUTOFRANGE = "InvalidParameterValue.BandwidthOutOfRange" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_BANDWIDTHTOOSMALL = "InvalidParameterValue.BandwidthTooSmall" +// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" +// INVALIDPARAMETERVALUE_INVALIDDEDICATEDCLUSTERID = "InvalidParameterValue.InvalidDedicatedClusterId" +// INVALIDPARAMETERVALUE_INVALIDTAG = "InvalidParameterValue.InvalidTag" +// INVALIDPARAMETERVALUE_MIXEDADDRESSIPSETTYPE = "InvalidParameterValue.MixedAddressIpSetType" +// INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" +// INVALIDPARAMETERVALUE_TAGNOTEXISTED = "InvalidParameterValue.TagNotExisted" +// INVALIDPARAMETERVALUE_UNAVAILABLEZONE = "InvalidParameterValue.UnavailableZone" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +func (c *Client) AllocateAddressesWithContext(ctx context.Context, request *AllocateAddressesRequest) (response *AllocateAddressesResponse, err error) { + if request == nil { + request = NewAllocateAddressesRequest() + } + request.SetContext(ctx) + + response = NewAllocateAddressesResponse() + err = c.Send(request, response) + return +} + +func NewAllocateIp6AddressesBandwidthRequest() (request *AllocateIp6AddressesBandwidthRequest) { + request = &AllocateIp6AddressesBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AllocateIp6AddressesBandwidth") + + return +} + +func NewAllocateIp6AddressesBandwidthResponse() (response *AllocateIp6AddressesBandwidthResponse) { + response = &AllocateIp6AddressesBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AllocateIp6AddressesBandwidth +// 该接口用于给IPv6地址初次分配公网带宽 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTINVPC = "InvalidParameterValue.AddressIpNotInVpc" +// INVALIDPARAMETERVALUE_ADDRESSPUBLISHED = "InvalidParameterValue.AddressPublished" +// INVALIDPARAMETERVALUE_INVALIDIPV6 = "InvalidParameterValue.InvalidIpv6" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +func (c *Client) AllocateIp6AddressesBandwidth(request *AllocateIp6AddressesBandwidthRequest) (response *AllocateIp6AddressesBandwidthResponse, err error) { + if request == nil { + request = NewAllocateIp6AddressesBandwidthRequest() + } + + response = NewAllocateIp6AddressesBandwidthResponse() + err = c.Send(request, response) + return +} + +// AllocateIp6AddressesBandwidth +// 该接口用于给IPv6地址初次分配公网带宽 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTINVPC = "InvalidParameterValue.AddressIpNotInVpc" +// INVALIDPARAMETERVALUE_ADDRESSPUBLISHED = "InvalidParameterValue.AddressPublished" +// INVALIDPARAMETERVALUE_INVALIDIPV6 = "InvalidParameterValue.InvalidIpv6" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +func (c *Client) AllocateIp6AddressesBandwidthWithContext(ctx context.Context, request *AllocateIp6AddressesBandwidthRequest) (response *AllocateIp6AddressesBandwidthResponse, err error) { + if request == nil { + request = NewAllocateIp6AddressesBandwidthRequest() + } + request.SetContext(ctx) + + response = NewAllocateIp6AddressesBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewAssignIpv6AddressesRequest() (request *AssignIpv6AddressesRequest) { + request = &AssignIpv6AddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssignIpv6Addresses") + + return +} + +func NewAssignIpv6AddressesResponse() (response *AssignIpv6AddressesResponse) { + response = &AssignIpv6AddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssignIpv6Addresses +// 本接口(AssignIpv6Addresses)用于弹性网卡申请`IPv6`地址。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 可以指定`IPv6`地址申请,地址类型不能为主`IP`,`IPv6`地址暂时只支持作为辅助`IP`。 +// +// * 地址必须要在弹性网卡所在子网内,而且不能被占用。 +// +// * 在弹性网卡上申请一个到多个辅助`IPv6`地址,接口会在弹性网卡所在子网段内返回指定数量的辅助`IPv6`地址。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED_ADDRESS = "LimitExceeded.Address" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE_ADDRESS = "ResourceInUse.Address" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_UNASSIGNCIDRBLOCK = "UnsupportedOperation.UnassignCidrBlock" +func (c *Client) AssignIpv6Addresses(request *AssignIpv6AddressesRequest) (response *AssignIpv6AddressesResponse, err error) { + if request == nil { + request = NewAssignIpv6AddressesRequest() + } + + response = NewAssignIpv6AddressesResponse() + err = c.Send(request, response) + return +} + +// AssignIpv6Addresses +// 本接口(AssignIpv6Addresses)用于弹性网卡申请`IPv6`地址。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 可以指定`IPv6`地址申请,地址类型不能为主`IP`,`IPv6`地址暂时只支持作为辅助`IP`。 +// +// * 地址必须要在弹性网卡所在子网内,而且不能被占用。 +// +// * 在弹性网卡上申请一个到多个辅助`IPv6`地址,接口会在弹性网卡所在子网段内返回指定数量的辅助`IPv6`地址。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED_ADDRESS = "LimitExceeded.Address" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE_ADDRESS = "ResourceInUse.Address" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_UNASSIGNCIDRBLOCK = "UnsupportedOperation.UnassignCidrBlock" +func (c *Client) AssignIpv6AddressesWithContext(ctx context.Context, request *AssignIpv6AddressesRequest) (response *AssignIpv6AddressesResponse, err error) { + if request == nil { + request = NewAssignIpv6AddressesRequest() + } + request.SetContext(ctx) + + response = NewAssignIpv6AddressesResponse() + err = c.Send(request, response) + return +} + +func NewAssignIpv6CidrBlockRequest() (request *AssignIpv6CidrBlockRequest) { + request = &AssignIpv6CidrBlockRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssignIpv6CidrBlock") + + return +} + +func NewAssignIpv6CidrBlockResponse() (response *AssignIpv6CidrBlockResponse) { + response = &AssignIpv6CidrBlockResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssignIpv6CidrBlock +// 本接口(AssignIpv6CidrBlock)用于分配IPv6网段。 +// +// * 使用本接口前,您需要已有VPC实例,如果没有可通过接口<a href="https://cloud.tencent.com/document/api/215/15774" title="CreateVpc" target="_blank">CreateVpc</a>创建。 +// +// * 每个VPC只能申请一个IPv6网段 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED_CIDRBLOCK = "LimitExceeded.CidrBlock" +// RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AssignIpv6CidrBlock(request *AssignIpv6CidrBlockRequest) (response *AssignIpv6CidrBlockResponse, err error) { + if request == nil { + request = NewAssignIpv6CidrBlockRequest() + } + + response = NewAssignIpv6CidrBlockResponse() + err = c.Send(request, response) + return +} + +// AssignIpv6CidrBlock +// 本接口(AssignIpv6CidrBlock)用于分配IPv6网段。 +// +// * 使用本接口前,您需要已有VPC实例,如果没有可通过接口<a href="https://cloud.tencent.com/document/api/215/15774" title="CreateVpc" target="_blank">CreateVpc</a>创建。 +// +// * 每个VPC只能申请一个IPv6网段 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED_CIDRBLOCK = "LimitExceeded.CidrBlock" +// RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AssignIpv6CidrBlockWithContext(ctx context.Context, request *AssignIpv6CidrBlockRequest) (response *AssignIpv6CidrBlockResponse, err error) { + if request == nil { + request = NewAssignIpv6CidrBlockRequest() + } + request.SetContext(ctx) + + response = NewAssignIpv6CidrBlockResponse() + err = c.Send(request, response) + return +} + +func NewAssignIpv6SubnetCidrBlockRequest() (request *AssignIpv6SubnetCidrBlockRequest) { + request = &AssignIpv6SubnetCidrBlockRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssignIpv6SubnetCidrBlock") + + return +} + +func NewAssignIpv6SubnetCidrBlockResponse() (response *AssignIpv6SubnetCidrBlockResponse) { + response = &AssignIpv6SubnetCidrBlockResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssignIpv6SubnetCidrBlock +// 本接口(AssignIpv6SubnetCidrBlock)用于分配IPv6子网段。 +// +// * 给子网分配 `IPv6` 网段,要求子网所属 `VPC` 已获得 `IPv6` 网段。如果尚未分配,请先通过接口 `AssignIpv6CidrBlock` 给子网所属 `VPC` 分配一个 `IPv6` 网段。否则无法分配 `IPv6` 子网段。 +// +// * 每个子网只能分配一个IPv6网段。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" +// LIMITEXCEEDED_SUBNETCIDRBLOCK = "LimitExceeded.SubnetCidrBlock" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) AssignIpv6SubnetCidrBlock(request *AssignIpv6SubnetCidrBlockRequest) (response *AssignIpv6SubnetCidrBlockResponse, err error) { + if request == nil { + request = NewAssignIpv6SubnetCidrBlockRequest() + } + + response = NewAssignIpv6SubnetCidrBlockResponse() + err = c.Send(request, response) + return +} + +// AssignIpv6SubnetCidrBlock +// 本接口(AssignIpv6SubnetCidrBlock)用于分配IPv6子网段。 +// +// * 给子网分配 `IPv6` 网段,要求子网所属 `VPC` 已获得 `IPv6` 网段。如果尚未分配,请先通过接口 `AssignIpv6CidrBlock` 给子网所属 `VPC` 分配一个 `IPv6` 网段。否则无法分配 `IPv6` 子网段。 +// +// * 每个子网只能分配一个IPv6网段。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" +// LIMITEXCEEDED_SUBNETCIDRBLOCK = "LimitExceeded.SubnetCidrBlock" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) AssignIpv6SubnetCidrBlockWithContext(ctx context.Context, request *AssignIpv6SubnetCidrBlockRequest) (response *AssignIpv6SubnetCidrBlockResponse, err error) { + if request == nil { + request = NewAssignIpv6SubnetCidrBlockRequest() + } + request.SetContext(ctx) + + response = NewAssignIpv6SubnetCidrBlockResponse() + err = c.Send(request, response) + return +} + +func NewAssignPrivateIpAddressesRequest() (request *AssignPrivateIpAddressesRequest) { + request = &AssignPrivateIpAddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssignPrivateIpAddresses") + + return +} + +func NewAssignPrivateIpAddressesResponse() (response *AssignPrivateIpAddressesResponse) { + response = &AssignPrivateIpAddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssignPrivateIpAddresses +// 本接口(AssignPrivateIpAddresses)用于弹性网卡申请内网 IP。 +// +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 可以指定内网IP地址申请,内网IP地址类型不能为主IP,主IP已存在,不能修改,内网IP必须要弹性网卡所在子网内,而且不能被占用。 +// +// * 在弹性网卡上申请一个到多个辅助内网IP,接口会在弹性网卡所在子网网段内返回指定数量的辅助内网IP。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_RESOURCEMISMATCH = "UnsupportedOperation.ResourceMismatch" +func (c *Client) AssignPrivateIpAddresses(request *AssignPrivateIpAddressesRequest) (response *AssignPrivateIpAddressesResponse, err error) { + if request == nil { + request = NewAssignPrivateIpAddressesRequest() + } + + response = NewAssignPrivateIpAddressesResponse() + err = c.Send(request, response) + return +} + +// AssignPrivateIpAddresses +// 本接口(AssignPrivateIpAddresses)用于弹性网卡申请内网 IP。 +// +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 可以指定内网IP地址申请,内网IP地址类型不能为主IP,主IP已存在,不能修改,内网IP必须要弹性网卡所在子网内,而且不能被占用。 +// +// * 在弹性网卡上申请一个到多个辅助内网IP,接口会在弹性网卡所在子网网段内返回指定数量的辅助内网IP。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_RESOURCEMISMATCH = "UnsupportedOperation.ResourceMismatch" +func (c *Client) AssignPrivateIpAddressesWithContext(ctx context.Context, request *AssignPrivateIpAddressesRequest) (response *AssignPrivateIpAddressesResponse, err error) { + if request == nil { + request = NewAssignPrivateIpAddressesRequest() + } + request.SetContext(ctx) + + response = NewAssignPrivateIpAddressesResponse() + err = c.Send(request, response) + return +} + +func NewAssociateAddressRequest() (request *AssociateAddressRequest) { + request = &AssociateAddressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssociateAddress") + + return +} + +func NewAssociateAddressResponse() (response *AssociateAddressResponse) { + response = &AssociateAddressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateAddress +// 本接口 (AssociateAddress) 用于将[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)绑定到实例或弹性网卡的指定内网 IP 上。 +// +// * 将 EIP 绑定到实例(CVM)上,其本质是将 EIP 绑定到实例上主网卡的主内网 IP 上。 +// +// * 将 EIP 绑定到主网卡的主内网IP上,绑定过程会把其上绑定的普通公网 IP 自动解绑并释放。 +// +// * 将 EIP 绑定到指定网卡的内网 IP上(非主网卡的主内网IP),则必须先解绑该 EIP,才能再绑定新的。 +// +// * 将 EIP 绑定到NAT网关,请使用接口[AssociateNatGatewayAddress](https://cloud.tencent.com/document/product/215/36722) +// +// * EIP 如果欠费或被封堵,则不能被绑定。 +// +// * 只有状态为 UNBIND 的 EIP 才能够被绑定。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ADDRESSENIINFONOTFOUND = "FailedOperation.AddressEniInfoNotFound" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDINSTANCEID_ALREADYBINDEIP = "InvalidInstanceId.AlreadyBindEip" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDNETWORKINTERFACEID_NOTFOUND = "InvalidNetworkInterfaceId.NotFound" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTAPPLICABLE = "InvalidParameterValue.AddressNotApplicable" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" +// INVALIDPARAMETERVALUE_INSTANCEDOESNOTSUPPORTANYCAST = "InvalidParameterValue.InstanceDoesNotSupportAnycast" +// INVALIDPARAMETERVALUE_INSTANCEHASWANIP = "InvalidParameterValue.InstanceHasWanIP" +// INVALIDPARAMETERVALUE_INSTANCENOWANIP = "InvalidParameterValue.InstanceNoWanIP" +// INVALIDPARAMETERVALUE_INSTANCENORMALPUBLICIPBLOCKED = "InvalidParameterValue.InstanceNormalPublicIpBlocked" +// INVALIDPARAMETERVALUE_INSTANCENOTMATCHASSOCIATEENI = "InvalidParameterValue.InstanceNotMatchAssociateEni" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEINTERNETCHARGETYPE = "InvalidParameterValue.InvalidInstanceInternetChargeType" +// INVALIDPARAMETERVALUE_INVALIDINSTANCESTATE = "InvalidParameterValue.InvalidInstanceState" +// INVALIDPARAMETERVALUE_LBALREADYBINDEIP = "InvalidParameterValue.LBAlreadyBindEip" +// INVALIDPARAMETERVALUE_MISSINGASSOCIATEENTITY = "InvalidParameterValue.MissingAssociateEntity" +// INVALIDPARAMETERVALUE_NETWORKINTERFACENOTFOUND = "InvalidParameterValue.NetworkInterfaceNotFound" +// INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" +// INVALIDPRIVATEIPADDRESS_ALREADYBINDEIP = "InvalidPrivateIpAddress.AlreadyBindEip" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INCORRECTADDRESSRESOURCETYPE = "UnsupportedOperation.IncorrectAddressResourceType" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +// UNSUPPORTEDOPERATION_INVALIDADDRESSINTERNETCHARGETYPE = "UnsupportedOperation.InvalidAddressInternetChargeType" +// UNSUPPORTEDOPERATION_ISPNOTSUPPORTED = "UnsupportedOperation.IspNotSupported" +func (c *Client) AssociateAddress(request *AssociateAddressRequest) (response *AssociateAddressResponse, err error) { + if request == nil { + request = NewAssociateAddressRequest() + } + + response = NewAssociateAddressResponse() + err = c.Send(request, response) + return +} + +// AssociateAddress +// 本接口 (AssociateAddress) 用于将[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)绑定到实例或弹性网卡的指定内网 IP 上。 +// +// * 将 EIP 绑定到实例(CVM)上,其本质是将 EIP 绑定到实例上主网卡的主内网 IP 上。 +// +// * 将 EIP 绑定到主网卡的主内网IP上,绑定过程会把其上绑定的普通公网 IP 自动解绑并释放。 +// +// * 将 EIP 绑定到指定网卡的内网 IP上(非主网卡的主内网IP),则必须先解绑该 EIP,才能再绑定新的。 +// +// * 将 EIP 绑定到NAT网关,请使用接口[AssociateNatGatewayAddress](https://cloud.tencent.com/document/product/215/36722) +// +// * EIP 如果欠费或被封堵,则不能被绑定。 +// +// * 只有状态为 UNBIND 的 EIP 才能够被绑定。 +// +// 可能返回的错误码: +// FAILEDOPERATION_ADDRESSENIINFONOTFOUND = "FailedOperation.AddressEniInfoNotFound" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDINSTANCEID_ALREADYBINDEIP = "InvalidInstanceId.AlreadyBindEip" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDNETWORKINTERFACEID_NOTFOUND = "InvalidNetworkInterfaceId.NotFound" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTAPPLICABLE = "InvalidParameterValue.AddressNotApplicable" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" +// INVALIDPARAMETERVALUE_INSTANCEDOESNOTSUPPORTANYCAST = "InvalidParameterValue.InstanceDoesNotSupportAnycast" +// INVALIDPARAMETERVALUE_INSTANCEHASWANIP = "InvalidParameterValue.InstanceHasWanIP" +// INVALIDPARAMETERVALUE_INSTANCENOWANIP = "InvalidParameterValue.InstanceNoWanIP" +// INVALIDPARAMETERVALUE_INSTANCENORMALPUBLICIPBLOCKED = "InvalidParameterValue.InstanceNormalPublicIpBlocked" +// INVALIDPARAMETERVALUE_INSTANCENOTMATCHASSOCIATEENI = "InvalidParameterValue.InstanceNotMatchAssociateEni" +// INVALIDPARAMETERVALUE_INVALIDINSTANCEINTERNETCHARGETYPE = "InvalidParameterValue.InvalidInstanceInternetChargeType" +// INVALIDPARAMETERVALUE_INVALIDINSTANCESTATE = "InvalidParameterValue.InvalidInstanceState" +// INVALIDPARAMETERVALUE_LBALREADYBINDEIP = "InvalidParameterValue.LBAlreadyBindEip" +// INVALIDPARAMETERVALUE_MISSINGASSOCIATEENTITY = "InvalidParameterValue.MissingAssociateEntity" +// INVALIDPARAMETERVALUE_NETWORKINTERFACENOTFOUND = "InvalidParameterValue.NetworkInterfaceNotFound" +// INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" +// INVALIDPRIVATEIPADDRESS_ALREADYBINDEIP = "InvalidPrivateIpAddress.AlreadyBindEip" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INCORRECTADDRESSRESOURCETYPE = "UnsupportedOperation.IncorrectAddressResourceType" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +// UNSUPPORTEDOPERATION_INVALIDADDRESSINTERNETCHARGETYPE = "UnsupportedOperation.InvalidAddressInternetChargeType" +// UNSUPPORTEDOPERATION_ISPNOTSUPPORTED = "UnsupportedOperation.IspNotSupported" +func (c *Client) AssociateAddressWithContext(ctx context.Context, request *AssociateAddressRequest) (response *AssociateAddressResponse, err error) { + if request == nil { + request = NewAssociateAddressRequest() + } + request.SetContext(ctx) + + response = NewAssociateAddressResponse() + err = c.Send(request, response) + return +} + +func NewAssociateDhcpIpWithAddressIpRequest() (request *AssociateDhcpIpWithAddressIpRequest) { + request = &AssociateDhcpIpWithAddressIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssociateDhcpIpWithAddressIp") + + return +} + +func NewAssociateDhcpIpWithAddressIpResponse() (response *AssociateDhcpIpWithAddressIpResponse) { + response = &AssociateDhcpIpWithAddressIpResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateDhcpIpWithAddressIp +// 本接口(AssociateDhcpIpWithAddressIp)用于DhcpIp绑定弹性公网IP(EIP)。<br /> +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_BINDEIP = "UnsupportedOperation.BindEIP" +func (c *Client) AssociateDhcpIpWithAddressIp(request *AssociateDhcpIpWithAddressIpRequest) (response *AssociateDhcpIpWithAddressIpResponse, err error) { + if request == nil { + request = NewAssociateDhcpIpWithAddressIpRequest() + } + + response = NewAssociateDhcpIpWithAddressIpResponse() + err = c.Send(request, response) + return +} + +// AssociateDhcpIpWithAddressIp +// 本接口(AssociateDhcpIpWithAddressIp)用于DhcpIp绑定弹性公网IP(EIP)。<br /> +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_BINDEIP = "UnsupportedOperation.BindEIP" +func (c *Client) AssociateDhcpIpWithAddressIpWithContext(ctx context.Context, request *AssociateDhcpIpWithAddressIpRequest) (response *AssociateDhcpIpWithAddressIpResponse, err error) { + if request == nil { + request = NewAssociateDhcpIpWithAddressIpRequest() + } + request.SetContext(ctx) + + response = NewAssociateDhcpIpWithAddressIpResponse() + err = c.Send(request, response) + return +} + +func NewAssociateDirectConnectGatewayNatGatewayRequest() (request *AssociateDirectConnectGatewayNatGatewayRequest) { + request = &AssociateDirectConnectGatewayNatGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssociateDirectConnectGatewayNatGateway") + + return +} + +func NewAssociateDirectConnectGatewayNatGatewayResponse() (response *AssociateDirectConnectGatewayNatGatewayResponse) { + response = &AssociateDirectConnectGatewayNatGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateDirectConnectGatewayNatGateway +// 将专线网关与NAT网关绑定,专线网关默认路由指向NAT网关 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_VPGTYPENOTMATCH = "InvalidParameterValue.VpgTypeNotMatch" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AssociateDirectConnectGatewayNatGateway(request *AssociateDirectConnectGatewayNatGatewayRequest) (response *AssociateDirectConnectGatewayNatGatewayResponse, err error) { + if request == nil { + request = NewAssociateDirectConnectGatewayNatGatewayRequest() + } + + response = NewAssociateDirectConnectGatewayNatGatewayResponse() + err = c.Send(request, response) + return +} + +// AssociateDirectConnectGatewayNatGateway +// 将专线网关与NAT网关绑定,专线网关默认路由指向NAT网关 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_VPGTYPENOTMATCH = "InvalidParameterValue.VpgTypeNotMatch" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AssociateDirectConnectGatewayNatGatewayWithContext(ctx context.Context, request *AssociateDirectConnectGatewayNatGatewayRequest) (response *AssociateDirectConnectGatewayNatGatewayResponse, err error) { + if request == nil { + request = NewAssociateDirectConnectGatewayNatGatewayRequest() + } + request.SetContext(ctx) + + response = NewAssociateDirectConnectGatewayNatGatewayResponse() + err = c.Send(request, response) + return +} + +func NewAssociateNatGatewayAddressRequest() (request *AssociateNatGatewayAddressRequest) { + request = &AssociateNatGatewayAddressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssociateNatGatewayAddress") + + return +} + +func NewAssociateNatGatewayAddressResponse() (response *AssociateNatGatewayAddressResponse) { + response = &AssociateNatGatewayAddressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateNatGatewayAddress +// 本接口(AssociateNatGatewayAddress)用于NAT网关绑定弹性IP(EIP)。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED_ADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.AddressQuotaLimitExceeded" +// LIMITEXCEEDED_DAILYALLOCATEADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.DailyAllocateAddressQuotaLimitExceeded" +// LIMITEXCEEDED_PUBLICIPADDRESSPERNATGATEWAYLIMITEXCEEDED = "LimitExceeded.PublicIpAddressPerNatGatewayLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTBGPIP = "UnsupportedOperation.PublicIpAddressIsNotBGPIp" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSNOTBILLEDBYTRAFFIC = "UnsupportedOperation.PublicIpAddressNotBilledByTraffic" +func (c *Client) AssociateNatGatewayAddress(request *AssociateNatGatewayAddressRequest) (response *AssociateNatGatewayAddressResponse, err error) { + if request == nil { + request = NewAssociateNatGatewayAddressRequest() + } + + response = NewAssociateNatGatewayAddressResponse() + err = c.Send(request, response) + return +} + +// AssociateNatGatewayAddress +// 本接口(AssociateNatGatewayAddress)用于NAT网关绑定弹性IP(EIP)。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED_ADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.AddressQuotaLimitExceeded" +// LIMITEXCEEDED_DAILYALLOCATEADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.DailyAllocateAddressQuotaLimitExceeded" +// LIMITEXCEEDED_PUBLICIPADDRESSPERNATGATEWAYLIMITEXCEEDED = "LimitExceeded.PublicIpAddressPerNatGatewayLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTBGPIP = "UnsupportedOperation.PublicIpAddressIsNotBGPIp" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSNOTBILLEDBYTRAFFIC = "UnsupportedOperation.PublicIpAddressNotBilledByTraffic" +func (c *Client) AssociateNatGatewayAddressWithContext(ctx context.Context, request *AssociateNatGatewayAddressRequest) (response *AssociateNatGatewayAddressResponse, err error) { + if request == nil { + request = NewAssociateNatGatewayAddressRequest() + } + request.SetContext(ctx) + + response = NewAssociateNatGatewayAddressResponse() + err = c.Send(request, response) + return +} + +func NewAssociateNetworkAclSubnetsRequest() (request *AssociateNetworkAclSubnetsRequest) { + request = &AssociateNetworkAclSubnetsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssociateNetworkAclSubnets") + + return +} + +func NewAssociateNetworkAclSubnetsResponse() (response *AssociateNetworkAclSubnetsResponse) { + response = &AssociateNetworkAclSubnetsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateNetworkAclSubnets +// 本接口(AssociateNetworkAclSubnets)用于网络ACL关联vpc下的子网。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) AssociateNetworkAclSubnets(request *AssociateNetworkAclSubnetsRequest) (response *AssociateNetworkAclSubnetsResponse, err error) { + if request == nil { + request = NewAssociateNetworkAclSubnetsRequest() + } + + response = NewAssociateNetworkAclSubnetsResponse() + err = c.Send(request, response) + return +} + +// AssociateNetworkAclSubnets +// 本接口(AssociateNetworkAclSubnets)用于网络ACL关联vpc下的子网。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) AssociateNetworkAclSubnetsWithContext(ctx context.Context, request *AssociateNetworkAclSubnetsRequest) (response *AssociateNetworkAclSubnetsResponse, err error) { + if request == nil { + request = NewAssociateNetworkAclSubnetsRequest() + } + request.SetContext(ctx) + + response = NewAssociateNetworkAclSubnetsResponse() + err = c.Send(request, response) + return +} + +func NewAssociateNetworkInterfaceSecurityGroupsRequest() (request *AssociateNetworkInterfaceSecurityGroupsRequest) { + request = &AssociateNetworkInterfaceSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AssociateNetworkInterfaceSecurityGroups") + + return +} + +func NewAssociateNetworkInterfaceSecurityGroupsResponse() (response *AssociateNetworkInterfaceSecurityGroupsResponse) { + response = &AssociateNetworkInterfaceSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AssociateNetworkInterfaceSecurityGroups +// 本接口(AssociateNetworkInterfaceSecurityGroups)用于弹性网卡绑定安全组(SecurityGroup)。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AssociateNetworkInterfaceSecurityGroups(request *AssociateNetworkInterfaceSecurityGroupsRequest) (response *AssociateNetworkInterfaceSecurityGroupsResponse, err error) { + if request == nil { + request = NewAssociateNetworkInterfaceSecurityGroupsRequest() + } + + response = NewAssociateNetworkInterfaceSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// AssociateNetworkInterfaceSecurityGroups +// 本接口(AssociateNetworkInterfaceSecurityGroups)用于弹性网卡绑定安全组(SecurityGroup)。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AssociateNetworkInterfaceSecurityGroupsWithContext(ctx context.Context, request *AssociateNetworkInterfaceSecurityGroupsRequest) (response *AssociateNetworkInterfaceSecurityGroupsResponse, err error) { + if request == nil { + request = NewAssociateNetworkInterfaceSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewAssociateNetworkInterfaceSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewAttachCcnInstancesRequest() (request *AttachCcnInstancesRequest) { + request = &AttachCcnInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AttachCcnInstances") + + return +} + +func NewAttachCcnInstancesResponse() (response *AttachCcnInstancesResponse) { + response = &AttachCcnInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AttachCcnInstances +// 本接口(AttachCcnInstances)用于将网络实例加载到云联网实例中,网络实例包括VPC和专线网关。<br /> +// +// 每个云联网能够关联的网络实例个数是有限的,详请参考产品文档。如果需要扩充请联系在线客服。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CCNATTACHBMVPCLIMITEXCEEDED = "InvalidParameterValue.CcnAttachBmvpcLimitExceeded" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_APPIDNOTFOUND = "UnsupportedOperation.AppIdNotFound" +// UNSUPPORTEDOPERATION_CCNATTACHED = "UnsupportedOperation.CcnAttached" +// UNSUPPORTEDOPERATION_CCNROUTETABLENOTEXIST = "UnsupportedOperation.CcnRouteTableNotExist" +// UNSUPPORTEDOPERATION_INSTANCEANDRTBNOTMATCH = "UnsupportedOperation.InstanceAndRtbNotMatch" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_ISNOTFINANCEACCOUNT = "UnsupportedOperation.IsNotFinanceAccount" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +// UNSUPPORTEDOPERATION_UNABLECROSSBORDER = "UnsupportedOperation.UnableCrossBorder" +// UNSUPPORTEDOPERATION_UNABLECROSSFINANCE = "UnsupportedOperation.UnableCrossFinance" +func (c *Client) AttachCcnInstances(request *AttachCcnInstancesRequest) (response *AttachCcnInstancesResponse, err error) { + if request == nil { + request = NewAttachCcnInstancesRequest() + } + + response = NewAttachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +// AttachCcnInstances +// 本接口(AttachCcnInstances)用于将网络实例加载到云联网实例中,网络实例包括VPC和专线网关。<br /> +// +// 每个云联网能够关联的网络实例个数是有限的,详请参考产品文档。如果需要扩充请联系在线客服。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CCNATTACHBMVPCLIMITEXCEEDED = "InvalidParameterValue.CcnAttachBmvpcLimitExceeded" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_APPIDNOTFOUND = "UnsupportedOperation.AppIdNotFound" +// UNSUPPORTEDOPERATION_CCNATTACHED = "UnsupportedOperation.CcnAttached" +// UNSUPPORTEDOPERATION_CCNROUTETABLENOTEXIST = "UnsupportedOperation.CcnRouteTableNotExist" +// UNSUPPORTEDOPERATION_INSTANCEANDRTBNOTMATCH = "UnsupportedOperation.InstanceAndRtbNotMatch" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_ISNOTFINANCEACCOUNT = "UnsupportedOperation.IsNotFinanceAccount" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +// UNSUPPORTEDOPERATION_UNABLECROSSBORDER = "UnsupportedOperation.UnableCrossBorder" +// UNSUPPORTEDOPERATION_UNABLECROSSFINANCE = "UnsupportedOperation.UnableCrossFinance" +func (c *Client) AttachCcnInstancesWithContext(ctx context.Context, request *AttachCcnInstancesRequest) (response *AttachCcnInstancesResponse, err error) { + if request == nil { + request = NewAttachCcnInstancesRequest() + } + request.SetContext(ctx) + + response = NewAttachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +func NewAttachClassicLinkVpcRequest() (request *AttachClassicLinkVpcRequest) { + request = &AttachClassicLinkVpcRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AttachClassicLinkVpc") + + return +} + +func NewAttachClassicLinkVpcResponse() (response *AttachClassicLinkVpcResponse) { + response = &AttachClassicLinkVpcResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AttachClassicLinkVpc +// 本接口(AttachClassicLinkVpc)用于创建私有网络和基础网络设备互通。 +// +// * 私有网络和基础网络设备必须在同一个地域。 +// +// * 私有网络和基础网络的区别详见vpc产品文档-<a href="https://cloud.tencent.com/document/product/215/30720">私有网络与基础网络</a>。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CIDRUNSUPPORTEDCLASSICLINK = "UnsupportedOperation.CIDRUnSupportedClassicLink" +// UNSUPPORTEDOPERATION_CLASSICINSTANCEIDALREADYEXISTS = "UnsupportedOperation.ClassicInstanceIdAlreadyExists" +func (c *Client) AttachClassicLinkVpc(request *AttachClassicLinkVpcRequest) (response *AttachClassicLinkVpcResponse, err error) { + if request == nil { + request = NewAttachClassicLinkVpcRequest() + } + + response = NewAttachClassicLinkVpcResponse() + err = c.Send(request, response) + return +} + +// AttachClassicLinkVpc +// 本接口(AttachClassicLinkVpc)用于创建私有网络和基础网络设备互通。 +// +// * 私有网络和基础网络设备必须在同一个地域。 +// +// * 私有网络和基础网络的区别详见vpc产品文档-<a href="https://cloud.tencent.com/document/product/215/30720">私有网络与基础网络</a>。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CIDRUNSUPPORTEDCLASSICLINK = "UnsupportedOperation.CIDRUnSupportedClassicLink" +// UNSUPPORTEDOPERATION_CLASSICINSTANCEIDALREADYEXISTS = "UnsupportedOperation.ClassicInstanceIdAlreadyExists" +func (c *Client) AttachClassicLinkVpcWithContext(ctx context.Context, request *AttachClassicLinkVpcRequest) (response *AttachClassicLinkVpcResponse, err error) { + if request == nil { + request = NewAttachClassicLinkVpcRequest() + } + request.SetContext(ctx) + + response = NewAttachClassicLinkVpcResponse() + err = c.Send(request, response) + return +} + +func NewAttachNetworkInterfaceRequest() (request *AttachNetworkInterfaceRequest) { + request = &AttachNetworkInterfaceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AttachNetworkInterface") + + return +} + +func NewAttachNetworkInterfaceResponse() (response *AttachNetworkInterfaceResponse) { + response = &AttachNetworkInterfaceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AttachNetworkInterface +// 本接口(AttachNetworkInterface)用于弹性网卡绑定云服务器。 +// +// * 一个云服务器可以绑定多个弹性网卡,但只能绑定一个主网卡。更多限制信息详见<a href="https://cloud.tencent.com/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 一个弹性网卡只能同时绑定一个云服务器。 +// +// * 只有运行中或者已关机状态的云服务器才能绑定弹性网卡,查看云服务器状态详见<a href="https://cloud.tencent.com/document/api/213/9452#InstanceStatus">腾讯云服务器信息</a>。 +// +// * 弹性网卡绑定的云服务器必须是私有网络的,而且云服务器所在可用区必须和弹性网卡子网的可用区相同。 +// +// +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHMENTALREADYEXISTS = "UnsupportedOperation.AttachmentAlreadyExists" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_UNSUPPORTEDINSTANCEFAMILY = "UnsupportedOperation.UnsupportedInstanceFamily" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +// UNSUPPORTEDOPERATION_ZONEMISMATCH = "UnsupportedOperation.ZoneMismatch" +func (c *Client) AttachNetworkInterface(request *AttachNetworkInterfaceRequest) (response *AttachNetworkInterfaceResponse, err error) { + if request == nil { + request = NewAttachNetworkInterfaceRequest() + } + + response = NewAttachNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +// AttachNetworkInterface +// 本接口(AttachNetworkInterface)用于弹性网卡绑定云服务器。 +// +// * 一个云服务器可以绑定多个弹性网卡,但只能绑定一个主网卡。更多限制信息详见<a href="https://cloud.tencent.com/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 一个弹性网卡只能同时绑定一个云服务器。 +// +// * 只有运行中或者已关机状态的云服务器才能绑定弹性网卡,查看云服务器状态详见<a href="https://cloud.tencent.com/document/api/213/9452#InstanceStatus">腾讯云服务器信息</a>。 +// +// * 弹性网卡绑定的云服务器必须是私有网络的,而且云服务器所在可用区必须和弹性网卡子网的可用区相同。 +// +// +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHMENTALREADYEXISTS = "UnsupportedOperation.AttachmentAlreadyExists" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_UNSUPPORTEDINSTANCEFAMILY = "UnsupportedOperation.UnsupportedInstanceFamily" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +// UNSUPPORTEDOPERATION_ZONEMISMATCH = "UnsupportedOperation.ZoneMismatch" +func (c *Client) AttachNetworkInterfaceWithContext(ctx context.Context, request *AttachNetworkInterfaceRequest) (response *AttachNetworkInterfaceResponse, err error) { + if request == nil { + request = NewAttachNetworkInterfaceRequest() + } + request.SetContext(ctx) + + response = NewAttachNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +func NewAuditCrossBorderComplianceRequest() (request *AuditCrossBorderComplianceRequest) { + request = &AuditCrossBorderComplianceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "AuditCrossBorderCompliance") + + return +} + +func NewAuditCrossBorderComplianceResponse() (response *AuditCrossBorderComplianceResponse) { + response = &AuditCrossBorderComplianceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AuditCrossBorderCompliance +// 本接口(AuditCrossBorderCompliance)用于服务商操作合规化资质审批。 +// +// * 服务商只能操作提交到本服务商的审批单,后台会校验身份。即只授权给服务商的`APPID` 调用本接口。 +// +// * `APPROVED` 状态的审批单,可以再次操作为 `DENY`;`DENY` 状态的审批单,也可以再次操作为 `APPROVED`。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AuditCrossBorderCompliance(request *AuditCrossBorderComplianceRequest) (response *AuditCrossBorderComplianceResponse, err error) { + if request == nil { + request = NewAuditCrossBorderComplianceRequest() + } + + response = NewAuditCrossBorderComplianceResponse() + err = c.Send(request, response) + return +} + +// AuditCrossBorderCompliance +// 本接口(AuditCrossBorderCompliance)用于服务商操作合规化资质审批。 +// +// * 服务商只能操作提交到本服务商的审批单,后台会校验身份。即只授权给服务商的`APPID` 调用本接口。 +// +// * `APPROVED` 状态的审批单,可以再次操作为 `DENY`;`DENY` 状态的审批单,也可以再次操作为 `APPROVED`。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AuditCrossBorderComplianceWithContext(ctx context.Context, request *AuditCrossBorderComplianceRequest) (response *AuditCrossBorderComplianceResponse, err error) { + if request == nil { + request = NewAuditCrossBorderComplianceRequest() + } + request.SetContext(ctx) + + response = NewAuditCrossBorderComplianceResponse() + err = c.Send(request, response) + return +} + +func NewCheckAssistantCidrRequest() (request *CheckAssistantCidrRequest) { + request = &CheckAssistantCidrRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CheckAssistantCidr") + + return +} + +func NewCheckAssistantCidrResponse() (response *CheckAssistantCidrResponse) { + response = &CheckAssistantCidrResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CheckAssistantCidr +// 本接口(CheckAssistantCidr)用于检查辅助CIDR是否与存量路由、对等连接(对端VPC的CIDR)等资源存在冲突。如果存在重叠,则返回重叠的资源。(接口灰度中,如需使用请提工单。) +// +// * 检测辅助CIDR是否与当前VPC的主CIDR和辅助CIDR存在重叠。 +// +// * 检测辅助CIDR是否与当前VPC的路由的目的端存在重叠。 +// +// * 检测辅助CIDR是否与当前VPC的对等连接,对端VPC下的主CIDR或辅助CIDR存在重叠。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CheckAssistantCidr(request *CheckAssistantCidrRequest) (response *CheckAssistantCidrResponse, err error) { + if request == nil { + request = NewCheckAssistantCidrRequest() + } + + response = NewCheckAssistantCidrResponse() + err = c.Send(request, response) + return +} + +// CheckAssistantCidr +// 本接口(CheckAssistantCidr)用于检查辅助CIDR是否与存量路由、对等连接(对端VPC的CIDR)等资源存在冲突。如果存在重叠,则返回重叠的资源。(接口灰度中,如需使用请提工单。) +// +// * 检测辅助CIDR是否与当前VPC的主CIDR和辅助CIDR存在重叠。 +// +// * 检测辅助CIDR是否与当前VPC的路由的目的端存在重叠。 +// +// * 检测辅助CIDR是否与当前VPC的对等连接,对端VPC下的主CIDR或辅助CIDR存在重叠。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CheckAssistantCidrWithContext(ctx context.Context, request *CheckAssistantCidrRequest) (response *CheckAssistantCidrResponse, err error) { + if request == nil { + request = NewCheckAssistantCidrRequest() + } + request.SetContext(ctx) + + response = NewCheckAssistantCidrResponse() + err = c.Send(request, response) + return +} + +func NewCheckDefaultSubnetRequest() (request *CheckDefaultSubnetRequest) { + request = &CheckDefaultSubnetRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CheckDefaultSubnet") + + return +} + +func NewCheckDefaultSubnetResponse() (response *CheckDefaultSubnetResponse) { + response = &CheckDefaultSubnetResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CheckDefaultSubnet +// 本接口(CheckDefaultSubnet)用于预判是否可建默认子网。 +// +// 可能返回的错误码: +// RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CheckDefaultSubnet(request *CheckDefaultSubnetRequest) (response *CheckDefaultSubnetResponse, err error) { + if request == nil { + request = NewCheckDefaultSubnetRequest() + } + + response = NewCheckDefaultSubnetResponse() + err = c.Send(request, response) + return +} + +// CheckDefaultSubnet +// 本接口(CheckDefaultSubnet)用于预判是否可建默认子网。 +// +// 可能返回的错误码: +// RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CheckDefaultSubnetWithContext(ctx context.Context, request *CheckDefaultSubnetRequest) (response *CheckDefaultSubnetResponse, err error) { + if request == nil { + request = NewCheckDefaultSubnetRequest() + } + request.SetContext(ctx) + + response = NewCheckDefaultSubnetResponse() + err = c.Send(request, response) + return +} + +func NewCheckNetDetectStateRequest() (request *CheckNetDetectStateRequest) { + request = &CheckNetDetectStateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CheckNetDetectState") + + return +} + +func NewCheckNetDetectStateResponse() (response *CheckNetDetectStateResponse) { + response = &CheckNetDetectStateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CheckNetDetectState +// 本接口(CheckNetDetectState)用于验证网络探测。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_NEXTHOPMISMATCH = "InvalidParameter.NextHopMismatch" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_NETDETECTINVPC = "InvalidParameterValue.NetDetectInVpc" +// INVALIDPARAMETERVALUE_NETDETECTNOTFOUNDIP = "InvalidParameterValue.NetDetectNotFoundIp" +// INVALIDPARAMETERVALUE_NETDETECTSAMEIP = "InvalidParameterValue.NetDetectSameIp" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) CheckNetDetectState(request *CheckNetDetectStateRequest) (response *CheckNetDetectStateResponse, err error) { + if request == nil { + request = NewCheckNetDetectStateRequest() + } + + response = NewCheckNetDetectStateResponse() + err = c.Send(request, response) + return +} + +// CheckNetDetectState +// 本接口(CheckNetDetectState)用于验证网络探测。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_NEXTHOPMISMATCH = "InvalidParameter.NextHopMismatch" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_NETDETECTINVPC = "InvalidParameterValue.NetDetectInVpc" +// INVALIDPARAMETERVALUE_NETDETECTNOTFOUNDIP = "InvalidParameterValue.NetDetectNotFoundIp" +// INVALIDPARAMETERVALUE_NETDETECTSAMEIP = "InvalidParameterValue.NetDetectSameIp" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) CheckNetDetectStateWithContext(ctx context.Context, request *CheckNetDetectStateRequest) (response *CheckNetDetectStateResponse, err error) { + if request == nil { + request = NewCheckNetDetectStateRequest() + } + request.SetContext(ctx) + + response = NewCheckNetDetectStateResponse() + err = c.Send(request, response) + return +} + +func NewCloneSecurityGroupRequest() (request *CloneSecurityGroupRequest) { + request = &CloneSecurityGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CloneSecurityGroup") + + return +} + +func NewCloneSecurityGroupResponse() (response *CloneSecurityGroupResponse) { + response = &CloneSecurityGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CloneSecurityGroup +// 本接口(CloneSecurityGroup)用于根据存量的安全组,克隆创建出同样规则配置的安全组。仅克隆安全组及其规则信息,不会克隆安全组标签信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CloneSecurityGroup(request *CloneSecurityGroupRequest) (response *CloneSecurityGroupResponse, err error) { + if request == nil { + request = NewCloneSecurityGroupRequest() + } + + response = NewCloneSecurityGroupResponse() + err = c.Send(request, response) + return +} + +// CloneSecurityGroup +// 本接口(CloneSecurityGroup)用于根据存量的安全组,克隆创建出同样规则配置的安全组。仅克隆安全组及其规则信息,不会克隆安全组标签信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CloneSecurityGroupWithContext(ctx context.Context, request *CloneSecurityGroupRequest) (response *CloneSecurityGroupResponse, err error) { + if request == nil { + request = NewCloneSecurityGroupRequest() + } + request.SetContext(ctx) + + response = NewCloneSecurityGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateAddressTemplateRequest() (request *CreateAddressTemplateRequest) { + request = &CreateAddressTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateAddressTemplate") + + return +} + +func NewCreateAddressTemplateResponse() (response *CreateAddressTemplateResponse) { + response = &CreateAddressTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateAddressTemplate +// 本接口(CreateAddressTemplate)用于创建IP地址模版 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) CreateAddressTemplate(request *CreateAddressTemplateRequest) (response *CreateAddressTemplateResponse, err error) { + if request == nil { + request = NewCreateAddressTemplateRequest() + } + + response = NewCreateAddressTemplateResponse() + err = c.Send(request, response) + return +} + +// CreateAddressTemplate +// 本接口(CreateAddressTemplate)用于创建IP地址模版 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) CreateAddressTemplateWithContext(ctx context.Context, request *CreateAddressTemplateRequest) (response *CreateAddressTemplateResponse, err error) { + if request == nil { + request = NewCreateAddressTemplateRequest() + } + request.SetContext(ctx) + + response = NewCreateAddressTemplateResponse() + err = c.Send(request, response) + return +} + +func NewCreateAddressTemplateGroupRequest() (request *CreateAddressTemplateGroupRequest) { + request = &CreateAddressTemplateGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateAddressTemplateGroup") + + return +} + +func NewCreateAddressTemplateGroupResponse() (response *CreateAddressTemplateGroupResponse) { + response = &CreateAddressTemplateGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateAddressTemplateGroup +// 本接口(CreateAddressTemplateGroup)用于创建IP地址模版集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) CreateAddressTemplateGroup(request *CreateAddressTemplateGroupRequest) (response *CreateAddressTemplateGroupResponse, err error) { + if request == nil { + request = NewCreateAddressTemplateGroupRequest() + } + + response = NewCreateAddressTemplateGroupResponse() + err = c.Send(request, response) + return +} + +// CreateAddressTemplateGroup +// 本接口(CreateAddressTemplateGroup)用于创建IP地址模版集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) CreateAddressTemplateGroupWithContext(ctx context.Context, request *CreateAddressTemplateGroupRequest) (response *CreateAddressTemplateGroupResponse, err error) { + if request == nil { + request = NewCreateAddressTemplateGroupRequest() + } + request.SetContext(ctx) + + response = NewCreateAddressTemplateGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateAndAttachNetworkInterfaceRequest() (request *CreateAndAttachNetworkInterfaceRequest) { + request = &CreateAndAttachNetworkInterfaceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateAndAttachNetworkInterface") + + return +} + +func NewCreateAndAttachNetworkInterfaceResponse() (response *CreateAndAttachNetworkInterfaceResponse) { + response = &CreateAndAttachNetworkInterfaceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateAndAttachNetworkInterface +// 本接口(CreateAndAttachNetworkInterface)用于创建弹性网卡并绑定云服务器。 +// +// * 创建弹性网卡时可以指定内网IP,并且可以指定一个主IP,指定的内网IP必须在弹性网卡所在子网内,而且不能被占用。 +// +// * 创建弹性网卡时可以指定需要申请的内网IP数量,系统会随机生成内网IP地址。 +// +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 创建弹性网卡同时可以绑定已有安全组。 +// +// * 创建弹性网卡同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_UNSUPPORTEDINSTANCEFAMILY = "UnsupportedOperation.UnsupportedInstanceFamily" +func (c *Client) CreateAndAttachNetworkInterface(request *CreateAndAttachNetworkInterfaceRequest) (response *CreateAndAttachNetworkInterfaceResponse, err error) { + if request == nil { + request = NewCreateAndAttachNetworkInterfaceRequest() + } + + response = NewCreateAndAttachNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +// CreateAndAttachNetworkInterface +// 本接口(CreateAndAttachNetworkInterface)用于创建弹性网卡并绑定云服务器。 +// +// * 创建弹性网卡时可以指定内网IP,并且可以指定一个主IP,指定的内网IP必须在弹性网卡所在子网内,而且不能被占用。 +// +// * 创建弹性网卡时可以指定需要申请的内网IP数量,系统会随机生成内网IP地址。 +// +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 创建弹性网卡同时可以绑定已有安全组。 +// +// * 创建弹性网卡同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_UNSUPPORTEDINSTANCEFAMILY = "UnsupportedOperation.UnsupportedInstanceFamily" +func (c *Client) CreateAndAttachNetworkInterfaceWithContext(ctx context.Context, request *CreateAndAttachNetworkInterfaceRequest) (response *CreateAndAttachNetworkInterfaceResponse, err error) { + if request == nil { + request = NewCreateAndAttachNetworkInterfaceRequest() + } + request.SetContext(ctx) + + response = NewCreateAndAttachNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +func NewCreateAssistantCidrRequest() (request *CreateAssistantCidrRequest) { + request = &CreateAssistantCidrRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateAssistantCidr") + + return +} + +func NewCreateAssistantCidrResponse() (response *CreateAssistantCidrResponse) { + response = &CreateAssistantCidrResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateAssistantCidr +// 本接口(CreateAssistantCidr)用于批量创建辅助CIDR。(接口灰度中,如需使用请提工单。) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETOVERLAPASSISTCIDR = "InvalidParameterValue.SubnetOverlapAssistCidr" +// INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateAssistantCidr(request *CreateAssistantCidrRequest) (response *CreateAssistantCidrResponse, err error) { + if request == nil { + request = NewCreateAssistantCidrRequest() + } + + response = NewCreateAssistantCidrResponse() + err = c.Send(request, response) + return +} + +// CreateAssistantCidr +// 本接口(CreateAssistantCidr)用于批量创建辅助CIDR。(接口灰度中,如需使用请提工单。) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETOVERLAPASSISTCIDR = "InvalidParameterValue.SubnetOverlapAssistCidr" +// INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateAssistantCidrWithContext(ctx context.Context, request *CreateAssistantCidrRequest) (response *CreateAssistantCidrResponse, err error) { + if request == nil { + request = NewCreateAssistantCidrRequest() + } + request.SetContext(ctx) + + response = NewCreateAssistantCidrResponse() + err = c.Send(request, response) + return +} + +func NewCreateBandwidthPackageRequest() (request *CreateBandwidthPackageRequest) { + request = &CreateBandwidthPackageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateBandwidthPackage") + + return +} + +func NewCreateBandwidthPackageResponse() (response *CreateBandwidthPackageResponse) { + response = &CreateBandwidthPackageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateBandwidthPackage +// 本接口 (CreateBandwidthPackage) 支持创建[设备带宽包](https://cloud.tencent.com/document/product/684/15245#bwptype)和[IP带宽包](https://cloud.tencent.com/document/product/684/15245#bwptype)。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TAGNOTEXISTED = "InvalidParameterValue.TagNotExisted" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +// UNSUPPORTEDOPERATION_INVALIDRESOURCEINTERNETCHARGETYPE = "UnsupportedOperation.InvalidResourceInternetChargeType" +func (c *Client) CreateBandwidthPackage(request *CreateBandwidthPackageRequest) (response *CreateBandwidthPackageResponse, err error) { + if request == nil { + request = NewCreateBandwidthPackageRequest() + } + + response = NewCreateBandwidthPackageResponse() + err = c.Send(request, response) + return +} + +// CreateBandwidthPackage +// 本接口 (CreateBandwidthPackage) 支持创建[设备带宽包](https://cloud.tencent.com/document/product/684/15245#bwptype)和[IP带宽包](https://cloud.tencent.com/document/product/684/15245#bwptype)。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TAGNOTEXISTED = "InvalidParameterValue.TagNotExisted" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +// UNSUPPORTEDOPERATION_INVALIDRESOURCEINTERNETCHARGETYPE = "UnsupportedOperation.InvalidResourceInternetChargeType" +func (c *Client) CreateBandwidthPackageWithContext(ctx context.Context, request *CreateBandwidthPackageRequest) (response *CreateBandwidthPackageResponse, err error) { + if request == nil { + request = NewCreateBandwidthPackageRequest() + } + request.SetContext(ctx) + + response = NewCreateBandwidthPackageResponse() + err = c.Send(request, response) + return +} + +func NewCreateCcnRequest() (request *CreateCcnRequest) { + request = &CreateCcnRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateCcn") + + return +} + +func NewCreateCcnResponse() (response *CreateCcnResponse) { + response = &CreateCcnResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateCcn +// 本接口(CreateCcn)用于创建云联网(CCN)。<br /> +// +// * 创建云联网同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 每个账号能创建的云联网实例个数是有限的,详请参考产品文档。如果需要扩充请联系在线客服。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" +// UNSUPPORTEDOPERATION_PREPAIDCCNONLYSUPPORTINTERREGIONLIMIT = "UnsupportedOperation.PrepaidCcnOnlySupportInterRegionLimit" +// UNSUPPORTEDOPERATION_USERANDCCNCHARGETYPENOTMATCH = "UnsupportedOperation.UserAndCcnChargeTypeNotMatch" +func (c *Client) CreateCcn(request *CreateCcnRequest) (response *CreateCcnResponse, err error) { + if request == nil { + request = NewCreateCcnRequest() + } + + response = NewCreateCcnResponse() + err = c.Send(request, response) + return +} + +// CreateCcn +// 本接口(CreateCcn)用于创建云联网(CCN)。<br /> +// +// * 创建云联网同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 每个账号能创建的云联网实例个数是有限的,详请参考产品文档。如果需要扩充请联系在线客服。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" +// UNSUPPORTEDOPERATION_PREPAIDCCNONLYSUPPORTINTERREGIONLIMIT = "UnsupportedOperation.PrepaidCcnOnlySupportInterRegionLimit" +// UNSUPPORTEDOPERATION_USERANDCCNCHARGETYPENOTMATCH = "UnsupportedOperation.UserAndCcnChargeTypeNotMatch" +func (c *Client) CreateCcnWithContext(ctx context.Context, request *CreateCcnRequest) (response *CreateCcnResponse, err error) { + if request == nil { + request = NewCreateCcnRequest() + } + request.SetContext(ctx) + + response = NewCreateCcnResponse() + err = c.Send(request, response) + return +} + +func NewCreateCustomerGatewayRequest() (request *CreateCustomerGatewayRequest) { + request = &CreateCustomerGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateCustomerGateway") + + return +} + +func NewCreateCustomerGatewayResponse() (response *CreateCustomerGatewayResponse) { + response = &CreateCustomerGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateCustomerGateway +// 本接口(CreateCustomerGateway)用于创建对端网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// VPCLIMITEXCEEDED = "VpcLimitExceeded" +func (c *Client) CreateCustomerGateway(request *CreateCustomerGatewayRequest) (response *CreateCustomerGatewayResponse, err error) { + if request == nil { + request = NewCreateCustomerGatewayRequest() + } + + response = NewCreateCustomerGatewayResponse() + err = c.Send(request, response) + return +} + +// CreateCustomerGateway +// 本接口(CreateCustomerGateway)用于创建对端网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// VPCLIMITEXCEEDED = "VpcLimitExceeded" +func (c *Client) CreateCustomerGatewayWithContext(ctx context.Context, request *CreateCustomerGatewayRequest) (response *CreateCustomerGatewayResponse, err error) { + if request == nil { + request = NewCreateCustomerGatewayRequest() + } + request.SetContext(ctx) + + response = NewCreateCustomerGatewayResponse() + err = c.Send(request, response) + return +} + +func NewCreateDefaultSecurityGroupRequest() (request *CreateDefaultSecurityGroupRequest) { + request = &CreateDefaultSecurityGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateDefaultSecurityGroup") + + return +} + +func NewCreateDefaultSecurityGroupResponse() (response *CreateDefaultSecurityGroupResponse) { + response = &CreateDefaultSecurityGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateDefaultSecurityGroup +// 本接口(CreateDefaultSecurityGroup)用于创建(如果项目下未存在默认安全组,则创建;已存在则获取。)默认安全组(SecurityGroup)。 +// +// * 每个账户下每个地域的每个项目的<a href="https://cloud.tencent.com/document/product/213/12453">安全组数量限制</a>。 +// +// * 默认安全组会放通所有IPv4规则,在创建后通常您需要再调用CreateSecurityGroupPolicies将安全组的规则设置为需要的规则。 +// +// * 创建安全组同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateDefaultSecurityGroup(request *CreateDefaultSecurityGroupRequest) (response *CreateDefaultSecurityGroupResponse, err error) { + if request == nil { + request = NewCreateDefaultSecurityGroupRequest() + } + + response = NewCreateDefaultSecurityGroupResponse() + err = c.Send(request, response) + return +} + +// CreateDefaultSecurityGroup +// 本接口(CreateDefaultSecurityGroup)用于创建(如果项目下未存在默认安全组,则创建;已存在则获取。)默认安全组(SecurityGroup)。 +// +// * 每个账户下每个地域的每个项目的<a href="https://cloud.tencent.com/document/product/213/12453">安全组数量限制</a>。 +// +// * 默认安全组会放通所有IPv4规则,在创建后通常您需要再调用CreateSecurityGroupPolicies将安全组的规则设置为需要的规则。 +// +// * 创建安全组同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateDefaultSecurityGroupWithContext(ctx context.Context, request *CreateDefaultSecurityGroupRequest) (response *CreateDefaultSecurityGroupResponse, err error) { + if request == nil { + request = NewCreateDefaultSecurityGroupRequest() + } + request.SetContext(ctx) + + response = NewCreateDefaultSecurityGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateDefaultVpcRequest() (request *CreateDefaultVpcRequest) { + request = &CreateDefaultVpcRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateDefaultVpc") + + return +} + +func NewCreateDefaultVpcResponse() (response *CreateDefaultVpcResponse) { + response = &CreateDefaultVpcResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateDefaultVpc +// 本接口(CreateDefaultVpc)用于创建默认私有网络(VPC)。 +// +// +// +// 默认VPC适用于快速入门和启动公共实例,您可以像使用任何其他VPC一样使用默认VPC。如果您想创建标准VPC,即指定VPC名称、VPC网段、子网网段、子网可用区,请使用常规创建VPC接口(CreateVpc) +// +// +// +// 正常情况,本接口并不一定生产默认VPC,而是根据用户账号的网络属性(DescribeAccountAttributes)来决定的 +// +// * 支持基础网络、VPC,返回VpcId为0 +// +// * 只支持VPC,返回默认VPC信息 +// +// +// +// 您也可以通过 Force 参数,强制返回默认VPC +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateDefaultVpc(request *CreateDefaultVpcRequest) (response *CreateDefaultVpcResponse, err error) { + if request == nil { + request = NewCreateDefaultVpcRequest() + } + + response = NewCreateDefaultVpcResponse() + err = c.Send(request, response) + return +} + +// CreateDefaultVpc +// 本接口(CreateDefaultVpc)用于创建默认私有网络(VPC)。 +// +// +// +// 默认VPC适用于快速入门和启动公共实例,您可以像使用任何其他VPC一样使用默认VPC。如果您想创建标准VPC,即指定VPC名称、VPC网段、子网网段、子网可用区,请使用常规创建VPC接口(CreateVpc) +// +// +// +// 正常情况,本接口并不一定生产默认VPC,而是根据用户账号的网络属性(DescribeAccountAttributes)来决定的 +// +// * 支持基础网络、VPC,返回VpcId为0 +// +// * 只支持VPC,返回默认VPC信息 +// +// +// +// 您也可以通过 Force 参数,强制返回默认VPC +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateDefaultVpcWithContext(ctx context.Context, request *CreateDefaultVpcRequest) (response *CreateDefaultVpcResponse, err error) { + if request == nil { + request = NewCreateDefaultVpcRequest() + } + request.SetContext(ctx) + + response = NewCreateDefaultVpcResponse() + err = c.Send(request, response) + return +} + +func NewCreateDhcpIpRequest() (request *CreateDhcpIpRequest) { + request = &CreateDhcpIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateDhcpIp") + + return +} + +func NewCreateDhcpIpResponse() (response *CreateDhcpIpResponse) { + response = &CreateDhcpIpResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateDhcpIp +// 本接口(CreateDhcpIp)用于创建DhcpIp +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateDhcpIp(request *CreateDhcpIpRequest) (response *CreateDhcpIpResponse, err error) { + if request == nil { + request = NewCreateDhcpIpRequest() + } + + response = NewCreateDhcpIpResponse() + err = c.Send(request, response) + return +} + +// CreateDhcpIp +// 本接口(CreateDhcpIp)用于创建DhcpIp +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateDhcpIpWithContext(ctx context.Context, request *CreateDhcpIpRequest) (response *CreateDhcpIpResponse, err error) { + if request == nil { + request = NewCreateDhcpIpRequest() + } + request.SetContext(ctx) + + response = NewCreateDhcpIpResponse() + err = c.Send(request, response) + return +} + +func NewCreateDirectConnectGatewayRequest() (request *CreateDirectConnectGatewayRequest) { + request = &CreateDirectConnectGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateDirectConnectGateway") + + return +} + +func NewCreateDirectConnectGatewayResponse() (response *CreateDirectConnectGatewayResponse) { + response = &CreateDirectConnectGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateDirectConnectGateway +// 本接口(CreateDirectConnectGateway)用于创建专线网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_VPGHAGROUPNOTFOUND = "InvalidParameter.VpgHaGroupNotFound" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_UNABLECROSSBORDER = "UnsupportedOperation.UnableCrossBorder" +func (c *Client) CreateDirectConnectGateway(request *CreateDirectConnectGatewayRequest) (response *CreateDirectConnectGatewayResponse, err error) { + if request == nil { + request = NewCreateDirectConnectGatewayRequest() + } + + response = NewCreateDirectConnectGatewayResponse() + err = c.Send(request, response) + return +} + +// CreateDirectConnectGateway +// 本接口(CreateDirectConnectGateway)用于创建专线网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_VPGHAGROUPNOTFOUND = "InvalidParameter.VpgHaGroupNotFound" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_UNABLECROSSBORDER = "UnsupportedOperation.UnableCrossBorder" +func (c *Client) CreateDirectConnectGatewayWithContext(ctx context.Context, request *CreateDirectConnectGatewayRequest) (response *CreateDirectConnectGatewayResponse, err error) { + if request == nil { + request = NewCreateDirectConnectGatewayRequest() + } + request.SetContext(ctx) + + response = NewCreateDirectConnectGatewayResponse() + err = c.Send(request, response) + return +} + +func NewCreateDirectConnectGatewayCcnRoutesRequest() (request *CreateDirectConnectGatewayCcnRoutesRequest) { + request = &CreateDirectConnectGatewayCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateDirectConnectGatewayCcnRoutes") + + return +} + +func NewCreateDirectConnectGatewayCcnRoutesResponse() (response *CreateDirectConnectGatewayCcnRoutesResponse) { + response = &CreateDirectConnectGatewayCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateDirectConnectGatewayCcnRoutes +// 本接口(CreateDirectConnectGatewayCcnRoutes)用于创建专线网关的云联网路由(IDC网段) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateDirectConnectGatewayCcnRoutes(request *CreateDirectConnectGatewayCcnRoutesRequest) (response *CreateDirectConnectGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewCreateDirectConnectGatewayCcnRoutesRequest() + } + + response = NewCreateDirectConnectGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// CreateDirectConnectGatewayCcnRoutes +// 本接口(CreateDirectConnectGatewayCcnRoutes)用于创建专线网关的云联网路由(IDC网段) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateDirectConnectGatewayCcnRoutesWithContext(ctx context.Context, request *CreateDirectConnectGatewayCcnRoutesRequest) (response *CreateDirectConnectGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewCreateDirectConnectGatewayCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewCreateDirectConnectGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewCreateFlowLogRequest() (request *CreateFlowLogRequest) { + request = &CreateFlowLogRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateFlowLog") + + return +} + +func NewCreateFlowLogResponse() (response *CreateFlowLogResponse) { + response = &CreateFlowLogResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateFlowLog +// 本接口(CreateFlowLog)用于创建流日志 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) CreateFlowLog(request *CreateFlowLogRequest) (response *CreateFlowLogResponse, err error) { + if request == nil { + request = NewCreateFlowLogRequest() + } + + response = NewCreateFlowLogResponse() + err = c.Send(request, response) + return +} + +// CreateFlowLog +// 本接口(CreateFlowLog)用于创建流日志 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) CreateFlowLogWithContext(ctx context.Context, request *CreateFlowLogRequest) (response *CreateFlowLogResponse, err error) { + if request == nil { + request = NewCreateFlowLogRequest() + } + request.SetContext(ctx) + + response = NewCreateFlowLogResponse() + err = c.Send(request, response) + return +} + +func NewCreateHaVipRequest() (request *CreateHaVipRequest) { + request = &CreateHaVipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateHaVip") + + return +} + +func NewCreateHaVipResponse() (response *CreateHaVipResponse) { + response = &CreateHaVipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateHaVip +// 本接口(CreateHaVip)用于创建高可用虚拟IP(HAVIP) +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_INVALIDBUSINESS = "InvalidParameterValue.InvalidBusiness" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateHaVip(request *CreateHaVipRequest) (response *CreateHaVipResponse, err error) { + if request == nil { + request = NewCreateHaVipRequest() + } + + response = NewCreateHaVipResponse() + err = c.Send(request, response) + return +} + +// CreateHaVip +// 本接口(CreateHaVip)用于创建高可用虚拟IP(HAVIP) +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_INVALIDBUSINESS = "InvalidParameterValue.InvalidBusiness" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateHaVipWithContext(ctx context.Context, request *CreateHaVipRequest) (response *CreateHaVipResponse, err error) { + if request == nil { + request = NewCreateHaVipRequest() + } + request.SetContext(ctx) + + response = NewCreateHaVipResponse() + err = c.Send(request, response) + return +} + +func NewCreateIp6TranslatorsRequest() (request *CreateIp6TranslatorsRequest) { + request = &CreateIp6TranslatorsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateIp6Translators") + + return +} + +func NewCreateIp6TranslatorsResponse() (response *CreateIp6TranslatorsResponse) { + response = &CreateIp6TranslatorsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateIp6Translators +// 1. 该接口用于创建IPV6转换IPV4实例,支持批量 +// +// 2. 同一个账户在一个地域最多允许创建10个转换实例 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +func (c *Client) CreateIp6Translators(request *CreateIp6TranslatorsRequest) (response *CreateIp6TranslatorsResponse, err error) { + if request == nil { + request = NewCreateIp6TranslatorsRequest() + } + + response = NewCreateIp6TranslatorsResponse() + err = c.Send(request, response) + return +} + +// CreateIp6Translators +// 1. 该接口用于创建IPV6转换IPV4实例,支持批量 +// +// 2. 同一个账户在一个地域最多允许创建10个转换实例 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +func (c *Client) CreateIp6TranslatorsWithContext(ctx context.Context, request *CreateIp6TranslatorsRequest) (response *CreateIp6TranslatorsResponse, err error) { + if request == nil { + request = NewCreateIp6TranslatorsRequest() + } + request.SetContext(ctx) + + response = NewCreateIp6TranslatorsResponse() + err = c.Send(request, response) + return +} + +func NewCreateLocalGatewayRequest() (request *CreateLocalGatewayRequest) { + request = &CreateLocalGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateLocalGateway") + + return +} + +func NewCreateLocalGatewayResponse() (response *CreateLocalGatewayResponse) { + response = &CreateLocalGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateLocalGateway +// 该接口用于创建用于CDC的本地网关。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_LOCALGATEWAYALREADYEXISTS = "UnsupportedOperation.LocalGatewayAlreadyExists" +func (c *Client) CreateLocalGateway(request *CreateLocalGatewayRequest) (response *CreateLocalGatewayResponse, err error) { + if request == nil { + request = NewCreateLocalGatewayRequest() + } + + response = NewCreateLocalGatewayResponse() + err = c.Send(request, response) + return +} + +// CreateLocalGateway +// 该接口用于创建用于CDC的本地网关。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_LOCALGATEWAYALREADYEXISTS = "UnsupportedOperation.LocalGatewayAlreadyExists" +func (c *Client) CreateLocalGatewayWithContext(ctx context.Context, request *CreateLocalGatewayRequest) (response *CreateLocalGatewayResponse, err error) { + if request == nil { + request = NewCreateLocalGatewayRequest() + } + request.SetContext(ctx) + + response = NewCreateLocalGatewayResponse() + err = c.Send(request, response) + return +} + +func NewCreateNatGatewayRequest() (request *CreateNatGatewayRequest) { + request = &CreateNatGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateNatGateway") + + return +} + +func NewCreateNatGatewayResponse() (response *CreateNatGatewayResponse) { + response = &CreateNatGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateNatGateway +// 本接口(CreateNatGateway)用于创建NAT网关。 +// +// 在对新建的NAT网关做其他操作前,需先确认此网关已被创建完成(DescribeNatGateway接口返回的实例State字段为AVAILABLE)。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSSTATE = "InvalidAddressState" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDVPCID_MALFORMED = "InvalidVpcId.Malformed" +// INVALIDVPCID_NOTFOUND = "InvalidVpcId.NotFound" +// LIMITEXCEEDED_ADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.AddressQuotaLimitExceeded" +// LIMITEXCEEDED_DAILYALLOCATEADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.DailyAllocateAddressQuotaLimitExceeded" +// LIMITEXCEEDED_NATGATEWAYPERVPCLIMITEXCEEDED = "LimitExceeded.NatGatewayPerVpcLimitExceeded" +// LIMITEXCEEDED_PUBLICIPADDRESSPERNATGATEWAYLIMITEXCEEDED = "LimitExceeded.PublicIpAddressPerNatGatewayLimitExceeded" +// RESOURCEINUSE_ADDRESS = "ResourceInUse.Address" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTBGPIP = "UnsupportedOperation.PublicIpAddressIsNotBGPIp" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTEXISTED = "UnsupportedOperation.PublicIpAddressIsNotExisted" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSNOTBILLEDBYTRAFFIC = "UnsupportedOperation.PublicIpAddressNotBilledByTraffic" +func (c *Client) CreateNatGateway(request *CreateNatGatewayRequest) (response *CreateNatGatewayResponse, err error) { + if request == nil { + request = NewCreateNatGatewayRequest() + } + + response = NewCreateNatGatewayResponse() + err = c.Send(request, response) + return +} + +// CreateNatGateway +// 本接口(CreateNatGateway)用于创建NAT网关。 +// +// 在对新建的NAT网关做其他操作前,需先确认此网关已被创建完成(DescribeNatGateway接口返回的实例State字段为AVAILABLE)。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSSTATE = "InvalidAddressState" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDVPCID_MALFORMED = "InvalidVpcId.Malformed" +// INVALIDVPCID_NOTFOUND = "InvalidVpcId.NotFound" +// LIMITEXCEEDED_ADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.AddressQuotaLimitExceeded" +// LIMITEXCEEDED_DAILYALLOCATEADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.DailyAllocateAddressQuotaLimitExceeded" +// LIMITEXCEEDED_NATGATEWAYPERVPCLIMITEXCEEDED = "LimitExceeded.NatGatewayPerVpcLimitExceeded" +// LIMITEXCEEDED_PUBLICIPADDRESSPERNATGATEWAYLIMITEXCEEDED = "LimitExceeded.PublicIpAddressPerNatGatewayLimitExceeded" +// RESOURCEINUSE_ADDRESS = "ResourceInUse.Address" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTBGPIP = "UnsupportedOperation.PublicIpAddressIsNotBGPIp" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTEXISTED = "UnsupportedOperation.PublicIpAddressIsNotExisted" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSNOTBILLEDBYTRAFFIC = "UnsupportedOperation.PublicIpAddressNotBilledByTraffic" +func (c *Client) CreateNatGatewayWithContext(ctx context.Context, request *CreateNatGatewayRequest) (response *CreateNatGatewayResponse, err error) { + if request == nil { + request = NewCreateNatGatewayRequest() + } + request.SetContext(ctx) + + response = NewCreateNatGatewayResponse() + err = c.Send(request, response) + return +} + +func NewCreateNatGatewayDestinationIpPortTranslationNatRuleRequest() (request *CreateNatGatewayDestinationIpPortTranslationNatRuleRequest) { + request = &CreateNatGatewayDestinationIpPortTranslationNatRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateNatGatewayDestinationIpPortTranslationNatRule") + + return +} + +func NewCreateNatGatewayDestinationIpPortTranslationNatRuleResponse() (response *CreateNatGatewayDestinationIpPortTranslationNatRuleResponse) { + response = &CreateNatGatewayDestinationIpPortTranslationNatRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateNatGatewayDestinationIpPortTranslationNatRule +// 本接口(CreateNatGatewayDestinationIpPortTranslationNatRule)用于创建NAT网关端口转发规则。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSSTATE = "InvalidAddressState" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDVPCID_MALFORMED = "InvalidVpcId.Malformed" +// INVALIDVPCID_NOTFOUND = "InvalidVpcId.NotFound" +// LIMITEXCEEDED_ADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.AddressQuotaLimitExceeded" +// LIMITEXCEEDED_DAILYALLOCATEADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.DailyAllocateAddressQuotaLimitExceeded" +// LIMITEXCEEDED_NATGATEWAYPERVPCLIMITEXCEEDED = "LimitExceeded.NatGatewayPerVpcLimitExceeded" +// LIMITEXCEEDED_PUBLICIPADDRESSPERNATGATEWAYLIMITEXCEEDED = "LimitExceeded.PublicIpAddressPerNatGatewayLimitExceeded" +// RESOURCEINUSE_ADDRESS = "ResourceInUse.Address" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTBGPIP = "UnsupportedOperation.PublicIpAddressIsNotBGPIp" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTEXISTED = "UnsupportedOperation.PublicIpAddressIsNotExisted" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSNOTBILLEDBYTRAFFIC = "UnsupportedOperation.PublicIpAddressNotBilledByTraffic" +func (c *Client) CreateNatGatewayDestinationIpPortTranslationNatRule(request *CreateNatGatewayDestinationIpPortTranslationNatRuleRequest) (response *CreateNatGatewayDestinationIpPortTranslationNatRuleResponse, err error) { + if request == nil { + request = NewCreateNatGatewayDestinationIpPortTranslationNatRuleRequest() + } + + response = NewCreateNatGatewayDestinationIpPortTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +// CreateNatGatewayDestinationIpPortTranslationNatRule +// 本接口(CreateNatGatewayDestinationIpPortTranslationNatRule)用于创建NAT网关端口转发规则。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSSTATE = "InvalidAddressState" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDVPCID_MALFORMED = "InvalidVpcId.Malformed" +// INVALIDVPCID_NOTFOUND = "InvalidVpcId.NotFound" +// LIMITEXCEEDED_ADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.AddressQuotaLimitExceeded" +// LIMITEXCEEDED_DAILYALLOCATEADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.DailyAllocateAddressQuotaLimitExceeded" +// LIMITEXCEEDED_NATGATEWAYPERVPCLIMITEXCEEDED = "LimitExceeded.NatGatewayPerVpcLimitExceeded" +// LIMITEXCEEDED_PUBLICIPADDRESSPERNATGATEWAYLIMITEXCEEDED = "LimitExceeded.PublicIpAddressPerNatGatewayLimitExceeded" +// RESOURCEINUSE_ADDRESS = "ResourceInUse.Address" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTBGPIP = "UnsupportedOperation.PublicIpAddressIsNotBGPIp" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTEXISTED = "UnsupportedOperation.PublicIpAddressIsNotExisted" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSNOTBILLEDBYTRAFFIC = "UnsupportedOperation.PublicIpAddressNotBilledByTraffic" +func (c *Client) CreateNatGatewayDestinationIpPortTranslationNatRuleWithContext(ctx context.Context, request *CreateNatGatewayDestinationIpPortTranslationNatRuleRequest) (response *CreateNatGatewayDestinationIpPortTranslationNatRuleResponse, err error) { + if request == nil { + request = NewCreateNatGatewayDestinationIpPortTranslationNatRuleRequest() + } + request.SetContext(ctx) + + response = NewCreateNatGatewayDestinationIpPortTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +func NewCreateNatGatewaySourceIpTranslationNatRuleRequest() (request *CreateNatGatewaySourceIpTranslationNatRuleRequest) { + request = &CreateNatGatewaySourceIpTranslationNatRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateNatGatewaySourceIpTranslationNatRule") + + return +} + +func NewCreateNatGatewaySourceIpTranslationNatRuleResponse() (response *CreateNatGatewaySourceIpTranslationNatRuleResponse) { + response = &CreateNatGatewaySourceIpTranslationNatRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateNatGatewaySourceIpTranslationNatRule +// 本接口(CreateNatGatewaySourceIpTranslationNatRule)用于创建NAT网关SNAT规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_NATSNATRULEEXISTS = "InvalidParameterValue.NatSnatRuleExists" +// LIMITEXCEEDED = "LimitExceeded" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION_NATGATEWAYTYPENOTSUPPORTSNAT = "UnsupportedOperation.NatGatewayTypeNotSupportSNAT" +func (c *Client) CreateNatGatewaySourceIpTranslationNatRule(request *CreateNatGatewaySourceIpTranslationNatRuleRequest) (response *CreateNatGatewaySourceIpTranslationNatRuleResponse, err error) { + if request == nil { + request = NewCreateNatGatewaySourceIpTranslationNatRuleRequest() + } + + response = NewCreateNatGatewaySourceIpTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +// CreateNatGatewaySourceIpTranslationNatRule +// 本接口(CreateNatGatewaySourceIpTranslationNatRule)用于创建NAT网关SNAT规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_NATSNATRULEEXISTS = "InvalidParameterValue.NatSnatRuleExists" +// LIMITEXCEEDED = "LimitExceeded" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION_NATGATEWAYTYPENOTSUPPORTSNAT = "UnsupportedOperation.NatGatewayTypeNotSupportSNAT" +func (c *Client) CreateNatGatewaySourceIpTranslationNatRuleWithContext(ctx context.Context, request *CreateNatGatewaySourceIpTranslationNatRuleRequest) (response *CreateNatGatewaySourceIpTranslationNatRuleResponse, err error) { + if request == nil { + request = NewCreateNatGatewaySourceIpTranslationNatRuleRequest() + } + request.SetContext(ctx) + + response = NewCreateNatGatewaySourceIpTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +func NewCreateNetDetectRequest() (request *CreateNetDetectRequest) { + request = &CreateNetDetectRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateNetDetect") + + return +} + +func NewCreateNetDetectResponse() (response *CreateNetDetectResponse) { + response = &CreateNetDetectResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateNetDetect +// 本接口(CreateNetDetect)用于创建网络探测。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_NEXTHOPMISMATCH = "InvalidParameter.NextHopMismatch" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_NETDETECTINVPC = "InvalidParameterValue.NetDetectInVpc" +// INVALIDPARAMETERVALUE_NETDETECTNOTFOUNDIP = "InvalidParameterValue.NetDetectNotFoundIp" +// INVALIDPARAMETERVALUE_NETDETECTSAMEIP = "InvalidParameterValue.NetDetectSameIp" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) CreateNetDetect(request *CreateNetDetectRequest) (response *CreateNetDetectResponse, err error) { + if request == nil { + request = NewCreateNetDetectRequest() + } + + response = NewCreateNetDetectResponse() + err = c.Send(request, response) + return +} + +// CreateNetDetect +// 本接口(CreateNetDetect)用于创建网络探测。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_NEXTHOPMISMATCH = "InvalidParameter.NextHopMismatch" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_NETDETECTINVPC = "InvalidParameterValue.NetDetectInVpc" +// INVALIDPARAMETERVALUE_NETDETECTNOTFOUNDIP = "InvalidParameterValue.NetDetectNotFoundIp" +// INVALIDPARAMETERVALUE_NETDETECTSAMEIP = "InvalidParameterValue.NetDetectSameIp" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) CreateNetDetectWithContext(ctx context.Context, request *CreateNetDetectRequest) (response *CreateNetDetectResponse, err error) { + if request == nil { + request = NewCreateNetDetectRequest() + } + request.SetContext(ctx) + + response = NewCreateNetDetectResponse() + err = c.Send(request, response) + return +} + +func NewCreateNetworkAclRequest() (request *CreateNetworkAclRequest) { + request = &CreateNetworkAclRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateNetworkAcl") + + return +} + +func NewCreateNetworkAclResponse() (response *CreateNetworkAclResponse) { + response = &CreateNetworkAclResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateNetworkAcl +// 本接口(CreateNetworkAcl)用于创建新的<a href="https://cloud.tencent.com/document/product/215/20088">网络ACL</a>。 +// +// * 新建的网络ACL的入站和出站规则默认都是全部拒绝,在创建后通常您需要再调用ModifyNetworkAclEntries将网络ACL的规则设置为需要的规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateNetworkAcl(request *CreateNetworkAclRequest) (response *CreateNetworkAclResponse, err error) { + if request == nil { + request = NewCreateNetworkAclRequest() + } + + response = NewCreateNetworkAclResponse() + err = c.Send(request, response) + return +} + +// CreateNetworkAcl +// 本接口(CreateNetworkAcl)用于创建新的<a href="https://cloud.tencent.com/document/product/215/20088">网络ACL</a>。 +// +// * 新建的网络ACL的入站和出站规则默认都是全部拒绝,在创建后通常您需要再调用ModifyNetworkAclEntries将网络ACL的规则设置为需要的规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateNetworkAclWithContext(ctx context.Context, request *CreateNetworkAclRequest) (response *CreateNetworkAclResponse, err error) { + if request == nil { + request = NewCreateNetworkAclRequest() + } + request.SetContext(ctx) + + response = NewCreateNetworkAclResponse() + err = c.Send(request, response) + return +} + +func NewCreateNetworkInterfaceRequest() (request *CreateNetworkInterfaceRequest) { + request = &CreateNetworkInterfaceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateNetworkInterface") + + return +} + +func NewCreateNetworkInterfaceResponse() (response *CreateNetworkInterfaceResponse) { + response = &CreateNetworkInterfaceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateNetworkInterface +// 本接口(CreateNetworkInterface)用于创建弹性网卡。 +// +// * 创建弹性网卡时可以指定内网IP,并且可以指定一个主IP,指定的内网IP必须在弹性网卡所在子网内,而且不能被占用。 +// +// * 创建弹性网卡时可以指定需要申请的内网IP数量,系统会随机生成内网IP地址。 +// +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 创建弹性网卡同时可以绑定已有安全组。 +// +// * 创建弹性网卡同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateNetworkInterface(request *CreateNetworkInterfaceRequest) (response *CreateNetworkInterfaceResponse, err error) { + if request == nil { + request = NewCreateNetworkInterfaceRequest() + } + + response = NewCreateNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +// CreateNetworkInterface +// 本接口(CreateNetworkInterface)用于创建弹性网卡。 +// +// * 创建弹性网卡时可以指定内网IP,并且可以指定一个主IP,指定的内网IP必须在弹性网卡所在子网内,而且不能被占用。 +// +// * 创建弹性网卡时可以指定需要申请的内网IP数量,系统会随机生成内网IP地址。 +// +// * 一个弹性网卡支持绑定的IP地址是有限制的,更多资源限制信息详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 +// +// * 创建弹性网卡同时可以绑定已有安全组。 +// +// * 创建弹性网卡同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateNetworkInterfaceWithContext(ctx context.Context, request *CreateNetworkInterfaceRequest) (response *CreateNetworkInterfaceResponse, err error) { + if request == nil { + request = NewCreateNetworkInterfaceRequest() + } + request.SetContext(ctx) + + response = NewCreateNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +func NewCreateRouteTableRequest() (request *CreateRouteTableRequest) { + request = &CreateRouteTableRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateRouteTable") + + return +} + +func NewCreateRouteTableResponse() (response *CreateRouteTableResponse) { + response = &CreateRouteTableResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateRouteTable +// 本接口(CreateRouteTable)用于创建路由表。 +// +// * 创建了VPC后,系统会创建一个默认路由表,所有新建的子网都会关联到默认路由表。默认情况下您可以直接使用默认路由表来管理您的路由策略。当您的路由策略较多时,您可以调用创建路由表接口创建更多路由表管理您的路由策略。 +// +// * 创建路由表同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateRouteTable(request *CreateRouteTableRequest) (response *CreateRouteTableResponse, err error) { + if request == nil { + request = NewCreateRouteTableRequest() + } + + response = NewCreateRouteTableResponse() + err = c.Send(request, response) + return +} + +// CreateRouteTable +// 本接口(CreateRouteTable)用于创建路由表。 +// +// * 创建了VPC后,系统会创建一个默认路由表,所有新建的子网都会关联到默认路由表。默认情况下您可以直接使用默认路由表来管理您的路由策略。当您的路由策略较多时,您可以调用创建路由表接口创建更多路由表管理您的路由策略。 +// +// * 创建路由表同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateRouteTableWithContext(ctx context.Context, request *CreateRouteTableRequest) (response *CreateRouteTableResponse, err error) { + if request == nil { + request = NewCreateRouteTableRequest() + } + request.SetContext(ctx) + + response = NewCreateRouteTableResponse() + err = c.Send(request, response) + return +} + +func NewCreateRoutesRequest() (request *CreateRoutesRequest) { + request = &CreateRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateRoutes") + + return +} + +func NewCreateRoutesResponse() (response *CreateRoutesResponse) { + response = &CreateRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateRoutes +// 本接口(CreateRoutes)用于创建路由策略。 +// +// * 向指定路由表批量新增路由策略。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CIDRNOTINPEERVPC = "InvalidParameterValue.CidrNotInPeerVpc" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CDCSUBNETNOTSUPPORTUNLOCALGATEWAY = "UnsupportedOperation.CdcSubnetNotSupportUnLocalGateway" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +// UNSUPPORTEDOPERATION_ECMPWITHCCNROUTE = "UnsupportedOperation.EcmpWithCcnRoute" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +// UNSUPPORTEDOPERATION_NORMALSUBNETNOTSUPPORTLOCALGATEWAY = "UnsupportedOperation.NormalSubnetNotSupportLocalGateway" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) CreateRoutes(request *CreateRoutesRequest) (response *CreateRoutesResponse, err error) { + if request == nil { + request = NewCreateRoutesRequest() + } + + response = NewCreateRoutesResponse() + err = c.Send(request, response) + return +} + +// CreateRoutes +// 本接口(CreateRoutes)用于创建路由策略。 +// +// * 向指定路由表批量新增路由策略。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CIDRNOTINPEERVPC = "InvalidParameterValue.CidrNotInPeerVpc" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CDCSUBNETNOTSUPPORTUNLOCALGATEWAY = "UnsupportedOperation.CdcSubnetNotSupportUnLocalGateway" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +// UNSUPPORTEDOPERATION_ECMPWITHCCNROUTE = "UnsupportedOperation.EcmpWithCcnRoute" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +// UNSUPPORTEDOPERATION_NORMALSUBNETNOTSUPPORTLOCALGATEWAY = "UnsupportedOperation.NormalSubnetNotSupportLocalGateway" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) CreateRoutesWithContext(ctx context.Context, request *CreateRoutesRequest) (response *CreateRoutesResponse, err error) { + if request == nil { + request = NewCreateRoutesRequest() + } + request.SetContext(ctx) + + response = NewCreateRoutesResponse() + err = c.Send(request, response) + return +} + +func NewCreateSecurityGroupRequest() (request *CreateSecurityGroupRequest) { + request = &CreateSecurityGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateSecurityGroup") + + return +} + +func NewCreateSecurityGroupResponse() (response *CreateSecurityGroupResponse) { + response = &CreateSecurityGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateSecurityGroup +// 本接口(CreateSecurityGroup)用于创建新的安全组(SecurityGroup)。 +// +// * 每个账户下每个地域的每个项目的<a href="https://cloud.tencent.com/document/product/213/12453">安全组数量限制</a>。 +// +// * 新建的安全组的入站和出站规则默认都是全部拒绝,在创建后通常您需要再调用CreateSecurityGroupPolicies将安全组的规则设置为需要的规则。 +// +// * 创建安全组同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateSecurityGroup(request *CreateSecurityGroupRequest) (response *CreateSecurityGroupResponse, err error) { + if request == nil { + request = NewCreateSecurityGroupRequest() + } + + response = NewCreateSecurityGroupResponse() + err = c.Send(request, response) + return +} + +// CreateSecurityGroup +// 本接口(CreateSecurityGroup)用于创建新的安全组(SecurityGroup)。 +// +// * 每个账户下每个地域的每个项目的<a href="https://cloud.tencent.com/document/product/213/12453">安全组数量限制</a>。 +// +// * 新建的安全组的入站和出站规则默认都是全部拒绝,在创建后通常您需要再调用CreateSecurityGroupPolicies将安全组的规则设置为需要的规则。 +// +// * 创建安全组同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateSecurityGroupWithContext(ctx context.Context, request *CreateSecurityGroupRequest) (response *CreateSecurityGroupResponse, err error) { + if request == nil { + request = NewCreateSecurityGroupRequest() + } + request.SetContext(ctx) + + response = NewCreateSecurityGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateSecurityGroupPoliciesRequest() (request *CreateSecurityGroupPoliciesRequest) { + request = &CreateSecurityGroupPoliciesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateSecurityGroupPolicies") + + return +} + +func NewCreateSecurityGroupPoliciesResponse() (response *CreateSecurityGroupPoliciesResponse) { + response = &CreateSecurityGroupPoliciesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateSecurityGroupPolicies +// 本接口(CreateSecurityGroupPolicies)用于创建安全组规则(SecurityGroupPolicy)。 +// +// +// +// 在 SecurityGroupPolicySet 参数中: +// +// <ul> +// +// <li>Version 安全组规则版本号,用户每次更新安全规则版本会自动加1,防止您更新的路由规则已过期,不填不考虑冲突。</li> +// +// <li>在创建出站和入站规则(Egress 和 Ingress)时:<ul> +// +// <li>Protocol 字段支持输入TCP, UDP, ICMP, ICMPV6, GRE, ALL。</li> +// +// <li>CidrBlock 字段允许输入符合cidr格式标准的任意字符串。在基础网络中,如果 CidrBlock 包含您的账户内的云服务器之外的设备在腾讯云的内网 IP,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。</li> +// +// <li>Ipv6CidrBlock 字段允许输入符合IPv6 cidr格式标准的任意字符串。在基础网络中,如果Ipv6CidrBlock 包含您的账户内的云服务器之外的设备在腾讯云的内网 IPv6,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。</li> +// +// <li>SecurityGroupId 字段允许输入与待修改的安全组位于相同项目中的安全组 ID,包括这个安全组 ID 本身,代表安全组下所有云服务器的内网 IP。使用这个字段时,这条规则用来匹配网络报文的过程中会随着被使用的这个 ID 所关联的云服务器变化而变化,不需要重新修改。</li> +// +// <li>Port 字段允许输入一个单独端口号,或者用减号分隔的两个端口号代表端口范围,例如80或8000-8010。只有当 Protocol 字段是 TCP 或 UDP 时,Port 字段才被接受,即 Protocol 字段不是 TCP 或 UDP 时,Protocol 和 Port 排他关系,不允许同时输入,否则会接口报错。</li> +// +// <li>Action 字段只允许输入 ACCEPT 或 DROP。</li> +// +// <li>CidrBlock, Ipv6CidrBlock, SecurityGroupId, AddressTemplate 四者是排他关系,不允许同时输入,Protocol + Port 和 ServiceTemplate 二者是排他关系,不允许同时输入。</li> +// +// <li>一次请求中只能创建单个方向的规则, 如果需要指定索引(PolicyIndex)参数, 多条规则的索引必须一致。</li> +// +// </ul></li></ul> +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_SECURITYGROUPPOLICYSET = "LimitExceeded.SecurityGroupPolicySet" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" +// UNSUPPORTEDOPERATION_CLBPOLICYLIMIT = "UnsupportedOperation.ClbPolicyLimit" +// UNSUPPORTEDOPERATION_DUPLICATEPOLICY = "UnsupportedOperation.DuplicatePolicy" +// UNSUPPORTEDOPERATION_VERSIONMISMATCH = "UnsupportedOperation.VersionMismatch" +func (c *Client) CreateSecurityGroupPolicies(request *CreateSecurityGroupPoliciesRequest) (response *CreateSecurityGroupPoliciesResponse, err error) { + if request == nil { + request = NewCreateSecurityGroupPoliciesRequest() + } + + response = NewCreateSecurityGroupPoliciesResponse() + err = c.Send(request, response) + return +} + +// CreateSecurityGroupPolicies +// 本接口(CreateSecurityGroupPolicies)用于创建安全组规则(SecurityGroupPolicy)。 +// +// +// +// 在 SecurityGroupPolicySet 参数中: +// +// <ul> +// +// <li>Version 安全组规则版本号,用户每次更新安全规则版本会自动加1,防止您更新的路由规则已过期,不填不考虑冲突。</li> +// +// <li>在创建出站和入站规则(Egress 和 Ingress)时:<ul> +// +// <li>Protocol 字段支持输入TCP, UDP, ICMP, ICMPV6, GRE, ALL。</li> +// +// <li>CidrBlock 字段允许输入符合cidr格式标准的任意字符串。在基础网络中,如果 CidrBlock 包含您的账户内的云服务器之外的设备在腾讯云的内网 IP,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。</li> +// +// <li>Ipv6CidrBlock 字段允许输入符合IPv6 cidr格式标准的任意字符串。在基础网络中,如果Ipv6CidrBlock 包含您的账户内的云服务器之外的设备在腾讯云的内网 IPv6,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。</li> +// +// <li>SecurityGroupId 字段允许输入与待修改的安全组位于相同项目中的安全组 ID,包括这个安全组 ID 本身,代表安全组下所有云服务器的内网 IP。使用这个字段时,这条规则用来匹配网络报文的过程中会随着被使用的这个 ID 所关联的云服务器变化而变化,不需要重新修改。</li> +// +// <li>Port 字段允许输入一个单独端口号,或者用减号分隔的两个端口号代表端口范围,例如80或8000-8010。只有当 Protocol 字段是 TCP 或 UDP 时,Port 字段才被接受,即 Protocol 字段不是 TCP 或 UDP 时,Protocol 和 Port 排他关系,不允许同时输入,否则会接口报错。</li> +// +// <li>Action 字段只允许输入 ACCEPT 或 DROP。</li> +// +// <li>CidrBlock, Ipv6CidrBlock, SecurityGroupId, AddressTemplate 四者是排他关系,不允许同时输入,Protocol + Port 和 ServiceTemplate 二者是排他关系,不允许同时输入。</li> +// +// <li>一次请求中只能创建单个方向的规则, 如果需要指定索引(PolicyIndex)参数, 多条规则的索引必须一致。</li> +// +// </ul></li></ul> +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// LIMITEXCEEDED_SECURITYGROUPPOLICYSET = "LimitExceeded.SecurityGroupPolicySet" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" +// UNSUPPORTEDOPERATION_CLBPOLICYLIMIT = "UnsupportedOperation.ClbPolicyLimit" +// UNSUPPORTEDOPERATION_DUPLICATEPOLICY = "UnsupportedOperation.DuplicatePolicy" +// UNSUPPORTEDOPERATION_VERSIONMISMATCH = "UnsupportedOperation.VersionMismatch" +func (c *Client) CreateSecurityGroupPoliciesWithContext(ctx context.Context, request *CreateSecurityGroupPoliciesRequest) (response *CreateSecurityGroupPoliciesResponse, err error) { + if request == nil { + request = NewCreateSecurityGroupPoliciesRequest() + } + request.SetContext(ctx) + + response = NewCreateSecurityGroupPoliciesResponse() + err = c.Send(request, response) + return +} + +func NewCreateSecurityGroupWithPoliciesRequest() (request *CreateSecurityGroupWithPoliciesRequest) { + request = &CreateSecurityGroupWithPoliciesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateSecurityGroupWithPolicies") + + return +} + +func NewCreateSecurityGroupWithPoliciesResponse() (response *CreateSecurityGroupWithPoliciesResponse) { + response = &CreateSecurityGroupWithPoliciesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateSecurityGroupWithPolicies +// 本接口(CreateSecurityGroupWithPolicies)用于创建新的安全组(SecurityGroup),并且可以同时添加安全组规则(SecurityGroupPolicy)。 +// +// * 每个账户下每个地域的每个项目的<a href="https://cloud.tencent.com/document/product/213/12453">安全组数量限制</a>。 +// +// * 新建的安全组的入站和出站规则默认都是全部拒绝,在创建后通常您需要再调用CreateSecurityGroupPolicies将安全组的规则设置为需要的规则。 +// +// +// +// 安全组规则说明: +// +// * Version安全组规则版本号,用户每次更新安全规则版本会自动加1,防止您更新的路由规则已过期,不填不考虑冲突。 +// +// * Protocol字段支持输入TCP, UDP, ICMP, ICMPV6, GRE, ALL。 +// +// * CidrBlock字段允许输入符合cidr格式标准的任意字符串。(展开)在基础网络中,如果CidrBlock包含您的账户内的云服务器之外的设备在腾讯云的内网IP,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。 +// +// * Ipv6CidrBlock字段允许输入符合IPv6 cidr格式标准的任意字符串。(展开)在基础网络中,如果Ipv6CidrBlock包含您的账户内的云服务器之外的设备在腾讯云的内网IPv6,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。 +// +// * SecurityGroupId字段允许输入与待修改的安全组位于相同项目中的安全组ID,包括这个安全组ID本身,代表安全组下所有云服务器的内网IP。使用这个字段时,这条规则用来匹配网络报文的过程中会随着被使用的这个ID所关联的云服务器变化而变化,不需要重新修改。 +// +// * Port字段允许输入一个单独端口号,或者用减号分隔的两个端口号代表端口范围,例如80或8000-8010。只有当Protocol字段是TCP或UDP时,Port字段才被接受,即Protocol字段不是TCP或UDP时,Protocol和Port排他关系,不允许同时输入,否则会接口报错。 +// +// * Action字段只允许输入ACCEPT或DROP。 +// +// * CidrBlock, Ipv6CidrBlock, SecurityGroupId, AddressTemplate四者是排他关系,不允许同时输入,Protocol + Port和ServiceTemplate二者是排他关系,不允许同时输入。 +// +// * 一次请求中只能创建单个方向的规则, 如果需要指定索引(PolicyIndex)参数, 多条规则的索引必须一致。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateSecurityGroupWithPolicies(request *CreateSecurityGroupWithPoliciesRequest) (response *CreateSecurityGroupWithPoliciesResponse, err error) { + if request == nil { + request = NewCreateSecurityGroupWithPoliciesRequest() + } + + response = NewCreateSecurityGroupWithPoliciesResponse() + err = c.Send(request, response) + return +} + +// CreateSecurityGroupWithPolicies +// 本接口(CreateSecurityGroupWithPolicies)用于创建新的安全组(SecurityGroup),并且可以同时添加安全组规则(SecurityGroupPolicy)。 +// +// * 每个账户下每个地域的每个项目的<a href="https://cloud.tencent.com/document/product/213/12453">安全组数量限制</a>。 +// +// * 新建的安全组的入站和出站规则默认都是全部拒绝,在创建后通常您需要再调用CreateSecurityGroupPolicies将安全组的规则设置为需要的规则。 +// +// +// +// 安全组规则说明: +// +// * Version安全组规则版本号,用户每次更新安全规则版本会自动加1,防止您更新的路由规则已过期,不填不考虑冲突。 +// +// * Protocol字段支持输入TCP, UDP, ICMP, ICMPV6, GRE, ALL。 +// +// * CidrBlock字段允许输入符合cidr格式标准的任意字符串。(展开)在基础网络中,如果CidrBlock包含您的账户内的云服务器之外的设备在腾讯云的内网IP,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。 +// +// * Ipv6CidrBlock字段允许输入符合IPv6 cidr格式标准的任意字符串。(展开)在基础网络中,如果Ipv6CidrBlock包含您的账户内的云服务器之外的设备在腾讯云的内网IPv6,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。 +// +// * SecurityGroupId字段允许输入与待修改的安全组位于相同项目中的安全组ID,包括这个安全组ID本身,代表安全组下所有云服务器的内网IP。使用这个字段时,这条规则用来匹配网络报文的过程中会随着被使用的这个ID所关联的云服务器变化而变化,不需要重新修改。 +// +// * Port字段允许输入一个单独端口号,或者用减号分隔的两个端口号代表端口范围,例如80或8000-8010。只有当Protocol字段是TCP或UDP时,Port字段才被接受,即Protocol字段不是TCP或UDP时,Protocol和Port排他关系,不允许同时输入,否则会接口报错。 +// +// * Action字段只允许输入ACCEPT或DROP。 +// +// * CidrBlock, Ipv6CidrBlock, SecurityGroupId, AddressTemplate四者是排他关系,不允许同时输入,Protocol + Port和ServiceTemplate二者是排他关系,不允许同时输入。 +// +// * 一次请求中只能创建单个方向的规则, 如果需要指定索引(PolicyIndex)参数, 多条规则的索引必须一致。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateSecurityGroupWithPoliciesWithContext(ctx context.Context, request *CreateSecurityGroupWithPoliciesRequest) (response *CreateSecurityGroupWithPoliciesResponse, err error) { + if request == nil { + request = NewCreateSecurityGroupWithPoliciesRequest() + } + request.SetContext(ctx) + + response = NewCreateSecurityGroupWithPoliciesResponse() + err = c.Send(request, response) + return +} + +func NewCreateServiceTemplateRequest() (request *CreateServiceTemplateRequest) { + request = &CreateServiceTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateServiceTemplate") + + return +} + +func NewCreateServiceTemplateResponse() (response *CreateServiceTemplateResponse) { + response = &CreateServiceTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateServiceTemplate +// 本接口(CreateServiceTemplate)用于创建协议端口模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) CreateServiceTemplate(request *CreateServiceTemplateRequest) (response *CreateServiceTemplateResponse, err error) { + if request == nil { + request = NewCreateServiceTemplateRequest() + } + + response = NewCreateServiceTemplateResponse() + err = c.Send(request, response) + return +} + +// CreateServiceTemplate +// 本接口(CreateServiceTemplate)用于创建协议端口模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) CreateServiceTemplateWithContext(ctx context.Context, request *CreateServiceTemplateRequest) (response *CreateServiceTemplateResponse, err error) { + if request == nil { + request = NewCreateServiceTemplateRequest() + } + request.SetContext(ctx) + + response = NewCreateServiceTemplateResponse() + err = c.Send(request, response) + return +} + +func NewCreateServiceTemplateGroupRequest() (request *CreateServiceTemplateGroupRequest) { + request = &CreateServiceTemplateGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateServiceTemplateGroup") + + return +} + +func NewCreateServiceTemplateGroupResponse() (response *CreateServiceTemplateGroupResponse) { + response = &CreateServiceTemplateGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateServiceTemplateGroup +// 本接口(CreateServiceTemplateGroup)用于创建协议端口模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) CreateServiceTemplateGroup(request *CreateServiceTemplateGroupRequest) (response *CreateServiceTemplateGroupResponse, err error) { + if request == nil { + request = NewCreateServiceTemplateGroupRequest() + } + + response = NewCreateServiceTemplateGroupResponse() + err = c.Send(request, response) + return +} + +// CreateServiceTemplateGroup +// 本接口(CreateServiceTemplateGroup)用于创建协议端口模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) CreateServiceTemplateGroupWithContext(ctx context.Context, request *CreateServiceTemplateGroupRequest) (response *CreateServiceTemplateGroupResponse, err error) { + if request == nil { + request = NewCreateServiceTemplateGroupRequest() + } + request.SetContext(ctx) + + response = NewCreateServiceTemplateGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateSubnetRequest() (request *CreateSubnetRequest) { + request = &CreateSubnetRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateSubnet") + + return +} + +func NewCreateSubnetResponse() (response *CreateSubnetResponse) { + response = &CreateSubnetResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateSubnet +// 本接口(CreateSubnet)用于创建子网。 +// +// * 创建子网前必须创建好 VPC。 +// +// * 子网创建成功后,子网网段不能修改。子网网段必须在VPC网段内,可以和VPC网段相同(VPC有且只有一个子网时),建议子网网段在VPC网段内,预留网段给其他子网使用。 +// +// * 您可以创建的最小网段子网掩码为28(有16个IP地址),最大网段子网掩码为16(65,536个IP地址)。 +// +// * 同一个VPC内,多个子网的网段不能重叠。 +// +// * 子网创建后会自动关联到默认路由表。 +// +// * 创建子网同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_ZONECONFLICT = "InvalidParameterValue.ZoneConflict" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" +// UNSUPPORTEDOPERATION_DCGATEWAYSNOTFOUNDINVPC = "UnsupportedOperation.DcGatewaysNotFoundInVpc" +func (c *Client) CreateSubnet(request *CreateSubnetRequest) (response *CreateSubnetResponse, err error) { + if request == nil { + request = NewCreateSubnetRequest() + } + + response = NewCreateSubnetResponse() + err = c.Send(request, response) + return +} + +// CreateSubnet +// 本接口(CreateSubnet)用于创建子网。 +// +// * 创建子网前必须创建好 VPC。 +// +// * 子网创建成功后,子网网段不能修改。子网网段必须在VPC网段内,可以和VPC网段相同(VPC有且只有一个子网时),建议子网网段在VPC网段内,预留网段给其他子网使用。 +// +// * 您可以创建的最小网段子网掩码为28(有16个IP地址),最大网段子网掩码为16(65,536个IP地址)。 +// +// * 同一个VPC内,多个子网的网段不能重叠。 +// +// * 子网创建后会自动关联到默认路由表。 +// +// * 创建子网同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_ZONECONFLICT = "InvalidParameterValue.ZoneConflict" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" +// UNSUPPORTEDOPERATION_DCGATEWAYSNOTFOUNDINVPC = "UnsupportedOperation.DcGatewaysNotFoundInVpc" +func (c *Client) CreateSubnetWithContext(ctx context.Context, request *CreateSubnetRequest) (response *CreateSubnetResponse, err error) { + if request == nil { + request = NewCreateSubnetRequest() + } + request.SetContext(ctx) + + response = NewCreateSubnetResponse() + err = c.Send(request, response) + return +} + +func NewCreateSubnetsRequest() (request *CreateSubnetsRequest) { + request = &CreateSubnetsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateSubnets") + + return +} + +func NewCreateSubnetsResponse() (response *CreateSubnetsResponse) { + response = &CreateSubnetsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateSubnets +// 本接口(CreateSubnets)用于批量创建子网。 +// +// * 创建子网前必须创建好 VPC。 +// +// * 子网创建成功后,子网网段不能修改。子网网段必须在VPC网段内,可以和VPC网段相同(VPC有且只有一个子网时),建议子网网段在VPC网段内,预留网段给其他子网使用。 +// +// * 您可以创建的最小网段子网掩码为28(有16个IP地址),最大网段子网掩码为16(65,536个IP地址)。 +// +// * 同一个VPC内,多个子网的网段不能重叠。 +// +// * 子网创建后会自动关联到默认路由表。 +// +// * 创建子网同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_ZONECONFLICT = "InvalidParameterValue.ZoneConflict" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" +// UNSUPPORTEDOPERATION_DCGATEWAYSNOTFOUNDINVPC = "UnsupportedOperation.DcGatewaysNotFoundInVpc" +func (c *Client) CreateSubnets(request *CreateSubnetsRequest) (response *CreateSubnetsResponse, err error) { + if request == nil { + request = NewCreateSubnetsRequest() + } + + response = NewCreateSubnetsResponse() + err = c.Send(request, response) + return +} + +// CreateSubnets +// 本接口(CreateSubnets)用于批量创建子网。 +// +// * 创建子网前必须创建好 VPC。 +// +// * 子网创建成功后,子网网段不能修改。子网网段必须在VPC网段内,可以和VPC网段相同(VPC有且只有一个子网时),建议子网网段在VPC网段内,预留网段给其他子网使用。 +// +// * 您可以创建的最小网段子网掩码为28(有16个IP地址),最大网段子网掩码为16(65,536个IP地址)。 +// +// * 同一个VPC内,多个子网的网段不能重叠。 +// +// * 子网创建后会自动关联到默认路由表。 +// +// * 创建子网同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_ZONECONFLICT = "InvalidParameterValue.ZoneConflict" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" +// UNSUPPORTEDOPERATION_DCGATEWAYSNOTFOUNDINVPC = "UnsupportedOperation.DcGatewaysNotFoundInVpc" +func (c *Client) CreateSubnetsWithContext(ctx context.Context, request *CreateSubnetsRequest) (response *CreateSubnetsResponse, err error) { + if request == nil { + request = NewCreateSubnetsRequest() + } + request.SetContext(ctx) + + response = NewCreateSubnetsResponse() + err = c.Send(request, response) + return +} + +func NewCreateVpcRequest() (request *CreateVpcRequest) { + request = &CreateVpcRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateVpc") + + return +} + +func NewCreateVpcResponse() (response *CreateVpcResponse) { + response = &CreateVpcResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateVpc +// 本接口(CreateVpc)用于创建私有网络(VPC)。 +// +// * 用户可以创建的最小网段子网掩码为28(有16个IP地址),最大网段子网掩码为16(65,536个IP地址),如果需要规划VPC网段请参见[网络规划](https://cloud.tencent.com/document/product/215/30313)。 +// +// * 同一个地域能创建的VPC资源个数也是有限制的,详见 <a href="https://cloud.tencent.com/doc/product/215/537" title="VPC使用限制">VPC使用限制</a>,如果需要申请更多资源,请提交[工单申请](https://console.cloud.tencent.com/workorder/category)。 +// +// * 创建VPC同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateVpc(request *CreateVpcRequest) (response *CreateVpcResponse, err error) { + if request == nil { + request = NewCreateVpcRequest() + } + + response = NewCreateVpcResponse() + err = c.Send(request, response) + return +} + +// CreateVpc +// 本接口(CreateVpc)用于创建私有网络(VPC)。 +// +// * 用户可以创建的最小网段子网掩码为28(有16个IP地址),最大网段子网掩码为16(65,536个IP地址),如果需要规划VPC网段请参见[网络规划](https://cloud.tencent.com/document/product/215/30313)。 +// +// * 同一个地域能创建的VPC资源个数也是有限制的,详见 <a href="https://cloud.tencent.com/doc/product/215/537" title="VPC使用限制">VPC使用限制</a>,如果需要申请更多资源,请提交[工单申请](https://console.cloud.tencent.com/workorder/category)。 +// +// * 创建VPC同时可以绑定标签, 应答里的标签列表代表添加成功的标签。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateVpcWithContext(ctx context.Context, request *CreateVpcRequest) (response *CreateVpcResponse, err error) { + if request == nil { + request = NewCreateVpcRequest() + } + request.SetContext(ctx) + + response = NewCreateVpcResponse() + err = c.Send(request, response) + return +} + +func NewCreateVpcEndPointRequest() (request *CreateVpcEndPointRequest) { + request = &CreateVpcEndPointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateVpcEndPoint") + + return +} + +func NewCreateVpcEndPointResponse() (response *CreateVpcEndPointResponse) { + response = &CreateVpcEndPointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateVpcEndPoint +// 创建终端节点。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_SERVICEWHITELISTNOTADDED = "ResourceUnavailable.ServiceWhiteListNotAdded" +// UNSUPPORTEDOPERATION_ENDPOINTSERVICE = "UnsupportedOperation.EndPointService" +// UNSUPPORTEDOPERATION_SPECIALENDPOINTSERVICE = "UnsupportedOperation.SpecialEndPointService" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) CreateVpcEndPoint(request *CreateVpcEndPointRequest) (response *CreateVpcEndPointResponse, err error) { + if request == nil { + request = NewCreateVpcEndPointRequest() + } + + response = NewCreateVpcEndPointResponse() + err = c.Send(request, response) + return +} + +// CreateVpcEndPoint +// 创建终端节点。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_SERVICEWHITELISTNOTADDED = "ResourceUnavailable.ServiceWhiteListNotAdded" +// UNSUPPORTEDOPERATION_ENDPOINTSERVICE = "UnsupportedOperation.EndPointService" +// UNSUPPORTEDOPERATION_SPECIALENDPOINTSERVICE = "UnsupportedOperation.SpecialEndPointService" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) CreateVpcEndPointWithContext(ctx context.Context, request *CreateVpcEndPointRequest) (response *CreateVpcEndPointResponse, err error) { + if request == nil { + request = NewCreateVpcEndPointRequest() + } + request.SetContext(ctx) + + response = NewCreateVpcEndPointResponse() + err = c.Send(request, response) + return +} + +func NewCreateVpcEndPointServiceRequest() (request *CreateVpcEndPointServiceRequest) { + request = &CreateVpcEndPointServiceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateVpcEndPointService") + + return +} + +func NewCreateVpcEndPointServiceResponse() (response *CreateVpcEndPointServiceResponse) { + response = &CreateVpcEndPointServiceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateVpcEndPointService +// 创建终端节点服务。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) CreateVpcEndPointService(request *CreateVpcEndPointServiceRequest) (response *CreateVpcEndPointServiceResponse, err error) { + if request == nil { + request = NewCreateVpcEndPointServiceRequest() + } + + response = NewCreateVpcEndPointServiceResponse() + err = c.Send(request, response) + return +} + +// CreateVpcEndPointService +// 创建终端节点服务。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) CreateVpcEndPointServiceWithContext(ctx context.Context, request *CreateVpcEndPointServiceRequest) (response *CreateVpcEndPointServiceResponse, err error) { + if request == nil { + request = NewCreateVpcEndPointServiceRequest() + } + request.SetContext(ctx) + + response = NewCreateVpcEndPointServiceResponse() + err = c.Send(request, response) + return +} + +func NewCreateVpcEndPointServiceWhiteListRequest() (request *CreateVpcEndPointServiceWhiteListRequest) { + request = &CreateVpcEndPointServiceWhiteListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateVpcEndPointServiceWhiteList") + + return +} + +func NewCreateVpcEndPointServiceWhiteListResponse() (response *CreateVpcEndPointServiceWhiteListResponse) { + response = &CreateVpcEndPointServiceWhiteListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateVpcEndPointServiceWhiteList +// 创建终端服务白名单。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +func (c *Client) CreateVpcEndPointServiceWhiteList(request *CreateVpcEndPointServiceWhiteListRequest) (response *CreateVpcEndPointServiceWhiteListResponse, err error) { + if request == nil { + request = NewCreateVpcEndPointServiceWhiteListRequest() + } + + response = NewCreateVpcEndPointServiceWhiteListResponse() + err = c.Send(request, response) + return +} + +// CreateVpcEndPointServiceWhiteList +// 创建终端服务白名单。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +func (c *Client) CreateVpcEndPointServiceWhiteListWithContext(ctx context.Context, request *CreateVpcEndPointServiceWhiteListRequest) (response *CreateVpcEndPointServiceWhiteListResponse, err error) { + if request == nil { + request = NewCreateVpcEndPointServiceWhiteListRequest() + } + request.SetContext(ctx) + + response = NewCreateVpcEndPointServiceWhiteListResponse() + err = c.Send(request, response) + return +} + +func NewCreateVpnConnectionRequest() (request *CreateVpnConnectionRequest) { + request = &CreateVpnConnectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateVpnConnection") + + return +} + +func NewCreateVpnConnectionResponse() (response *CreateVpnConnectionResponse) { + response = &CreateVpnConnectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateVpnConnection +// 本接口(CreateVpnConnection)用于创建VPN通道。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// INVALIDPARAMETERVALUE_VPNCONNCIDRCONFLICT = "InvalidParameterValue.VpnConnCidrConflict" +// INVALIDPARAMETERVALUE_VPNCONNHEALTHCHECKIPCONFLICT = "InvalidParameterValue.VpnConnHealthCheckIpConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) CreateVpnConnection(request *CreateVpnConnectionRequest) (response *CreateVpnConnectionResponse, err error) { + if request == nil { + request = NewCreateVpnConnectionRequest() + } + + response = NewCreateVpnConnectionResponse() + err = c.Send(request, response) + return +} + +// CreateVpnConnection +// 本接口(CreateVpnConnection)用于创建VPN通道。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// INVALIDPARAMETERVALUE_VPNCONNCIDRCONFLICT = "InvalidParameterValue.VpnConnCidrConflict" +// INVALIDPARAMETERVALUE_VPNCONNHEALTHCHECKIPCONFLICT = "InvalidParameterValue.VpnConnHealthCheckIpConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) CreateVpnConnectionWithContext(ctx context.Context, request *CreateVpnConnectionRequest) (response *CreateVpnConnectionResponse, err error) { + if request == nil { + request = NewCreateVpnConnectionRequest() + } + request.SetContext(ctx) + + response = NewCreateVpnConnectionResponse() + err = c.Send(request, response) + return +} + +func NewCreateVpnGatewayRequest() (request *CreateVpnGatewayRequest) { + request = &CreateVpnGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateVpnGateway") + + return +} + +func NewCreateVpnGatewayResponse() (response *CreateVpnGatewayResponse) { + response = &CreateVpnGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateVpnGateway +// 本接口(CreateVpnGateway)用于创建VPN网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_VPNCONNCIDRCONFLICT = "InvalidParameterValue.VpnConnCidrConflict" +// INVALIDVPCID_MALFORMED = "InvalidVpcId.Malformed" +// INVALIDVPCID_NOTFOUND = "InvalidVpcId.NotFound" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" +// UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" +func (c *Client) CreateVpnGateway(request *CreateVpnGatewayRequest) (response *CreateVpnGatewayResponse, err error) { + if request == nil { + request = NewCreateVpnGatewayRequest() + } + + response = NewCreateVpnGatewayResponse() + err = c.Send(request, response) + return +} + +// CreateVpnGateway +// 本接口(CreateVpnGateway)用于创建VPN网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// INVALIDPARAMETERVALUE_VPNCONNCIDRCONFLICT = "InvalidParameterValue.VpnConnCidrConflict" +// INVALIDVPCID_MALFORMED = "InvalidVpcId.Malformed" +// INVALIDVPCID_NOTFOUND = "InvalidVpcId.NotFound" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" +// UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" +func (c *Client) CreateVpnGatewayWithContext(ctx context.Context, request *CreateVpnGatewayRequest) (response *CreateVpnGatewayResponse, err error) { + if request == nil { + request = NewCreateVpnGatewayRequest() + } + request.SetContext(ctx) + + response = NewCreateVpnGatewayResponse() + err = c.Send(request, response) + return +} + +func NewCreateVpnGatewayRoutesRequest() (request *CreateVpnGatewayRoutesRequest) { + request = &CreateVpnGatewayRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "CreateVpnGatewayRoutes") + + return +} + +func NewCreateVpnGatewayRoutesResponse() (response *CreateVpnGatewayRoutesResponse) { + response = &CreateVpnGatewayRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateVpnGatewayRoutes +// 创建路由型VPN网关的目的路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateVpnGatewayRoutes(request *CreateVpnGatewayRoutesRequest) (response *CreateVpnGatewayRoutesResponse, err error) { + if request == nil { + request = NewCreateVpnGatewayRoutesRequest() + } + + response = NewCreateVpnGatewayRoutesResponse() + err = c.Send(request, response) + return +} + +// CreateVpnGatewayRoutes +// 创建路由型VPN网关的目的路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateVpnGatewayRoutesWithContext(ctx context.Context, request *CreateVpnGatewayRoutesRequest) (response *CreateVpnGatewayRoutesResponse, err error) { + if request == nil { + request = NewCreateVpnGatewayRoutesRequest() + } + request.SetContext(ctx) + + response = NewCreateVpnGatewayRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteAddressTemplateRequest() (request *DeleteAddressTemplateRequest) { + request = &DeleteAddressTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteAddressTemplate") + + return +} + +func NewDeleteAddressTemplateResponse() (response *DeleteAddressTemplateResponse) { + response = &DeleteAddressTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteAddressTemplate +// 本接口(DeleteAddressTemplate)用于删除IP地址模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteAddressTemplate(request *DeleteAddressTemplateRequest) (response *DeleteAddressTemplateResponse, err error) { + if request == nil { + request = NewDeleteAddressTemplateRequest() + } + + response = NewDeleteAddressTemplateResponse() + err = c.Send(request, response) + return +} + +// DeleteAddressTemplate +// 本接口(DeleteAddressTemplate)用于删除IP地址模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteAddressTemplateWithContext(ctx context.Context, request *DeleteAddressTemplateRequest) (response *DeleteAddressTemplateResponse, err error) { + if request == nil { + request = NewDeleteAddressTemplateRequest() + } + request.SetContext(ctx) + + response = NewDeleteAddressTemplateResponse() + err = c.Send(request, response) + return +} + +func NewDeleteAddressTemplateGroupRequest() (request *DeleteAddressTemplateGroupRequest) { + request = &DeleteAddressTemplateGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteAddressTemplateGroup") + + return +} + +func NewDeleteAddressTemplateGroupResponse() (response *DeleteAddressTemplateGroupResponse) { + response = &DeleteAddressTemplateGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteAddressTemplateGroup +// 本接口(DeleteAddressTemplateGroup)用于删除IP地址模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteAddressTemplateGroup(request *DeleteAddressTemplateGroupRequest) (response *DeleteAddressTemplateGroupResponse, err error) { + if request == nil { + request = NewDeleteAddressTemplateGroupRequest() + } + + response = NewDeleteAddressTemplateGroupResponse() + err = c.Send(request, response) + return +} + +// DeleteAddressTemplateGroup +// 本接口(DeleteAddressTemplateGroup)用于删除IP地址模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteAddressTemplateGroupWithContext(ctx context.Context, request *DeleteAddressTemplateGroupRequest) (response *DeleteAddressTemplateGroupResponse, err error) { + if request == nil { + request = NewDeleteAddressTemplateGroupRequest() + } + request.SetContext(ctx) + + response = NewDeleteAddressTemplateGroupResponse() + err = c.Send(request, response) + return +} + +func NewDeleteAssistantCidrRequest() (request *DeleteAssistantCidrRequest) { + request = &DeleteAssistantCidrRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteAssistantCidr") + + return +} + +func NewDeleteAssistantCidrResponse() (response *DeleteAssistantCidrResponse) { + response = &DeleteAssistantCidrResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteAssistantCidr +// 本接口(DeleteAssistantCidr)用于删除辅助CIDR。(接口灰度中,如需使用请提工单。) +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteAssistantCidr(request *DeleteAssistantCidrRequest) (response *DeleteAssistantCidrResponse, err error) { + if request == nil { + request = NewDeleteAssistantCidrRequest() + } + + response = NewDeleteAssistantCidrResponse() + err = c.Send(request, response) + return +} + +// DeleteAssistantCidr +// 本接口(DeleteAssistantCidr)用于删除辅助CIDR。(接口灰度中,如需使用请提工单。) +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteAssistantCidrWithContext(ctx context.Context, request *DeleteAssistantCidrRequest) (response *DeleteAssistantCidrResponse, err error) { + if request == nil { + request = NewDeleteAssistantCidrRequest() + } + request.SetContext(ctx) + + response = NewDeleteAssistantCidrResponse() + err = c.Send(request, response) + return +} + +func NewDeleteBandwidthPackageRequest() (request *DeleteBandwidthPackageRequest) { + request = &DeleteBandwidthPackageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteBandwidthPackage") + + return +} + +func NewDeleteBandwidthPackageResponse() (response *DeleteBandwidthPackageResponse) { + response = &DeleteBandwidthPackageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteBandwidthPackage +// 接口支持删除共享带宽包,包括[设备带宽包](https://cloud.tencent.com/document/product/684/15246#.E8.AE.BE.E5.A4.87.E5.B8.A6.E5.AE.BD.E5.8C.85)和[IP带宽包](https://cloud.tencent.com/document/product/684/15246#ip-.E5.B8.A6.E5.AE.BD.E5.8C.85) +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEINUSE = "InvalidParameterValue.BandwidthPackageInUse" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDADDRESSSTATE = "UnsupportedOperation.InvalidAddressState" +func (c *Client) DeleteBandwidthPackage(request *DeleteBandwidthPackageRequest) (response *DeleteBandwidthPackageResponse, err error) { + if request == nil { + request = NewDeleteBandwidthPackageRequest() + } + + response = NewDeleteBandwidthPackageResponse() + err = c.Send(request, response) + return +} + +// DeleteBandwidthPackage +// 接口支持删除共享带宽包,包括[设备带宽包](https://cloud.tencent.com/document/product/684/15246#.E8.AE.BE.E5.A4.87.E5.B8.A6.E5.AE.BD.E5.8C.85)和[IP带宽包](https://cloud.tencent.com/document/product/684/15246#ip-.E5.B8.A6.E5.AE.BD.E5.8C.85) +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEINUSE = "InvalidParameterValue.BandwidthPackageInUse" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDADDRESSSTATE = "UnsupportedOperation.InvalidAddressState" +func (c *Client) DeleteBandwidthPackageWithContext(ctx context.Context, request *DeleteBandwidthPackageRequest) (response *DeleteBandwidthPackageResponse, err error) { + if request == nil { + request = NewDeleteBandwidthPackageRequest() + } + request.SetContext(ctx) + + response = NewDeleteBandwidthPackageResponse() + err = c.Send(request, response) + return +} + +func NewDeleteCcnRequest() (request *DeleteCcnRequest) { + request = &DeleteCcnRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteCcn") + + return +} + +func NewDeleteCcnResponse() (response *DeleteCcnResponse) { + response = &DeleteCcnResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteCcn +// 本接口(DeleteCcn)用于删除云联网。 +// +// * 删除后,云联网关联的所有实例间路由将被删除,网络将会中断,请务必确认 +// +// * 删除云联网是不可逆的操作,请谨慎处理。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_BANDWIDTHNOTEXPIRED = "UnsupportedOperation.BandwidthNotExpired" +// UNSUPPORTEDOPERATION_CCNHASFLOWLOG = "UnsupportedOperation.CcnHasFlowLog" +func (c *Client) DeleteCcn(request *DeleteCcnRequest) (response *DeleteCcnResponse, err error) { + if request == nil { + request = NewDeleteCcnRequest() + } + + response = NewDeleteCcnResponse() + err = c.Send(request, response) + return +} + +// DeleteCcn +// 本接口(DeleteCcn)用于删除云联网。 +// +// * 删除后,云联网关联的所有实例间路由将被删除,网络将会中断,请务必确认 +// +// * 删除云联网是不可逆的操作,请谨慎处理。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_BANDWIDTHNOTEXPIRED = "UnsupportedOperation.BandwidthNotExpired" +// UNSUPPORTEDOPERATION_CCNHASFLOWLOG = "UnsupportedOperation.CcnHasFlowLog" +func (c *Client) DeleteCcnWithContext(ctx context.Context, request *DeleteCcnRequest) (response *DeleteCcnResponse, err error) { + if request == nil { + request = NewDeleteCcnRequest() + } + request.SetContext(ctx) + + response = NewDeleteCcnResponse() + err = c.Send(request, response) + return +} + +func NewDeleteCustomerGatewayRequest() (request *DeleteCustomerGatewayRequest) { + request = &DeleteCustomerGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteCustomerGateway") + + return +} + +func NewDeleteCustomerGatewayResponse() (response *DeleteCustomerGatewayResponse) { + response = &DeleteCustomerGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteCustomerGateway +// 本接口(DeleteCustomerGateway)用于删除对端网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteCustomerGateway(request *DeleteCustomerGatewayRequest) (response *DeleteCustomerGatewayResponse, err error) { + if request == nil { + request = NewDeleteCustomerGatewayRequest() + } + + response = NewDeleteCustomerGatewayResponse() + err = c.Send(request, response) + return +} + +// DeleteCustomerGateway +// 本接口(DeleteCustomerGateway)用于删除对端网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteCustomerGatewayWithContext(ctx context.Context, request *DeleteCustomerGatewayRequest) (response *DeleteCustomerGatewayResponse, err error) { + if request == nil { + request = NewDeleteCustomerGatewayRequest() + } + request.SetContext(ctx) + + response = NewDeleteCustomerGatewayResponse() + err = c.Send(request, response) + return +} + +func NewDeleteDhcpIpRequest() (request *DeleteDhcpIpRequest) { + request = &DeleteDhcpIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteDhcpIp") + + return +} + +func NewDeleteDhcpIpResponse() (response *DeleteDhcpIpResponse) { + response = &DeleteDhcpIpResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteDhcpIp +// 本接口(DeleteDhcpIp)用于删除DhcpIp。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteDhcpIp(request *DeleteDhcpIpRequest) (response *DeleteDhcpIpResponse, err error) { + if request == nil { + request = NewDeleteDhcpIpRequest() + } + + response = NewDeleteDhcpIpResponse() + err = c.Send(request, response) + return +} + +// DeleteDhcpIp +// 本接口(DeleteDhcpIp)用于删除DhcpIp。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteDhcpIpWithContext(ctx context.Context, request *DeleteDhcpIpRequest) (response *DeleteDhcpIpResponse, err error) { + if request == nil { + request = NewDeleteDhcpIpRequest() + } + request.SetContext(ctx) + + response = NewDeleteDhcpIpResponse() + err = c.Send(request, response) + return +} + +func NewDeleteDirectConnectGatewayRequest() (request *DeleteDirectConnectGatewayRequest) { + request = &DeleteDirectConnectGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteDirectConnectGateway") + + return +} + +func NewDeleteDirectConnectGatewayResponse() (response *DeleteDirectConnectGatewayResponse) { + response = &DeleteDirectConnectGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteDirectConnectGateway +// 本接口(DeleteDirectConnectGateway)用于删除专线网关。 +// +// <li>如果是 NAT 网关,删除专线网关后,NAT 规则以及 ACL 策略都被清理了。</li> +// +// <li>删除专线网关后,系统会删除路由表中跟该专线网关相关的路由策略。</li> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`QueryTask`接口 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteDirectConnectGateway(request *DeleteDirectConnectGatewayRequest) (response *DeleteDirectConnectGatewayResponse, err error) { + if request == nil { + request = NewDeleteDirectConnectGatewayRequest() + } + + response = NewDeleteDirectConnectGatewayResponse() + err = c.Send(request, response) + return +} + +// DeleteDirectConnectGateway +// 本接口(DeleteDirectConnectGateway)用于删除专线网关。 +// +// <li>如果是 NAT 网关,删除专线网关后,NAT 规则以及 ACL 策略都被清理了。</li> +// +// <li>删除专线网关后,系统会删除路由表中跟该专线网关相关的路由策略。</li> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`QueryTask`接口 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteDirectConnectGatewayWithContext(ctx context.Context, request *DeleteDirectConnectGatewayRequest) (response *DeleteDirectConnectGatewayResponse, err error) { + if request == nil { + request = NewDeleteDirectConnectGatewayRequest() + } + request.SetContext(ctx) + + response = NewDeleteDirectConnectGatewayResponse() + err = c.Send(request, response) + return +} + +func NewDeleteDirectConnectGatewayCcnRoutesRequest() (request *DeleteDirectConnectGatewayCcnRoutesRequest) { + request = &DeleteDirectConnectGatewayCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteDirectConnectGatewayCcnRoutes") + + return +} + +func NewDeleteDirectConnectGatewayCcnRoutesResponse() (response *DeleteDirectConnectGatewayCcnRoutesResponse) { + response = &DeleteDirectConnectGatewayCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteDirectConnectGatewayCcnRoutes +// 本接口(DeleteDirectConnectGatewayCcnRoutes)用于删除专线网关的云联网路由(IDC网段) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteDirectConnectGatewayCcnRoutes(request *DeleteDirectConnectGatewayCcnRoutesRequest) (response *DeleteDirectConnectGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewDeleteDirectConnectGatewayCcnRoutesRequest() + } + + response = NewDeleteDirectConnectGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// DeleteDirectConnectGatewayCcnRoutes +// 本接口(DeleteDirectConnectGatewayCcnRoutes)用于删除专线网关的云联网路由(IDC网段) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteDirectConnectGatewayCcnRoutesWithContext(ctx context.Context, request *DeleteDirectConnectGatewayCcnRoutesRequest) (response *DeleteDirectConnectGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewDeleteDirectConnectGatewayCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewDeleteDirectConnectGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteFlowLogRequest() (request *DeleteFlowLogRequest) { + request = &DeleteFlowLogRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteFlowLog") + + return +} + +func NewDeleteFlowLogResponse() (response *DeleteFlowLogResponse) { + response = &DeleteFlowLogResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteFlowLog +// 本接口(DeleteFlowLog)用于删除流日志 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteFlowLog(request *DeleteFlowLogRequest) (response *DeleteFlowLogResponse, err error) { + if request == nil { + request = NewDeleteFlowLogRequest() + } + + response = NewDeleteFlowLogResponse() + err = c.Send(request, response) + return +} + +// DeleteFlowLog +// 本接口(DeleteFlowLog)用于删除流日志 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteFlowLogWithContext(ctx context.Context, request *DeleteFlowLogRequest) (response *DeleteFlowLogResponse, err error) { + if request == nil { + request = NewDeleteFlowLogRequest() + } + request.SetContext(ctx) + + response = NewDeleteFlowLogResponse() + err = c.Send(request, response) + return +} + +func NewDeleteHaVipRequest() (request *DeleteHaVipRequest) { + request = &DeleteHaVipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteHaVip") + + return +} + +func NewDeleteHaVipResponse() (response *DeleteHaVipResponse) { + response = &DeleteHaVipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteHaVip +// 本接口(DeleteHaVip)用于删除高可用虚拟IP(HAVIP)。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteHaVip(request *DeleteHaVipRequest) (response *DeleteHaVipResponse, err error) { + if request == nil { + request = NewDeleteHaVipRequest() + } + + response = NewDeleteHaVipResponse() + err = c.Send(request, response) + return +} + +// DeleteHaVip +// 本接口(DeleteHaVip)用于删除高可用虚拟IP(HAVIP)。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteHaVipWithContext(ctx context.Context, request *DeleteHaVipRequest) (response *DeleteHaVipResponse, err error) { + if request == nil { + request = NewDeleteHaVipRequest() + } + request.SetContext(ctx) + + response = NewDeleteHaVipResponse() + err = c.Send(request, response) + return +} + +func NewDeleteIp6TranslatorsRequest() (request *DeleteIp6TranslatorsRequest) { + request = &DeleteIp6TranslatorsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteIp6Translators") + + return +} + +func NewDeleteIp6TranslatorsResponse() (response *DeleteIp6TranslatorsResponse) { + response = &DeleteIp6TranslatorsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteIp6Translators +// 1. 该接口用于释放IPV6转换实例,支持批量。 +// +// 2. 如果IPV6转换实例建立有转换规则,会一并删除。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DeleteIp6Translators(request *DeleteIp6TranslatorsRequest) (response *DeleteIp6TranslatorsResponse, err error) { + if request == nil { + request = NewDeleteIp6TranslatorsRequest() + } + + response = NewDeleteIp6TranslatorsResponse() + err = c.Send(request, response) + return +} + +// DeleteIp6Translators +// 1. 该接口用于释放IPV6转换实例,支持批量。 +// +// 2. 如果IPV6转换实例建立有转换规则,会一并删除。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DeleteIp6TranslatorsWithContext(ctx context.Context, request *DeleteIp6TranslatorsRequest) (response *DeleteIp6TranslatorsResponse, err error) { + if request == nil { + request = NewDeleteIp6TranslatorsRequest() + } + request.SetContext(ctx) + + response = NewDeleteIp6TranslatorsResponse() + err = c.Send(request, response) + return +} + +func NewDeleteLocalGatewayRequest() (request *DeleteLocalGatewayRequest) { + request = &DeleteLocalGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteLocalGateway") + + return +} + +func NewDeleteLocalGatewayResponse() (response *DeleteLocalGatewayResponse) { + response = &DeleteLocalGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteLocalGateway +// 该接口用于删除CDC的本地网关。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteLocalGateway(request *DeleteLocalGatewayRequest) (response *DeleteLocalGatewayResponse, err error) { + if request == nil { + request = NewDeleteLocalGatewayRequest() + } + + response = NewDeleteLocalGatewayResponse() + err = c.Send(request, response) + return +} + +// DeleteLocalGateway +// 该接口用于删除CDC的本地网关。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteLocalGatewayWithContext(ctx context.Context, request *DeleteLocalGatewayRequest) (response *DeleteLocalGatewayResponse, err error) { + if request == nil { + request = NewDeleteLocalGatewayRequest() + } + request.SetContext(ctx) + + response = NewDeleteLocalGatewayResponse() + err = c.Send(request, response) + return +} + +func NewDeleteNatGatewayRequest() (request *DeleteNatGatewayRequest) { + request = &DeleteNatGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteNatGateway") + + return +} + +func NewDeleteNatGatewayResponse() (response *DeleteNatGatewayResponse) { + response = &DeleteNatGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteNatGateway +// 本接口(DeleteNatGateway)用于删除NAT网关。 +// +// 删除 NAT 网关后,系统会自动删除路由表中包含此 NAT 网关的路由项,同时也会解绑弹性公网IP(EIP)。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteNatGateway(request *DeleteNatGatewayRequest) (response *DeleteNatGatewayResponse, err error) { + if request == nil { + request = NewDeleteNatGatewayRequest() + } + + response = NewDeleteNatGatewayResponse() + err = c.Send(request, response) + return +} + +// DeleteNatGateway +// 本接口(DeleteNatGateway)用于删除NAT网关。 +// +// 删除 NAT 网关后,系统会自动删除路由表中包含此 NAT 网关的路由项,同时也会解绑弹性公网IP(EIP)。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteNatGatewayWithContext(ctx context.Context, request *DeleteNatGatewayRequest) (response *DeleteNatGatewayResponse, err error) { + if request == nil { + request = NewDeleteNatGatewayRequest() + } + request.SetContext(ctx) + + response = NewDeleteNatGatewayResponse() + err = c.Send(request, response) + return +} + +func NewDeleteNatGatewayDestinationIpPortTranslationNatRuleRequest() (request *DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest) { + request = &DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteNatGatewayDestinationIpPortTranslationNatRule") + + return +} + +func NewDeleteNatGatewayDestinationIpPortTranslationNatRuleResponse() (response *DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse) { + response = &DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteNatGatewayDestinationIpPortTranslationNatRule +// 本接口(DeleteNatGatewayDestinationIpPortTranslationNatRule)用于删除NAT网关端口转发规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteNatGatewayDestinationIpPortTranslationNatRule(request *DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest) (response *DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse, err error) { + if request == nil { + request = NewDeleteNatGatewayDestinationIpPortTranslationNatRuleRequest() + } + + response = NewDeleteNatGatewayDestinationIpPortTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +// DeleteNatGatewayDestinationIpPortTranslationNatRule +// 本接口(DeleteNatGatewayDestinationIpPortTranslationNatRule)用于删除NAT网关端口转发规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteNatGatewayDestinationIpPortTranslationNatRuleWithContext(ctx context.Context, request *DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest) (response *DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse, err error) { + if request == nil { + request = NewDeleteNatGatewayDestinationIpPortTranslationNatRuleRequest() + } + request.SetContext(ctx) + + response = NewDeleteNatGatewayDestinationIpPortTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +func NewDeleteNatGatewaySourceIpTranslationNatRuleRequest() (request *DeleteNatGatewaySourceIpTranslationNatRuleRequest) { + request = &DeleteNatGatewaySourceIpTranslationNatRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteNatGatewaySourceIpTranslationNatRule") + + return +} + +func NewDeleteNatGatewaySourceIpTranslationNatRuleResponse() (response *DeleteNatGatewaySourceIpTranslationNatRuleResponse) { + response = &DeleteNatGatewaySourceIpTranslationNatRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteNatGatewaySourceIpTranslationNatRule +// 本接口(DeleteNatGatewaySourceIpTranslationNatRule)用于删除NAT网关端口SNAT转发规则。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DeleteNatGatewaySourceIpTranslationNatRule(request *DeleteNatGatewaySourceIpTranslationNatRuleRequest) (response *DeleteNatGatewaySourceIpTranslationNatRuleResponse, err error) { + if request == nil { + request = NewDeleteNatGatewaySourceIpTranslationNatRuleRequest() + } + + response = NewDeleteNatGatewaySourceIpTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +// DeleteNatGatewaySourceIpTranslationNatRule +// 本接口(DeleteNatGatewaySourceIpTranslationNatRule)用于删除NAT网关端口SNAT转发规则。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DeleteNatGatewaySourceIpTranslationNatRuleWithContext(ctx context.Context, request *DeleteNatGatewaySourceIpTranslationNatRuleRequest) (response *DeleteNatGatewaySourceIpTranslationNatRuleResponse, err error) { + if request == nil { + request = NewDeleteNatGatewaySourceIpTranslationNatRuleRequest() + } + request.SetContext(ctx) + + response = NewDeleteNatGatewaySourceIpTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +func NewDeleteNetDetectRequest() (request *DeleteNetDetectRequest) { + request = &DeleteNetDetectRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteNetDetect") + + return +} + +func NewDeleteNetDetectResponse() (response *DeleteNetDetectResponse) { + response = &DeleteNetDetectResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteNetDetect +// 本接口(DeleteNetDetect)用于删除网络探测实例。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteNetDetect(request *DeleteNetDetectRequest) (response *DeleteNetDetectResponse, err error) { + if request == nil { + request = NewDeleteNetDetectRequest() + } + + response = NewDeleteNetDetectResponse() + err = c.Send(request, response) + return +} + +// DeleteNetDetect +// 本接口(DeleteNetDetect)用于删除网络探测实例。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteNetDetectWithContext(ctx context.Context, request *DeleteNetDetectRequest) (response *DeleteNetDetectResponse, err error) { + if request == nil { + request = NewDeleteNetDetectRequest() + } + request.SetContext(ctx) + + response = NewDeleteNetDetectResponse() + err = c.Send(request, response) + return +} + +func NewDeleteNetworkAclRequest() (request *DeleteNetworkAclRequest) { + request = &DeleteNetworkAclRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteNetworkAcl") + + return +} + +func NewDeleteNetworkAclResponse() (response *DeleteNetworkAclResponse) { + response = &DeleteNetworkAclResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteNetworkAcl +// 本接口(DeleteNetworkAcl)用于删除网络ACL。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteNetworkAcl(request *DeleteNetworkAclRequest) (response *DeleteNetworkAclResponse, err error) { + if request == nil { + request = NewDeleteNetworkAclRequest() + } + + response = NewDeleteNetworkAclResponse() + err = c.Send(request, response) + return +} + +// DeleteNetworkAcl +// 本接口(DeleteNetworkAcl)用于删除网络ACL。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteNetworkAclWithContext(ctx context.Context, request *DeleteNetworkAclRequest) (response *DeleteNetworkAclResponse, err error) { + if request == nil { + request = NewDeleteNetworkAclRequest() + } + request.SetContext(ctx) + + response = NewDeleteNetworkAclResponse() + err = c.Send(request, response) + return +} + +func NewDeleteNetworkInterfaceRequest() (request *DeleteNetworkInterfaceRequest) { + request = &DeleteNetworkInterfaceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteNetworkInterface") + + return +} + +func NewDeleteNetworkInterfaceResponse() (response *DeleteNetworkInterfaceResponse) { + response = &DeleteNetworkInterfaceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteNetworkInterface +// 本接口(DeleteNetworkInterface)用于删除弹性网卡。 +// +// * 弹性网卡上绑定了云服务器时,不能被删除。 +// +// * 删除指定弹性网卡,弹性网卡必须先和子机解绑才能删除。删除之后弹性网卡上所有内网IP都将被退还。 +// +// +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) DeleteNetworkInterface(request *DeleteNetworkInterfaceRequest) (response *DeleteNetworkInterfaceResponse, err error) { + if request == nil { + request = NewDeleteNetworkInterfaceRequest() + } + + response = NewDeleteNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +// DeleteNetworkInterface +// 本接口(DeleteNetworkInterface)用于删除弹性网卡。 +// +// * 弹性网卡上绑定了云服务器时,不能被删除。 +// +// * 删除指定弹性网卡,弹性网卡必须先和子机解绑才能删除。删除之后弹性网卡上所有内网IP都将被退还。 +// +// +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) DeleteNetworkInterfaceWithContext(ctx context.Context, request *DeleteNetworkInterfaceRequest) (response *DeleteNetworkInterfaceResponse, err error) { + if request == nil { + request = NewDeleteNetworkInterfaceRequest() + } + request.SetContext(ctx) + + response = NewDeleteNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +func NewDeleteRouteTableRequest() (request *DeleteRouteTableRequest) { + request = &DeleteRouteTableRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteRouteTable") + + return +} + +func NewDeleteRouteTableResponse() (response *DeleteRouteTableResponse) { + response = &DeleteRouteTableResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteRouteTable +// 删除路由表 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteRouteTable(request *DeleteRouteTableRequest) (response *DeleteRouteTableResponse, err error) { + if request == nil { + request = NewDeleteRouteTableRequest() + } + + response = NewDeleteRouteTableResponse() + err = c.Send(request, response) + return +} + +// DeleteRouteTable +// 删除路由表 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteRouteTableWithContext(ctx context.Context, request *DeleteRouteTableRequest) (response *DeleteRouteTableResponse, err error) { + if request == nil { + request = NewDeleteRouteTableRequest() + } + request.SetContext(ctx) + + response = NewDeleteRouteTableResponse() + err = c.Send(request, response) + return +} + +func NewDeleteRoutesRequest() (request *DeleteRoutesRequest) { + request = &DeleteRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteRoutes") + + return +} + +func NewDeleteRoutesResponse() (response *DeleteRoutesResponse) { + response = &DeleteRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteRoutes +// 本接口(DeleteRoutes)用于对某个路由表批量删除路由策略(Route)。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" +// UNSUPPORTEDOPERATION_DISABLEDNOTIFYCCN = "UnsupportedOperation.DisabledNotifyCcn" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) DeleteRoutes(request *DeleteRoutesRequest) (response *DeleteRoutesResponse, err error) { + if request == nil { + request = NewDeleteRoutesRequest() + } + + response = NewDeleteRoutesResponse() + err = c.Send(request, response) + return +} + +// DeleteRoutes +// 本接口(DeleteRoutes)用于对某个路由表批量删除路由策略(Route)。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" +// UNSUPPORTEDOPERATION_DISABLEDNOTIFYCCN = "UnsupportedOperation.DisabledNotifyCcn" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) DeleteRoutesWithContext(ctx context.Context, request *DeleteRoutesRequest) (response *DeleteRoutesResponse, err error) { + if request == nil { + request = NewDeleteRoutesRequest() + } + request.SetContext(ctx) + + response = NewDeleteRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteSecurityGroupRequest() (request *DeleteSecurityGroupRequest) { + request = &DeleteSecurityGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteSecurityGroup") + + return +} + +func NewDeleteSecurityGroupResponse() (response *DeleteSecurityGroupResponse) { + response = &DeleteSecurityGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteSecurityGroup +// 本接口(DeleteSecurityGroup)用于删除安全组(SecurityGroup)。 +// +// * 只有当前账号下的安全组允许被删除。 +// +// * 安全组实例ID如果在其他安全组的规则中被引用,则无法直接删除。这种情况下,需要先进行规则修改,再删除安全组。 +// +// * 删除的安全组无法再找回,请谨慎调用。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDSECURITYGROUPID_MALFORMED = "InvalidSecurityGroupID.Malformed" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupID.NotFound" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteSecurityGroup(request *DeleteSecurityGroupRequest) (response *DeleteSecurityGroupResponse, err error) { + if request == nil { + request = NewDeleteSecurityGroupRequest() + } + + response = NewDeleteSecurityGroupResponse() + err = c.Send(request, response) + return +} + +// DeleteSecurityGroup +// 本接口(DeleteSecurityGroup)用于删除安全组(SecurityGroup)。 +// +// * 只有当前账号下的安全组允许被删除。 +// +// * 安全组实例ID如果在其他安全组的规则中被引用,则无法直接删除。这种情况下,需要先进行规则修改,再删除安全组。 +// +// * 删除的安全组无法再找回,请谨慎调用。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDSECURITYGROUPID_MALFORMED = "InvalidSecurityGroupID.Malformed" +// INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupID.NotFound" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteSecurityGroupWithContext(ctx context.Context, request *DeleteSecurityGroupRequest) (response *DeleteSecurityGroupResponse, err error) { + if request == nil { + request = NewDeleteSecurityGroupRequest() + } + request.SetContext(ctx) + + response = NewDeleteSecurityGroupResponse() + err = c.Send(request, response) + return +} + +func NewDeleteSecurityGroupPoliciesRequest() (request *DeleteSecurityGroupPoliciesRequest) { + request = &DeleteSecurityGroupPoliciesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteSecurityGroupPolicies") + + return +} + +func NewDeleteSecurityGroupPoliciesResponse() (response *DeleteSecurityGroupPoliciesResponse) { + response = &DeleteSecurityGroupPoliciesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteSecurityGroupPolicies +// 本接口(DeleteSecurityGroupPolicies)用于用于删除安全组规则(SecurityGroupPolicy)。 +// +// * SecurityGroupPolicySet.Version 用于指定要操作的安全组的版本。传入 Version 版本号若不等于当前安全组的最新版本,将返回失败;若不传 Version 则直接删除指定PolicyIndex的规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VERSIONMISMATCH = "UnsupportedOperation.VersionMismatch" +func (c *Client) DeleteSecurityGroupPolicies(request *DeleteSecurityGroupPoliciesRequest) (response *DeleteSecurityGroupPoliciesResponse, err error) { + if request == nil { + request = NewDeleteSecurityGroupPoliciesRequest() + } + + response = NewDeleteSecurityGroupPoliciesResponse() + err = c.Send(request, response) + return +} + +// DeleteSecurityGroupPolicies +// 本接口(DeleteSecurityGroupPolicies)用于用于删除安全组规则(SecurityGroupPolicy)。 +// +// * SecurityGroupPolicySet.Version 用于指定要操作的安全组的版本。传入 Version 版本号若不等于当前安全组的最新版本,将返回失败;若不传 Version 则直接删除指定PolicyIndex的规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VERSIONMISMATCH = "UnsupportedOperation.VersionMismatch" +func (c *Client) DeleteSecurityGroupPoliciesWithContext(ctx context.Context, request *DeleteSecurityGroupPoliciesRequest) (response *DeleteSecurityGroupPoliciesResponse, err error) { + if request == nil { + request = NewDeleteSecurityGroupPoliciesRequest() + } + request.SetContext(ctx) + + response = NewDeleteSecurityGroupPoliciesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteServiceTemplateRequest() (request *DeleteServiceTemplateRequest) { + request = &DeleteServiceTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteServiceTemplate") + + return +} + +func NewDeleteServiceTemplateResponse() (response *DeleteServiceTemplateResponse) { + response = &DeleteServiceTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteServiceTemplate +// 本接口(DeleteServiceTemplate)用于删除协议端口模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteServiceTemplate(request *DeleteServiceTemplateRequest) (response *DeleteServiceTemplateResponse, err error) { + if request == nil { + request = NewDeleteServiceTemplateRequest() + } + + response = NewDeleteServiceTemplateResponse() + err = c.Send(request, response) + return +} + +// DeleteServiceTemplate +// 本接口(DeleteServiceTemplate)用于删除协议端口模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteServiceTemplateWithContext(ctx context.Context, request *DeleteServiceTemplateRequest) (response *DeleteServiceTemplateResponse, err error) { + if request == nil { + request = NewDeleteServiceTemplateRequest() + } + request.SetContext(ctx) + + response = NewDeleteServiceTemplateResponse() + err = c.Send(request, response) + return +} + +func NewDeleteServiceTemplateGroupRequest() (request *DeleteServiceTemplateGroupRequest) { + request = &DeleteServiceTemplateGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteServiceTemplateGroup") + + return +} + +func NewDeleteServiceTemplateGroupResponse() (response *DeleteServiceTemplateGroupResponse) { + response = &DeleteServiceTemplateGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteServiceTemplateGroup +// 本接口(DeleteServiceTemplateGroup)用于删除协议端口模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteServiceTemplateGroup(request *DeleteServiceTemplateGroupRequest) (response *DeleteServiceTemplateGroupResponse, err error) { + if request == nil { + request = NewDeleteServiceTemplateGroupRequest() + } + + response = NewDeleteServiceTemplateGroupResponse() + err = c.Send(request, response) + return +} + +// DeleteServiceTemplateGroup +// 本接口(DeleteServiceTemplateGroup)用于删除协议端口模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteServiceTemplateGroupWithContext(ctx context.Context, request *DeleteServiceTemplateGroupRequest) (response *DeleteServiceTemplateGroupResponse, err error) { + if request == nil { + request = NewDeleteServiceTemplateGroupRequest() + } + request.SetContext(ctx) + + response = NewDeleteServiceTemplateGroupResponse() + err = c.Send(request, response) + return +} + +func NewDeleteSubnetRequest() (request *DeleteSubnetRequest) { + request = &DeleteSubnetRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteSubnet") + + return +} + +func NewDeleteSubnetResponse() (response *DeleteSubnetResponse) { + response = &DeleteSubnetResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteSubnet +// 本接口(DeleteSubnet)用于用于删除子网(Subnet)。 +// +// * 删除子网前,请清理该子网下所有资源,包括云服务器、负载均衡、云数据、noSql、弹性网卡等资源。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteSubnet(request *DeleteSubnetRequest) (response *DeleteSubnetResponse, err error) { + if request == nil { + request = NewDeleteSubnetRequest() + } + + response = NewDeleteSubnetResponse() + err = c.Send(request, response) + return +} + +// DeleteSubnet +// 本接口(DeleteSubnet)用于用于删除子网(Subnet)。 +// +// * 删除子网前,请清理该子网下所有资源,包括云服务器、负载均衡、云数据、noSql、弹性网卡等资源。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteSubnetWithContext(ctx context.Context, request *DeleteSubnetRequest) (response *DeleteSubnetResponse, err error) { + if request == nil { + request = NewDeleteSubnetRequest() + } + request.SetContext(ctx) + + response = NewDeleteSubnetResponse() + err = c.Send(request, response) + return +} + +func NewDeleteTemplateMemberRequest() (request *DeleteTemplateMemberRequest) { + request = &DeleteTemplateMemberRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteTemplateMember") + + return +} + +func NewDeleteTemplateMemberResponse() (response *DeleteTemplateMemberResponse) { + response = &DeleteTemplateMemberResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteTemplateMember +// 删除模版对象中的IP地址、协议端口、IP地址组、协议端口组。当前仅支持北京、泰国、北美地域请求。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteTemplateMember(request *DeleteTemplateMemberRequest) (response *DeleteTemplateMemberResponse, err error) { + if request == nil { + request = NewDeleteTemplateMemberRequest() + } + + response = NewDeleteTemplateMemberResponse() + err = c.Send(request, response) + return +} + +// DeleteTemplateMember +// 删除模版对象中的IP地址、协议端口、IP地址组、协议端口组。当前仅支持北京、泰国、北美地域请求。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteTemplateMemberWithContext(ctx context.Context, request *DeleteTemplateMemberRequest) (response *DeleteTemplateMemberResponse, err error) { + if request == nil { + request = NewDeleteTemplateMemberRequest() + } + request.SetContext(ctx) + + response = NewDeleteTemplateMemberResponse() + err = c.Send(request, response) + return +} + +func NewDeleteVpcRequest() (request *DeleteVpcRequest) { + request = &DeleteVpcRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteVpc") + + return +} + +func NewDeleteVpcResponse() (response *DeleteVpcResponse) { + response = &DeleteVpcResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteVpc +// 本接口(DeleteVpc)用于删除私有网络。 +// +// * 删除前请确保 VPC 内已经没有相关资源,例如云服务器、云数据库、NoSQL、VPN网关、专线网关、负载均衡、对等连接、与之互通的基础网络设备等。 +// +// * 删除私有网络是不可逆的操作,请谨慎处理。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" +func (c *Client) DeleteVpc(request *DeleteVpcRequest) (response *DeleteVpcResponse, err error) { + if request == nil { + request = NewDeleteVpcRequest() + } + + response = NewDeleteVpcResponse() + err = c.Send(request, response) + return +} + +// DeleteVpc +// 本接口(DeleteVpc)用于删除私有网络。 +// +// * 删除前请确保 VPC 内已经没有相关资源,例如云服务器、云数据库、NoSQL、VPN网关、专线网关、负载均衡、对等连接、与之互通的基础网络设备等。 +// +// * 删除私有网络是不可逆的操作,请谨慎处理。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" +func (c *Client) DeleteVpcWithContext(ctx context.Context, request *DeleteVpcRequest) (response *DeleteVpcResponse, err error) { + if request == nil { + request = NewDeleteVpcRequest() + } + request.SetContext(ctx) + + response = NewDeleteVpcResponse() + err = c.Send(request, response) + return +} + +func NewDeleteVpcEndPointRequest() (request *DeleteVpcEndPointRequest) { + request = &DeleteVpcEndPointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteVpcEndPoint") + + return +} + +func NewDeleteVpcEndPointResponse() (response *DeleteVpcEndPointResponse) { + response = &DeleteVpcEndPointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteVpcEndPoint +// 删除终端节点。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteVpcEndPoint(request *DeleteVpcEndPointRequest) (response *DeleteVpcEndPointResponse, err error) { + if request == nil { + request = NewDeleteVpcEndPointRequest() + } + + response = NewDeleteVpcEndPointResponse() + err = c.Send(request, response) + return +} + +// DeleteVpcEndPoint +// 删除终端节点。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteVpcEndPointWithContext(ctx context.Context, request *DeleteVpcEndPointRequest) (response *DeleteVpcEndPointResponse, err error) { + if request == nil { + request = NewDeleteVpcEndPointRequest() + } + request.SetContext(ctx) + + response = NewDeleteVpcEndPointResponse() + err = c.Send(request, response) + return +} + +func NewDeleteVpcEndPointServiceRequest() (request *DeleteVpcEndPointServiceRequest) { + request = &DeleteVpcEndPointServiceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteVpcEndPointService") + + return +} + +func NewDeleteVpcEndPointServiceResponse() (response *DeleteVpcEndPointServiceResponse) { + response = &DeleteVpcEndPointServiceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteVpcEndPointService +// 删除终端节点服务。 +// +// +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteVpcEndPointService(request *DeleteVpcEndPointServiceRequest) (response *DeleteVpcEndPointServiceResponse, err error) { + if request == nil { + request = NewDeleteVpcEndPointServiceRequest() + } + + response = NewDeleteVpcEndPointServiceResponse() + err = c.Send(request, response) + return +} + +// DeleteVpcEndPointService +// 删除终端节点服务。 +// +// +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteVpcEndPointServiceWithContext(ctx context.Context, request *DeleteVpcEndPointServiceRequest) (response *DeleteVpcEndPointServiceResponse, err error) { + if request == nil { + request = NewDeleteVpcEndPointServiceRequest() + } + request.SetContext(ctx) + + response = NewDeleteVpcEndPointServiceResponse() + err = c.Send(request, response) + return +} + +func NewDeleteVpcEndPointServiceWhiteListRequest() (request *DeleteVpcEndPointServiceWhiteListRequest) { + request = &DeleteVpcEndPointServiceWhiteListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteVpcEndPointServiceWhiteList") + + return +} + +func NewDeleteVpcEndPointServiceWhiteListResponse() (response *DeleteVpcEndPointServiceWhiteListResponse) { + response = &DeleteVpcEndPointServiceWhiteListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteVpcEndPointServiceWhiteList +// 删除终端节点服务白名单。 +// +// 可能返回的错误码: +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +func (c *Client) DeleteVpcEndPointServiceWhiteList(request *DeleteVpcEndPointServiceWhiteListRequest) (response *DeleteVpcEndPointServiceWhiteListResponse, err error) { + if request == nil { + request = NewDeleteVpcEndPointServiceWhiteListRequest() + } + + response = NewDeleteVpcEndPointServiceWhiteListResponse() + err = c.Send(request, response) + return +} + +// DeleteVpcEndPointServiceWhiteList +// 删除终端节点服务白名单。 +// +// 可能返回的错误码: +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +func (c *Client) DeleteVpcEndPointServiceWhiteListWithContext(ctx context.Context, request *DeleteVpcEndPointServiceWhiteListRequest) (response *DeleteVpcEndPointServiceWhiteListResponse, err error) { + if request == nil { + request = NewDeleteVpcEndPointServiceWhiteListRequest() + } + request.SetContext(ctx) + + response = NewDeleteVpcEndPointServiceWhiteListResponse() + err = c.Send(request, response) + return +} + +func NewDeleteVpnConnectionRequest() (request *DeleteVpnConnectionRequest) { + request = &DeleteVpnConnectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteVpnConnection") + + return +} + +func NewDeleteVpnConnectionResponse() (response *DeleteVpnConnectionResponse) { + response = &DeleteVpnConnectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteVpnConnection +// 本接口(DeleteVpnConnection)用于删除VPN通道。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteVpnConnection(request *DeleteVpnConnectionRequest) (response *DeleteVpnConnectionResponse, err error) { + if request == nil { + request = NewDeleteVpnConnectionRequest() + } + + response = NewDeleteVpnConnectionResponse() + err = c.Send(request, response) + return +} + +// DeleteVpnConnection +// 本接口(DeleteVpnConnection)用于删除VPN通道。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DeleteVpnConnectionWithContext(ctx context.Context, request *DeleteVpnConnectionRequest) (response *DeleteVpnConnectionResponse, err error) { + if request == nil { + request = NewDeleteVpnConnectionRequest() + } + request.SetContext(ctx) + + response = NewDeleteVpnConnectionResponse() + err = c.Send(request, response) + return +} + +func NewDeleteVpnGatewayRequest() (request *DeleteVpnGatewayRequest) { + request = &DeleteVpnGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteVpnGateway") + + return +} + +func NewDeleteVpnGatewayResponse() (response *DeleteVpnGatewayResponse) { + response = &DeleteVpnGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteVpnGateway +// 本接口(DeleteVpnGateway)用于删除VPN网关。目前只支持删除运行中的按量计费的IPSEC网关实例。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDVPNGATEWAYID_MALFORMED = "InvalidVpnGatewayId.Malformed" +// INVALIDVPNGATEWAYID_NOTFOUND = "InvalidVpnGatewayId.NotFound" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteVpnGateway(request *DeleteVpnGatewayRequest) (response *DeleteVpnGatewayResponse, err error) { + if request == nil { + request = NewDeleteVpnGatewayRequest() + } + + response = NewDeleteVpnGatewayResponse() + err = c.Send(request, response) + return +} + +// DeleteVpnGateway +// 本接口(DeleteVpnGateway)用于删除VPN网关。目前只支持删除运行中的按量计费的IPSEC网关实例。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDVPNGATEWAYID_MALFORMED = "InvalidVpnGatewayId.Malformed" +// INVALIDVPNGATEWAYID_NOTFOUND = "InvalidVpnGatewayId.NotFound" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteVpnGatewayWithContext(ctx context.Context, request *DeleteVpnGatewayRequest) (response *DeleteVpnGatewayResponse, err error) { + if request == nil { + request = NewDeleteVpnGatewayRequest() + } + request.SetContext(ctx) + + response = NewDeleteVpnGatewayResponse() + err = c.Send(request, response) + return +} + +func NewDeleteVpnGatewayRoutesRequest() (request *DeleteVpnGatewayRoutesRequest) { + request = &DeleteVpnGatewayRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DeleteVpnGatewayRoutes") + + return +} + +func NewDeleteVpnGatewayRoutesResponse() (response *DeleteVpnGatewayRoutesResponse) { + response = &DeleteVpnGatewayRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteVpnGatewayRoutes +// 本接口(DeleteVpnGatewayCcnRoutes)用于删除VPN网关路由 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteVpnGatewayRoutes(request *DeleteVpnGatewayRoutesRequest) (response *DeleteVpnGatewayRoutesResponse, err error) { + if request == nil { + request = NewDeleteVpnGatewayRoutesRequest() + } + + response = NewDeleteVpnGatewayRoutesResponse() + err = c.Send(request, response) + return +} + +// DeleteVpnGatewayRoutes +// 本接口(DeleteVpnGatewayCcnRoutes)用于删除VPN网关路由 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteVpnGatewayRoutesWithContext(ctx context.Context, request *DeleteVpnGatewayRoutesRequest) (response *DeleteVpnGatewayRoutesResponse, err error) { + if request == nil { + request = NewDeleteVpnGatewayRoutesRequest() + } + request.SetContext(ctx) + + response = NewDeleteVpnGatewayRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAccountAttributesRequest() (request *DescribeAccountAttributesRequest) { + request = &DescribeAccountAttributesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeAccountAttributes") + + return +} + +func NewDescribeAccountAttributesResponse() (response *DescribeAccountAttributesResponse) { + response = &DescribeAccountAttributesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAccountAttributes +// 本接口(DescribeAccountAttributes)用于查询用户账号私有属性。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeAccountAttributes(request *DescribeAccountAttributesRequest) (response *DescribeAccountAttributesResponse, err error) { + if request == nil { + request = NewDescribeAccountAttributesRequest() + } + + response = NewDescribeAccountAttributesResponse() + err = c.Send(request, response) + return +} + +// DescribeAccountAttributes +// 本接口(DescribeAccountAttributes)用于查询用户账号私有属性。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeAccountAttributesWithContext(ctx context.Context, request *DescribeAccountAttributesRequest) (response *DescribeAccountAttributesResponse, err error) { + if request == nil { + request = NewDescribeAccountAttributesRequest() + } + request.SetContext(ctx) + + response = NewDescribeAccountAttributesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAddressQuotaRequest() (request *DescribeAddressQuotaRequest) { + request = &DescribeAddressQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeAddressQuota") + + return +} + +func NewDescribeAddressQuotaResponse() (response *DescribeAddressQuotaResponse) { + response = &DescribeAddressQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAddressQuota +// 本接口 (DescribeAddressQuota) 用于查询您账户的[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)在当前地域的配额信息。配额详情可参见 [EIP 产品简介](https://cloud.tencent.com/document/product/213/5733)。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +func (c *Client) DescribeAddressQuota(request *DescribeAddressQuotaRequest) (response *DescribeAddressQuotaResponse, err error) { + if request == nil { + request = NewDescribeAddressQuotaRequest() + } + + response = NewDescribeAddressQuotaResponse() + err = c.Send(request, response) + return +} + +// DescribeAddressQuota +// 本接口 (DescribeAddressQuota) 用于查询您账户的[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)在当前地域的配额信息。配额详情可参见 [EIP 产品简介](https://cloud.tencent.com/document/product/213/5733)。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +func (c *Client) DescribeAddressQuotaWithContext(ctx context.Context, request *DescribeAddressQuotaRequest) (response *DescribeAddressQuotaResponse, err error) { + if request == nil { + request = NewDescribeAddressQuotaRequest() + } + request.SetContext(ctx) + + response = NewDescribeAddressQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAddressTemplateGroupsRequest() (request *DescribeAddressTemplateGroupsRequest) { + request = &DescribeAddressTemplateGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeAddressTemplateGroups") + + return +} + +func NewDescribeAddressTemplateGroupsResponse() (response *DescribeAddressTemplateGroupsResponse) { + response = &DescribeAddressTemplateGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAddressTemplateGroups +// 本接口(DescribeAddressTemplateGroups)用于查询IP地址模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeAddressTemplateGroups(request *DescribeAddressTemplateGroupsRequest) (response *DescribeAddressTemplateGroupsResponse, err error) { + if request == nil { + request = NewDescribeAddressTemplateGroupsRequest() + } + + response = NewDescribeAddressTemplateGroupsResponse() + err = c.Send(request, response) + return +} + +// DescribeAddressTemplateGroups +// 本接口(DescribeAddressTemplateGroups)用于查询IP地址模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeAddressTemplateGroupsWithContext(ctx context.Context, request *DescribeAddressTemplateGroupsRequest) (response *DescribeAddressTemplateGroupsResponse, err error) { + if request == nil { + request = NewDescribeAddressTemplateGroupsRequest() + } + request.SetContext(ctx) + + response = NewDescribeAddressTemplateGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAddressTemplatesRequest() (request *DescribeAddressTemplatesRequest) { + request = &DescribeAddressTemplatesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeAddressTemplates") + + return +} + +func NewDescribeAddressTemplatesResponse() (response *DescribeAddressTemplatesResponse) { + response = &DescribeAddressTemplatesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAddressTemplates +// 本接口(DescribeAddressTemplates)用于查询IP地址模板 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeAddressTemplates(request *DescribeAddressTemplatesRequest) (response *DescribeAddressTemplatesResponse, err error) { + if request == nil { + request = NewDescribeAddressTemplatesRequest() + } + + response = NewDescribeAddressTemplatesResponse() + err = c.Send(request, response) + return +} + +// DescribeAddressTemplates +// 本接口(DescribeAddressTemplates)用于查询IP地址模板 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeAddressTemplatesWithContext(ctx context.Context, request *DescribeAddressTemplatesRequest) (response *DescribeAddressTemplatesResponse, err error) { + if request == nil { + request = NewDescribeAddressTemplatesRequest() + } + request.SetContext(ctx) + + response = NewDescribeAddressTemplatesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAddressesRequest() (request *DescribeAddressesRequest) { + request = &DescribeAddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeAddresses") + + return +} + +func NewDescribeAddressesResponse() (response *DescribeAddressesResponse) { + response = &DescribeAddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAddresses +// 本接口 (DescribeAddresses) 用于查询一个或多个[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)的详细信息。 +// +// * 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的 EIP。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +func (c *Client) DescribeAddresses(request *DescribeAddressesRequest) (response *DescribeAddressesResponse, err error) { + if request == nil { + request = NewDescribeAddressesRequest() + } + + response = NewDescribeAddressesResponse() + err = c.Send(request, response) + return +} + +// DescribeAddresses +// 本接口 (DescribeAddresses) 用于查询一个或多个[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)的详细信息。 +// +// * 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的 EIP。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +func (c *Client) DescribeAddressesWithContext(ctx context.Context, request *DescribeAddressesRequest) (response *DescribeAddressesResponse, err error) { + if request == nil { + request = NewDescribeAddressesRequest() + } + request.SetContext(ctx) + + response = NewDescribeAddressesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAssistantCidrRequest() (request *DescribeAssistantCidrRequest) { + request = &DescribeAssistantCidrRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeAssistantCidr") + + return +} + +func NewDescribeAssistantCidrResponse() (response *DescribeAssistantCidrResponse) { + response = &DescribeAssistantCidrResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAssistantCidr +// 本接口(DescribeAssistantCidr)用于查询辅助CIDR列表。(接口灰度中,如需使用请提工单。) +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeAssistantCidr(request *DescribeAssistantCidrRequest) (response *DescribeAssistantCidrResponse, err error) { + if request == nil { + request = NewDescribeAssistantCidrRequest() + } + + response = NewDescribeAssistantCidrResponse() + err = c.Send(request, response) + return +} + +// DescribeAssistantCidr +// 本接口(DescribeAssistantCidr)用于查询辅助CIDR列表。(接口灰度中,如需使用请提工单。) +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeAssistantCidrWithContext(ctx context.Context, request *DescribeAssistantCidrRequest) (response *DescribeAssistantCidrResponse, err error) { + if request == nil { + request = NewDescribeAssistantCidrRequest() + } + request.SetContext(ctx) + + response = NewDescribeAssistantCidrResponse() + err = c.Send(request, response) + return +} + +func NewDescribeBandwidthPackageBillUsageRequest() (request *DescribeBandwidthPackageBillUsageRequest) { + request = &DescribeBandwidthPackageBillUsageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeBandwidthPackageBillUsage") + + return +} + +func NewDescribeBandwidthPackageBillUsageResponse() (response *DescribeBandwidthPackageBillUsageResponse) { + response = &DescribeBandwidthPackageBillUsageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeBandwidthPackageBillUsage +// 本接口 (DescribeBandwidthPackageBillUsage) 用于查询后付费共享带宽包当前的计费用量. +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +func (c *Client) DescribeBandwidthPackageBillUsage(request *DescribeBandwidthPackageBillUsageRequest) (response *DescribeBandwidthPackageBillUsageResponse, err error) { + if request == nil { + request = NewDescribeBandwidthPackageBillUsageRequest() + } + + response = NewDescribeBandwidthPackageBillUsageResponse() + err = c.Send(request, response) + return +} + +// DescribeBandwidthPackageBillUsage +// 本接口 (DescribeBandwidthPackageBillUsage) 用于查询后付费共享带宽包当前的计费用量. +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +func (c *Client) DescribeBandwidthPackageBillUsageWithContext(ctx context.Context, request *DescribeBandwidthPackageBillUsageRequest) (response *DescribeBandwidthPackageBillUsageResponse, err error) { + if request == nil { + request = NewDescribeBandwidthPackageBillUsageRequest() + } + request.SetContext(ctx) + + response = NewDescribeBandwidthPackageBillUsageResponse() + err = c.Send(request, response) + return +} + +func NewDescribeBandwidthPackageQuotaRequest() (request *DescribeBandwidthPackageQuotaRequest) { + request = &DescribeBandwidthPackageQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeBandwidthPackageQuota") + + return +} + +func NewDescribeBandwidthPackageQuotaResponse() (response *DescribeBandwidthPackageQuotaResponse) { + response = &DescribeBandwidthPackageQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeBandwidthPackageQuota +// 接口用于查询账户在当前地域的带宽包上限数量以及使用数量 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +func (c *Client) DescribeBandwidthPackageQuota(request *DescribeBandwidthPackageQuotaRequest) (response *DescribeBandwidthPackageQuotaResponse, err error) { + if request == nil { + request = NewDescribeBandwidthPackageQuotaRequest() + } + + response = NewDescribeBandwidthPackageQuotaResponse() + err = c.Send(request, response) + return +} + +// DescribeBandwidthPackageQuota +// 接口用于查询账户在当前地域的带宽包上限数量以及使用数量 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +func (c *Client) DescribeBandwidthPackageQuotaWithContext(ctx context.Context, request *DescribeBandwidthPackageQuotaRequest) (response *DescribeBandwidthPackageQuotaResponse, err error) { + if request == nil { + request = NewDescribeBandwidthPackageQuotaRequest() + } + request.SetContext(ctx) + + response = NewDescribeBandwidthPackageQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeBandwidthPackageResourcesRequest() (request *DescribeBandwidthPackageResourcesRequest) { + request = &DescribeBandwidthPackageResourcesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeBandwidthPackageResources") + + return +} + +func NewDescribeBandwidthPackageResourcesResponse() (response *DescribeBandwidthPackageResourcesResponse) { + response = &DescribeBandwidthPackageResourcesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeBandwidthPackageResources +// 本接口 (DescribeBandwidthPackageResources) 用于根据共享带宽包唯一ID查询共享带宽包内的资源列表,支持按条件过滤查询结果和分页查询。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_RESOURCEIDMALFORMED = "InvalidParameterValue.ResourceIdMalformed" +func (c *Client) DescribeBandwidthPackageResources(request *DescribeBandwidthPackageResourcesRequest) (response *DescribeBandwidthPackageResourcesResponse, err error) { + if request == nil { + request = NewDescribeBandwidthPackageResourcesRequest() + } + + response = NewDescribeBandwidthPackageResourcesResponse() + err = c.Send(request, response) + return +} + +// DescribeBandwidthPackageResources +// 本接口 (DescribeBandwidthPackageResources) 用于根据共享带宽包唯一ID查询共享带宽包内的资源列表,支持按条件过滤查询结果和分页查询。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_RESOURCEIDMALFORMED = "InvalidParameterValue.ResourceIdMalformed" +func (c *Client) DescribeBandwidthPackageResourcesWithContext(ctx context.Context, request *DescribeBandwidthPackageResourcesRequest) (response *DescribeBandwidthPackageResourcesResponse, err error) { + if request == nil { + request = NewDescribeBandwidthPackageResourcesRequest() + } + request.SetContext(ctx) + + response = NewDescribeBandwidthPackageResourcesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeBandwidthPackagesRequest() (request *DescribeBandwidthPackagesRequest) { + request = &DescribeBandwidthPackagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeBandwidthPackages") + + return +} + +func NewDescribeBandwidthPackagesResponse() (response *DescribeBandwidthPackagesResponse) { + response = &DescribeBandwidthPackagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeBandwidthPackages +// 接口用于查询带宽包详细信息,包括带宽包唯一标识ID,类型,计费模式,名称,资源信息等 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBANDWIDTHPACKAGECHARGETYPE = "InvalidParameterValue.InvalidBandwidthPackageChargeType" +func (c *Client) DescribeBandwidthPackages(request *DescribeBandwidthPackagesRequest) (response *DescribeBandwidthPackagesResponse, err error) { + if request == nil { + request = NewDescribeBandwidthPackagesRequest() + } + + response = NewDescribeBandwidthPackagesResponse() + err = c.Send(request, response) + return +} + +// DescribeBandwidthPackages +// 接口用于查询带宽包详细信息,包括带宽包唯一标识ID,类型,计费模式,名称,资源信息等 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_INVALIDBANDWIDTHPACKAGECHARGETYPE = "InvalidParameterValue.InvalidBandwidthPackageChargeType" +func (c *Client) DescribeBandwidthPackagesWithContext(ctx context.Context, request *DescribeBandwidthPackagesRequest) (response *DescribeBandwidthPackagesResponse, err error) { + if request == nil { + request = NewDescribeBandwidthPackagesRequest() + } + request.SetContext(ctx) + + response = NewDescribeBandwidthPackagesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCcnAttachedInstancesRequest() (request *DescribeCcnAttachedInstancesRequest) { + request = &DescribeCcnAttachedInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeCcnAttachedInstances") + + return +} + +func NewDescribeCcnAttachedInstancesResponse() (response *DescribeCcnAttachedInstancesResponse) { + response = &DescribeCcnAttachedInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeCcnAttachedInstances +// 本接口(DescribeCcnAttachedInstances)用于查询云联网实例下已关联的网络实例。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// UNSUPPORTEDOPERATION_APPIDNOTFOUND = "UnsupportedOperation.AppIdNotFound" +func (c *Client) DescribeCcnAttachedInstances(request *DescribeCcnAttachedInstancesRequest) (response *DescribeCcnAttachedInstancesResponse, err error) { + if request == nil { + request = NewDescribeCcnAttachedInstancesRequest() + } + + response = NewDescribeCcnAttachedInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeCcnAttachedInstances +// 本接口(DescribeCcnAttachedInstances)用于查询云联网实例下已关联的网络实例。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// UNSUPPORTEDOPERATION_APPIDNOTFOUND = "UnsupportedOperation.AppIdNotFound" +func (c *Client) DescribeCcnAttachedInstancesWithContext(ctx context.Context, request *DescribeCcnAttachedInstancesRequest) (response *DescribeCcnAttachedInstancesResponse, err error) { + if request == nil { + request = NewDescribeCcnAttachedInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeCcnAttachedInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCcnRegionBandwidthLimitsRequest() (request *DescribeCcnRegionBandwidthLimitsRequest) { + request = &DescribeCcnRegionBandwidthLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeCcnRegionBandwidthLimits") + + return +} + +func NewDescribeCcnRegionBandwidthLimitsResponse() (response *DescribeCcnRegionBandwidthLimitsResponse) { + response = &DescribeCcnRegionBandwidthLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeCcnRegionBandwidthLimits +// 本接口(DescribeCcnRegionBandwidthLimits)用于查询云联网各地域出带宽上限,该接口只返回已关联网络实例包含的地域 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +func (c *Client) DescribeCcnRegionBandwidthLimits(request *DescribeCcnRegionBandwidthLimitsRequest) (response *DescribeCcnRegionBandwidthLimitsResponse, err error) { + if request == nil { + request = NewDescribeCcnRegionBandwidthLimitsRequest() + } + + response = NewDescribeCcnRegionBandwidthLimitsResponse() + err = c.Send(request, response) + return +} + +// DescribeCcnRegionBandwidthLimits +// 本接口(DescribeCcnRegionBandwidthLimits)用于查询云联网各地域出带宽上限,该接口只返回已关联网络实例包含的地域 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +func (c *Client) DescribeCcnRegionBandwidthLimitsWithContext(ctx context.Context, request *DescribeCcnRegionBandwidthLimitsRequest) (response *DescribeCcnRegionBandwidthLimitsResponse, err error) { + if request == nil { + request = NewDescribeCcnRegionBandwidthLimitsRequest() + } + request.SetContext(ctx) + + response = NewDescribeCcnRegionBandwidthLimitsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCcnRoutesRequest() (request *DescribeCcnRoutesRequest) { + request = &DescribeCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeCcnRoutes") + + return +} + +func NewDescribeCcnRoutesResponse() (response *DescribeCcnRoutesResponse) { + response = &DescribeCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeCcnRoutes +// 本接口(DescribeCcnRoutes)用于查询已加入云联网(CCN)的路由 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeCcnRoutes(request *DescribeCcnRoutesRequest) (response *DescribeCcnRoutesResponse, err error) { + if request == nil { + request = NewDescribeCcnRoutesRequest() + } + + response = NewDescribeCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// DescribeCcnRoutes +// 本接口(DescribeCcnRoutes)用于查询已加入云联网(CCN)的路由 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeCcnRoutesWithContext(ctx context.Context, request *DescribeCcnRoutesRequest) (response *DescribeCcnRoutesResponse, err error) { + if request == nil { + request = NewDescribeCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewDescribeCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCcnsRequest() (request *DescribeCcnsRequest) { + request = &DescribeCcnsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeCcns") + + return +} + +func NewDescribeCcnsResponse() (response *DescribeCcnsResponse) { + response = &DescribeCcnsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeCcns +// 本接口(DescribeCcns)用于查询云联网(CCN)列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeCcns(request *DescribeCcnsRequest) (response *DescribeCcnsResponse, err error) { + if request == nil { + request = NewDescribeCcnsRequest() + } + + response = NewDescribeCcnsResponse() + err = c.Send(request, response) + return +} + +// DescribeCcns +// 本接口(DescribeCcns)用于查询云联网(CCN)列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeCcnsWithContext(ctx context.Context, request *DescribeCcnsRequest) (response *DescribeCcnsResponse, err error) { + if request == nil { + request = NewDescribeCcnsRequest() + } + request.SetContext(ctx) + + response = NewDescribeCcnsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClassicLinkInstancesRequest() (request *DescribeClassicLinkInstancesRequest) { + request = &DescribeClassicLinkInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeClassicLinkInstances") + + return +} + +func NewDescribeClassicLinkInstancesResponse() (response *DescribeClassicLinkInstancesResponse) { + response = &DescribeClassicLinkInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClassicLinkInstances +// 本接口(DescribeClassicLinkInstances)用于查询私有网络和基础网络设备互通列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeClassicLinkInstances(request *DescribeClassicLinkInstancesRequest) (response *DescribeClassicLinkInstancesResponse, err error) { + if request == nil { + request = NewDescribeClassicLinkInstancesRequest() + } + + response = NewDescribeClassicLinkInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeClassicLinkInstances +// 本接口(DescribeClassicLinkInstances)用于查询私有网络和基础网络设备互通列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeClassicLinkInstancesWithContext(ctx context.Context, request *DescribeClassicLinkInstancesRequest) (response *DescribeClassicLinkInstancesResponse, err error) { + if request == nil { + request = NewDescribeClassicLinkInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeClassicLinkInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCrossBorderComplianceRequest() (request *DescribeCrossBorderComplianceRequest) { + request = &DescribeCrossBorderComplianceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeCrossBorderCompliance") + + return +} + +func NewDescribeCrossBorderComplianceResponse() (response *DescribeCrossBorderComplianceResponse) { + response = &DescribeCrossBorderComplianceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeCrossBorderCompliance +// 本接口(DescribeCrossBorderCompliance)用于查询用户创建的合规化资质审批单。 +// +// 服务商可以查询服务名下的任意 `APPID` 创建的审批单;非服务商,只能查询自己审批单。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeCrossBorderCompliance(request *DescribeCrossBorderComplianceRequest) (response *DescribeCrossBorderComplianceResponse, err error) { + if request == nil { + request = NewDescribeCrossBorderComplianceRequest() + } + + response = NewDescribeCrossBorderComplianceResponse() + err = c.Send(request, response) + return +} + +// DescribeCrossBorderCompliance +// 本接口(DescribeCrossBorderCompliance)用于查询用户创建的合规化资质审批单。 +// +// 服务商可以查询服务名下的任意 `APPID` 创建的审批单;非服务商,只能查询自己审批单。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeCrossBorderComplianceWithContext(ctx context.Context, request *DescribeCrossBorderComplianceRequest) (response *DescribeCrossBorderComplianceResponse, err error) { + if request == nil { + request = NewDescribeCrossBorderComplianceRequest() + } + request.SetContext(ctx) + + response = NewDescribeCrossBorderComplianceResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCustomerGatewayVendorsRequest() (request *DescribeCustomerGatewayVendorsRequest) { + request = &DescribeCustomerGatewayVendorsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeCustomerGatewayVendors") + + return +} + +func NewDescribeCustomerGatewayVendorsResponse() (response *DescribeCustomerGatewayVendorsResponse) { + response = &DescribeCustomerGatewayVendorsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeCustomerGatewayVendors +// 本接口(DescribeCustomerGatewayVendors)用于查询可支持的对端网关厂商信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeCustomerGatewayVendors(request *DescribeCustomerGatewayVendorsRequest) (response *DescribeCustomerGatewayVendorsResponse, err error) { + if request == nil { + request = NewDescribeCustomerGatewayVendorsRequest() + } + + response = NewDescribeCustomerGatewayVendorsResponse() + err = c.Send(request, response) + return +} + +// DescribeCustomerGatewayVendors +// 本接口(DescribeCustomerGatewayVendors)用于查询可支持的对端网关厂商信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeCustomerGatewayVendorsWithContext(ctx context.Context, request *DescribeCustomerGatewayVendorsRequest) (response *DescribeCustomerGatewayVendorsResponse, err error) { + if request == nil { + request = NewDescribeCustomerGatewayVendorsRequest() + } + request.SetContext(ctx) + + response = NewDescribeCustomerGatewayVendorsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeCustomerGatewaysRequest() (request *DescribeCustomerGatewaysRequest) { + request = &DescribeCustomerGatewaysRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeCustomerGateways") + + return +} + +func NewDescribeCustomerGatewaysResponse() (response *DescribeCustomerGatewaysResponse) { + response = &DescribeCustomerGatewaysResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeCustomerGateways +// 本接口(DescribeCustomerGateways)用于查询对端网关列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeCustomerGateways(request *DescribeCustomerGatewaysRequest) (response *DescribeCustomerGatewaysResponse, err error) { + if request == nil { + request = NewDescribeCustomerGatewaysRequest() + } + + response = NewDescribeCustomerGatewaysResponse() + err = c.Send(request, response) + return +} + +// DescribeCustomerGateways +// 本接口(DescribeCustomerGateways)用于查询对端网关列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeCustomerGatewaysWithContext(ctx context.Context, request *DescribeCustomerGatewaysRequest) (response *DescribeCustomerGatewaysResponse, err error) { + if request == nil { + request = NewDescribeCustomerGatewaysRequest() + } + request.SetContext(ctx) + + response = NewDescribeCustomerGatewaysResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDhcpIpsRequest() (request *DescribeDhcpIpsRequest) { + request = &DescribeDhcpIpsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeDhcpIps") + + return +} + +func NewDescribeDhcpIpsResponse() (response *DescribeDhcpIpsResponse) { + response = &DescribeDhcpIpsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDhcpIps +// 本接口(DescribeDhcpIps)用于查询DhcpIp列表 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeDhcpIps(request *DescribeDhcpIpsRequest) (response *DescribeDhcpIpsResponse, err error) { + if request == nil { + request = NewDescribeDhcpIpsRequest() + } + + response = NewDescribeDhcpIpsResponse() + err = c.Send(request, response) + return +} + +// DescribeDhcpIps +// 本接口(DescribeDhcpIps)用于查询DhcpIp列表 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeDhcpIpsWithContext(ctx context.Context, request *DescribeDhcpIpsRequest) (response *DescribeDhcpIpsResponse, err error) { + if request == nil { + request = NewDescribeDhcpIpsRequest() + } + request.SetContext(ctx) + + response = NewDescribeDhcpIpsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDirectConnectGatewayCcnRoutesRequest() (request *DescribeDirectConnectGatewayCcnRoutesRequest) { + request = &DescribeDirectConnectGatewayCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeDirectConnectGatewayCcnRoutes") + + return +} + +func NewDescribeDirectConnectGatewayCcnRoutesResponse() (response *DescribeDirectConnectGatewayCcnRoutesResponse) { + response = &DescribeDirectConnectGatewayCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDirectConnectGatewayCcnRoutes +// 本接口(DescribeDirectConnectGatewayCcnRoutes)用于查询专线网关的云联网路由(IDC网段) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeDirectConnectGatewayCcnRoutes(request *DescribeDirectConnectGatewayCcnRoutesRequest) (response *DescribeDirectConnectGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewDescribeDirectConnectGatewayCcnRoutesRequest() + } + + response = NewDescribeDirectConnectGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// DescribeDirectConnectGatewayCcnRoutes +// 本接口(DescribeDirectConnectGatewayCcnRoutes)用于查询专线网关的云联网路由(IDC网段) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeDirectConnectGatewayCcnRoutesWithContext(ctx context.Context, request *DescribeDirectConnectGatewayCcnRoutesRequest) (response *DescribeDirectConnectGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewDescribeDirectConnectGatewayCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewDescribeDirectConnectGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDirectConnectGatewaysRequest() (request *DescribeDirectConnectGatewaysRequest) { + request = &DescribeDirectConnectGatewaysRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeDirectConnectGateways") + + return +} + +func NewDescribeDirectConnectGatewaysResponse() (response *DescribeDirectConnectGatewaysResponse) { + response = &DescribeDirectConnectGatewaysResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDirectConnectGateways +// 本接口(DescribeDirectConnectGateways)用于查询专线网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +func (c *Client) DescribeDirectConnectGateways(request *DescribeDirectConnectGatewaysRequest) (response *DescribeDirectConnectGatewaysResponse, err error) { + if request == nil { + request = NewDescribeDirectConnectGatewaysRequest() + } + + response = NewDescribeDirectConnectGatewaysResponse() + err = c.Send(request, response) + return +} + +// DescribeDirectConnectGateways +// 本接口(DescribeDirectConnectGateways)用于查询专线网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +func (c *Client) DescribeDirectConnectGatewaysWithContext(ctx context.Context, request *DescribeDirectConnectGatewaysRequest) (response *DescribeDirectConnectGatewaysResponse, err error) { + if request == nil { + request = NewDescribeDirectConnectGatewaysRequest() + } + request.SetContext(ctx) + + response = NewDescribeDirectConnectGatewaysResponse() + err = c.Send(request, response) + return +} + +func NewDescribeFlowLogRequest() (request *DescribeFlowLogRequest) { + request = &DescribeFlowLogRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeFlowLog") + + return +} + +func NewDescribeFlowLogResponse() (response *DescribeFlowLogResponse) { + response = &DescribeFlowLogResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeFlowLog +// 本接口(DescribeFlowLog)用于查询流日志实例信息 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeFlowLog(request *DescribeFlowLogRequest) (response *DescribeFlowLogResponse, err error) { + if request == nil { + request = NewDescribeFlowLogRequest() + } + + response = NewDescribeFlowLogResponse() + err = c.Send(request, response) + return +} + +// DescribeFlowLog +// 本接口(DescribeFlowLog)用于查询流日志实例信息 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeFlowLogWithContext(ctx context.Context, request *DescribeFlowLogRequest) (response *DescribeFlowLogResponse, err error) { + if request == nil { + request = NewDescribeFlowLogRequest() + } + request.SetContext(ctx) + + response = NewDescribeFlowLogResponse() + err = c.Send(request, response) + return +} + +func NewDescribeFlowLogsRequest() (request *DescribeFlowLogsRequest) { + request = &DescribeFlowLogsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeFlowLogs") + + return +} + +func NewDescribeFlowLogsResponse() (response *DescribeFlowLogsResponse) { + response = &DescribeFlowLogsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeFlowLogs +// 本接口(DescribeFlowLogs)用于查询获取流日志集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeFlowLogs(request *DescribeFlowLogsRequest) (response *DescribeFlowLogsResponse, err error) { + if request == nil { + request = NewDescribeFlowLogsRequest() + } + + response = NewDescribeFlowLogsResponse() + err = c.Send(request, response) + return +} + +// DescribeFlowLogs +// 本接口(DescribeFlowLogs)用于查询获取流日志集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeFlowLogsWithContext(ctx context.Context, request *DescribeFlowLogsRequest) (response *DescribeFlowLogsResponse, err error) { + if request == nil { + request = NewDescribeFlowLogsRequest() + } + request.SetContext(ctx) + + response = NewDescribeFlowLogsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeGatewayFlowMonitorDetailRequest() (request *DescribeGatewayFlowMonitorDetailRequest) { + request = &DescribeGatewayFlowMonitorDetailRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeGatewayFlowMonitorDetail") + + return +} + +func NewDescribeGatewayFlowMonitorDetailResponse() (response *DescribeGatewayFlowMonitorDetailResponse) { + response = &DescribeGatewayFlowMonitorDetailResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeGatewayFlowMonitorDetail +// 本接口(DescribeGatewayFlowMonitorDetail)用于查询网关流量监控明细。 +// +// * 只支持单个网关实例查询。即入参 `VpnId`、 `DirectConnectGatewayId`、 `PeeringConnectionId`、 `NatId` 最多只支持传一个,且必须传一个。 +// +// * 如果网关有流量,但调用本接口没有返回数据,请在控制台对应网关详情页确认是否开启网关流量监控。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeGatewayFlowMonitorDetail(request *DescribeGatewayFlowMonitorDetailRequest) (response *DescribeGatewayFlowMonitorDetailResponse, err error) { + if request == nil { + request = NewDescribeGatewayFlowMonitorDetailRequest() + } + + response = NewDescribeGatewayFlowMonitorDetailResponse() + err = c.Send(request, response) + return +} + +// DescribeGatewayFlowMonitorDetail +// 本接口(DescribeGatewayFlowMonitorDetail)用于查询网关流量监控明细。 +// +// * 只支持单个网关实例查询。即入参 `VpnId`、 `DirectConnectGatewayId`、 `PeeringConnectionId`、 `NatId` 最多只支持传一个,且必须传一个。 +// +// * 如果网关有流量,但调用本接口没有返回数据,请在控制台对应网关详情页确认是否开启网关流量监控。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeGatewayFlowMonitorDetailWithContext(ctx context.Context, request *DescribeGatewayFlowMonitorDetailRequest) (response *DescribeGatewayFlowMonitorDetailResponse, err error) { + if request == nil { + request = NewDescribeGatewayFlowMonitorDetailRequest() + } + request.SetContext(ctx) + + response = NewDescribeGatewayFlowMonitorDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeGatewayFlowQosRequest() (request *DescribeGatewayFlowQosRequest) { + request = &DescribeGatewayFlowQosRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeGatewayFlowQos") + + return +} + +func NewDescribeGatewayFlowQosResponse() (response *DescribeGatewayFlowQosResponse) { + response = &DescribeGatewayFlowQosResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeGatewayFlowQos +// 本接口(DescribeGatewayFlowQos)用于查询网关来访IP流控带宽。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) DescribeGatewayFlowQos(request *DescribeGatewayFlowQosRequest) (response *DescribeGatewayFlowQosResponse, err error) { + if request == nil { + request = NewDescribeGatewayFlowQosRequest() + } + + response = NewDescribeGatewayFlowQosResponse() + err = c.Send(request, response) + return +} + +// DescribeGatewayFlowQos +// 本接口(DescribeGatewayFlowQos)用于查询网关来访IP流控带宽。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) DescribeGatewayFlowQosWithContext(ctx context.Context, request *DescribeGatewayFlowQosRequest) (response *DescribeGatewayFlowQosResponse, err error) { + if request == nil { + request = NewDescribeGatewayFlowQosRequest() + } + request.SetContext(ctx) + + response = NewDescribeGatewayFlowQosResponse() + err = c.Send(request, response) + return +} + +func NewDescribeHaVipsRequest() (request *DescribeHaVipsRequest) { + request = &DescribeHaVipsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeHaVips") + + return +} + +func NewDescribeHaVipsResponse() (response *DescribeHaVipsResponse) { + response = &DescribeHaVipsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeHaVips +// 本接口(DescribeHaVips)用于查询高可用虚拟IP(HAVIP)列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeHaVips(request *DescribeHaVipsRequest) (response *DescribeHaVipsResponse, err error) { + if request == nil { + request = NewDescribeHaVipsRequest() + } + + response = NewDescribeHaVipsResponse() + err = c.Send(request, response) + return +} + +// DescribeHaVips +// 本接口(DescribeHaVips)用于查询高可用虚拟IP(HAVIP)列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeHaVipsWithContext(ctx context.Context, request *DescribeHaVipsRequest) (response *DescribeHaVipsResponse, err error) { + if request == nil { + request = NewDescribeHaVipsRequest() + } + request.SetContext(ctx) + + response = NewDescribeHaVipsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeIp6AddressesRequest() (request *DescribeIp6AddressesRequest) { + request = &DescribeIp6AddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeIp6Addresses") + + return +} + +func NewDescribeIp6AddressesResponse() (response *DescribeIp6AddressesResponse) { + response = &DescribeIp6AddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeIp6Addresses +// 该接口用于查询IPV6地址信息 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_NETWORKINTERFACEIDMALFORMED = "InvalidParameterValue.NetworkInterfaceIdMalformed" +func (c *Client) DescribeIp6Addresses(request *DescribeIp6AddressesRequest) (response *DescribeIp6AddressesResponse, err error) { + if request == nil { + request = NewDescribeIp6AddressesRequest() + } + + response = NewDescribeIp6AddressesResponse() + err = c.Send(request, response) + return +} + +// DescribeIp6Addresses +// 该接口用于查询IPV6地址信息 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_NETWORKINTERFACEIDMALFORMED = "InvalidParameterValue.NetworkInterfaceIdMalformed" +func (c *Client) DescribeIp6AddressesWithContext(ctx context.Context, request *DescribeIp6AddressesRequest) (response *DescribeIp6AddressesResponse, err error) { + if request == nil { + request = NewDescribeIp6AddressesRequest() + } + request.SetContext(ctx) + + response = NewDescribeIp6AddressesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeIp6TranslatorQuotaRequest() (request *DescribeIp6TranslatorQuotaRequest) { + request = &DescribeIp6TranslatorQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeIp6TranslatorQuota") + + return +} + +func NewDescribeIp6TranslatorQuotaResponse() (response *DescribeIp6TranslatorQuotaResponse) { + response = &DescribeIp6TranslatorQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeIp6TranslatorQuota +// 查询账户在指定地域IPV6转换实例和规则的配额 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +func (c *Client) DescribeIp6TranslatorQuota(request *DescribeIp6TranslatorQuotaRequest) (response *DescribeIp6TranslatorQuotaResponse, err error) { + if request == nil { + request = NewDescribeIp6TranslatorQuotaRequest() + } + + response = NewDescribeIp6TranslatorQuotaResponse() + err = c.Send(request, response) + return +} + +// DescribeIp6TranslatorQuota +// 查询账户在指定地域IPV6转换实例和规则的配额 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +func (c *Client) DescribeIp6TranslatorQuotaWithContext(ctx context.Context, request *DescribeIp6TranslatorQuotaRequest) (response *DescribeIp6TranslatorQuotaResponse, err error) { + if request == nil { + request = NewDescribeIp6TranslatorQuotaRequest() + } + request.SetContext(ctx) + + response = NewDescribeIp6TranslatorQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeIp6TranslatorsRequest() (request *DescribeIp6TranslatorsRequest) { + request = &DescribeIp6TranslatorsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeIp6Translators") + + return +} + +func NewDescribeIp6TranslatorsResponse() (response *DescribeIp6TranslatorsResponse) { + response = &DescribeIp6TranslatorsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeIp6Translators +// 1. 该接口用于查询账户下的IPV6转换实例及其绑定的转换规则信息 +// +// 2. 支持过滤查询 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeIp6Translators(request *DescribeIp6TranslatorsRequest) (response *DescribeIp6TranslatorsResponse, err error) { + if request == nil { + request = NewDescribeIp6TranslatorsRequest() + } + + response = NewDescribeIp6TranslatorsResponse() + err = c.Send(request, response) + return +} + +// DescribeIp6Translators +// 1. 该接口用于查询账户下的IPV6转换实例及其绑定的转换规则信息 +// +// 2. 支持过滤查询 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeIp6TranslatorsWithContext(ctx context.Context, request *DescribeIp6TranslatorsRequest) (response *DescribeIp6TranslatorsResponse, err error) { + if request == nil { + request = NewDescribeIp6TranslatorsRequest() + } + request.SetContext(ctx) + + response = NewDescribeIp6TranslatorsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeIpGeolocationDatabaseUrlRequest() (request *DescribeIpGeolocationDatabaseUrlRequest) { + request = &DescribeIpGeolocationDatabaseUrlRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeIpGeolocationDatabaseUrl") + + return +} + +func NewDescribeIpGeolocationDatabaseUrlResponse() (response *DescribeIpGeolocationDatabaseUrlResponse) { + response = &DescribeIpGeolocationDatabaseUrlResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeIpGeolocationDatabaseUrl +// 本接口(DescribeIpGeolocationDatabaseUrl)用于获取IP地理位置库下载链接。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// INTERNALERROR = "InternalError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeIpGeolocationDatabaseUrl(request *DescribeIpGeolocationDatabaseUrlRequest) (response *DescribeIpGeolocationDatabaseUrlResponse, err error) { + if request == nil { + request = NewDescribeIpGeolocationDatabaseUrlRequest() + } + + response = NewDescribeIpGeolocationDatabaseUrlResponse() + err = c.Send(request, response) + return +} + +// DescribeIpGeolocationDatabaseUrl +// 本接口(DescribeIpGeolocationDatabaseUrl)用于获取IP地理位置库下载链接。 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// INTERNALERROR = "InternalError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeIpGeolocationDatabaseUrlWithContext(ctx context.Context, request *DescribeIpGeolocationDatabaseUrlRequest) (response *DescribeIpGeolocationDatabaseUrlResponse, err error) { + if request == nil { + request = NewDescribeIpGeolocationDatabaseUrlRequest() + } + request.SetContext(ctx) + + response = NewDescribeIpGeolocationDatabaseUrlResponse() + err = c.Send(request, response) + return +} + +func NewDescribeIpGeolocationInfosRequest() (request *DescribeIpGeolocationInfosRequest) { + request = &DescribeIpGeolocationInfosRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeIpGeolocationInfos") + + return +} + +func NewDescribeIpGeolocationInfosResponse() (response *DescribeIpGeolocationInfosResponse) { + response = &DescribeIpGeolocationInfosResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeIpGeolocationInfos +// 本接口(DescribeIpGeolocationInfos)用于查询IP地址信息,包括地理位置信息和网络信息。 +// +// 本接口目前处于内测中,如需使用,请提交 [工单申请](https://console.cloud.tencent.com/workorder/category?level1_id=6&level2_id=660&source=0&data_title=%E5%BC%B9%E6%80%A7%E5%85%AC%E7%BD%91%20EIP&level3_id=662&queue=96&scene_code=16400&step=2)。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeIpGeolocationInfos(request *DescribeIpGeolocationInfosRequest) (response *DescribeIpGeolocationInfosResponse, err error) { + if request == nil { + request = NewDescribeIpGeolocationInfosRequest() + } + + response = NewDescribeIpGeolocationInfosResponse() + err = c.Send(request, response) + return +} + +// DescribeIpGeolocationInfos +// 本接口(DescribeIpGeolocationInfos)用于查询IP地址信息,包括地理位置信息和网络信息。 +// +// 本接口目前处于内测中,如需使用,请提交 [工单申请](https://console.cloud.tencent.com/workorder/category?level1_id=6&level2_id=660&source=0&data_title=%E5%BC%B9%E6%80%A7%E5%85%AC%E7%BD%91%20EIP&level3_id=662&queue=96&scene_code=16400&step=2)。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeIpGeolocationInfosWithContext(ctx context.Context, request *DescribeIpGeolocationInfosRequest) (response *DescribeIpGeolocationInfosResponse, err error) { + if request == nil { + request = NewDescribeIpGeolocationInfosRequest() + } + request.SetContext(ctx) + + response = NewDescribeIpGeolocationInfosResponse() + err = c.Send(request, response) + return +} + +func NewDescribeLocalGatewayRequest() (request *DescribeLocalGatewayRequest) { + request = &DescribeLocalGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeLocalGateway") + + return +} + +func NewDescribeLocalGatewayResponse() (response *DescribeLocalGatewayResponse) { + response = &DescribeLocalGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeLocalGateway +// 该接口用于查询CDC的本地网关。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeLocalGateway(request *DescribeLocalGatewayRequest) (response *DescribeLocalGatewayResponse, err error) { + if request == nil { + request = NewDescribeLocalGatewayRequest() + } + + response = NewDescribeLocalGatewayResponse() + err = c.Send(request, response) + return +} + +// DescribeLocalGateway +// 该接口用于查询CDC的本地网关。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeLocalGatewayWithContext(ctx context.Context, request *DescribeLocalGatewayRequest) (response *DescribeLocalGatewayResponse, err error) { + if request == nil { + request = NewDescribeLocalGatewayRequest() + } + request.SetContext(ctx) + + response = NewDescribeLocalGatewayResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNatGatewayDestinationIpPortTranslationNatRulesRequest() (request *DescribeNatGatewayDestinationIpPortTranslationNatRulesRequest) { + request = &DescribeNatGatewayDestinationIpPortTranslationNatRulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNatGatewayDestinationIpPortTranslationNatRules") + + return +} + +func NewDescribeNatGatewayDestinationIpPortTranslationNatRulesResponse() (response *DescribeNatGatewayDestinationIpPortTranslationNatRulesResponse) { + response = &DescribeNatGatewayDestinationIpPortTranslationNatRulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNatGatewayDestinationIpPortTranslationNatRules +// 本接口(DescribeNatGatewayDestinationIpPortTranslationNatRules)用于查询NAT网关端口转发规则对象数组。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) DescribeNatGatewayDestinationIpPortTranslationNatRules(request *DescribeNatGatewayDestinationIpPortTranslationNatRulesRequest) (response *DescribeNatGatewayDestinationIpPortTranslationNatRulesResponse, err error) { + if request == nil { + request = NewDescribeNatGatewayDestinationIpPortTranslationNatRulesRequest() + } + + response = NewDescribeNatGatewayDestinationIpPortTranslationNatRulesResponse() + err = c.Send(request, response) + return +} + +// DescribeNatGatewayDestinationIpPortTranslationNatRules +// 本接口(DescribeNatGatewayDestinationIpPortTranslationNatRules)用于查询NAT网关端口转发规则对象数组。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) DescribeNatGatewayDestinationIpPortTranslationNatRulesWithContext(ctx context.Context, request *DescribeNatGatewayDestinationIpPortTranslationNatRulesRequest) (response *DescribeNatGatewayDestinationIpPortTranslationNatRulesResponse, err error) { + if request == nil { + request = NewDescribeNatGatewayDestinationIpPortTranslationNatRulesRequest() + } + request.SetContext(ctx) + + response = NewDescribeNatGatewayDestinationIpPortTranslationNatRulesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNatGatewayDirectConnectGatewayRouteRequest() (request *DescribeNatGatewayDirectConnectGatewayRouteRequest) { + request = &DescribeNatGatewayDirectConnectGatewayRouteRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNatGatewayDirectConnectGatewayRoute") + + return +} + +func NewDescribeNatGatewayDirectConnectGatewayRouteResponse() (response *DescribeNatGatewayDirectConnectGatewayRouteResponse) { + response = &DescribeNatGatewayDirectConnectGatewayRouteResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNatGatewayDirectConnectGatewayRoute +// 查询专线绑定NAT的路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) DescribeNatGatewayDirectConnectGatewayRoute(request *DescribeNatGatewayDirectConnectGatewayRouteRequest) (response *DescribeNatGatewayDirectConnectGatewayRouteResponse, err error) { + if request == nil { + request = NewDescribeNatGatewayDirectConnectGatewayRouteRequest() + } + + response = NewDescribeNatGatewayDirectConnectGatewayRouteResponse() + err = c.Send(request, response) + return +} + +// DescribeNatGatewayDirectConnectGatewayRoute +// 查询专线绑定NAT的路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) DescribeNatGatewayDirectConnectGatewayRouteWithContext(ctx context.Context, request *DescribeNatGatewayDirectConnectGatewayRouteRequest) (response *DescribeNatGatewayDirectConnectGatewayRouteResponse, err error) { + if request == nil { + request = NewDescribeNatGatewayDirectConnectGatewayRouteRequest() + } + request.SetContext(ctx) + + response = NewDescribeNatGatewayDirectConnectGatewayRouteResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNatGatewaySourceIpTranslationNatRulesRequest() (request *DescribeNatGatewaySourceIpTranslationNatRulesRequest) { + request = &DescribeNatGatewaySourceIpTranslationNatRulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNatGatewaySourceIpTranslationNatRules") + + return +} + +func NewDescribeNatGatewaySourceIpTranslationNatRulesResponse() (response *DescribeNatGatewaySourceIpTranslationNatRulesResponse) { + response = &DescribeNatGatewaySourceIpTranslationNatRulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNatGatewaySourceIpTranslationNatRules +// 本接口(DescribeNatGatewaySourceIpTranslationNatRules)用于查询NAT网关SNAT转发规则对象数组。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNatGatewaySourceIpTranslationNatRules(request *DescribeNatGatewaySourceIpTranslationNatRulesRequest) (response *DescribeNatGatewaySourceIpTranslationNatRulesResponse, err error) { + if request == nil { + request = NewDescribeNatGatewaySourceIpTranslationNatRulesRequest() + } + + response = NewDescribeNatGatewaySourceIpTranslationNatRulesResponse() + err = c.Send(request, response) + return +} + +// DescribeNatGatewaySourceIpTranslationNatRules +// 本接口(DescribeNatGatewaySourceIpTranslationNatRules)用于查询NAT网关SNAT转发规则对象数组。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNatGatewaySourceIpTranslationNatRulesWithContext(ctx context.Context, request *DescribeNatGatewaySourceIpTranslationNatRulesRequest) (response *DescribeNatGatewaySourceIpTranslationNatRulesResponse, err error) { + if request == nil { + request = NewDescribeNatGatewaySourceIpTranslationNatRulesRequest() + } + request.SetContext(ctx) + + response = NewDescribeNatGatewaySourceIpTranslationNatRulesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNatGatewaysRequest() (request *DescribeNatGatewaysRequest) { + request = &DescribeNatGatewaysRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNatGateways") + + return +} + +func NewDescribeNatGatewaysResponse() (response *DescribeNatGatewaysResponse) { + response = &DescribeNatGatewaysResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNatGateways +// 本接口(DescribeNatGateways)用于查询 NAT 网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +func (c *Client) DescribeNatGateways(request *DescribeNatGatewaysRequest) (response *DescribeNatGatewaysResponse, err error) { + if request == nil { + request = NewDescribeNatGatewaysRequest() + } + + response = NewDescribeNatGatewaysResponse() + err = c.Send(request, response) + return +} + +// DescribeNatGateways +// 本接口(DescribeNatGateways)用于查询 NAT 网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +func (c *Client) DescribeNatGatewaysWithContext(ctx context.Context, request *DescribeNatGatewaysRequest) (response *DescribeNatGatewaysResponse, err error) { + if request == nil { + request = NewDescribeNatGatewaysRequest() + } + request.SetContext(ctx) + + response = NewDescribeNatGatewaysResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNetDetectStatesRequest() (request *DescribeNetDetectStatesRequest) { + request = &DescribeNetDetectStatesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNetDetectStates") + + return +} + +func NewDescribeNetDetectStatesResponse() (response *DescribeNetDetectStatesResponse) { + response = &DescribeNetDetectStatesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNetDetectStates +// 本接口(DescribeNetDetectStates)用于查询网络探测验证结果列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNetDetectStates(request *DescribeNetDetectStatesRequest) (response *DescribeNetDetectStatesResponse, err error) { + if request == nil { + request = NewDescribeNetDetectStatesRequest() + } + + response = NewDescribeNetDetectStatesResponse() + err = c.Send(request, response) + return +} + +// DescribeNetDetectStates +// 本接口(DescribeNetDetectStates)用于查询网络探测验证结果列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNetDetectStatesWithContext(ctx context.Context, request *DescribeNetDetectStatesRequest) (response *DescribeNetDetectStatesResponse, err error) { + if request == nil { + request = NewDescribeNetDetectStatesRequest() + } + request.SetContext(ctx) + + response = NewDescribeNetDetectStatesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNetDetectsRequest() (request *DescribeNetDetectsRequest) { + request = &DescribeNetDetectsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNetDetects") + + return +} + +func NewDescribeNetDetectsResponse() (response *DescribeNetDetectsResponse) { + response = &DescribeNetDetectsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNetDetects +// 本接口(DescribeNetDetects)用于查询网络探测列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNetDetects(request *DescribeNetDetectsRequest) (response *DescribeNetDetectsResponse, err error) { + if request == nil { + request = NewDescribeNetDetectsRequest() + } + + response = NewDescribeNetDetectsResponse() + err = c.Send(request, response) + return +} + +// DescribeNetDetects +// 本接口(DescribeNetDetects)用于查询网络探测列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNetDetectsWithContext(ctx context.Context, request *DescribeNetDetectsRequest) (response *DescribeNetDetectsResponse, err error) { + if request == nil { + request = NewDescribeNetDetectsRequest() + } + request.SetContext(ctx) + + response = NewDescribeNetDetectsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNetworkAclsRequest() (request *DescribeNetworkAclsRequest) { + request = &DescribeNetworkAclsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNetworkAcls") + + return +} + +func NewDescribeNetworkAclsResponse() (response *DescribeNetworkAclsResponse) { + response = &DescribeNetworkAclsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNetworkAcls +// 本接口(DescribeNetworkAcls)用于查询网络ACL列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +func (c *Client) DescribeNetworkAcls(request *DescribeNetworkAclsRequest) (response *DescribeNetworkAclsResponse, err error) { + if request == nil { + request = NewDescribeNetworkAclsRequest() + } + + response = NewDescribeNetworkAclsResponse() + err = c.Send(request, response) + return +} + +// DescribeNetworkAcls +// 本接口(DescribeNetworkAcls)用于查询网络ACL列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +func (c *Client) DescribeNetworkAclsWithContext(ctx context.Context, request *DescribeNetworkAclsRequest) (response *DescribeNetworkAclsResponse, err error) { + if request == nil { + request = NewDescribeNetworkAclsRequest() + } + request.SetContext(ctx) + + response = NewDescribeNetworkAclsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNetworkInterfaceLimitRequest() (request *DescribeNetworkInterfaceLimitRequest) { + request = &DescribeNetworkInterfaceLimitRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNetworkInterfaceLimit") + + return +} + +func NewDescribeNetworkInterfaceLimitResponse() (response *DescribeNetworkInterfaceLimitResponse) { + response = &DescribeNetworkInterfaceLimitResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNetworkInterfaceLimit +// 本接口(DescribeNetworkInterfaceLimit)根据CVM实例ID或弹性网卡ID查询弹性网卡配额,返回该CVM实例或弹性网卡能绑定的弹性网卡配额,以及弹性网卡可以分配的IP配额 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNetworkInterfaceLimit(request *DescribeNetworkInterfaceLimitRequest) (response *DescribeNetworkInterfaceLimitResponse, err error) { + if request == nil { + request = NewDescribeNetworkInterfaceLimitRequest() + } + + response = NewDescribeNetworkInterfaceLimitResponse() + err = c.Send(request, response) + return +} + +// DescribeNetworkInterfaceLimit +// 本接口(DescribeNetworkInterfaceLimit)根据CVM实例ID或弹性网卡ID查询弹性网卡配额,返回该CVM实例或弹性网卡能绑定的弹性网卡配额,以及弹性网卡可以分配的IP配额 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNetworkInterfaceLimitWithContext(ctx context.Context, request *DescribeNetworkInterfaceLimitRequest) (response *DescribeNetworkInterfaceLimitResponse, err error) { + if request == nil { + request = NewDescribeNetworkInterfaceLimitRequest() + } + request.SetContext(ctx) + + response = NewDescribeNetworkInterfaceLimitResponse() + err = c.Send(request, response) + return +} + +func NewDescribeNetworkInterfacesRequest() (request *DescribeNetworkInterfacesRequest) { + request = &DescribeNetworkInterfacesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeNetworkInterfaces") + + return +} + +func NewDescribeNetworkInterfacesResponse() (response *DescribeNetworkInterfacesResponse) { + response = &DescribeNetworkInterfacesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeNetworkInterfaces +// 本接口(DescribeNetworkInterfaces)用于查询弹性网卡列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNetworkInterfaces(request *DescribeNetworkInterfacesRequest) (response *DescribeNetworkInterfacesResponse, err error) { + if request == nil { + request = NewDescribeNetworkInterfacesRequest() + } + + response = NewDescribeNetworkInterfacesResponse() + err = c.Send(request, response) + return +} + +// DescribeNetworkInterfaces +// 本接口(DescribeNetworkInterfaces)用于查询弹性网卡列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeNetworkInterfacesWithContext(ctx context.Context, request *DescribeNetworkInterfacesRequest) (response *DescribeNetworkInterfacesResponse, err error) { + if request == nil { + request = NewDescribeNetworkInterfacesRequest() + } + request.SetContext(ctx) + + response = NewDescribeNetworkInterfacesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeProductQuotaRequest() (request *DescribeProductQuotaRequest) { + request = &DescribeProductQuotaRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeProductQuota") + + return +} + +func NewDescribeProductQuotaResponse() (response *DescribeProductQuotaResponse) { + response = &DescribeProductQuotaResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeProductQuota +// 本接口用于查询网络产品的配额信息 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeProductQuota(request *DescribeProductQuotaRequest) (response *DescribeProductQuotaResponse, err error) { + if request == nil { + request = NewDescribeProductQuotaRequest() + } + + response = NewDescribeProductQuotaResponse() + err = c.Send(request, response) + return +} + +// DescribeProductQuota +// 本接口用于查询网络产品的配额信息 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeProductQuotaWithContext(ctx context.Context, request *DescribeProductQuotaRequest) (response *DescribeProductQuotaResponse, err error) { + if request == nil { + request = NewDescribeProductQuotaRequest() + } + request.SetContext(ctx) + + response = NewDescribeProductQuotaResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRouteConflictsRequest() (request *DescribeRouteConflictsRequest) { + request = &DescribeRouteConflictsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeRouteConflicts") + + return +} + +func NewDescribeRouteConflictsResponse() (response *DescribeRouteConflictsResponse) { + response = &DescribeRouteConflictsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRouteConflicts +// 本接口(DescribeRouteConflicts)用于查询自定义路由策略与云联网路由策略冲突列表 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeRouteConflicts(request *DescribeRouteConflictsRequest) (response *DescribeRouteConflictsResponse, err error) { + if request == nil { + request = NewDescribeRouteConflictsRequest() + } + + response = NewDescribeRouteConflictsResponse() + err = c.Send(request, response) + return +} + +// DescribeRouteConflicts +// 本接口(DescribeRouteConflicts)用于查询自定义路由策略与云联网路由策略冲突列表 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeRouteConflictsWithContext(ctx context.Context, request *DescribeRouteConflictsRequest) (response *DescribeRouteConflictsResponse, err error) { + if request == nil { + request = NewDescribeRouteConflictsRequest() + } + request.SetContext(ctx) + + response = NewDescribeRouteConflictsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRouteTablesRequest() (request *DescribeRouteTablesRequest) { + request = &DescribeRouteTablesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeRouteTables") + + return +} + +func NewDescribeRouteTablesResponse() (response *DescribeRouteTablesResponse) { + response = &DescribeRouteTablesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRouteTables +// 本接口(DescribeRouteTables)用于查询路由表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeRouteTables(request *DescribeRouteTablesRequest) (response *DescribeRouteTablesResponse, err error) { + if request == nil { + request = NewDescribeRouteTablesRequest() + } + + response = NewDescribeRouteTablesResponse() + err = c.Send(request, response) + return +} + +// DescribeRouteTables +// 本接口(DescribeRouteTables)用于查询路由表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeRouteTablesWithContext(ctx context.Context, request *DescribeRouteTablesRequest) (response *DescribeRouteTablesResponse, err error) { + if request == nil { + request = NewDescribeRouteTablesRequest() + } + request.SetContext(ctx) + + response = NewDescribeRouteTablesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeSecurityGroupAssociationStatisticsRequest() (request *DescribeSecurityGroupAssociationStatisticsRequest) { + request = &DescribeSecurityGroupAssociationStatisticsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeSecurityGroupAssociationStatistics") + + return +} + +func NewDescribeSecurityGroupAssociationStatisticsResponse() (response *DescribeSecurityGroupAssociationStatisticsResponse) { + response = &DescribeSecurityGroupAssociationStatisticsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeSecurityGroupAssociationStatistics +// 本接口(DescribeSecurityGroupAssociationStatistics)用于查询安全组关联的实例统计。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupAssociationStatistics(request *DescribeSecurityGroupAssociationStatisticsRequest) (response *DescribeSecurityGroupAssociationStatisticsResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupAssociationStatisticsRequest() + } + + response = NewDescribeSecurityGroupAssociationStatisticsResponse() + err = c.Send(request, response) + return +} + +// DescribeSecurityGroupAssociationStatistics +// 本接口(DescribeSecurityGroupAssociationStatistics)用于查询安全组关联的实例统计。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupAssociationStatisticsWithContext(ctx context.Context, request *DescribeSecurityGroupAssociationStatisticsRequest) (response *DescribeSecurityGroupAssociationStatisticsResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupAssociationStatisticsRequest() + } + request.SetContext(ctx) + + response = NewDescribeSecurityGroupAssociationStatisticsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeSecurityGroupLimitsRequest() (request *DescribeSecurityGroupLimitsRequest) { + request = &DescribeSecurityGroupLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeSecurityGroupLimits") + + return +} + +func NewDescribeSecurityGroupLimitsResponse() (response *DescribeSecurityGroupLimitsResponse) { + response = &DescribeSecurityGroupLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeSecurityGroupLimits +// 本接口(DescribeSecurityGroupLimits)用于查询用户安全组配额。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupLimits(request *DescribeSecurityGroupLimitsRequest) (response *DescribeSecurityGroupLimitsResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupLimitsRequest() + } + + response = NewDescribeSecurityGroupLimitsResponse() + err = c.Send(request, response) + return +} + +// DescribeSecurityGroupLimits +// 本接口(DescribeSecurityGroupLimits)用于查询用户安全组配额。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupLimitsWithContext(ctx context.Context, request *DescribeSecurityGroupLimitsRequest) (response *DescribeSecurityGroupLimitsResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupLimitsRequest() + } + request.SetContext(ctx) + + response = NewDescribeSecurityGroupLimitsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeSecurityGroupPoliciesRequest() (request *DescribeSecurityGroupPoliciesRequest) { + request = &DescribeSecurityGroupPoliciesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeSecurityGroupPolicies") + + return +} + +func NewDescribeSecurityGroupPoliciesResponse() (response *DescribeSecurityGroupPoliciesResponse) { + response = &DescribeSecurityGroupPoliciesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeSecurityGroupPolicies +// 本接口(DescribeSecurityGroupPolicies)用于查询安全组规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupPolicies(request *DescribeSecurityGroupPoliciesRequest) (response *DescribeSecurityGroupPoliciesResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupPoliciesRequest() + } + + response = NewDescribeSecurityGroupPoliciesResponse() + err = c.Send(request, response) + return +} + +// DescribeSecurityGroupPolicies +// 本接口(DescribeSecurityGroupPolicies)用于查询安全组规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupPoliciesWithContext(ctx context.Context, request *DescribeSecurityGroupPoliciesRequest) (response *DescribeSecurityGroupPoliciesResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupPoliciesRequest() + } + request.SetContext(ctx) + + response = NewDescribeSecurityGroupPoliciesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeSecurityGroupReferencesRequest() (request *DescribeSecurityGroupReferencesRequest) { + request = &DescribeSecurityGroupReferencesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeSecurityGroupReferences") + + return +} + +func NewDescribeSecurityGroupReferencesResponse() (response *DescribeSecurityGroupReferencesResponse) { + response = &DescribeSecurityGroupReferencesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeSecurityGroupReferences +// 本接口(DescribeSecurityGroupReferences)用于查询安全组被引用信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupReferences(request *DescribeSecurityGroupReferencesRequest) (response *DescribeSecurityGroupReferencesResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupReferencesRequest() + } + + response = NewDescribeSecurityGroupReferencesResponse() + err = c.Send(request, response) + return +} + +// DescribeSecurityGroupReferences +// 本接口(DescribeSecurityGroupReferences)用于查询安全组被引用信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupReferencesWithContext(ctx context.Context, request *DescribeSecurityGroupReferencesRequest) (response *DescribeSecurityGroupReferencesResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupReferencesRequest() + } + request.SetContext(ctx) + + response = NewDescribeSecurityGroupReferencesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeSecurityGroupsRequest() (request *DescribeSecurityGroupsRequest) { + request = &DescribeSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeSecurityGroups") + + return +} + +func NewDescribeSecurityGroupsResponse() (response *DescribeSecurityGroupsResponse) { + response = &DescribeSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeSecurityGroups +// 本接口(DescribeSecurityGroups)用于查询安全组。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroups(request *DescribeSecurityGroupsRequest) (response *DescribeSecurityGroupsResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupsRequest() + } + + response = NewDescribeSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// DescribeSecurityGroups +// 本接口(DescribeSecurityGroups)用于查询安全组。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSecurityGroupsWithContext(ctx context.Context, request *DescribeSecurityGroupsRequest) (response *DescribeSecurityGroupsResponse, err error) { + if request == nil { + request = NewDescribeSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewDescribeSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeServiceTemplateGroupsRequest() (request *DescribeServiceTemplateGroupsRequest) { + request = &DescribeServiceTemplateGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeServiceTemplateGroups") + + return +} + +func NewDescribeServiceTemplateGroupsResponse() (response *DescribeServiceTemplateGroupsResponse) { + response = &DescribeServiceTemplateGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeServiceTemplateGroups +// 本接口(DescribeServiceTemplateGroups)用于查询协议端口模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeServiceTemplateGroups(request *DescribeServiceTemplateGroupsRequest) (response *DescribeServiceTemplateGroupsResponse, err error) { + if request == nil { + request = NewDescribeServiceTemplateGroupsRequest() + } + + response = NewDescribeServiceTemplateGroupsResponse() + err = c.Send(request, response) + return +} + +// DescribeServiceTemplateGroups +// 本接口(DescribeServiceTemplateGroups)用于查询协议端口模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeServiceTemplateGroupsWithContext(ctx context.Context, request *DescribeServiceTemplateGroupsRequest) (response *DescribeServiceTemplateGroupsResponse, err error) { + if request == nil { + request = NewDescribeServiceTemplateGroupsRequest() + } + request.SetContext(ctx) + + response = NewDescribeServiceTemplateGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeServiceTemplatesRequest() (request *DescribeServiceTemplatesRequest) { + request = &DescribeServiceTemplatesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeServiceTemplates") + + return +} + +func NewDescribeServiceTemplatesResponse() (response *DescribeServiceTemplatesResponse) { + response = &DescribeServiceTemplatesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeServiceTemplates +// 本接口(DescribeServiceTemplates)用于查询协议端口模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeServiceTemplates(request *DescribeServiceTemplatesRequest) (response *DescribeServiceTemplatesResponse, err error) { + if request == nil { + request = NewDescribeServiceTemplatesRequest() + } + + response = NewDescribeServiceTemplatesResponse() + err = c.Send(request, response) + return +} + +// DescribeServiceTemplates +// 本接口(DescribeServiceTemplates)用于查询协议端口模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) DescribeServiceTemplatesWithContext(ctx context.Context, request *DescribeServiceTemplatesRequest) (response *DescribeServiceTemplatesResponse, err error) { + if request == nil { + request = NewDescribeServiceTemplatesRequest() + } + request.SetContext(ctx) + + response = NewDescribeServiceTemplatesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeSubnetsRequest() (request *DescribeSubnetsRequest) { + request = &DescribeSubnetsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeSubnets") + + return +} + +func NewDescribeSubnetsResponse() (response *DescribeSubnetsResponse) { + response = &DescribeSubnetsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeSubnets +// 本接口(DescribeSubnets)用于查询子网列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSubnets(request *DescribeSubnetsRequest) (response *DescribeSubnetsResponse, err error) { + if request == nil { + request = NewDescribeSubnetsRequest() + } + + response = NewDescribeSubnetsResponse() + err = c.Send(request, response) + return +} + +// DescribeSubnets +// 本接口(DescribeSubnets)用于查询子网列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeSubnetsWithContext(ctx context.Context, request *DescribeSubnetsRequest) (response *DescribeSubnetsResponse, err error) { + if request == nil { + request = NewDescribeSubnetsRequest() + } + request.SetContext(ctx) + + response = NewDescribeSubnetsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeTaskResultRequest() (request *DescribeTaskResultRequest) { + request = &DescribeTaskResultRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeTaskResult") + + return +} + +func NewDescribeTaskResultResponse() (response *DescribeTaskResultResponse) { + response = &DescribeTaskResultResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeTaskResult +// 查询EIP异步任务执行结果 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeTaskResult(request *DescribeTaskResultRequest) (response *DescribeTaskResultResponse, err error) { + if request == nil { + request = NewDescribeTaskResultRequest() + } + + response = NewDescribeTaskResultResponse() + err = c.Send(request, response) + return +} + +// DescribeTaskResult +// 查询EIP异步任务执行结果 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeTaskResultWithContext(ctx context.Context, request *DescribeTaskResultRequest) (response *DescribeTaskResultResponse, err error) { + if request == nil { + request = NewDescribeTaskResultRequest() + } + request.SetContext(ctx) + + response = NewDescribeTaskResultResponse() + err = c.Send(request, response) + return +} + +func NewDescribeTemplateLimitsRequest() (request *DescribeTemplateLimitsRequest) { + request = &DescribeTemplateLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeTemplateLimits") + + return +} + +func NewDescribeTemplateLimitsResponse() (response *DescribeTemplateLimitsResponse) { + response = &DescribeTemplateLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeTemplateLimits +// 本接口(DescribeTemplateLimits)用于查询参数模板配额列表。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeTemplateLimits(request *DescribeTemplateLimitsRequest) (response *DescribeTemplateLimitsResponse, err error) { + if request == nil { + request = NewDescribeTemplateLimitsRequest() + } + + response = NewDescribeTemplateLimitsResponse() + err = c.Send(request, response) + return +} + +// DescribeTemplateLimits +// 本接口(DescribeTemplateLimits)用于查询参数模板配额列表。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +func (c *Client) DescribeTemplateLimitsWithContext(ctx context.Context, request *DescribeTemplateLimitsRequest) (response *DescribeTemplateLimitsResponse, err error) { + if request == nil { + request = NewDescribeTemplateLimitsRequest() + } + request.SetContext(ctx) + + response = NewDescribeTemplateLimitsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcEndPointRequest() (request *DescribeVpcEndPointRequest) { + request = &DescribeVpcEndPointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcEndPoint") + + return +} + +func NewDescribeVpcEndPointResponse() (response *DescribeVpcEndPointResponse) { + response = &DescribeVpcEndPointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcEndPoint +// 查询终端节点列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SVCNOTEXIST = "ResourceNotFound.SvcNotExist" +func (c *Client) DescribeVpcEndPoint(request *DescribeVpcEndPointRequest) (response *DescribeVpcEndPointResponse, err error) { + if request == nil { + request = NewDescribeVpcEndPointRequest() + } + + response = NewDescribeVpcEndPointResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcEndPoint +// 查询终端节点列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SVCNOTEXIST = "ResourceNotFound.SvcNotExist" +func (c *Client) DescribeVpcEndPointWithContext(ctx context.Context, request *DescribeVpcEndPointRequest) (response *DescribeVpcEndPointResponse, err error) { + if request == nil { + request = NewDescribeVpcEndPointRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcEndPointResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcEndPointServiceRequest() (request *DescribeVpcEndPointServiceRequest) { + request = &DescribeVpcEndPointServiceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcEndPointService") + + return +} + +func NewDescribeVpcEndPointServiceResponse() (response *DescribeVpcEndPointServiceResponse) { + response = &DescribeVpcEndPointServiceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcEndPointService +// 查询终端节点服务列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcEndPointService(request *DescribeVpcEndPointServiceRequest) (response *DescribeVpcEndPointServiceResponse, err error) { + if request == nil { + request = NewDescribeVpcEndPointServiceRequest() + } + + response = NewDescribeVpcEndPointServiceResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcEndPointService +// 查询终端节点服务列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcEndPointServiceWithContext(ctx context.Context, request *DescribeVpcEndPointServiceRequest) (response *DescribeVpcEndPointServiceResponse, err error) { + if request == nil { + request = NewDescribeVpcEndPointServiceRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcEndPointServiceResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcEndPointServiceWhiteListRequest() (request *DescribeVpcEndPointServiceWhiteListRequest) { + request = &DescribeVpcEndPointServiceWhiteListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcEndPointServiceWhiteList") + + return +} + +func NewDescribeVpcEndPointServiceWhiteListResponse() (response *DescribeVpcEndPointServiceWhiteListResponse) { + response = &DescribeVpcEndPointServiceWhiteListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcEndPointServiceWhiteList +// 查询终端节点服务的服务白名单列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +func (c *Client) DescribeVpcEndPointServiceWhiteList(request *DescribeVpcEndPointServiceWhiteListRequest) (response *DescribeVpcEndPointServiceWhiteListResponse, err error) { + if request == nil { + request = NewDescribeVpcEndPointServiceWhiteListRequest() + } + + response = NewDescribeVpcEndPointServiceWhiteListResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcEndPointServiceWhiteList +// 查询终端节点服务的服务白名单列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +func (c *Client) DescribeVpcEndPointServiceWhiteListWithContext(ctx context.Context, request *DescribeVpcEndPointServiceWhiteListRequest) (response *DescribeVpcEndPointServiceWhiteListResponse, err error) { + if request == nil { + request = NewDescribeVpcEndPointServiceWhiteListRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcEndPointServiceWhiteListResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcInstancesRequest() (request *DescribeVpcInstancesRequest) { + request = &DescribeVpcInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcInstances") + + return +} + +func NewDescribeVpcInstancesResponse() (response *DescribeVpcInstancesResponse) { + response = &DescribeVpcInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcInstances +// 本接口(DescribeVpcInstances)用于查询VPC下的云主机实例列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcInstances(request *DescribeVpcInstancesRequest) (response *DescribeVpcInstancesResponse, err error) { + if request == nil { + request = NewDescribeVpcInstancesRequest() + } + + response = NewDescribeVpcInstancesResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcInstances +// 本接口(DescribeVpcInstances)用于查询VPC下的云主机实例列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcInstancesWithContext(ctx context.Context, request *DescribeVpcInstancesRequest) (response *DescribeVpcInstancesResponse, err error) { + if request == nil { + request = NewDescribeVpcInstancesRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcIpv6AddressesRequest() (request *DescribeVpcIpv6AddressesRequest) { + request = &DescribeVpcIpv6AddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcIpv6Addresses") + + return +} + +func NewDescribeVpcIpv6AddressesResponse() (response *DescribeVpcIpv6AddressesResponse) { + response = &DescribeVpcIpv6AddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcIpv6Addresses +// 本接口(DescribeVpcIpv6Addresses)用于查询 `VPC` `IPv6` 信息。 +// +// 只能查询已使用的`IPv6`信息,当查询未使用的IP时,本接口不会报错,但不会出现在返回结果里。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcIpv6Addresses(request *DescribeVpcIpv6AddressesRequest) (response *DescribeVpcIpv6AddressesResponse, err error) { + if request == nil { + request = NewDescribeVpcIpv6AddressesRequest() + } + + response = NewDescribeVpcIpv6AddressesResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcIpv6Addresses +// 本接口(DescribeVpcIpv6Addresses)用于查询 `VPC` `IPv6` 信息。 +// +// 只能查询已使用的`IPv6`信息,当查询未使用的IP时,本接口不会报错,但不会出现在返回结果里。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcIpv6AddressesWithContext(ctx context.Context, request *DescribeVpcIpv6AddressesRequest) (response *DescribeVpcIpv6AddressesResponse, err error) { + if request == nil { + request = NewDescribeVpcIpv6AddressesRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcIpv6AddressesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcLimitsRequest() (request *DescribeVpcLimitsRequest) { + request = &DescribeVpcLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcLimits") + + return +} + +func NewDescribeVpcLimitsResponse() (response *DescribeVpcLimitsResponse) { + response = &DescribeVpcLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcLimits +// 获取私有网络配额,部分私有网络的配额有地域属性。 +// +// LimitTypes取值范围: +// +// * appid-max-vpcs (每个开发商每个地域可创建的VPC数) +// +// * vpc-max-subnets(每个VPC可创建的子网数) +// +// * vpc-max-route-tables(每个VPC可创建的路由表数) +// +// * route-table-max-policies(每个路由表可添加的策略数) +// +// * vpc-max-vpn-gateways(每个VPC可创建的VPN网关数) +// +// * appid-max-custom-gateways(每个开发商可创建的对端网关数) +// +// * appid-max-vpn-connections(每个开发商可创建的VPN通道数) +// +// * custom-gateway-max-vpn-connections(每个对端网关可创建的VPN通道数) +// +// * vpn-gateway-max-custom-gateways(每个VPNGW可以创建的通道数) +// +// * vpc-max-network-acls(每个VPC可创建的网络ACL数) +// +// * network-acl-max-inbound-policies(每个网络ACL可添加的入站规则数) +// +// * network-acl-max-outbound-policies(每个网络ACL可添加的出站规则数) +// +// * vpc-max-vpcpeers(每个VPC可创建的对等连接数) +// +// * vpc-max-available-vpcpeers(每个VPC可创建的有效对等连接数) +// +// * vpc-max-basic-network-interconnections(每个VPC可创建的基础网络云主机与VPC互通数) +// +// * direct-connection-max-snats(每个专线网关可创建的SNAT数) +// +// * direct-connection-max-dnats(每个专线网关可创建的DNAT数) +// +// * direct-connection-max-snapts(每个专线网关可创建的SNAPT数) +// +// * direct-connection-max-dnapts(每个专线网关可创建的DNAPT数) +// +// * vpc-max-nat-gateways(每个VPC可创建的NAT网关数) +// +// * nat-gateway-max-eips(每个NAT可以购买的外网IP数量) +// +// * vpc-max-enis(每个VPC可创建弹性网卡数) +// +// * vpc-max-havips(每个VPC可创建HAVIP数) +// +// * eni-max-private-ips(每个ENI可以绑定的内网IP数(ENI未绑定子机)) +// +// * nat-gateway-max-dnapts(每个NAT网关可创建的DNAPT数) +// +// * vpc-max-ipv6s(每个VPC可分配的IPv6地址数) +// +// * eni-max-ipv6s(每个ENI可分配的IPv6地址数) +// +// * vpc-max-assistant_cidrs(每个VPC可分配的辅助CIDR数) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeVpcLimits(request *DescribeVpcLimitsRequest) (response *DescribeVpcLimitsResponse, err error) { + if request == nil { + request = NewDescribeVpcLimitsRequest() + } + + response = NewDescribeVpcLimitsResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcLimits +// 获取私有网络配额,部分私有网络的配额有地域属性。 +// +// LimitTypes取值范围: +// +// * appid-max-vpcs (每个开发商每个地域可创建的VPC数) +// +// * vpc-max-subnets(每个VPC可创建的子网数) +// +// * vpc-max-route-tables(每个VPC可创建的路由表数) +// +// * route-table-max-policies(每个路由表可添加的策略数) +// +// * vpc-max-vpn-gateways(每个VPC可创建的VPN网关数) +// +// * appid-max-custom-gateways(每个开发商可创建的对端网关数) +// +// * appid-max-vpn-connections(每个开发商可创建的VPN通道数) +// +// * custom-gateway-max-vpn-connections(每个对端网关可创建的VPN通道数) +// +// * vpn-gateway-max-custom-gateways(每个VPNGW可以创建的通道数) +// +// * vpc-max-network-acls(每个VPC可创建的网络ACL数) +// +// * network-acl-max-inbound-policies(每个网络ACL可添加的入站规则数) +// +// * network-acl-max-outbound-policies(每个网络ACL可添加的出站规则数) +// +// * vpc-max-vpcpeers(每个VPC可创建的对等连接数) +// +// * vpc-max-available-vpcpeers(每个VPC可创建的有效对等连接数) +// +// * vpc-max-basic-network-interconnections(每个VPC可创建的基础网络云主机与VPC互通数) +// +// * direct-connection-max-snats(每个专线网关可创建的SNAT数) +// +// * direct-connection-max-dnats(每个专线网关可创建的DNAT数) +// +// * direct-connection-max-snapts(每个专线网关可创建的SNAPT数) +// +// * direct-connection-max-dnapts(每个专线网关可创建的DNAPT数) +// +// * vpc-max-nat-gateways(每个VPC可创建的NAT网关数) +// +// * nat-gateway-max-eips(每个NAT可以购买的外网IP数量) +// +// * vpc-max-enis(每个VPC可创建弹性网卡数) +// +// * vpc-max-havips(每个VPC可创建HAVIP数) +// +// * eni-max-private-ips(每个ENI可以绑定的内网IP数(ENI未绑定子机)) +// +// * nat-gateway-max-dnapts(每个NAT网关可创建的DNAPT数) +// +// * vpc-max-ipv6s(每个VPC可分配的IPv6地址数) +// +// * eni-max-ipv6s(每个ENI可分配的IPv6地址数) +// +// * vpc-max-assistant_cidrs(每个VPC可分配的辅助CIDR数) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) DescribeVpcLimitsWithContext(ctx context.Context, request *DescribeVpcLimitsRequest) (response *DescribeVpcLimitsResponse, err error) { + if request == nil { + request = NewDescribeVpcLimitsRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcLimitsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcPrivateIpAddressesRequest() (request *DescribeVpcPrivateIpAddressesRequest) { + request = &DescribeVpcPrivateIpAddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcPrivateIpAddresses") + + return +} + +func NewDescribeVpcPrivateIpAddressesResponse() (response *DescribeVpcPrivateIpAddressesResponse) { + response = &DescribeVpcPrivateIpAddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcPrivateIpAddresses +// 本接口(DescribeVpcPrivateIpAddresses)用于查询VPC内网IP信息。<br /> +// +// 只能查询已使用的IP信息,当查询未使用的IP时,本接口不会报错,但不会出现在返回结果里。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcPrivateIpAddresses(request *DescribeVpcPrivateIpAddressesRequest) (response *DescribeVpcPrivateIpAddressesResponse, err error) { + if request == nil { + request = NewDescribeVpcPrivateIpAddressesRequest() + } + + response = NewDescribeVpcPrivateIpAddressesResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcPrivateIpAddresses +// 本接口(DescribeVpcPrivateIpAddresses)用于查询VPC内网IP信息。<br /> +// +// 只能查询已使用的IP信息,当查询未使用的IP时,本接口不会报错,但不会出现在返回结果里。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcPrivateIpAddressesWithContext(ctx context.Context, request *DescribeVpcPrivateIpAddressesRequest) (response *DescribeVpcPrivateIpAddressesResponse, err error) { + if request == nil { + request = NewDescribeVpcPrivateIpAddressesRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcPrivateIpAddressesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcResourceDashboardRequest() (request *DescribeVpcResourceDashboardRequest) { + request = &DescribeVpcResourceDashboardRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcResourceDashboard") + + return +} + +func NewDescribeVpcResourceDashboardResponse() (response *DescribeVpcResourceDashboardResponse) { + response = &DescribeVpcResourceDashboardResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcResourceDashboard +// 本接口(DescribeVpcResourceDashboard)用于查看VPC资源信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcResourceDashboard(request *DescribeVpcResourceDashboardRequest) (response *DescribeVpcResourceDashboardResponse, err error) { + if request == nil { + request = NewDescribeVpcResourceDashboardRequest() + } + + response = NewDescribeVpcResourceDashboardResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcResourceDashboard +// 本接口(DescribeVpcResourceDashboard)用于查看VPC资源信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcResourceDashboardWithContext(ctx context.Context, request *DescribeVpcResourceDashboardRequest) (response *DescribeVpcResourceDashboardResponse, err error) { + if request == nil { + request = NewDescribeVpcResourceDashboardRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcResourceDashboardResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcTaskResultRequest() (request *DescribeVpcTaskResultRequest) { + request = &DescribeVpcTaskResultRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcTaskResult") + + return +} + +func NewDescribeVpcTaskResultResponse() (response *DescribeVpcTaskResultResponse) { + response = &DescribeVpcTaskResultResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcTaskResult +// 本接口(DescribeVpcTaskResult)用于查询VPC任务执行结果。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVpcTaskResult(request *DescribeVpcTaskResultRequest) (response *DescribeVpcTaskResultResponse, err error) { + if request == nil { + request = NewDescribeVpcTaskResultRequest() + } + + response = NewDescribeVpcTaskResultResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcTaskResult +// 本接口(DescribeVpcTaskResult)用于查询VPC任务执行结果。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVpcTaskResultWithContext(ctx context.Context, request *DescribeVpcTaskResultRequest) (response *DescribeVpcTaskResultResponse, err error) { + if request == nil { + request = NewDescribeVpcTaskResultRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcTaskResultResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcsRequest() (request *DescribeVpcsRequest) { + request = &DescribeVpcsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpcs") + + return +} + +func NewDescribeVpcsResponse() (response *DescribeVpcsResponse) { + response = &DescribeVpcsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcs +// 本接口(DescribeVpcs)用于查询私有网络列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcs(request *DescribeVpcsRequest) (response *DescribeVpcsResponse, err error) { + if request == nil { + request = NewDescribeVpcsRequest() + } + + response = NewDescribeVpcsResponse() + err = c.Send(request, response) + return +} + +// DescribeVpcs +// 本接口(DescribeVpcs)用于查询私有网络列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpcsWithContext(ctx context.Context, request *DescribeVpcsRequest) (response *DescribeVpcsResponse, err error) { + if request == nil { + request = NewDescribeVpcsRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpcsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpnConnectionsRequest() (request *DescribeVpnConnectionsRequest) { + request = &DescribeVpnConnectionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpnConnections") + + return +} + +func NewDescribeVpnConnectionsResponse() (response *DescribeVpnConnectionsResponse) { + response = &DescribeVpnConnectionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpnConnections +// 本接口(DescribeVpnConnections)查询VPN通道列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpnConnections(request *DescribeVpnConnectionsRequest) (response *DescribeVpnConnectionsResponse, err error) { + if request == nil { + request = NewDescribeVpnConnectionsRequest() + } + + response = NewDescribeVpnConnectionsResponse() + err = c.Send(request, response) + return +} + +// DescribeVpnConnections +// 本接口(DescribeVpnConnections)查询VPN通道列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpnConnectionsWithContext(ctx context.Context, request *DescribeVpnConnectionsRequest) (response *DescribeVpnConnectionsResponse, err error) { + if request == nil { + request = NewDescribeVpnConnectionsRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpnConnectionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpnGatewayCcnRoutesRequest() (request *DescribeVpnGatewayCcnRoutesRequest) { + request = &DescribeVpnGatewayCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpnGatewayCcnRoutes") + + return +} + +func NewDescribeVpnGatewayCcnRoutesResponse() (response *DescribeVpnGatewayCcnRoutesResponse) { + response = &DescribeVpnGatewayCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpnGatewayCcnRoutes +// 本接口(DescribeVpnGatewayCcnRoutes)用于查询VPN网关云联网路由 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpnGatewayCcnRoutes(request *DescribeVpnGatewayCcnRoutesRequest) (response *DescribeVpnGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewDescribeVpnGatewayCcnRoutesRequest() + } + + response = NewDescribeVpnGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// DescribeVpnGatewayCcnRoutes +// 本接口(DescribeVpnGatewayCcnRoutes)用于查询VPN网关云联网路由 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpnGatewayCcnRoutesWithContext(ctx context.Context, request *DescribeVpnGatewayCcnRoutesRequest) (response *DescribeVpnGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewDescribeVpnGatewayCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpnGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpnGatewayRoutesRequest() (request *DescribeVpnGatewayRoutesRequest) { + request = &DescribeVpnGatewayRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpnGatewayRoutes") + + return +} + +func NewDescribeVpnGatewayRoutesResponse() (response *DescribeVpnGatewayRoutesResponse) { + response = &DescribeVpnGatewayRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpnGatewayRoutes +// 查询路由型VPN网关的目的路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVpnGatewayRoutes(request *DescribeVpnGatewayRoutesRequest) (response *DescribeVpnGatewayRoutesResponse, err error) { + if request == nil { + request = NewDescribeVpnGatewayRoutesRequest() + } + + response = NewDescribeVpnGatewayRoutesResponse() + err = c.Send(request, response) + return +} + +// DescribeVpnGatewayRoutes +// 查询路由型VPN网关的目的路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVpnGatewayRoutesWithContext(ctx context.Context, request *DescribeVpnGatewayRoutesRequest) (response *DescribeVpnGatewayRoutesResponse, err error) { + if request == nil { + request = NewDescribeVpnGatewayRoutesRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpnGatewayRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpnGatewaysRequest() (request *DescribeVpnGatewaysRequest) { + request = &DescribeVpnGatewaysRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DescribeVpnGateways") + + return +} + +func NewDescribeVpnGatewaysResponse() (response *DescribeVpnGatewaysResponse) { + response = &DescribeVpnGatewaysResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpnGateways +// 本接口(DescribeVpnGateways)用于查询VPN网关列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDVPNGATEWAYID_MALFORMED = "InvalidVpnGatewayId.Malformed" +// INVALIDVPNGATEWAYID_NOTFOUND = "InvalidVpnGatewayId.NotFound" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpnGateways(request *DescribeVpnGatewaysRequest) (response *DescribeVpnGatewaysResponse, err error) { + if request == nil { + request = NewDescribeVpnGatewaysRequest() + } + + response = NewDescribeVpnGatewaysResponse() + err = c.Send(request, response) + return +} + +// DescribeVpnGateways +// 本接口(DescribeVpnGateways)用于查询VPN网关列表。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" +// INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" +// INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// INVALIDVPNGATEWAYID_MALFORMED = "InvalidVpnGatewayId.Malformed" +// INVALIDVPNGATEWAYID_NOTFOUND = "InvalidVpnGatewayId.NotFound" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeVpnGatewaysWithContext(ctx context.Context, request *DescribeVpnGatewaysRequest) (response *DescribeVpnGatewaysResponse, err error) { + if request == nil { + request = NewDescribeVpnGatewaysRequest() + } + request.SetContext(ctx) + + response = NewDescribeVpnGatewaysResponse() + err = c.Send(request, response) + return +} + +func NewDetachCcnInstancesRequest() (request *DetachCcnInstancesRequest) { + request = &DetachCcnInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DetachCcnInstances") + + return +} + +func NewDetachCcnInstancesResponse() (response *DetachCcnInstancesResponse) { + response = &DetachCcnInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DetachCcnInstances +// 本接口(DetachCcnInstances)用于从云联网实例中解关联指定的网络实例。<br /> +// +// 解关联网络实例后,相应的路由策略会一并删除。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" +// UNSUPPORTEDOPERATION_APPIDNOTFOUND = "UnsupportedOperation.AppIdNotFound" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DetachCcnInstances(request *DetachCcnInstancesRequest) (response *DetachCcnInstancesResponse, err error) { + if request == nil { + request = NewDetachCcnInstancesRequest() + } + + response = NewDetachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +// DetachCcnInstances +// 本接口(DetachCcnInstances)用于从云联网实例中解关联指定的网络实例。<br /> +// +// 解关联网络实例后,相应的路由策略会一并删除。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" +// UNSUPPORTEDOPERATION_APPIDNOTFOUND = "UnsupportedOperation.AppIdNotFound" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) DetachCcnInstancesWithContext(ctx context.Context, request *DetachCcnInstancesRequest) (response *DetachCcnInstancesResponse, err error) { + if request == nil { + request = NewDetachCcnInstancesRequest() + } + request.SetContext(ctx) + + response = NewDetachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDetachClassicLinkVpcRequest() (request *DetachClassicLinkVpcRequest) { + request = &DetachClassicLinkVpcRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DetachClassicLinkVpc") + + return +} + +func NewDetachClassicLinkVpcResponse() (response *DetachClassicLinkVpcResponse) { + response = &DetachClassicLinkVpcResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DetachClassicLinkVpc +// 本接口(DetachClassicLinkVpc)用于删除私有网络和基础网络设备互通。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DetachClassicLinkVpc(request *DetachClassicLinkVpcRequest) (response *DetachClassicLinkVpcResponse, err error) { + if request == nil { + request = NewDetachClassicLinkVpcRequest() + } + + response = NewDetachClassicLinkVpcResponse() + err = c.Send(request, response) + return +} + +// DetachClassicLinkVpc +// 本接口(DetachClassicLinkVpc)用于删除私有网络和基础网络设备互通。 +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DetachClassicLinkVpcWithContext(ctx context.Context, request *DetachClassicLinkVpcRequest) (response *DetachClassicLinkVpcResponse, err error) { + if request == nil { + request = NewDetachClassicLinkVpcRequest() + } + request.SetContext(ctx) + + response = NewDetachClassicLinkVpcResponse() + err = c.Send(request, response) + return +} + +func NewDetachNetworkInterfaceRequest() (request *DetachNetworkInterfaceRequest) { + request = &DetachNetworkInterfaceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DetachNetworkInterface") + + return +} + +func NewDetachNetworkInterfaceResponse() (response *DetachNetworkInterfaceResponse) { + response = &DetachNetworkInterfaceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DetachNetworkInterface +// 本接口(DetachNetworkInterface)用于弹性网卡解绑云服务器。 +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) DetachNetworkInterface(request *DetachNetworkInterfaceRequest) (response *DetachNetworkInterfaceResponse, err error) { + if request == nil { + request = NewDetachNetworkInterfaceRequest() + } + + response = NewDetachNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +// DetachNetworkInterface +// 本接口(DetachNetworkInterface)用于弹性网卡解绑云服务器。 +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) DetachNetworkInterfaceWithContext(ctx context.Context, request *DetachNetworkInterfaceRequest) (response *DetachNetworkInterfaceResponse, err error) { + if request == nil { + request = NewDetachNetworkInterfaceRequest() + } + request.SetContext(ctx) + + response = NewDetachNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +func NewDisableCcnRoutesRequest() (request *DisableCcnRoutesRequest) { + request = &DisableCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisableCcnRoutes") + + return +} + +func NewDisableCcnRoutesResponse() (response *DisableCcnRoutesResponse) { + response = &DisableCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisableCcnRoutes +// 本接口(DisableCcnRoutes)用于禁用已经启用的云联网(CCN)路由 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DisableCcnRoutes(request *DisableCcnRoutesRequest) (response *DisableCcnRoutesResponse, err error) { + if request == nil { + request = NewDisableCcnRoutesRequest() + } + + response = NewDisableCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// DisableCcnRoutes +// 本接口(DisableCcnRoutes)用于禁用已经启用的云联网(CCN)路由 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DisableCcnRoutesWithContext(ctx context.Context, request *DisableCcnRoutesRequest) (response *DisableCcnRoutesResponse, err error) { + if request == nil { + request = NewDisableCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewDisableCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDisableGatewayFlowMonitorRequest() (request *DisableGatewayFlowMonitorRequest) { + request = &DisableGatewayFlowMonitorRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisableGatewayFlowMonitor") + + return +} + +func NewDisableGatewayFlowMonitorResponse() (response *DisableGatewayFlowMonitorResponse) { + response = &DisableGatewayFlowMonitorResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisableGatewayFlowMonitor +// 本接口(DisableGatewayFlowMonitor)用于关闭网关流量监控。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) DisableGatewayFlowMonitor(request *DisableGatewayFlowMonitorRequest) (response *DisableGatewayFlowMonitorResponse, err error) { + if request == nil { + request = NewDisableGatewayFlowMonitorRequest() + } + + response = NewDisableGatewayFlowMonitorResponse() + err = c.Send(request, response) + return +} + +// DisableGatewayFlowMonitor +// 本接口(DisableGatewayFlowMonitor)用于关闭网关流量监控。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) DisableGatewayFlowMonitorWithContext(ctx context.Context, request *DisableGatewayFlowMonitorRequest) (response *DisableGatewayFlowMonitorResponse, err error) { + if request == nil { + request = NewDisableGatewayFlowMonitorRequest() + } + request.SetContext(ctx) + + response = NewDisableGatewayFlowMonitorResponse() + err = c.Send(request, response) + return +} + +func NewDisableRoutesRequest() (request *DisableRoutesRequest) { + request = &DisableRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisableRoutes") + + return +} + +func NewDisableRoutesResponse() (response *DisableRoutesResponse) { + response = &DisableRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisableRoutes +// 本接口(DisableRoutes)用于禁用已启用的子网路由 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_DISABLEDNOTIFYCCN = "UnsupportedOperation.DisabledNotifyCcn" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) DisableRoutes(request *DisableRoutesRequest) (response *DisableRoutesResponse, err error) { + if request == nil { + request = NewDisableRoutesRequest() + } + + response = NewDisableRoutesResponse() + err = c.Send(request, response) + return +} + +// DisableRoutes +// 本接口(DisableRoutes)用于禁用已启用的子网路由 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_DISABLEDNOTIFYCCN = "UnsupportedOperation.DisabledNotifyCcn" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) DisableRoutesWithContext(ctx context.Context, request *DisableRoutesRequest) (response *DisableRoutesResponse, err error) { + if request == nil { + request = NewDisableRoutesRequest() + } + request.SetContext(ctx) + + response = NewDisableRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateAddressRequest() (request *DisassociateAddressRequest) { + request = &DisassociateAddressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisassociateAddress") + + return +} + +func NewDisassociateAddressResponse() (response *DisassociateAddressResponse) { + response = &DisassociateAddressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateAddress +// 本接口 (DisassociateAddress) 用于解绑[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)。 +// +// * 支持CVM实例,弹性网卡上的EIP解绑 +// +// * 不支持NAT上的EIP解绑。NAT上的EIP解绑请参考[DisassociateNatGatewayAddress](https://cloud.tencent.com/document/api/215/36716) +// +// * 只有状态为 BIND 和 BIND_ENI 的 EIP 才能进行解绑定操作。 +// +// * EIP 如果被封堵,则不能进行解绑定操作。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED_DAILYALLOCATE = "AddressQuotaLimitExceeded.DailyAllocate" +// FAILEDOPERATION_ADDRESSENIINFONOTFOUND = "FailedOperation.AddressEniInfoNotFound" +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDADDRESSIDSTATUS_NOTPERMIT = "InvalidAddressIdStatus.NotPermit" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_ONLYSUPPORTEDFORMASTERNETWORKCARD = "InvalidParameterValue.OnlySupportedForMasterNetworkCard" +// INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +func (c *Client) DisassociateAddress(request *DisassociateAddressRequest) (response *DisassociateAddressResponse, err error) { + if request == nil { + request = NewDisassociateAddressRequest() + } + + response = NewDisassociateAddressResponse() + err = c.Send(request, response) + return +} + +// DisassociateAddress +// 本接口 (DisassociateAddress) 用于解绑[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)。 +// +// * 支持CVM实例,弹性网卡上的EIP解绑 +// +// * 不支持NAT上的EIP解绑。NAT上的EIP解绑请参考[DisassociateNatGatewayAddress](https://cloud.tencent.com/document/api/215/36716) +// +// * 只有状态为 BIND 和 BIND_ENI 的 EIP 才能进行解绑定操作。 +// +// * EIP 如果被封堵,则不能进行解绑定操作。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED_DAILYALLOCATE = "AddressQuotaLimitExceeded.DailyAllocate" +// FAILEDOPERATION_ADDRESSENIINFONOTFOUND = "FailedOperation.AddressEniInfoNotFound" +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDADDRESSIDSTATUS_NOTPERMIT = "InvalidAddressIdStatus.NotPermit" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_ONLYSUPPORTEDFORMASTERNETWORKCARD = "InvalidParameterValue.OnlySupportedForMasterNetworkCard" +// INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +func (c *Client) DisassociateAddressWithContext(ctx context.Context, request *DisassociateAddressRequest) (response *DisassociateAddressResponse, err error) { + if request == nil { + request = NewDisassociateAddressRequest() + } + request.SetContext(ctx) + + response = NewDisassociateAddressResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateDhcpIpWithAddressIpRequest() (request *DisassociateDhcpIpWithAddressIpRequest) { + request = &DisassociateDhcpIpWithAddressIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisassociateDhcpIpWithAddressIp") + + return +} + +func NewDisassociateDhcpIpWithAddressIpResponse() (response *DisassociateDhcpIpWithAddressIpResponse) { + response = &DisassociateDhcpIpWithAddressIpResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateDhcpIpWithAddressIp +// 本接口(DisassociateDhcpIpWithAddressIp)用于将DhcpIp已绑定的弹性公网IP(EIP)解除绑定。<br /> +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" +func (c *Client) DisassociateDhcpIpWithAddressIp(request *DisassociateDhcpIpWithAddressIpRequest) (response *DisassociateDhcpIpWithAddressIpResponse, err error) { + if request == nil { + request = NewDisassociateDhcpIpWithAddressIpRequest() + } + + response = NewDisassociateDhcpIpWithAddressIpResponse() + err = c.Send(request, response) + return +} + +// DisassociateDhcpIpWithAddressIp +// 本接口(DisassociateDhcpIpWithAddressIp)用于将DhcpIp已绑定的弹性公网IP(EIP)解除绑定。<br /> +// +// >?本接口为异步接口,可调用 [DescribeVpcTaskResult](https://cloud.tencent.com/document/api/215/59037) 接口查询任务执行结果,待任务执行成功后再进行其他操作。 +// +// > +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" +func (c *Client) DisassociateDhcpIpWithAddressIpWithContext(ctx context.Context, request *DisassociateDhcpIpWithAddressIpRequest) (response *DisassociateDhcpIpWithAddressIpResponse, err error) { + if request == nil { + request = NewDisassociateDhcpIpWithAddressIpRequest() + } + request.SetContext(ctx) + + response = NewDisassociateDhcpIpWithAddressIpResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateDirectConnectGatewayNatGatewayRequest() (request *DisassociateDirectConnectGatewayNatGatewayRequest) { + request = &DisassociateDirectConnectGatewayNatGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisassociateDirectConnectGatewayNatGateway") + + return +} + +func NewDisassociateDirectConnectGatewayNatGatewayResponse() (response *DisassociateDirectConnectGatewayNatGatewayResponse) { + response = &DisassociateDirectConnectGatewayNatGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateDirectConnectGatewayNatGateway +// 将专线网关与NAT网关解绑,解绑之后,专线网关将不能通过NAT网关访问公网 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DisassociateDirectConnectGatewayNatGateway(request *DisassociateDirectConnectGatewayNatGatewayRequest) (response *DisassociateDirectConnectGatewayNatGatewayResponse, err error) { + if request == nil { + request = NewDisassociateDirectConnectGatewayNatGatewayRequest() + } + + response = NewDisassociateDirectConnectGatewayNatGatewayResponse() + err = c.Send(request, response) + return +} + +// DisassociateDirectConnectGatewayNatGateway +// 将专线网关与NAT网关解绑,解绑之后,专线网关将不能通过NAT网关访问公网 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DisassociateDirectConnectGatewayNatGatewayWithContext(ctx context.Context, request *DisassociateDirectConnectGatewayNatGatewayRequest) (response *DisassociateDirectConnectGatewayNatGatewayResponse, err error) { + if request == nil { + request = NewDisassociateDirectConnectGatewayNatGatewayRequest() + } + request.SetContext(ctx) + + response = NewDisassociateDirectConnectGatewayNatGatewayResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateNatGatewayAddressRequest() (request *DisassociateNatGatewayAddressRequest) { + request = &DisassociateNatGatewayAddressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisassociateNatGatewayAddress") + + return +} + +func NewDisassociateNatGatewayAddressResponse() (response *DisassociateNatGatewayAddressResponse) { + response = &DisassociateNatGatewayAddressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateNatGatewayAddress +// 本接口(DisassociateNatGatewayAddress)用于NAT网关解绑弹性IP。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSDISASSOCIATE = "UnsupportedOperation.PublicIpAddressDisassociate" +func (c *Client) DisassociateNatGatewayAddress(request *DisassociateNatGatewayAddressRequest) (response *DisassociateNatGatewayAddressResponse, err error) { + if request == nil { + request = NewDisassociateNatGatewayAddressRequest() + } + + response = NewDisassociateNatGatewayAddressResponse() + err = c.Send(request, response) + return +} + +// DisassociateNatGatewayAddress +// 本接口(DisassociateNatGatewayAddress)用于NAT网关解绑弹性IP。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_PUBLICIPADDRESSDISASSOCIATE = "UnsupportedOperation.PublicIpAddressDisassociate" +func (c *Client) DisassociateNatGatewayAddressWithContext(ctx context.Context, request *DisassociateNatGatewayAddressRequest) (response *DisassociateNatGatewayAddressResponse, err error) { + if request == nil { + request = NewDisassociateNatGatewayAddressRequest() + } + request.SetContext(ctx) + + response = NewDisassociateNatGatewayAddressResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateNetworkAclSubnetsRequest() (request *DisassociateNetworkAclSubnetsRequest) { + request = &DisassociateNetworkAclSubnetsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisassociateNetworkAclSubnets") + + return +} + +func NewDisassociateNetworkAclSubnetsResponse() (response *DisassociateNetworkAclSubnetsResponse) { + response = &DisassociateNetworkAclSubnetsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateNetworkAclSubnets +// 本接口(DisassociateNetworkAclSubnets)用于网络ACL解关联vpc下的子网。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) DisassociateNetworkAclSubnets(request *DisassociateNetworkAclSubnetsRequest) (response *DisassociateNetworkAclSubnetsResponse, err error) { + if request == nil { + request = NewDisassociateNetworkAclSubnetsRequest() + } + + response = NewDisassociateNetworkAclSubnetsResponse() + err = c.Send(request, response) + return +} + +// DisassociateNetworkAclSubnets +// 本接口(DisassociateNetworkAclSubnets)用于网络ACL解关联vpc下的子网。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) DisassociateNetworkAclSubnetsWithContext(ctx context.Context, request *DisassociateNetworkAclSubnetsRequest) (response *DisassociateNetworkAclSubnetsResponse, err error) { + if request == nil { + request = NewDisassociateNetworkAclSubnetsRequest() + } + request.SetContext(ctx) + + response = NewDisassociateNetworkAclSubnetsResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateNetworkInterfaceSecurityGroupsRequest() (request *DisassociateNetworkInterfaceSecurityGroupsRequest) { + request = &DisassociateNetworkInterfaceSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisassociateNetworkInterfaceSecurityGroups") + + return +} + +func NewDisassociateNetworkInterfaceSecurityGroupsResponse() (response *DisassociateNetworkInterfaceSecurityGroupsResponse) { + response = &DisassociateNetworkInterfaceSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateNetworkInterfaceSecurityGroups +// 本接口(DisassociateNetworkInterfaceSecurityGroups)用于弹性网卡解绑安全组。支持弹性网卡完全解绑安全组。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DisassociateNetworkInterfaceSecurityGroups(request *DisassociateNetworkInterfaceSecurityGroupsRequest) (response *DisassociateNetworkInterfaceSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateNetworkInterfaceSecurityGroupsRequest() + } + + response = NewDisassociateNetworkInterfaceSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// DisassociateNetworkInterfaceSecurityGroups +// 本接口(DisassociateNetworkInterfaceSecurityGroups)用于弹性网卡解绑安全组。支持弹性网卡完全解绑安全组。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DisassociateNetworkInterfaceSecurityGroupsWithContext(ctx context.Context, request *DisassociateNetworkInterfaceSecurityGroupsRequest) (response *DisassociateNetworkInterfaceSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateNetworkInterfaceSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewDisassociateNetworkInterfaceSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDisassociateVpcEndPointSecurityGroupsRequest() (request *DisassociateVpcEndPointSecurityGroupsRequest) { + request = &DisassociateVpcEndPointSecurityGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DisassociateVpcEndPointSecurityGroups") + + return +} + +func NewDisassociateVpcEndPointSecurityGroupsResponse() (response *DisassociateVpcEndPointSecurityGroupsResponse) { + response = &DisassociateVpcEndPointSecurityGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisassociateVpcEndPointSecurityGroups +// 终端节点解绑安全组。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DisassociateVpcEndPointSecurityGroups(request *DisassociateVpcEndPointSecurityGroupsRequest) (response *DisassociateVpcEndPointSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateVpcEndPointSecurityGroupsRequest() + } + + response = NewDisassociateVpcEndPointSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +// DisassociateVpcEndPointSecurityGroups +// 终端节点解绑安全组。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DisassociateVpcEndPointSecurityGroupsWithContext(ctx context.Context, request *DisassociateVpcEndPointSecurityGroupsRequest) (response *DisassociateVpcEndPointSecurityGroupsResponse, err error) { + if request == nil { + request = NewDisassociateVpcEndPointSecurityGroupsRequest() + } + request.SetContext(ctx) + + response = NewDisassociateVpcEndPointSecurityGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDownloadCustomerGatewayConfigurationRequest() (request *DownloadCustomerGatewayConfigurationRequest) { + request = &DownloadCustomerGatewayConfigurationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "DownloadCustomerGatewayConfiguration") + + return +} + +func NewDownloadCustomerGatewayConfigurationResponse() (response *DownloadCustomerGatewayConfigurationResponse) { + response = &DownloadCustomerGatewayConfigurationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DownloadCustomerGatewayConfiguration +// 本接口(DownloadCustomerGatewayConfiguration)用于下载VPN通道配置。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DownloadCustomerGatewayConfiguration(request *DownloadCustomerGatewayConfigurationRequest) (response *DownloadCustomerGatewayConfigurationResponse, err error) { + if request == nil { + request = NewDownloadCustomerGatewayConfigurationRequest() + } + + response = NewDownloadCustomerGatewayConfigurationResponse() + err = c.Send(request, response) + return +} + +// DownloadCustomerGatewayConfiguration +// 本接口(DownloadCustomerGatewayConfiguration)用于下载VPN通道配置。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DownloadCustomerGatewayConfigurationWithContext(ctx context.Context, request *DownloadCustomerGatewayConfigurationRequest) (response *DownloadCustomerGatewayConfigurationResponse, err error) { + if request == nil { + request = NewDownloadCustomerGatewayConfigurationRequest() + } + request.SetContext(ctx) + + response = NewDownloadCustomerGatewayConfigurationResponse() + err = c.Send(request, response) + return +} + +func NewEnableCcnRoutesRequest() (request *EnableCcnRoutesRequest) { + request = &EnableCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "EnableCcnRoutes") + + return +} + +func NewEnableCcnRoutesResponse() (response *EnableCcnRoutesResponse) { + response = &EnableCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableCcnRoutes +// 本接口(EnableCcnRoutes)用于启用已经加入云联网(CCN)的路由。<br /> +// +// 本接口会校验启用后,是否与已有路由冲突,如果冲突,则无法启用,失败处理。路由冲突时,需要先禁用与之冲突的路由,才能启用该路由。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +func (c *Client) EnableCcnRoutes(request *EnableCcnRoutesRequest) (response *EnableCcnRoutesResponse, err error) { + if request == nil { + request = NewEnableCcnRoutesRequest() + } + + response = NewEnableCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// EnableCcnRoutes +// 本接口(EnableCcnRoutes)用于启用已经加入云联网(CCN)的路由。<br /> +// +// 本接口会校验启用后,是否与已有路由冲突,如果冲突,则无法启用,失败处理。路由冲突时,需要先禁用与之冲突的路由,才能启用该路由。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +func (c *Client) EnableCcnRoutesWithContext(ctx context.Context, request *EnableCcnRoutesRequest) (response *EnableCcnRoutesResponse, err error) { + if request == nil { + request = NewEnableCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewEnableCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewEnableGatewayFlowMonitorRequest() (request *EnableGatewayFlowMonitorRequest) { + request = &EnableGatewayFlowMonitorRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "EnableGatewayFlowMonitor") + + return +} + +func NewEnableGatewayFlowMonitorResponse() (response *EnableGatewayFlowMonitorResponse) { + response = &EnableGatewayFlowMonitorResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableGatewayFlowMonitor +// 本接口(EnableGatewayFlowMonitor)用于开启网关流量监控。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) EnableGatewayFlowMonitor(request *EnableGatewayFlowMonitorRequest) (response *EnableGatewayFlowMonitorResponse, err error) { + if request == nil { + request = NewEnableGatewayFlowMonitorRequest() + } + + response = NewEnableGatewayFlowMonitorResponse() + err = c.Send(request, response) + return +} + +// EnableGatewayFlowMonitor +// 本接口(EnableGatewayFlowMonitor)用于开启网关流量监控。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) EnableGatewayFlowMonitorWithContext(ctx context.Context, request *EnableGatewayFlowMonitorRequest) (response *EnableGatewayFlowMonitorResponse, err error) { + if request == nil { + request = NewEnableGatewayFlowMonitorRequest() + } + request.SetContext(ctx) + + response = NewEnableGatewayFlowMonitorResponse() + err = c.Send(request, response) + return +} + +func NewEnableRoutesRequest() (request *EnableRoutesRequest) { + request = &EnableRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "EnableRoutes") + + return +} + +func NewEnableRoutesResponse() (response *EnableRoutesResponse) { + response = &EnableRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableRoutes +// 本接口(EnableRoutes)用于启用已禁用的子网路由。<br /> +// +// 本接口会校验启用后,是否与已有路由冲突,如果冲突,则无法启用,失败处理。路由冲突时,需要先禁用与之冲突的路由,才能启用该路由。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +// UNSUPPORTEDOPERATION_ECMPWITHCCNROUTE = "UnsupportedOperation.EcmpWithCcnRoute" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) EnableRoutes(request *EnableRoutesRequest) (response *EnableRoutesResponse, err error) { + if request == nil { + request = NewEnableRoutesRequest() + } + + response = NewEnableRoutesResponse() + err = c.Send(request, response) + return +} + +// EnableRoutes +// 本接口(EnableRoutes)用于启用已禁用的子网路由。<br /> +// +// 本接口会校验启用后,是否与已有路由冲突,如果冲突,则无法启用,失败处理。路由冲突时,需要先禁用与之冲突的路由,才能启用该路由。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +// UNSUPPORTEDOPERATION_ECMPWITHCCNROUTE = "UnsupportedOperation.EcmpWithCcnRoute" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) EnableRoutesWithContext(ctx context.Context, request *EnableRoutesRequest) (response *EnableRoutesResponse, err error) { + if request == nil { + request = NewEnableRoutesRequest() + } + request.SetContext(ctx) + + response = NewEnableRoutesResponse() + err = c.Send(request, response) + return +} + +func NewEnableVpcEndPointConnectRequest() (request *EnableVpcEndPointConnectRequest) { + request = &EnableVpcEndPointConnectRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "EnableVpcEndPointConnect") + + return +} + +func NewEnableVpcEndPointConnectResponse() (response *EnableVpcEndPointConnectResponse) { + response = &EnableVpcEndPointConnectResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableVpcEndPointConnect +// 是否接受终端节点连接请求。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) EnableVpcEndPointConnect(request *EnableVpcEndPointConnectRequest) (response *EnableVpcEndPointConnectResponse, err error) { + if request == nil { + request = NewEnableVpcEndPointConnectRequest() + } + + response = NewEnableVpcEndPointConnectResponse() + err = c.Send(request, response) + return +} + +// EnableVpcEndPointConnect +// 是否接受终端节点连接请求。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) EnableVpcEndPointConnectWithContext(ctx context.Context, request *EnableVpcEndPointConnectRequest) (response *EnableVpcEndPointConnectResponse, err error) { + if request == nil { + request = NewEnableVpcEndPointConnectRequest() + } + request.SetContext(ctx) + + response = NewEnableVpcEndPointConnectResponse() + err = c.Send(request, response) + return +} + +func NewGetCcnRegionBandwidthLimitsRequest() (request *GetCcnRegionBandwidthLimitsRequest) { + request = &GetCcnRegionBandwidthLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "GetCcnRegionBandwidthLimits") + + return +} + +func NewGetCcnRegionBandwidthLimitsResponse() (response *GetCcnRegionBandwidthLimitsResponse) { + response = &GetCcnRegionBandwidthLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// GetCcnRegionBandwidthLimits +// 本接口(GetCcnRegionBandwidthLimits)用于查询云联网相关地域带宽信息,其中预付费模式的云联网仅支持地域间限速,后付费模式的云联网支持地域间限速和地域出口限速。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) GetCcnRegionBandwidthLimits(request *GetCcnRegionBandwidthLimitsRequest) (response *GetCcnRegionBandwidthLimitsResponse, err error) { + if request == nil { + request = NewGetCcnRegionBandwidthLimitsRequest() + } + + response = NewGetCcnRegionBandwidthLimitsResponse() + err = c.Send(request, response) + return +} + +// GetCcnRegionBandwidthLimits +// 本接口(GetCcnRegionBandwidthLimits)用于查询云联网相关地域带宽信息,其中预付费模式的云联网仅支持地域间限速,后付费模式的云联网支持地域间限速和地域出口限速。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) GetCcnRegionBandwidthLimitsWithContext(ctx context.Context, request *GetCcnRegionBandwidthLimitsRequest) (response *GetCcnRegionBandwidthLimitsResponse, err error) { + if request == nil { + request = NewGetCcnRegionBandwidthLimitsRequest() + } + request.SetContext(ctx) + + response = NewGetCcnRegionBandwidthLimitsResponse() + err = c.Send(request, response) + return +} + +func NewHaVipAssociateAddressIpRequest() (request *HaVipAssociateAddressIpRequest) { + request = &HaVipAssociateAddressIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "HaVipAssociateAddressIp") + + return +} + +func NewHaVipAssociateAddressIpResponse() (response *HaVipAssociateAddressIpResponse) { + response = &HaVipAssociateAddressIpResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// HaVipAssociateAddressIp +// 本接口(HaVipAssociateAddressIp)用于高可用虚拟IP(HAVIP)绑定弹性公网IP(EIP)。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_BINDEIP = "UnsupportedOperation.BindEIP" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) HaVipAssociateAddressIp(request *HaVipAssociateAddressIpRequest) (response *HaVipAssociateAddressIpResponse, err error) { + if request == nil { + request = NewHaVipAssociateAddressIpRequest() + } + + response = NewHaVipAssociateAddressIpResponse() + err = c.Send(request, response) + return +} + +// HaVipAssociateAddressIp +// 本接口(HaVipAssociateAddressIp)用于高可用虚拟IP(HAVIP)绑定弹性公网IP(EIP)。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_BINDEIP = "UnsupportedOperation.BindEIP" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) HaVipAssociateAddressIpWithContext(ctx context.Context, request *HaVipAssociateAddressIpRequest) (response *HaVipAssociateAddressIpResponse, err error) { + if request == nil { + request = NewHaVipAssociateAddressIpRequest() + } + request.SetContext(ctx) + + response = NewHaVipAssociateAddressIpResponse() + err = c.Send(request, response) + return +} + +func NewHaVipDisassociateAddressIpRequest() (request *HaVipDisassociateAddressIpRequest) { + request = &HaVipDisassociateAddressIpRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "HaVipDisassociateAddressIp") + + return +} + +func NewHaVipDisassociateAddressIpResponse() (response *HaVipDisassociateAddressIpResponse) { + response = &HaVipDisassociateAddressIpResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// HaVipDisassociateAddressIp +// 本接口(HaVipDisassociateAddressIp)用于将高可用虚拟IP(HAVIP)已绑定的弹性公网IP(EIP)解除绑定。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" +func (c *Client) HaVipDisassociateAddressIp(request *HaVipDisassociateAddressIpRequest) (response *HaVipDisassociateAddressIpResponse, err error) { + if request == nil { + request = NewHaVipDisassociateAddressIpRequest() + } + + response = NewHaVipDisassociateAddressIpResponse() + err = c.Send(request, response) + return +} + +// HaVipDisassociateAddressIp +// 本接口(HaVipDisassociateAddressIp)用于将高可用虚拟IP(HAVIP)已绑定的弹性公网IP(EIP)解除绑定。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" +func (c *Client) HaVipDisassociateAddressIpWithContext(ctx context.Context, request *HaVipDisassociateAddressIpRequest) (response *HaVipDisassociateAddressIpResponse, err error) { + if request == nil { + request = NewHaVipDisassociateAddressIpRequest() + } + request.SetContext(ctx) + + response = NewHaVipDisassociateAddressIpResponse() + err = c.Send(request, response) + return +} + +func NewInquirePriceCreateDirectConnectGatewayRequest() (request *InquirePriceCreateDirectConnectGatewayRequest) { + request = &InquirePriceCreateDirectConnectGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "InquirePriceCreateDirectConnectGateway") + + return +} + +func NewInquirePriceCreateDirectConnectGatewayResponse() (response *InquirePriceCreateDirectConnectGatewayResponse) { + response = &InquirePriceCreateDirectConnectGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquirePriceCreateDirectConnectGateway +// 本接口(DescribePriceCreateDirectConnectGateway)用于创建专线网关询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" +func (c *Client) InquirePriceCreateDirectConnectGateway(request *InquirePriceCreateDirectConnectGatewayRequest) (response *InquirePriceCreateDirectConnectGatewayResponse, err error) { + if request == nil { + request = NewInquirePriceCreateDirectConnectGatewayRequest() + } + + response = NewInquirePriceCreateDirectConnectGatewayResponse() + err = c.Send(request, response) + return +} + +// InquirePriceCreateDirectConnectGateway +// 本接口(DescribePriceCreateDirectConnectGateway)用于创建专线网关询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" +func (c *Client) InquirePriceCreateDirectConnectGatewayWithContext(ctx context.Context, request *InquirePriceCreateDirectConnectGatewayRequest) (response *InquirePriceCreateDirectConnectGatewayResponse, err error) { + if request == nil { + request = NewInquirePriceCreateDirectConnectGatewayRequest() + } + request.SetContext(ctx) + + response = NewInquirePriceCreateDirectConnectGatewayResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceCreateVpnGatewayRequest() (request *InquiryPriceCreateVpnGatewayRequest) { + request = &InquiryPriceCreateVpnGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "InquiryPriceCreateVpnGateway") + + return +} + +func NewInquiryPriceCreateVpnGatewayResponse() (response *InquiryPriceCreateVpnGatewayResponse) { + response = &InquiryPriceCreateVpnGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceCreateVpnGateway +// 本接口(InquiryPriceCreateVpnGateway)用于创建VPN网关询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) InquiryPriceCreateVpnGateway(request *InquiryPriceCreateVpnGatewayRequest) (response *InquiryPriceCreateVpnGatewayResponse, err error) { + if request == nil { + request = NewInquiryPriceCreateVpnGatewayRequest() + } + + response = NewInquiryPriceCreateVpnGatewayResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceCreateVpnGateway +// 本接口(InquiryPriceCreateVpnGateway)用于创建VPN网关询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +func (c *Client) InquiryPriceCreateVpnGatewayWithContext(ctx context.Context, request *InquiryPriceCreateVpnGatewayRequest) (response *InquiryPriceCreateVpnGatewayResponse, err error) { + if request == nil { + request = NewInquiryPriceCreateVpnGatewayRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceCreateVpnGatewayResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceRenewVpnGatewayRequest() (request *InquiryPriceRenewVpnGatewayRequest) { + request = &InquiryPriceRenewVpnGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "InquiryPriceRenewVpnGateway") + + return +} + +func NewInquiryPriceRenewVpnGatewayResponse() (response *InquiryPriceRenewVpnGatewayResponse) { + response = &InquiryPriceRenewVpnGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceRenewVpnGateway +// 本接口(InquiryPriceRenewVpnGateway)用于续费VPN网关询价。目前仅支持IPSEC类型网关的询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) InquiryPriceRenewVpnGateway(request *InquiryPriceRenewVpnGatewayRequest) (response *InquiryPriceRenewVpnGatewayResponse, err error) { + if request == nil { + request = NewInquiryPriceRenewVpnGatewayRequest() + } + + response = NewInquiryPriceRenewVpnGatewayResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceRenewVpnGateway +// 本接口(InquiryPriceRenewVpnGateway)用于续费VPN网关询价。目前仅支持IPSEC类型网关的询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) InquiryPriceRenewVpnGatewayWithContext(ctx context.Context, request *InquiryPriceRenewVpnGatewayRequest) (response *InquiryPriceRenewVpnGatewayResponse, err error) { + if request == nil { + request = NewInquiryPriceRenewVpnGatewayRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceRenewVpnGatewayResponse() + err = c.Send(request, response) + return +} + +func NewInquiryPriceResetVpnGatewayInternetMaxBandwidthRequest() (request *InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest) { + request = &InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "InquiryPriceResetVpnGatewayInternetMaxBandwidth") + + return +} + +func NewInquiryPriceResetVpnGatewayInternetMaxBandwidthResponse() (response *InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse) { + response = &InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InquiryPriceResetVpnGatewayInternetMaxBandwidth +// 本接口(InquiryPriceResetVpnGatewayInternetMaxBandwidth)调整VPN网关带宽上限询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) InquiryPriceResetVpnGatewayInternetMaxBandwidth(request *InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest) (response *InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewInquiryPriceResetVpnGatewayInternetMaxBandwidthRequest() + } + + response = NewInquiryPriceResetVpnGatewayInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +// InquiryPriceResetVpnGatewayInternetMaxBandwidth +// 本接口(InquiryPriceResetVpnGatewayInternetMaxBandwidth)调整VPN网关带宽上限询价。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) InquiryPriceResetVpnGatewayInternetMaxBandwidthWithContext(ctx context.Context, request *InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest) (response *InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewInquiryPriceResetVpnGatewayInternetMaxBandwidthRequest() + } + request.SetContext(ctx) + + response = NewInquiryPriceResetVpnGatewayInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewMigrateNetworkInterfaceRequest() (request *MigrateNetworkInterfaceRequest) { + request = &MigrateNetworkInterfaceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "MigrateNetworkInterface") + + return +} + +func NewMigrateNetworkInterfaceResponse() (response *MigrateNetworkInterfaceResponse) { + response = &MigrateNetworkInterfaceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// MigrateNetworkInterface +// 本接口(MigrateNetworkInterface)用于弹性网卡迁移。 +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) MigrateNetworkInterface(request *MigrateNetworkInterfaceRequest) (response *MigrateNetworkInterfaceResponse, err error) { + if request == nil { + request = NewMigrateNetworkInterfaceRequest() + } + + response = NewMigrateNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +// MigrateNetworkInterface +// 本接口(MigrateNetworkInterface)用于弹性网卡迁移。 +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) MigrateNetworkInterfaceWithContext(ctx context.Context, request *MigrateNetworkInterfaceRequest) (response *MigrateNetworkInterfaceResponse, err error) { + if request == nil { + request = NewMigrateNetworkInterfaceRequest() + } + request.SetContext(ctx) + + response = NewMigrateNetworkInterfaceResponse() + err = c.Send(request, response) + return +} + +func NewMigratePrivateIpAddressRequest() (request *MigratePrivateIpAddressRequest) { + request = &MigratePrivateIpAddressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "MigratePrivateIpAddress") + + return +} + +func NewMigratePrivateIpAddressResponse() (response *MigratePrivateIpAddressResponse) { + response = &MigratePrivateIpAddressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// MigratePrivateIpAddress +// 本接口(MigratePrivateIpAddress)用于弹性网卡内网IP迁移。 +// +// * 该接口用于将一个内网IP从一个弹性网卡上迁移到另外一个弹性网卡,主IP地址不支持迁移。 +// +// * 迁移前后的弹性网卡必须在同一个子网内。 +// +// +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_ATTACHMENTNOTFOUND = "UnauthorizedOperation.AttachmentNotFound" +// UNAUTHORIZEDOPERATION_PRIMARYIP = "UnauthorizedOperation.PrimaryIp" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_PRIMARYIP = "UnsupportedOperation.PrimaryIp" +func (c *Client) MigratePrivateIpAddress(request *MigratePrivateIpAddressRequest) (response *MigratePrivateIpAddressResponse, err error) { + if request == nil { + request = NewMigratePrivateIpAddressRequest() + } + + response = NewMigratePrivateIpAddressResponse() + err = c.Send(request, response) + return +} + +// MigratePrivateIpAddress +// 本接口(MigratePrivateIpAddress)用于弹性网卡内网IP迁移。 +// +// * 该接口用于将一个内网IP从一个弹性网卡上迁移到另外一个弹性网卡,主IP地址不支持迁移。 +// +// * 迁移前后的弹性网卡必须在同一个子网内。 +// +// +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_ATTACHMENTNOTFOUND = "UnauthorizedOperation.AttachmentNotFound" +// UNAUTHORIZEDOPERATION_PRIMARYIP = "UnauthorizedOperation.PrimaryIp" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +// UNSUPPORTEDOPERATION_PRIMARYIP = "UnsupportedOperation.PrimaryIp" +func (c *Client) MigratePrivateIpAddressWithContext(ctx context.Context, request *MigratePrivateIpAddressRequest) (response *MigratePrivateIpAddressResponse, err error) { + if request == nil { + request = NewMigratePrivateIpAddressRequest() + } + request.SetContext(ctx) + + response = NewMigratePrivateIpAddressResponse() + err = c.Send(request, response) + return +} + +func NewModifyAddressAttributeRequest() (request *ModifyAddressAttributeRequest) { + request = &ModifyAddressAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyAddressAttribute") + + return +} + +func NewModifyAddressAttributeResponse() (response *ModifyAddressAttributeResponse) { + response = &ModifyAddressAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyAddressAttribute +// 本接口 (ModifyAddressAttribute) 用于修改[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)的名称。 +// +// 可能返回的错误码: +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +func (c *Client) ModifyAddressAttribute(request *ModifyAddressAttributeRequest) (response *ModifyAddressAttributeResponse, err error) { + if request == nil { + request = NewModifyAddressAttributeRequest() + } + + response = NewModifyAddressAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyAddressAttribute +// 本接口 (ModifyAddressAttribute) 用于修改[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)的名称。 +// +// 可能返回的错误码: +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +func (c *Client) ModifyAddressAttributeWithContext(ctx context.Context, request *ModifyAddressAttributeRequest) (response *ModifyAddressAttributeResponse, err error) { + if request == nil { + request = NewModifyAddressAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyAddressAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyAddressInternetChargeTypeRequest() (request *ModifyAddressInternetChargeTypeRequest) { + request = &ModifyAddressInternetChargeTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyAddressInternetChargeType") + + return +} + +func NewModifyAddressInternetChargeTypeResponse() (response *ModifyAddressInternetChargeTypeResponse) { + response = &ModifyAddressInternetChargeTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyAddressInternetChargeType +// 该接口用于调整具有带宽属性弹性公网IP的网络计费模式 +// +// * 支持BANDWIDTH_PREPAID_BY_MONTH和TRAFFIC_POSTPAID_BY_HOUR两种网络计费模式之间的切换。 +// +// * 每个弹性公网IP支持调整两次,次数超出则无法调整。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDADDRESSIDSTATE_INARREARS = "InvalidAddressIdState.InArrears" +// INVALIDADDRESSSTATE = "InvalidAddressState" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTCALCIP = "InvalidParameterValue.AddressNotCalcIP" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_INTERNETCHARGETYPENOTCHANGED = "InvalidParameterValue.InternetChargeTypeNotChanged" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// LIMITEXCEEDED = "LimitExceeded" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +// UNSUPPORTEDOPERATION_NATNOTSUPPORTED = "UnsupportedOperation.NatNotSupported" +func (c *Client) ModifyAddressInternetChargeType(request *ModifyAddressInternetChargeTypeRequest) (response *ModifyAddressInternetChargeTypeResponse, err error) { + if request == nil { + request = NewModifyAddressInternetChargeTypeRequest() + } + + response = NewModifyAddressInternetChargeTypeResponse() + err = c.Send(request, response) + return +} + +// ModifyAddressInternetChargeType +// 该接口用于调整具有带宽属性弹性公网IP的网络计费模式 +// +// * 支持BANDWIDTH_PREPAID_BY_MONTH和TRAFFIC_POSTPAID_BY_HOUR两种网络计费模式之间的切换。 +// +// * 每个弹性公网IP支持调整两次,次数超出则无法调整。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDADDRESSIDSTATE_INARREARS = "InvalidAddressIdState.InArrears" +// INVALIDADDRESSSTATE = "InvalidAddressState" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTCALCIP = "InvalidParameterValue.AddressNotCalcIP" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_INTERNETCHARGETYPENOTCHANGED = "InvalidParameterValue.InternetChargeTypeNotChanged" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +// LIMITEXCEEDED = "LimitExceeded" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" +// UNSUPPORTEDOPERATION_NATNOTSUPPORTED = "UnsupportedOperation.NatNotSupported" +func (c *Client) ModifyAddressInternetChargeTypeWithContext(ctx context.Context, request *ModifyAddressInternetChargeTypeRequest) (response *ModifyAddressInternetChargeTypeResponse, err error) { + if request == nil { + request = NewModifyAddressInternetChargeTypeRequest() + } + request.SetContext(ctx) + + response = NewModifyAddressInternetChargeTypeResponse() + err = c.Send(request, response) + return +} + +func NewModifyAddressTemplateAttributeRequest() (request *ModifyAddressTemplateAttributeRequest) { + request = &ModifyAddressTemplateAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyAddressTemplateAttribute") + + return +} + +func NewModifyAddressTemplateAttributeResponse() (response *ModifyAddressTemplateAttributeResponse) { + response = &ModifyAddressTemplateAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyAddressTemplateAttribute +// 本接口(ModifyAddressTemplateAttribute)用于修改IP地址模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) ModifyAddressTemplateAttribute(request *ModifyAddressTemplateAttributeRequest) (response *ModifyAddressTemplateAttributeResponse, err error) { + if request == nil { + request = NewModifyAddressTemplateAttributeRequest() + } + + response = NewModifyAddressTemplateAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyAddressTemplateAttribute +// 本接口(ModifyAddressTemplateAttribute)用于修改IP地址模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) ModifyAddressTemplateAttributeWithContext(ctx context.Context, request *ModifyAddressTemplateAttributeRequest) (response *ModifyAddressTemplateAttributeResponse, err error) { + if request == nil { + request = NewModifyAddressTemplateAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyAddressTemplateAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyAddressTemplateGroupAttributeRequest() (request *ModifyAddressTemplateGroupAttributeRequest) { + request = &ModifyAddressTemplateGroupAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyAddressTemplateGroupAttribute") + + return +} + +func NewModifyAddressTemplateGroupAttributeResponse() (response *ModifyAddressTemplateGroupAttributeResponse) { + response = &ModifyAddressTemplateGroupAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyAddressTemplateGroupAttribute +// 本接口(ModifyAddressTemplateGroupAttribute)用于修改IP地址模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) ModifyAddressTemplateGroupAttribute(request *ModifyAddressTemplateGroupAttributeRequest) (response *ModifyAddressTemplateGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyAddressTemplateGroupAttributeRequest() + } + + response = NewModifyAddressTemplateGroupAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyAddressTemplateGroupAttribute +// 本接口(ModifyAddressTemplateGroupAttribute)用于修改IP地址模板集合 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) ModifyAddressTemplateGroupAttributeWithContext(ctx context.Context, request *ModifyAddressTemplateGroupAttributeRequest) (response *ModifyAddressTemplateGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyAddressTemplateGroupAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyAddressTemplateGroupAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyAddressesBandwidthRequest() (request *ModifyAddressesBandwidthRequest) { + request = &ModifyAddressesBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyAddressesBandwidth") + + return +} + +func NewModifyAddressesBandwidthResponse() (response *ModifyAddressesBandwidthResponse) { + response = &ModifyAddressesBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyAddressesBandwidth +// 本接口(ModifyAddressesBandwidth)用于调整[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称EIP)带宽,支持后付费EIP, 预付费EIP和带宽包EIP +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_BANDWIDTHOUTOFRANGE = "InvalidParameterValue.BandwidthOutOfRange" +// INVALIDPARAMETERVALUE_BANDWIDTHTOOSMALL = "InvalidParameterValue.BandwidthTooSmall" +// INVALIDPARAMETERVALUE_INCONSISTENTINSTANCEINTERNETCHARGETYPE = "InvalidParameterValue.InconsistentInstanceInternetChargeType" +// INVALIDPARAMETERVALUE_INSTANCENOCALCIP = "InvalidParameterValue.InstanceNoCalcIP" +// INVALIDPARAMETERVALUE_INSTANCENOWANIP = "InvalidParameterValue.InstanceNoWanIP" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RESOURCEEXPIRED = "InvalidParameterValue.ResourceExpired" +// INVALIDPARAMETERVALUE_RESOURCENOTEXISTED = "InvalidParameterValue.ResourceNotExisted" +// INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +func (c *Client) ModifyAddressesBandwidth(request *ModifyAddressesBandwidthRequest) (response *ModifyAddressesBandwidthResponse, err error) { + if request == nil { + request = NewModifyAddressesBandwidthRequest() + } + + response = NewModifyAddressesBandwidthResponse() + err = c.Send(request, response) + return +} + +// ModifyAddressesBandwidth +// 本接口(ModifyAddressesBandwidth)用于调整[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称EIP)带宽,支持后付费EIP, 预付费EIP和带宽包EIP +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// INVALIDPARAMETERVALUE_BANDWIDTHOUTOFRANGE = "InvalidParameterValue.BandwidthOutOfRange" +// INVALIDPARAMETERVALUE_BANDWIDTHTOOSMALL = "InvalidParameterValue.BandwidthTooSmall" +// INVALIDPARAMETERVALUE_INCONSISTENTINSTANCEINTERNETCHARGETYPE = "InvalidParameterValue.InconsistentInstanceInternetChargeType" +// INVALIDPARAMETERVALUE_INSTANCENOCALCIP = "InvalidParameterValue.InstanceNoCalcIP" +// INVALIDPARAMETERVALUE_INSTANCENOWANIP = "InvalidParameterValue.InstanceNoWanIP" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_RESOURCEEXPIRED = "InvalidParameterValue.ResourceExpired" +// INVALIDPARAMETERVALUE_RESOURCENOTEXISTED = "InvalidParameterValue.ResourceNotExisted" +// INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" +// UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" +func (c *Client) ModifyAddressesBandwidthWithContext(ctx context.Context, request *ModifyAddressesBandwidthRequest) (response *ModifyAddressesBandwidthResponse, err error) { + if request == nil { + request = NewModifyAddressesBandwidthRequest() + } + request.SetContext(ctx) + + response = NewModifyAddressesBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewModifyAssistantCidrRequest() (request *ModifyAssistantCidrRequest) { + request = &ModifyAssistantCidrRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyAssistantCidr") + + return +} + +func NewModifyAssistantCidrResponse() (response *ModifyAssistantCidrResponse) { + response = &ModifyAssistantCidrResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyAssistantCidr +// 本接口(ModifyAssistantCidr)用于批量修改辅助CIDR,支持新增和删除。(接口灰度中,如需使用请提工单。) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETOVERLAPASSISTCIDR = "InvalidParameterValue.SubnetOverlapAssistCidr" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyAssistantCidr(request *ModifyAssistantCidrRequest) (response *ModifyAssistantCidrResponse, err error) { + if request == nil { + request = NewModifyAssistantCidrRequest() + } + + response = NewModifyAssistantCidrResponse() + err = c.Send(request, response) + return +} + +// ModifyAssistantCidr +// 本接口(ModifyAssistantCidr)用于批量修改辅助CIDR,支持新增和删除。(接口灰度中,如需使用请提工单。) +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" +// INVALIDPARAMETERVALUE_SUBNETOVERLAPASSISTCIDR = "InvalidParameterValue.SubnetOverlapAssistCidr" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyAssistantCidrWithContext(ctx context.Context, request *ModifyAssistantCidrRequest) (response *ModifyAssistantCidrResponse, err error) { + if request == nil { + request = NewModifyAssistantCidrRequest() + } + request.SetContext(ctx) + + response = NewModifyAssistantCidrResponse() + err = c.Send(request, response) + return +} + +func NewModifyBandwidthPackageAttributeRequest() (request *ModifyBandwidthPackageAttributeRequest) { + request = &ModifyBandwidthPackageAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyBandwidthPackageAttribute") + + return +} + +func NewModifyBandwidthPackageAttributeResponse() (response *ModifyBandwidthPackageAttributeResponse) { + response = &ModifyBandwidthPackageAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyBandwidthPackageAttribute +// 接口用于修改带宽包属性,包括带宽包名字等 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_INVALIDBANDWIDTHPACKAGECHARGETYPE = "InvalidParameterValue.InvalidBandwidthPackageChargeType" +func (c *Client) ModifyBandwidthPackageAttribute(request *ModifyBandwidthPackageAttributeRequest) (response *ModifyBandwidthPackageAttributeResponse, err error) { + if request == nil { + request = NewModifyBandwidthPackageAttributeRequest() + } + + response = NewModifyBandwidthPackageAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyBandwidthPackageAttribute +// 接口用于修改带宽包属性,包括带宽包名字等 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_INVALIDBANDWIDTHPACKAGECHARGETYPE = "InvalidParameterValue.InvalidBandwidthPackageChargeType" +func (c *Client) ModifyBandwidthPackageAttributeWithContext(ctx context.Context, request *ModifyBandwidthPackageAttributeRequest) (response *ModifyBandwidthPackageAttributeResponse, err error) { + if request == nil { + request = NewModifyBandwidthPackageAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyBandwidthPackageAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyCcnAttachedInstancesAttributeRequest() (request *ModifyCcnAttachedInstancesAttributeRequest) { + request = &ModifyCcnAttachedInstancesAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyCcnAttachedInstancesAttribute") + + return +} + +func NewModifyCcnAttachedInstancesAttributeResponse() (response *ModifyCcnAttachedInstancesAttributeResponse) { + response = &ModifyCcnAttachedInstancesAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyCcnAttachedInstancesAttribute +// 修改CCN关联实例属性,目前仅修改备注description +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyCcnAttachedInstancesAttribute(request *ModifyCcnAttachedInstancesAttributeRequest) (response *ModifyCcnAttachedInstancesAttributeResponse, err error) { + if request == nil { + request = NewModifyCcnAttachedInstancesAttributeRequest() + } + + response = NewModifyCcnAttachedInstancesAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyCcnAttachedInstancesAttribute +// 修改CCN关联实例属性,目前仅修改备注description +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyCcnAttachedInstancesAttributeWithContext(ctx context.Context, request *ModifyCcnAttachedInstancesAttributeRequest) (response *ModifyCcnAttachedInstancesAttributeResponse, err error) { + if request == nil { + request = NewModifyCcnAttachedInstancesAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyCcnAttachedInstancesAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyCcnAttributeRequest() (request *ModifyCcnAttributeRequest) { + request = &ModifyCcnAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyCcnAttribute") + + return +} + +func NewModifyCcnAttributeResponse() (response *ModifyCcnAttributeResponse) { + response = &ModifyCcnAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyCcnAttribute +// 本接口(ModifyCcnAttribute)用于修改云联网(CCN)的相关属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyCcnAttribute(request *ModifyCcnAttributeRequest) (response *ModifyCcnAttributeResponse, err error) { + if request == nil { + request = NewModifyCcnAttributeRequest() + } + + response = NewModifyCcnAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyCcnAttribute +// 本接口(ModifyCcnAttribute)用于修改云联网(CCN)的相关属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyCcnAttributeWithContext(ctx context.Context, request *ModifyCcnAttributeRequest) (response *ModifyCcnAttributeResponse, err error) { + if request == nil { + request = NewModifyCcnAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyCcnAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyCcnRegionBandwidthLimitsTypeRequest() (request *ModifyCcnRegionBandwidthLimitsTypeRequest) { + request = &ModifyCcnRegionBandwidthLimitsTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyCcnRegionBandwidthLimitsType") + + return +} + +func NewModifyCcnRegionBandwidthLimitsTypeResponse() (response *ModifyCcnRegionBandwidthLimitsTypeResponse) { + response = &ModifyCcnRegionBandwidthLimitsTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyCcnRegionBandwidthLimitsType +// 本接口(ModifyCcnRegionBandwidthLimitsType)用于修改后付费云联网实例修改带宽限速策略。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_NOTPOSTPAIDCCNOPERATION = "UnsupportedOperation.NotPostpaidCcnOperation" +func (c *Client) ModifyCcnRegionBandwidthLimitsType(request *ModifyCcnRegionBandwidthLimitsTypeRequest) (response *ModifyCcnRegionBandwidthLimitsTypeResponse, err error) { + if request == nil { + request = NewModifyCcnRegionBandwidthLimitsTypeRequest() + } + + response = NewModifyCcnRegionBandwidthLimitsTypeResponse() + err = c.Send(request, response) + return +} + +// ModifyCcnRegionBandwidthLimitsType +// 本接口(ModifyCcnRegionBandwidthLimitsType)用于修改后付费云联网实例修改带宽限速策略。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_NOTPOSTPAIDCCNOPERATION = "UnsupportedOperation.NotPostpaidCcnOperation" +func (c *Client) ModifyCcnRegionBandwidthLimitsTypeWithContext(ctx context.Context, request *ModifyCcnRegionBandwidthLimitsTypeRequest) (response *ModifyCcnRegionBandwidthLimitsTypeResponse, err error) { + if request == nil { + request = NewModifyCcnRegionBandwidthLimitsTypeRequest() + } + request.SetContext(ctx) + + response = NewModifyCcnRegionBandwidthLimitsTypeResponse() + err = c.Send(request, response) + return +} + +func NewModifyCustomerGatewayAttributeRequest() (request *ModifyCustomerGatewayAttributeRequest) { + request = &ModifyCustomerGatewayAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyCustomerGatewayAttribute") + + return +} + +func NewModifyCustomerGatewayAttributeResponse() (response *ModifyCustomerGatewayAttributeResponse) { + response = &ModifyCustomerGatewayAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyCustomerGatewayAttribute +// 本接口(ModifyCustomerGatewayAttribute)用于修改对端网关信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyCustomerGatewayAttribute(request *ModifyCustomerGatewayAttributeRequest) (response *ModifyCustomerGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyCustomerGatewayAttributeRequest() + } + + response = NewModifyCustomerGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyCustomerGatewayAttribute +// 本接口(ModifyCustomerGatewayAttribute)用于修改对端网关信息。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyCustomerGatewayAttributeWithContext(ctx context.Context, request *ModifyCustomerGatewayAttributeRequest) (response *ModifyCustomerGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyCustomerGatewayAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyCustomerGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyDhcpIpAttributeRequest() (request *ModifyDhcpIpAttributeRequest) { + request = &ModifyDhcpIpAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyDhcpIpAttribute") + + return +} + +func NewModifyDhcpIpAttributeResponse() (response *ModifyDhcpIpAttributeResponse) { + response = &ModifyDhcpIpAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyDhcpIpAttribute +// 本接口(ModifyDhcpIpAttribute)用于修改DhcpIp属性 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyDhcpIpAttribute(request *ModifyDhcpIpAttributeRequest) (response *ModifyDhcpIpAttributeResponse, err error) { + if request == nil { + request = NewModifyDhcpIpAttributeRequest() + } + + response = NewModifyDhcpIpAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyDhcpIpAttribute +// 本接口(ModifyDhcpIpAttribute)用于修改DhcpIp属性 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyDhcpIpAttributeWithContext(ctx context.Context, request *ModifyDhcpIpAttributeRequest) (response *ModifyDhcpIpAttributeResponse, err error) { + if request == nil { + request = NewModifyDhcpIpAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyDhcpIpAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyDirectConnectGatewayAttributeRequest() (request *ModifyDirectConnectGatewayAttributeRequest) { + request = &ModifyDirectConnectGatewayAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyDirectConnectGatewayAttribute") + + return +} + +func NewModifyDirectConnectGatewayAttributeResponse() (response *ModifyDirectConnectGatewayAttributeResponse) { + response = &ModifyDirectConnectGatewayAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyDirectConnectGatewayAttribute +// 本接口(ModifyDirectConnectGatewayAttribute)用于修改专线网关属性 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_DIRECTCONNECTGATEWAYISUPDATINGCOMMUNITY = "UnsupportedOperation.DirectConnectGatewayIsUpdatingCommunity" +func (c *Client) ModifyDirectConnectGatewayAttribute(request *ModifyDirectConnectGatewayAttributeRequest) (response *ModifyDirectConnectGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyDirectConnectGatewayAttributeRequest() + } + + response = NewModifyDirectConnectGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyDirectConnectGatewayAttribute +// 本接口(ModifyDirectConnectGatewayAttribute)用于修改专线网关属性 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_DIRECTCONNECTGATEWAYISUPDATINGCOMMUNITY = "UnsupportedOperation.DirectConnectGatewayIsUpdatingCommunity" +func (c *Client) ModifyDirectConnectGatewayAttributeWithContext(ctx context.Context, request *ModifyDirectConnectGatewayAttributeRequest) (response *ModifyDirectConnectGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyDirectConnectGatewayAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyDirectConnectGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyFlowLogAttributeRequest() (request *ModifyFlowLogAttributeRequest) { + request = &ModifyFlowLogAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyFlowLogAttribute") + + return +} + +func NewModifyFlowLogAttributeResponse() (response *ModifyFlowLogAttributeResponse) { + response = &ModifyFlowLogAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyFlowLogAttribute +// 本接口(ModifyFlowLogAttribute)用于修改流日志属性 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) ModifyFlowLogAttribute(request *ModifyFlowLogAttributeRequest) (response *ModifyFlowLogAttributeResponse, err error) { + if request == nil { + request = NewModifyFlowLogAttributeRequest() + } + + response = NewModifyFlowLogAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyFlowLogAttribute +// 本接口(ModifyFlowLogAttribute)用于修改流日志属性 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) ModifyFlowLogAttributeWithContext(ctx context.Context, request *ModifyFlowLogAttributeRequest) (response *ModifyFlowLogAttributeResponse, err error) { + if request == nil { + request = NewModifyFlowLogAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyFlowLogAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyGatewayFlowQosRequest() (request *ModifyGatewayFlowQosRequest) { + request = &ModifyGatewayFlowQosRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyGatewayFlowQos") + + return +} + +func NewModifyGatewayFlowQosResponse() (response *ModifyGatewayFlowQosResponse) { + response = &ModifyGatewayFlowQosResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyGatewayFlowQos +// 本接口(ModifyGatewayFlowQos)用于调整网关流控带宽。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) ModifyGatewayFlowQos(request *ModifyGatewayFlowQosRequest) (response *ModifyGatewayFlowQosResponse, err error) { + if request == nil { + request = NewModifyGatewayFlowQosRequest() + } + + response = NewModifyGatewayFlowQosResponse() + err = c.Send(request, response) + return +} + +// ModifyGatewayFlowQos +// 本接口(ModifyGatewayFlowQos)用于调整网关流控带宽。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) ModifyGatewayFlowQosWithContext(ctx context.Context, request *ModifyGatewayFlowQosRequest) (response *ModifyGatewayFlowQosResponse, err error) { + if request == nil { + request = NewModifyGatewayFlowQosRequest() + } + request.SetContext(ctx) + + response = NewModifyGatewayFlowQosResponse() + err = c.Send(request, response) + return +} + +func NewModifyHaVipAttributeRequest() (request *ModifyHaVipAttributeRequest) { + request = &ModifyHaVipAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyHaVipAttribute") + + return +} + +func NewModifyHaVipAttributeResponse() (response *ModifyHaVipAttributeResponse) { + response = &ModifyHaVipAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyHaVipAttribute +// 本接口(ModifyHaVipAttribute)用于修改高可用虚拟IP(HAVIP)属性 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyHaVipAttribute(request *ModifyHaVipAttributeRequest) (response *ModifyHaVipAttributeResponse, err error) { + if request == nil { + request = NewModifyHaVipAttributeRequest() + } + + response = NewModifyHaVipAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyHaVipAttribute +// 本接口(ModifyHaVipAttribute)用于修改高可用虚拟IP(HAVIP)属性 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyHaVipAttributeWithContext(ctx context.Context, request *ModifyHaVipAttributeRequest) (response *ModifyHaVipAttributeResponse, err error) { + if request == nil { + request = NewModifyHaVipAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyHaVipAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyIp6AddressesBandwidthRequest() (request *ModifyIp6AddressesBandwidthRequest) { + request = &ModifyIp6AddressesBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyIp6AddressesBandwidth") + + return +} + +func NewModifyIp6AddressesBandwidthResponse() (response *ModifyIp6AddressesBandwidthResponse) { + response = &ModifyIp6AddressesBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyIp6AddressesBandwidth +// 该接口用于修改IPV6地址访问internet的带宽 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDADDRESSIDSTATE_INARREARS = "InvalidAddressIdState.InArrears" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound" +// INVALIDPARAMETERVALUE_INVALIDIPV6 = "InvalidParameterValue.InvalidIpv6" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// UNSUPPORTEDOPERATION_ADDRESSIPINARREAR = "UnsupportedOperation.AddressIpInArrear" +// UNSUPPORTEDOPERATION_ADDRESSIPINTERNETCHARGETYPENOTPERMIT = "UnsupportedOperation.AddressIpInternetChargeTypeNotPermit" +// UNSUPPORTEDOPERATION_ADDRESSIPNOTSUPPORTINSTANCE = "UnsupportedOperation.AddressIpNotSupportInstance" +// UNSUPPORTEDOPERATION_ADDRESSIPSTATUSNOTPERMIT = "UnsupportedOperation.AddressIpStatusNotPermit" +func (c *Client) ModifyIp6AddressesBandwidth(request *ModifyIp6AddressesBandwidthRequest) (response *ModifyIp6AddressesBandwidthResponse, err error) { + if request == nil { + request = NewModifyIp6AddressesBandwidthRequest() + } + + response = NewModifyIp6AddressesBandwidthResponse() + err = c.Send(request, response) + return +} + +// ModifyIp6AddressesBandwidth +// 该接口用于修改IPV6地址访问internet的带宽 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDADDRESSIDSTATE_INARREARS = "InvalidAddressIdState.InArrears" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound" +// INVALIDPARAMETERVALUE_INVALIDIPV6 = "InvalidParameterValue.InvalidIpv6" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// UNSUPPORTEDOPERATION_ADDRESSIPINARREAR = "UnsupportedOperation.AddressIpInArrear" +// UNSUPPORTEDOPERATION_ADDRESSIPINTERNETCHARGETYPENOTPERMIT = "UnsupportedOperation.AddressIpInternetChargeTypeNotPermit" +// UNSUPPORTEDOPERATION_ADDRESSIPNOTSUPPORTINSTANCE = "UnsupportedOperation.AddressIpNotSupportInstance" +// UNSUPPORTEDOPERATION_ADDRESSIPSTATUSNOTPERMIT = "UnsupportedOperation.AddressIpStatusNotPermit" +func (c *Client) ModifyIp6AddressesBandwidthWithContext(ctx context.Context, request *ModifyIp6AddressesBandwidthRequest) (response *ModifyIp6AddressesBandwidthResponse, err error) { + if request == nil { + request = NewModifyIp6AddressesBandwidthRequest() + } + request.SetContext(ctx) + + response = NewModifyIp6AddressesBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewModifyIp6RuleRequest() (request *ModifyIp6RuleRequest) { + request = &ModifyIp6RuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyIp6Rule") + + return +} + +func NewModifyIp6RuleResponse() (response *ModifyIp6RuleResponse) { + response = &ModifyIp6RuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyIp6Rule +// 该接口用于修改IPV6转换规则,当前仅支持修改转换规则名称,IPV4地址和IPV4端口号 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_IPV6RULENOTCHANGE = "InvalidParameterValue.IPv6RuleNotChange" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) ModifyIp6Rule(request *ModifyIp6RuleRequest) (response *ModifyIp6RuleResponse, err error) { + if request == nil { + request = NewModifyIp6RuleRequest() + } + + response = NewModifyIp6RuleResponse() + err = c.Send(request, response) + return +} + +// ModifyIp6Rule +// 该接口用于修改IPV6转换规则,当前仅支持修改转换规则名称,IPV4地址和IPV4端口号 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE_IPV6RULENOTCHANGE = "InvalidParameterValue.IPv6RuleNotChange" +// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" +func (c *Client) ModifyIp6RuleWithContext(ctx context.Context, request *ModifyIp6RuleRequest) (response *ModifyIp6RuleResponse, err error) { + if request == nil { + request = NewModifyIp6RuleRequest() + } + request.SetContext(ctx) + + response = NewModifyIp6RuleResponse() + err = c.Send(request, response) + return +} + +func NewModifyIp6TranslatorRequest() (request *ModifyIp6TranslatorRequest) { + request = &ModifyIp6TranslatorRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyIp6Translator") + + return +} + +func NewModifyIp6TranslatorResponse() (response *ModifyIp6TranslatorResponse) { + response = &ModifyIp6TranslatorResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyIp6Translator +// 该接口用于修改IP6转换实例属性,当前仅支持修改实例名称。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) ModifyIp6Translator(request *ModifyIp6TranslatorRequest) (response *ModifyIp6TranslatorResponse, err error) { + if request == nil { + request = NewModifyIp6TranslatorRequest() + } + + response = NewModifyIp6TranslatorResponse() + err = c.Send(request, response) + return +} + +// ModifyIp6Translator +// 该接口用于修改IP6转换实例属性,当前仅支持修改实例名称。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) ModifyIp6TranslatorWithContext(ctx context.Context, request *ModifyIp6TranslatorRequest) (response *ModifyIp6TranslatorResponse, err error) { + if request == nil { + request = NewModifyIp6TranslatorRequest() + } + request.SetContext(ctx) + + response = NewModifyIp6TranslatorResponse() + err = c.Send(request, response) + return +} + +func NewModifyIpv6AddressesAttributeRequest() (request *ModifyIpv6AddressesAttributeRequest) { + request = &ModifyIpv6AddressesAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyIpv6AddressesAttribute") + + return +} + +func NewModifyIpv6AddressesAttributeResponse() (response *ModifyIpv6AddressesAttributeResponse) { + response = &ModifyIpv6AddressesAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyIpv6AddressesAttribute +// 本接口(ModifyIpv6AddressesAttribute)用于修改弹性网卡内网IPv6地址属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHMENTNOTFOUND = "UnsupportedOperation.AttachmentNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) ModifyIpv6AddressesAttribute(request *ModifyIpv6AddressesAttributeRequest) (response *ModifyIpv6AddressesAttributeResponse, err error) { + if request == nil { + request = NewModifyIpv6AddressesAttributeRequest() + } + + response = NewModifyIpv6AddressesAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyIpv6AddressesAttribute +// 本接口(ModifyIpv6AddressesAttribute)用于修改弹性网卡内网IPv6地址属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHMENTNOTFOUND = "UnsupportedOperation.AttachmentNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) ModifyIpv6AddressesAttributeWithContext(ctx context.Context, request *ModifyIpv6AddressesAttributeRequest) (response *ModifyIpv6AddressesAttributeResponse, err error) { + if request == nil { + request = NewModifyIpv6AddressesAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyIpv6AddressesAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyLocalGatewayRequest() (request *ModifyLocalGatewayRequest) { + request = &ModifyLocalGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyLocalGateway") + + return +} + +func NewModifyLocalGatewayResponse() (response *ModifyLocalGatewayResponse) { + response = &ModifyLocalGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyLocalGateway +// 该接口用于修改CDC的本地网关。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyLocalGateway(request *ModifyLocalGatewayRequest) (response *ModifyLocalGatewayResponse, err error) { + if request == nil { + request = NewModifyLocalGatewayRequest() + } + + response = NewModifyLocalGatewayResponse() + err = c.Send(request, response) + return +} + +// ModifyLocalGateway +// 该接口用于修改CDC的本地网关。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyLocalGatewayWithContext(ctx context.Context, request *ModifyLocalGatewayRequest) (response *ModifyLocalGatewayResponse, err error) { + if request == nil { + request = NewModifyLocalGatewayRequest() + } + request.SetContext(ctx) + + response = NewModifyLocalGatewayResponse() + err = c.Send(request, response) + return +} + +func NewModifyNatGatewayAttributeRequest() (request *ModifyNatGatewayAttributeRequest) { + request = &ModifyNatGatewayAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyNatGatewayAttribute") + + return +} + +func NewModifyNatGatewayAttributeResponse() (response *ModifyNatGatewayAttributeResponse) { + response = &ModifyNatGatewayAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNatGatewayAttribute +// 本接口(ModifyNatGatewayAttribute)用于修改NAT网关的属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyNatGatewayAttribute(request *ModifyNatGatewayAttributeRequest) (response *ModifyNatGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyNatGatewayAttributeRequest() + } + + response = NewModifyNatGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyNatGatewayAttribute +// 本接口(ModifyNatGatewayAttribute)用于修改NAT网关的属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyNatGatewayAttributeWithContext(ctx context.Context, request *ModifyNatGatewayAttributeRequest) (response *ModifyNatGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyNatGatewayAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyNatGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyNatGatewayDestinationIpPortTranslationNatRuleRequest() (request *ModifyNatGatewayDestinationIpPortTranslationNatRuleRequest) { + request = &ModifyNatGatewayDestinationIpPortTranslationNatRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyNatGatewayDestinationIpPortTranslationNatRule") + + return +} + +func NewModifyNatGatewayDestinationIpPortTranslationNatRuleResponse() (response *ModifyNatGatewayDestinationIpPortTranslationNatRuleResponse) { + response = &ModifyNatGatewayDestinationIpPortTranslationNatRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNatGatewayDestinationIpPortTranslationNatRule +// 本接口(ModifyNatGatewayDestinationIpPortTranslationNatRule)用于修改NAT网关端口转发规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyNatGatewayDestinationIpPortTranslationNatRule(request *ModifyNatGatewayDestinationIpPortTranslationNatRuleRequest) (response *ModifyNatGatewayDestinationIpPortTranslationNatRuleResponse, err error) { + if request == nil { + request = NewModifyNatGatewayDestinationIpPortTranslationNatRuleRequest() + } + + response = NewModifyNatGatewayDestinationIpPortTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +// ModifyNatGatewayDestinationIpPortTranslationNatRule +// 本接口(ModifyNatGatewayDestinationIpPortTranslationNatRule)用于修改NAT网关端口转发规则。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyNatGatewayDestinationIpPortTranslationNatRuleWithContext(ctx context.Context, request *ModifyNatGatewayDestinationIpPortTranslationNatRuleRequest) (response *ModifyNatGatewayDestinationIpPortTranslationNatRuleResponse, err error) { + if request == nil { + request = NewModifyNatGatewayDestinationIpPortTranslationNatRuleRequest() + } + request.SetContext(ctx) + + response = NewModifyNatGatewayDestinationIpPortTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +func NewModifyNatGatewaySourceIpTranslationNatRuleRequest() (request *ModifyNatGatewaySourceIpTranslationNatRuleRequest) { + request = &ModifyNatGatewaySourceIpTranslationNatRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyNatGatewaySourceIpTranslationNatRule") + + return +} + +func NewModifyNatGatewaySourceIpTranslationNatRuleResponse() (response *ModifyNatGatewaySourceIpTranslationNatRuleResponse) { + response = &ModifyNatGatewaySourceIpTranslationNatRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNatGatewaySourceIpTranslationNatRule +// 本接口(ModifyNatGatewaySourceIpTranslationNatRule)用于修改NAT网关SNAT转发规则。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" +func (c *Client) ModifyNatGatewaySourceIpTranslationNatRule(request *ModifyNatGatewaySourceIpTranslationNatRuleRequest) (response *ModifyNatGatewaySourceIpTranslationNatRuleResponse, err error) { + if request == nil { + request = NewModifyNatGatewaySourceIpTranslationNatRuleRequest() + } + + response = NewModifyNatGatewaySourceIpTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +// ModifyNatGatewaySourceIpTranslationNatRule +// 本接口(ModifyNatGatewaySourceIpTranslationNatRule)用于修改NAT网关SNAT转发规则。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" +func (c *Client) ModifyNatGatewaySourceIpTranslationNatRuleWithContext(ctx context.Context, request *ModifyNatGatewaySourceIpTranslationNatRuleRequest) (response *ModifyNatGatewaySourceIpTranslationNatRuleResponse, err error) { + if request == nil { + request = NewModifyNatGatewaySourceIpTranslationNatRuleRequest() + } + request.SetContext(ctx) + + response = NewModifyNatGatewaySourceIpTranslationNatRuleResponse() + err = c.Send(request, response) + return +} + +func NewModifyNetDetectRequest() (request *ModifyNetDetectRequest) { + request = &ModifyNetDetectRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyNetDetect") + + return +} + +func NewModifyNetDetectResponse() (response *ModifyNetDetectResponse) { + response = &ModifyNetDetectResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNetDetect +// 本接口(ModifyNetDetect)用于修改网络探测参数。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_NEXTHOPMISMATCH = "InvalidParameter.NextHopMismatch" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_NETDETECTSAMEIP = "InvalidParameterValue.NetDetectSameIp" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +func (c *Client) ModifyNetDetect(request *ModifyNetDetectRequest) (response *ModifyNetDetectResponse, err error) { + if request == nil { + request = NewModifyNetDetectRequest() + } + + response = NewModifyNetDetectResponse() + err = c.Send(request, response) + return +} + +// ModifyNetDetect +// 本接口(ModifyNetDetect)用于修改网络探测参数。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_NEXTHOPMISMATCH = "InvalidParameter.NextHopMismatch" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_NETDETECTSAMEIP = "InvalidParameterValue.NetDetectSameIp" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" +func (c *Client) ModifyNetDetectWithContext(ctx context.Context, request *ModifyNetDetectRequest) (response *ModifyNetDetectResponse, err error) { + if request == nil { + request = NewModifyNetDetectRequest() + } + request.SetContext(ctx) + + response = NewModifyNetDetectResponse() + err = c.Send(request, response) + return +} + +func NewModifyNetworkAclAttributeRequest() (request *ModifyNetworkAclAttributeRequest) { + request = &ModifyNetworkAclAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyNetworkAclAttribute") + + return +} + +func NewModifyNetworkAclAttributeResponse() (response *ModifyNetworkAclAttributeResponse) { + response = &ModifyNetworkAclAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNetworkAclAttribute +// 本接口(ModifyNetworkAclAttribute)用于修改网络ACL属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyNetworkAclAttribute(request *ModifyNetworkAclAttributeRequest) (response *ModifyNetworkAclAttributeResponse, err error) { + if request == nil { + request = NewModifyNetworkAclAttributeRequest() + } + + response = NewModifyNetworkAclAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyNetworkAclAttribute +// 本接口(ModifyNetworkAclAttribute)用于修改网络ACL属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyNetworkAclAttributeWithContext(ctx context.Context, request *ModifyNetworkAclAttributeRequest) (response *ModifyNetworkAclAttributeResponse, err error) { + if request == nil { + request = NewModifyNetworkAclAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyNetworkAclAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyNetworkAclEntriesRequest() (request *ModifyNetworkAclEntriesRequest) { + request = &ModifyNetworkAclEntriesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyNetworkAclEntries") + + return +} + +func NewModifyNetworkAclEntriesResponse() (response *ModifyNetworkAclEntriesResponse) { + response = &ModifyNetworkAclEntriesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNetworkAclEntries +// 本接口(ModifyNetworkAclEntries)用于修改(包括添加和删除)网络ACL的入站规则和出站规则。在NetworkAclEntrySet参数中: +// +// * 若同时传入入站规则和出站规则,则重置原有的入站规则和出站规则,并分别导入传入的规则。 +// +// * 若仅传入入站规则,则仅重置原有的入站规则,并导入传入的规则,不影响原有的出站规则(若仅传入出站规则,处理方式类似入站方向)。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyNetworkAclEntries(request *ModifyNetworkAclEntriesRequest) (response *ModifyNetworkAclEntriesResponse, err error) { + if request == nil { + request = NewModifyNetworkAclEntriesRequest() + } + + response = NewModifyNetworkAclEntriesResponse() + err = c.Send(request, response) + return +} + +// ModifyNetworkAclEntries +// 本接口(ModifyNetworkAclEntries)用于修改(包括添加和删除)网络ACL的入站规则和出站规则。在NetworkAclEntrySet参数中: +// +// * 若同时传入入站规则和出站规则,则重置原有的入站规则和出站规则,并分别导入传入的规则。 +// +// * 若仅传入入站规则,则仅重置原有的入站规则,并导入传入的规则,不影响原有的出站规则(若仅传入出站规则,处理方式类似入站方向)。 +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyNetworkAclEntriesWithContext(ctx context.Context, request *ModifyNetworkAclEntriesRequest) (response *ModifyNetworkAclEntriesResponse, err error) { + if request == nil { + request = NewModifyNetworkAclEntriesRequest() + } + request.SetContext(ctx) + + response = NewModifyNetworkAclEntriesResponse() + err = c.Send(request, response) + return +} + +func NewModifyNetworkInterfaceAttributeRequest() (request *ModifyNetworkInterfaceAttributeRequest) { + request = &ModifyNetworkInterfaceAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyNetworkInterfaceAttribute") + + return +} + +func NewModifyNetworkInterfaceAttributeResponse() (response *ModifyNetworkInterfaceAttributeResponse) { + response = &ModifyNetworkInterfaceAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNetworkInterfaceAttribute +// 本接口(ModifyNetworkInterfaceAttribute)用于修改弹性网卡属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyNetworkInterfaceAttribute(request *ModifyNetworkInterfaceAttributeRequest) (response *ModifyNetworkInterfaceAttributeResponse, err error) { + if request == nil { + request = NewModifyNetworkInterfaceAttributeRequest() + } + + response = NewModifyNetworkInterfaceAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyNetworkInterfaceAttribute +// 本接口(ModifyNetworkInterfaceAttribute)用于修改弹性网卡属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyNetworkInterfaceAttributeWithContext(ctx context.Context, request *ModifyNetworkInterfaceAttributeRequest) (response *ModifyNetworkInterfaceAttributeResponse, err error) { + if request == nil { + request = NewModifyNetworkInterfaceAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyNetworkInterfaceAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyNetworkInterfaceQosRequest() (request *ModifyNetworkInterfaceQosRequest) { + request = &ModifyNetworkInterfaceQosRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyNetworkInterfaceQos") + + return +} + +func NewModifyNetworkInterfaceQosResponse() (response *ModifyNetworkInterfaceQosResponse) { + response = &ModifyNetworkInterfaceQosResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNetworkInterfaceQos +// 修改弹性网卡服务质量 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyNetworkInterfaceQos(request *ModifyNetworkInterfaceQosRequest) (response *ModifyNetworkInterfaceQosResponse, err error) { + if request == nil { + request = NewModifyNetworkInterfaceQosRequest() + } + + response = NewModifyNetworkInterfaceQosResponse() + err = c.Send(request, response) + return +} + +// ModifyNetworkInterfaceQos +// 修改弹性网卡服务质量 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyNetworkInterfaceQosWithContext(ctx context.Context, request *ModifyNetworkInterfaceQosRequest) (response *ModifyNetworkInterfaceQosResponse, err error) { + if request == nil { + request = NewModifyNetworkInterfaceQosRequest() + } + request.SetContext(ctx) + + response = NewModifyNetworkInterfaceQosResponse() + err = c.Send(request, response) + return +} + +func NewModifyPrivateIpAddressesAttributeRequest() (request *ModifyPrivateIpAddressesAttributeRequest) { + request = &ModifyPrivateIpAddressesAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyPrivateIpAddressesAttribute") + + return +} + +func NewModifyPrivateIpAddressesAttributeResponse() (response *ModifyPrivateIpAddressesAttributeResponse) { + response = &ModifyPrivateIpAddressesAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyPrivateIpAddressesAttribute +// 本接口(ModifyPrivateIpAddressesAttribute)用于修改弹性网卡内网IP属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) ModifyPrivateIpAddressesAttribute(request *ModifyPrivateIpAddressesAttributeRequest) (response *ModifyPrivateIpAddressesAttributeResponse, err error) { + if request == nil { + request = NewModifyPrivateIpAddressesAttributeRequest() + } + + response = NewModifyPrivateIpAddressesAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyPrivateIpAddressesAttribute +// 本接口(ModifyPrivateIpAddressesAttribute)用于修改弹性网卡内网IP属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) ModifyPrivateIpAddressesAttributeWithContext(ctx context.Context, request *ModifyPrivateIpAddressesAttributeRequest) (response *ModifyPrivateIpAddressesAttributeResponse, err error) { + if request == nil { + request = NewModifyPrivateIpAddressesAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyPrivateIpAddressesAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyRouteTableAttributeRequest() (request *ModifyRouteTableAttributeRequest) { + request = &ModifyRouteTableAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyRouteTableAttribute") + + return +} + +func NewModifyRouteTableAttributeResponse() (response *ModifyRouteTableAttributeResponse) { + response = &ModifyRouteTableAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyRouteTableAttribute +// 本接口(ModifyRouteTableAttribute)用于修改路由表(RouteTable)属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyRouteTableAttribute(request *ModifyRouteTableAttributeRequest) (response *ModifyRouteTableAttributeResponse, err error) { + if request == nil { + request = NewModifyRouteTableAttributeRequest() + } + + response = NewModifyRouteTableAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyRouteTableAttribute +// 本接口(ModifyRouteTableAttribute)用于修改路由表(RouteTable)属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyRouteTableAttributeWithContext(ctx context.Context, request *ModifyRouteTableAttributeRequest) (response *ModifyRouteTableAttributeResponse, err error) { + if request == nil { + request = NewModifyRouteTableAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyRouteTableAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifySecurityGroupAttributeRequest() (request *ModifySecurityGroupAttributeRequest) { + request = &ModifySecurityGroupAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifySecurityGroupAttribute") + + return +} + +func NewModifySecurityGroupAttributeResponse() (response *ModifySecurityGroupAttributeResponse) { + response = &ModifySecurityGroupAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifySecurityGroupAttribute +// 本接口(ModifySecurityGroupAttribute)用于修改安全组(SecurityGroupPolicy)属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifySecurityGroupAttribute(request *ModifySecurityGroupAttributeRequest) (response *ModifySecurityGroupAttributeResponse, err error) { + if request == nil { + request = NewModifySecurityGroupAttributeRequest() + } + + response = NewModifySecurityGroupAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifySecurityGroupAttribute +// 本接口(ModifySecurityGroupAttribute)用于修改安全组(SecurityGroupPolicy)属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifySecurityGroupAttributeWithContext(ctx context.Context, request *ModifySecurityGroupAttributeRequest) (response *ModifySecurityGroupAttributeResponse, err error) { + if request == nil { + request = NewModifySecurityGroupAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifySecurityGroupAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifySecurityGroupPoliciesRequest() (request *ModifySecurityGroupPoliciesRequest) { + request = &ModifySecurityGroupPoliciesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifySecurityGroupPolicies") + + return +} + +func NewModifySecurityGroupPoliciesResponse() (response *ModifySecurityGroupPoliciesResponse) { + response = &ModifySecurityGroupPoliciesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifySecurityGroupPolicies +// 本接口(ModifySecurityGroupPolicies)用于重置安全组出站和入站规则(SecurityGroupPolicy)。 +// +// +// +// <ul> +// +// <li>该接口不支持自定义索引 PolicyIndex。</li> +// +// <li>在 SecurityGroupPolicySet 参数中:<ul> +// +// <li> 如果指定 SecurityGroupPolicySet.Version 为0, 表示清空所有规则,并忽略 Egress 和 Ingress。</li> +// +// <li> 如果指定 SecurityGroupPolicySet.Version 不为0, 在添加出站和入站规则(Egress 和 Ingress)时:<ul> +// +// <li>Protocol 字段支持输入 TCP, UDP, ICMP, ICMPV6, GRE, ALL。</li> +// +// <li>CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。(展开)在基础网络中,如果 CidrBlock 包含您的账户内的云服务器之外的设备在腾讯云的内网 IP,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。</li> +// +// <li>Ipv6CidrBlock 字段允许输入符合 IPv6 cidr 格式标准的任意字符串。(展开)在基础网络中,如果Ipv6CidrBlock 包含您的账户内的云服务器之外的设备在腾讯云的内网 IPv6,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。</li> +// +// <li>SecurityGroupId 字段允许输入与待修改的安全组位于相同项目中的安全组 ID,包括这个安全组 ID 本身,代表安全组下所有云服务器的内网 IP。使用这个字段时,这条规则用来匹配网络报文的过程中会随着被使用的这个ID所关联的云服务器变化而变化,不需要重新修改。</li> +// +// <li>Port 字段允许输入一个单独端口号,或者用减号分隔的两个端口号代表端口范围,例如80或8000-8010。只有当 Protocol 字段是 TCP 或 UDP 时,Port 字段才被接受。</li> +// +// <li>Action 字段只允许输入 ACCEPT 或 DROP。</li> +// +// <li>CidrBlock, Ipv6CidrBlock, SecurityGroupId, AddressTemplate 四者是排他关系,不允许同时输入,Protocol + Port 和 ServiceTemplate 二者是排他关系,不允许同时输入。</li> +// +// </ul></li></ul></li> +// +// </ul> +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_DUPLICATEPOLICY = "UnsupportedOperation.DuplicatePolicy" +func (c *Client) ModifySecurityGroupPolicies(request *ModifySecurityGroupPoliciesRequest) (response *ModifySecurityGroupPoliciesResponse, err error) { + if request == nil { + request = NewModifySecurityGroupPoliciesRequest() + } + + response = NewModifySecurityGroupPoliciesResponse() + err = c.Send(request, response) + return +} + +// ModifySecurityGroupPolicies +// 本接口(ModifySecurityGroupPolicies)用于重置安全组出站和入站规则(SecurityGroupPolicy)。 +// +// +// +// <ul> +// +// <li>该接口不支持自定义索引 PolicyIndex。</li> +// +// <li>在 SecurityGroupPolicySet 参数中:<ul> +// +// <li> 如果指定 SecurityGroupPolicySet.Version 为0, 表示清空所有规则,并忽略 Egress 和 Ingress。</li> +// +// <li> 如果指定 SecurityGroupPolicySet.Version 不为0, 在添加出站和入站规则(Egress 和 Ingress)时:<ul> +// +// <li>Protocol 字段支持输入 TCP, UDP, ICMP, ICMPV6, GRE, ALL。</li> +// +// <li>CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。(展开)在基础网络中,如果 CidrBlock 包含您的账户内的云服务器之外的设备在腾讯云的内网 IP,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。</li> +// +// <li>Ipv6CidrBlock 字段允许输入符合 IPv6 cidr 格式标准的任意字符串。(展开)在基础网络中,如果Ipv6CidrBlock 包含您的账户内的云服务器之外的设备在腾讯云的内网 IPv6,并不代表此规则允许您访问这些设备,租户之间网络隔离规则优先于安全组中的内网规则。</li> +// +// <li>SecurityGroupId 字段允许输入与待修改的安全组位于相同项目中的安全组 ID,包括这个安全组 ID 本身,代表安全组下所有云服务器的内网 IP。使用这个字段时,这条规则用来匹配网络报文的过程中会随着被使用的这个ID所关联的云服务器变化而变化,不需要重新修改。</li> +// +// <li>Port 字段允许输入一个单独端口号,或者用减号分隔的两个端口号代表端口范围,例如80或8000-8010。只有当 Protocol 字段是 TCP 或 UDP 时,Port 字段才被接受。</li> +// +// <li>Action 字段只允许输入 ACCEPT 或 DROP。</li> +// +// <li>CidrBlock, Ipv6CidrBlock, SecurityGroupId, AddressTemplate 四者是排他关系,不允许同时输入,Protocol + Port 和 ServiceTemplate 二者是排他关系,不允许同时输入。</li> +// +// </ul></li></ul></li> +// +// </ul> +// +// 可能返回的错误码: +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_DUPLICATEPOLICY = "UnsupportedOperation.DuplicatePolicy" +func (c *Client) ModifySecurityGroupPoliciesWithContext(ctx context.Context, request *ModifySecurityGroupPoliciesRequest) (response *ModifySecurityGroupPoliciesResponse, err error) { + if request == nil { + request = NewModifySecurityGroupPoliciesRequest() + } + request.SetContext(ctx) + + response = NewModifySecurityGroupPoliciesResponse() + err = c.Send(request, response) + return +} + +func NewModifyServiceTemplateAttributeRequest() (request *ModifyServiceTemplateAttributeRequest) { + request = &ModifyServiceTemplateAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyServiceTemplateAttribute") + + return +} + +func NewModifyServiceTemplateAttributeResponse() (response *ModifyServiceTemplateAttributeResponse) { + response = &ModifyServiceTemplateAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyServiceTemplateAttribute +// 本接口(ModifyServiceTemplateAttribute)用于修改协议端口模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) ModifyServiceTemplateAttribute(request *ModifyServiceTemplateAttributeRequest) (response *ModifyServiceTemplateAttributeResponse, err error) { + if request == nil { + request = NewModifyServiceTemplateAttributeRequest() + } + + response = NewModifyServiceTemplateAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyServiceTemplateAttribute +// 本接口(ModifyServiceTemplateAttribute)用于修改协议端口模板 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) ModifyServiceTemplateAttributeWithContext(ctx context.Context, request *ModifyServiceTemplateAttributeRequest) (response *ModifyServiceTemplateAttributeResponse, err error) { + if request == nil { + request = NewModifyServiceTemplateAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyServiceTemplateAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyServiceTemplateGroupAttributeRequest() (request *ModifyServiceTemplateGroupAttributeRequest) { + request = &ModifyServiceTemplateGroupAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyServiceTemplateGroupAttribute") + + return +} + +func NewModifyServiceTemplateGroupAttributeResponse() (response *ModifyServiceTemplateGroupAttributeResponse) { + response = &ModifyServiceTemplateGroupAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyServiceTemplateGroupAttribute +// 本接口(ModifyServiceTemplateGroupAttribute)用于修改协议端口模板集合。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyServiceTemplateGroupAttribute(request *ModifyServiceTemplateGroupAttributeRequest) (response *ModifyServiceTemplateGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyServiceTemplateGroupAttributeRequest() + } + + response = NewModifyServiceTemplateGroupAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyServiceTemplateGroupAttribute +// 本接口(ModifyServiceTemplateGroupAttribute)用于修改协议端口模板集合。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyServiceTemplateGroupAttributeWithContext(ctx context.Context, request *ModifyServiceTemplateGroupAttributeRequest) (response *ModifyServiceTemplateGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyServiceTemplateGroupAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyServiceTemplateGroupAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifySubnetAttributeRequest() (request *ModifySubnetAttributeRequest) { + request = &ModifySubnetAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifySubnetAttribute") + + return +} + +func NewModifySubnetAttributeResponse() (response *ModifySubnetAttributeResponse) { + response = &ModifySubnetAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifySubnetAttribute +// 本接口(ModifySubnetAttribute)用于修改子网属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifySubnetAttribute(request *ModifySubnetAttributeRequest) (response *ModifySubnetAttributeResponse, err error) { + if request == nil { + request = NewModifySubnetAttributeRequest() + } + + response = NewModifySubnetAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifySubnetAttribute +// 本接口(ModifySubnetAttribute)用于修改子网属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifySubnetAttributeWithContext(ctx context.Context, request *ModifySubnetAttributeRequest) (response *ModifySubnetAttributeResponse, err error) { + if request == nil { + request = NewModifySubnetAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifySubnetAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyTemplateMemberRequest() (request *ModifyTemplateMemberRequest) { + request = &ModifyTemplateMemberRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyTemplateMember") + + return +} + +func NewModifyTemplateMemberResponse() (response *ModifyTemplateMemberResponse) { + response = &ModifyTemplateMemberResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyTemplateMember +// 修改模版对象中的IP地址、协议端口、IP地址组、协议端口组。当前仅支持北京、泰国、北美地域请求。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyTemplateMember(request *ModifyTemplateMemberRequest) (response *ModifyTemplateMemberResponse, err error) { + if request == nil { + request = NewModifyTemplateMemberRequest() + } + + response = NewModifyTemplateMemberResponse() + err = c.Send(request, response) + return +} + +// ModifyTemplateMember +// 修改模版对象中的IP地址、协议端口、IP地址组、协议端口组。当前仅支持北京、泰国、北美地域请求。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyTemplateMemberWithContext(ctx context.Context, request *ModifyTemplateMemberRequest) (response *ModifyTemplateMemberResponse, err error) { + if request == nil { + request = NewModifyTemplateMemberRequest() + } + request.SetContext(ctx) + + response = NewModifyTemplateMemberResponse() + err = c.Send(request, response) + return +} + +func NewModifyVpcAttributeRequest() (request *ModifyVpcAttributeRequest) { + request = &ModifyVpcAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyVpcAttribute") + + return +} + +func NewModifyVpcAttributeResponse() (response *ModifyVpcAttributeResponse) { + response = &ModifyVpcAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyVpcAttribute +// 本接口(ModifyVpcAttribute)用于修改私有网络(VPC)的相关属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyVpcAttribute(request *ModifyVpcAttributeRequest) (response *ModifyVpcAttributeResponse, err error) { + if request == nil { + request = NewModifyVpcAttributeRequest() + } + + response = NewModifyVpcAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyVpcAttribute +// 本接口(ModifyVpcAttribute)用于修改私有网络(VPC)的相关属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyVpcAttributeWithContext(ctx context.Context, request *ModifyVpcAttributeRequest) (response *ModifyVpcAttributeResponse, err error) { + if request == nil { + request = NewModifyVpcAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyVpcAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyVpcEndPointAttributeRequest() (request *ModifyVpcEndPointAttributeRequest) { + request = &ModifyVpcEndPointAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyVpcEndPointAttribute") + + return +} + +func NewModifyVpcEndPointAttributeResponse() (response *ModifyVpcEndPointAttributeResponse) { + response = &ModifyVpcEndPointAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyVpcEndPointAttribute +// 修改终端节点属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SVCNOTEXIST = "ResourceNotFound.SvcNotExist" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_SPECIALENDPOINTSERVICE = "UnsupportedOperation.SpecialEndPointService" +func (c *Client) ModifyVpcEndPointAttribute(request *ModifyVpcEndPointAttributeRequest) (response *ModifyVpcEndPointAttributeResponse, err error) { + if request == nil { + request = NewModifyVpcEndPointAttributeRequest() + } + + response = NewModifyVpcEndPointAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyVpcEndPointAttribute +// 修改终端节点属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SVCNOTEXIST = "ResourceNotFound.SvcNotExist" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_SPECIALENDPOINTSERVICE = "UnsupportedOperation.SpecialEndPointService" +func (c *Client) ModifyVpcEndPointAttributeWithContext(ctx context.Context, request *ModifyVpcEndPointAttributeRequest) (response *ModifyVpcEndPointAttributeResponse, err error) { + if request == nil { + request = NewModifyVpcEndPointAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyVpcEndPointAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyVpcEndPointServiceAttributeRequest() (request *ModifyVpcEndPointServiceAttributeRequest) { + request = &ModifyVpcEndPointServiceAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyVpcEndPointServiceAttribute") + + return +} + +func NewModifyVpcEndPointServiceAttributeResponse() (response *ModifyVpcEndPointServiceAttributeResponse) { + response = &ModifyVpcEndPointServiceAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyVpcEndPointServiceAttribute +// 本接口(ModifyVpcEndPointServiceAttribute)用于修改终端节点服务属性。 +// +// +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) ModifyVpcEndPointServiceAttribute(request *ModifyVpcEndPointServiceAttributeRequest) (response *ModifyVpcEndPointServiceAttributeResponse, err error) { + if request == nil { + request = NewModifyVpcEndPointServiceAttributeRequest() + } + + response = NewModifyVpcEndPointServiceAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyVpcEndPointServiceAttribute +// 本接口(ModifyVpcEndPointServiceAttribute)用于修改终端节点服务属性。 +// +// +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) ModifyVpcEndPointServiceAttributeWithContext(ctx context.Context, request *ModifyVpcEndPointServiceAttributeRequest) (response *ModifyVpcEndPointServiceAttributeResponse, err error) { + if request == nil { + request = NewModifyVpcEndPointServiceAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyVpcEndPointServiceAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyVpcEndPointServiceWhiteListRequest() (request *ModifyVpcEndPointServiceWhiteListRequest) { + request = &ModifyVpcEndPointServiceWhiteListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyVpcEndPointServiceWhiteList") + + return +} + +func NewModifyVpcEndPointServiceWhiteListResponse() (response *ModifyVpcEndPointServiceWhiteListResponse) { + response = &ModifyVpcEndPointServiceWhiteListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyVpcEndPointServiceWhiteList +// 修改终端节点服务白名单属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +func (c *Client) ModifyVpcEndPointServiceWhiteList(request *ModifyVpcEndPointServiceWhiteListRequest) (response *ModifyVpcEndPointServiceWhiteListResponse, err error) { + if request == nil { + request = NewModifyVpcEndPointServiceWhiteListRequest() + } + + response = NewModifyVpcEndPointServiceWhiteListResponse() + err = c.Send(request, response) + return +} + +// ModifyVpcEndPointServiceWhiteList +// 修改终端节点服务白名单属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" +func (c *Client) ModifyVpcEndPointServiceWhiteListWithContext(ctx context.Context, request *ModifyVpcEndPointServiceWhiteListRequest) (response *ModifyVpcEndPointServiceWhiteListResponse, err error) { + if request == nil { + request = NewModifyVpcEndPointServiceWhiteListRequest() + } + request.SetContext(ctx) + + response = NewModifyVpcEndPointServiceWhiteListResponse() + err = c.Send(request, response) + return +} + +func NewModifyVpnConnectionAttributeRequest() (request *ModifyVpnConnectionAttributeRequest) { + request = &ModifyVpnConnectionAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyVpnConnectionAttribute") + + return +} + +func NewModifyVpnConnectionAttributeResponse() (response *ModifyVpnConnectionAttributeResponse) { + response = &ModifyVpnConnectionAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyVpnConnectionAttribute +// 本接口(ModifyVpnConnectionAttribute)用于修改VPN通道。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_VPNCONNCIDRCONFLICT = "InvalidParameterValue.VpnConnCidrConflict" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyVpnConnectionAttribute(request *ModifyVpnConnectionAttributeRequest) (response *ModifyVpnConnectionAttributeResponse, err error) { + if request == nil { + request = NewModifyVpnConnectionAttributeRequest() + } + + response = NewModifyVpnConnectionAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyVpnConnectionAttribute +// 本接口(ModifyVpnConnectionAttribute)用于修改VPN通道。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_VPNCONNCIDRCONFLICT = "InvalidParameterValue.VpnConnCidrConflict" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyVpnConnectionAttributeWithContext(ctx context.Context, request *ModifyVpnConnectionAttributeRequest) (response *ModifyVpnConnectionAttributeResponse, err error) { + if request == nil { + request = NewModifyVpnConnectionAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyVpnConnectionAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyVpnGatewayAttributeRequest() (request *ModifyVpnGatewayAttributeRequest) { + request = &ModifyVpnGatewayAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyVpnGatewayAttribute") + + return +} + +func NewModifyVpnGatewayAttributeResponse() (response *ModifyVpnGatewayAttributeResponse) { + response = &ModifyVpnGatewayAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyVpnGatewayAttribute +// 本接口(ModifyVpnGatewayAttribute)用于修改VPN网关属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyVpnGatewayAttribute(request *ModifyVpnGatewayAttributeRequest) (response *ModifyVpnGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyVpnGatewayAttributeRequest() + } + + response = NewModifyVpnGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +// ModifyVpnGatewayAttribute +// 本接口(ModifyVpnGatewayAttribute)用于修改VPN网关属性。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyVpnGatewayAttributeWithContext(ctx context.Context, request *ModifyVpnGatewayAttributeRequest) (response *ModifyVpnGatewayAttributeResponse, err error) { + if request == nil { + request = NewModifyVpnGatewayAttributeRequest() + } + request.SetContext(ctx) + + response = NewModifyVpnGatewayAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyVpnGatewayCcnRoutesRequest() (request *ModifyVpnGatewayCcnRoutesRequest) { + request = &ModifyVpnGatewayCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyVpnGatewayCcnRoutes") + + return +} + +func NewModifyVpnGatewayCcnRoutesResponse() (response *ModifyVpnGatewayCcnRoutesResponse) { + response = &ModifyVpnGatewayCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyVpnGatewayCcnRoutes +// 本接口(ModifyVpnGatewayCcnRoutes)用于修改VPN网关云联网路由 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyVpnGatewayCcnRoutes(request *ModifyVpnGatewayCcnRoutesRequest) (response *ModifyVpnGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewModifyVpnGatewayCcnRoutesRequest() + } + + response = NewModifyVpnGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// ModifyVpnGatewayCcnRoutes +// 本接口(ModifyVpnGatewayCcnRoutes)用于修改VPN网关云联网路由 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ModifyVpnGatewayCcnRoutesWithContext(ctx context.Context, request *ModifyVpnGatewayCcnRoutesRequest) (response *ModifyVpnGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewModifyVpnGatewayCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewModifyVpnGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewModifyVpnGatewayRoutesRequest() (request *ModifyVpnGatewayRoutesRequest) { + request = &ModifyVpnGatewayRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ModifyVpnGatewayRoutes") + + return +} + +func NewModifyVpnGatewayRoutesResponse() (response *ModifyVpnGatewayRoutesResponse) { + response = &ModifyVpnGatewayRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyVpnGatewayRoutes +// 修改VPN路由是否启用 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyVpnGatewayRoutes(request *ModifyVpnGatewayRoutesRequest) (response *ModifyVpnGatewayRoutesResponse, err error) { + if request == nil { + request = NewModifyVpnGatewayRoutesRequest() + } + + response = NewModifyVpnGatewayRoutesResponse() + err = c.Send(request, response) + return +} + +// ModifyVpnGatewayRoutes +// 修改VPN路由是否启用 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyVpnGatewayRoutesWithContext(ctx context.Context, request *ModifyVpnGatewayRoutesRequest) (response *ModifyVpnGatewayRoutesResponse, err error) { + if request == nil { + request = NewModifyVpnGatewayRoutesRequest() + } + request.SetContext(ctx) + + response = NewModifyVpnGatewayRoutesResponse() + err = c.Send(request, response) + return +} + +func NewNotifyRoutesRequest() (request *NotifyRoutesRequest) { + request = &NotifyRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "NotifyRoutes") + + return +} + +func NewNotifyRoutesResponse() (response *NotifyRoutesResponse) { + response = &NotifyRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// NotifyRoutes +// 路由表列表页操作增加“发布到云联网”,用于发布路由到云联网。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDROUTEID_NOTFOUND = "InvalidRouteId.NotFound" +// INVALIDROUTETABLEID_MALFORMED = "InvalidRouteTableId.Malformed" +// INVALIDROUTETABLEID_NOTFOUND = "InvalidRouteTableId.NotFound" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_NOTIFYCCN = "UnsupportedOperation.NotifyCcn" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) NotifyRoutes(request *NotifyRoutesRequest) (response *NotifyRoutesResponse, err error) { + if request == nil { + request = NewNotifyRoutesRequest() + } + + response = NewNotifyRoutesResponse() + err = c.Send(request, response) + return +} + +// NotifyRoutes +// 路由表列表页操作增加“发布到云联网”,用于发布路由到云联网。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDROUTEID_NOTFOUND = "InvalidRouteId.NotFound" +// INVALIDROUTETABLEID_MALFORMED = "InvalidRouteTableId.Malformed" +// INVALIDROUTETABLEID_NOTFOUND = "InvalidRouteTableId.NotFound" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_NOTIFYCCN = "UnsupportedOperation.NotifyCcn" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) NotifyRoutesWithContext(ctx context.Context, request *NotifyRoutesRequest) (response *NotifyRoutesResponse, err error) { + if request == nil { + request = NewNotifyRoutesRequest() + } + request.SetContext(ctx) + + response = NewNotifyRoutesResponse() + err = c.Send(request, response) + return +} + +func NewRefreshDirectConnectGatewayRouteToNatGatewayRequest() (request *RefreshDirectConnectGatewayRouteToNatGatewayRequest) { + request = &RefreshDirectConnectGatewayRouteToNatGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "RefreshDirectConnectGatewayRouteToNatGateway") + + return +} + +func NewRefreshDirectConnectGatewayRouteToNatGatewayResponse() (response *RefreshDirectConnectGatewayRouteToNatGatewayResponse) { + response = &RefreshDirectConnectGatewayRouteToNatGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RefreshDirectConnectGatewayRouteToNatGateway +// 刷新专线直连nat路由,更新nat到专线的路由表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) RefreshDirectConnectGatewayRouteToNatGateway(request *RefreshDirectConnectGatewayRouteToNatGatewayRequest) (response *RefreshDirectConnectGatewayRouteToNatGatewayResponse, err error) { + if request == nil { + request = NewRefreshDirectConnectGatewayRouteToNatGatewayRequest() + } + + response = NewRefreshDirectConnectGatewayRouteToNatGatewayResponse() + err = c.Send(request, response) + return +} + +// RefreshDirectConnectGatewayRouteToNatGateway +// 刷新专线直连nat路由,更新nat到专线的路由表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +func (c *Client) RefreshDirectConnectGatewayRouteToNatGatewayWithContext(ctx context.Context, request *RefreshDirectConnectGatewayRouteToNatGatewayRequest) (response *RefreshDirectConnectGatewayRouteToNatGatewayResponse, err error) { + if request == nil { + request = NewRefreshDirectConnectGatewayRouteToNatGatewayRequest() + } + request.SetContext(ctx) + + response = NewRefreshDirectConnectGatewayRouteToNatGatewayResponse() + err = c.Send(request, response) + return +} + +func NewRejectAttachCcnInstancesRequest() (request *RejectAttachCcnInstancesRequest) { + request = &RejectAttachCcnInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "RejectAttachCcnInstances") + + return +} + +func NewRejectAttachCcnInstancesResponse() (response *RejectAttachCcnInstancesResponse) { + response = &RejectAttachCcnInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RejectAttachCcnInstances +// 本接口(RejectAttachCcnInstances)用于跨账号关联实例时,云联网所有者拒绝关联操作。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_NOTPENDINGCCNINSTANCE = "UnsupportedOperation.NotPendingCcnInstance" +func (c *Client) RejectAttachCcnInstances(request *RejectAttachCcnInstancesRequest) (response *RejectAttachCcnInstancesResponse, err error) { + if request == nil { + request = NewRejectAttachCcnInstancesRequest() + } + + response = NewRejectAttachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +// RejectAttachCcnInstances +// 本接口(RejectAttachCcnInstances)用于跨账号关联实例时,云联网所有者拒绝关联操作。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" +// UNSUPPORTEDOPERATION_NOTPENDINGCCNINSTANCE = "UnsupportedOperation.NotPendingCcnInstance" +func (c *Client) RejectAttachCcnInstancesWithContext(ctx context.Context, request *RejectAttachCcnInstancesRequest) (response *RejectAttachCcnInstancesResponse, err error) { + if request == nil { + request = NewRejectAttachCcnInstancesRequest() + } + request.SetContext(ctx) + + response = NewRejectAttachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +func NewReleaseAddressesRequest() (request *ReleaseAddressesRequest) { + request = &ReleaseAddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ReleaseAddresses") + + return +} + +func NewReleaseAddressesResponse() (response *ReleaseAddressesResponse) { + response = &ReleaseAddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ReleaseAddresses +// 本接口 (ReleaseAddresses) 用于释放一个或多个[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)。 +// +// * 该操作不可逆,释放后 EIP 关联的 IP 地址将不再属于您的名下。 +// +// * 只有状态为 UNBIND 的 EIP 才能进行释放操作。 +// +// 可能返回的错误码: +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDADDRESSSTATE = "InvalidAddressState" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSINTERNETCHARGETYPECONFLICT = "InvalidParameterValue.AddressInternetChargeTypeConflict" +// INVALIDPARAMETERVALUE_ADDRESSNOTEIP = "InvalidParameterValue.AddressNotEIP" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +func (c *Client) ReleaseAddresses(request *ReleaseAddressesRequest) (response *ReleaseAddressesResponse, err error) { + if request == nil { + request = NewReleaseAddressesRequest() + } + + response = NewReleaseAddressesResponse() + err = c.Send(request, response) + return +} + +// ReleaseAddresses +// 本接口 (ReleaseAddresses) 用于释放一个或多个[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)。 +// +// * 该操作不可逆,释放后 EIP 关联的 IP 地址将不再属于您的名下。 +// +// * 只有状态为 UNBIND 的 EIP 才能进行释放操作。 +// +// 可能返回的错误码: +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +// INVALIDADDRESSSTATE = "InvalidAddressState" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSINTERNETCHARGETYPECONFLICT = "InvalidParameterValue.AddressInternetChargeTypeConflict" +// INVALIDPARAMETERVALUE_ADDRESSNOTEIP = "InvalidParameterValue.AddressNotEIP" +// INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +func (c *Client) ReleaseAddressesWithContext(ctx context.Context, request *ReleaseAddressesRequest) (response *ReleaseAddressesResponse, err error) { + if request == nil { + request = NewReleaseAddressesRequest() + } + request.SetContext(ctx) + + response = NewReleaseAddressesResponse() + err = c.Send(request, response) + return +} + +func NewReleaseIp6AddressesBandwidthRequest() (request *ReleaseIp6AddressesBandwidthRequest) { + request = &ReleaseIp6AddressesBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ReleaseIp6AddressesBandwidth") + + return +} + +func NewReleaseIp6AddressesBandwidthResponse() (response *ReleaseIp6AddressesBandwidthResponse) { + response = &ReleaseIp6AddressesBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ReleaseIp6AddressesBandwidth +// 该接口用于给弹性公网IPv6地址释放带宽。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound" +// INVALIDPARAMETERVALUE_INVALIDIPV6 = "InvalidParameterValue.InvalidIpv6" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +func (c *Client) ReleaseIp6AddressesBandwidth(request *ReleaseIp6AddressesBandwidthRequest) (response *ReleaseIp6AddressesBandwidthResponse, err error) { + if request == nil { + request = NewReleaseIp6AddressesBandwidthRequest() + } + + response = NewReleaseIp6AddressesBandwidthResponse() + err = c.Send(request, response) + return +} + +// ReleaseIp6AddressesBandwidth +// 该接口用于给弹性公网IPv6地址释放带宽。 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" +// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound" +// INVALIDPARAMETERVALUE_INVALIDIPV6 = "InvalidParameterValue.InvalidIpv6" +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +func (c *Client) ReleaseIp6AddressesBandwidthWithContext(ctx context.Context, request *ReleaseIp6AddressesBandwidthRequest) (response *ReleaseIp6AddressesBandwidthResponse, err error) { + if request == nil { + request = NewReleaseIp6AddressesBandwidthRequest() + } + request.SetContext(ctx) + + response = NewReleaseIp6AddressesBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewRemoveBandwidthPackageResourcesRequest() (request *RemoveBandwidthPackageResourcesRequest) { + request = &RemoveBandwidthPackageResourcesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "RemoveBandwidthPackageResources") + + return +} + +func NewRemoveBandwidthPackageResourcesResponse() (response *RemoveBandwidthPackageResourcesResponse) { + response = &RemoveBandwidthPackageResourcesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RemoveBandwidthPackageResources +// 接口用于删除带宽包资源,包括[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)和[负载均衡](https://cloud.tencent.com/document/product/214/517)等 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_RESOURCEIDMALFORMED = "InvalidParameterValue.ResourceIdMalformed" +// INVALIDPARAMETERVALUE_RESOURCENOTEXISTED = "InvalidParameterValue.ResourceNotExisted" +// INVALIDPARAMETERVALUE_RESOURCENOTFOUND = "InvalidParameterValue.ResourceNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDRESOURCEPROTOCOL = "UnsupportedOperation.InvalidResourceProtocol" +func (c *Client) RemoveBandwidthPackageResources(request *RemoveBandwidthPackageResourcesRequest) (response *RemoveBandwidthPackageResourcesResponse, err error) { + if request == nil { + request = NewRemoveBandwidthPackageResourcesRequest() + } + + response = NewRemoveBandwidthPackageResourcesResponse() + err = c.Send(request, response) + return +} + +// RemoveBandwidthPackageResources +// 接口用于删除带宽包资源,包括[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)和[负载均衡](https://cloud.tencent.com/document/product/214/517)等 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" +// INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" +// INVALIDPARAMETERVALUE_RESOURCEIDMALFORMED = "InvalidParameterValue.ResourceIdMalformed" +// INVALIDPARAMETERVALUE_RESOURCENOTEXISTED = "InvalidParameterValue.ResourceNotExisted" +// INVALIDPARAMETERVALUE_RESOURCENOTFOUND = "InvalidParameterValue.ResourceNotFound" +// UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" +// UNSUPPORTEDOPERATION_INVALIDRESOURCEPROTOCOL = "UnsupportedOperation.InvalidResourceProtocol" +func (c *Client) RemoveBandwidthPackageResourcesWithContext(ctx context.Context, request *RemoveBandwidthPackageResourcesRequest) (response *RemoveBandwidthPackageResourcesResponse, err error) { + if request == nil { + request = NewRemoveBandwidthPackageResourcesRequest() + } + request.SetContext(ctx) + + response = NewRemoveBandwidthPackageResourcesResponse() + err = c.Send(request, response) + return +} + +func NewRemoveIp6RulesRequest() (request *RemoveIp6RulesRequest) { + request = &RemoveIp6RulesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "RemoveIp6Rules") + + return +} + +func NewRemoveIp6RulesResponse() (response *RemoveIp6RulesResponse) { + response = &RemoveIp6RulesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RemoveIp6Rules +// 1. 该接口用于删除IPV6转换规则 +// +// 2. 支持批量删除同一个转换实例下的多个转换规则 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) RemoveIp6Rules(request *RemoveIp6RulesRequest) (response *RemoveIp6RulesResponse, err error) { + if request == nil { + request = NewRemoveIp6RulesRequest() + } + + response = NewRemoveIp6RulesResponse() + err = c.Send(request, response) + return +} + +// RemoveIp6Rules +// 1. 该接口用于删除IPV6转换规则 +// +// 2. 支持批量删除同一个转换实例下的多个转换规则 +// +// 可能返回的错误码: +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) RemoveIp6RulesWithContext(ctx context.Context, request *RemoveIp6RulesRequest) (response *RemoveIp6RulesResponse, err error) { + if request == nil { + request = NewRemoveIp6RulesRequest() + } + request.SetContext(ctx) + + response = NewRemoveIp6RulesResponse() + err = c.Send(request, response) + return +} + +func NewRenewAddressesRequest() (request *RenewAddressesRequest) { + request = &RenewAddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "RenewAddresses") + + return +} + +func NewRenewAddressesResponse() (response *RenewAddressesResponse) { + response = &RenewAddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RenewAddresses +// 该接口用于续费包月带宽计费模式的弹性公网IP +// +// 可能返回的错误码: +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +func (c *Client) RenewAddresses(request *RenewAddressesRequest) (response *RenewAddressesResponse, err error) { + if request == nil { + request = NewRenewAddressesRequest() + } + + response = NewRenewAddressesResponse() + err = c.Send(request, response) + return +} + +// RenewAddresses +// 该接口用于续费包月带宽计费模式的弹性公网IP +// +// 可能返回的错误码: +// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" +func (c *Client) RenewAddressesWithContext(ctx context.Context, request *RenewAddressesRequest) (response *RenewAddressesResponse, err error) { + if request == nil { + request = NewRenewAddressesRequest() + } + request.SetContext(ctx) + + response = NewRenewAddressesResponse() + err = c.Send(request, response) + return +} + +func NewRenewVpnGatewayRequest() (request *RenewVpnGatewayRequest) { + request = &RenewVpnGatewayRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "RenewVpnGateway") + + return +} + +func NewRenewVpnGatewayResponse() (response *RenewVpnGatewayResponse) { + response = &RenewVpnGatewayResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RenewVpnGateway +// 本接口(RenewVpnGateway)用于预付费(包年包月)VPN网关续费。目前只支持IPSEC网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) RenewVpnGateway(request *RenewVpnGatewayRequest) (response *RenewVpnGatewayResponse, err error) { + if request == nil { + request = NewRenewVpnGatewayRequest() + } + + response = NewRenewVpnGatewayResponse() + err = c.Send(request, response) + return +} + +// RenewVpnGateway +// 本接口(RenewVpnGateway)用于预付费(包年包月)VPN网关续费。目前只支持IPSEC网关。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) RenewVpnGatewayWithContext(ctx context.Context, request *RenewVpnGatewayRequest) (response *RenewVpnGatewayResponse, err error) { + if request == nil { + request = NewRenewVpnGatewayRequest() + } + request.SetContext(ctx) + + response = NewRenewVpnGatewayResponse() + err = c.Send(request, response) + return +} + +func NewReplaceDirectConnectGatewayCcnRoutesRequest() (request *ReplaceDirectConnectGatewayCcnRoutesRequest) { + request = &ReplaceDirectConnectGatewayCcnRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ReplaceDirectConnectGatewayCcnRoutes") + + return +} + +func NewReplaceDirectConnectGatewayCcnRoutesResponse() (response *ReplaceDirectConnectGatewayCcnRoutesResponse) { + response = &ReplaceDirectConnectGatewayCcnRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ReplaceDirectConnectGatewayCcnRoutes +// 本接口(ReplaceDirectConnectGatewayCcnRoutes)根据路由ID(RouteId)修改指定的路由(Route),支持批量修改。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ReplaceDirectConnectGatewayCcnRoutes(request *ReplaceDirectConnectGatewayCcnRoutesRequest) (response *ReplaceDirectConnectGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewReplaceDirectConnectGatewayCcnRoutesRequest() + } + + response = NewReplaceDirectConnectGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +// ReplaceDirectConnectGatewayCcnRoutes +// 本接口(ReplaceDirectConnectGatewayCcnRoutes)根据路由ID(RouteId)修改指定的路由(Route),支持批量修改。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ReplaceDirectConnectGatewayCcnRoutesWithContext(ctx context.Context, request *ReplaceDirectConnectGatewayCcnRoutesRequest) (response *ReplaceDirectConnectGatewayCcnRoutesResponse, err error) { + if request == nil { + request = NewReplaceDirectConnectGatewayCcnRoutesRequest() + } + request.SetContext(ctx) + + response = NewReplaceDirectConnectGatewayCcnRoutesResponse() + err = c.Send(request, response) + return +} + +func NewReplaceRouteTableAssociationRequest() (request *ReplaceRouteTableAssociationRequest) { + request = &ReplaceRouteTableAssociationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ReplaceRouteTableAssociation") + + return +} + +func NewReplaceRouteTableAssociationResponse() (response *ReplaceRouteTableAssociationResponse) { + response = &ReplaceRouteTableAssociationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ReplaceRouteTableAssociation +// 本接口(ReplaceRouteTableAssociation)用于修改子网(Subnet)关联的路由表(RouteTable)。 +// +// * 一个子网只能关联一个路由表。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) ReplaceRouteTableAssociation(request *ReplaceRouteTableAssociationRequest) (response *ReplaceRouteTableAssociationResponse, err error) { + if request == nil { + request = NewReplaceRouteTableAssociationRequest() + } + + response = NewReplaceRouteTableAssociationResponse() + err = c.Send(request, response) + return +} + +// ReplaceRouteTableAssociation +// 本接口(ReplaceRouteTableAssociation)用于修改子网(Subnet)关联的路由表(RouteTable)。 +// +// * 一个子网只能关联一个路由表。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" +func (c *Client) ReplaceRouteTableAssociationWithContext(ctx context.Context, request *ReplaceRouteTableAssociationRequest) (response *ReplaceRouteTableAssociationResponse, err error) { + if request == nil { + request = NewReplaceRouteTableAssociationRequest() + } + request.SetContext(ctx) + + response = NewReplaceRouteTableAssociationResponse() + err = c.Send(request, response) + return +} + +func NewReplaceRoutesRequest() (request *ReplaceRoutesRequest) { + request = &ReplaceRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ReplaceRoutes") + + return +} + +func NewReplaceRoutesResponse() (response *ReplaceRoutesResponse) { + response = &ReplaceRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ReplaceRoutes +// 本接口(ReplaceRoutes)根据路由策略ID(RouteId)修改指定的路由策略(Route),支持批量修改。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CIDRNOTINPEERVPC = "InvalidParameterValue.CidrNotInPeerVpc" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CDCSUBNETNOTSUPPORTUNLOCALGATEWAY = "UnsupportedOperation.CdcSubnetNotSupportUnLocalGateway" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +// UNSUPPORTEDOPERATION_NORMALSUBNETNOTSUPPORTLOCALGATEWAY = "UnsupportedOperation.NormalSubnetNotSupportLocalGateway" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) ReplaceRoutes(request *ReplaceRoutesRequest) (response *ReplaceRoutesResponse, err error) { + if request == nil { + request = NewReplaceRoutesRequest() + } + + response = NewReplaceRoutesResponse() + err = c.Send(request, response) + return +} + +// ReplaceRoutes +// 本接口(ReplaceRoutes)根据路由策略ID(RouteId)修改指定的路由策略(Route),支持批量修改。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CIDRNOTINPEERVPC = "InvalidParameterValue.CidrNotInPeerVpc" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_CDCSUBNETNOTSUPPORTUNLOCALGATEWAY = "UnsupportedOperation.CdcSubnetNotSupportUnLocalGateway" +// UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +// UNSUPPORTEDOPERATION_NORMALSUBNETNOTSUPPORTLOCALGATEWAY = "UnsupportedOperation.NormalSubnetNotSupportLocalGateway" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) ReplaceRoutesWithContext(ctx context.Context, request *ReplaceRoutesRequest) (response *ReplaceRoutesResponse, err error) { + if request == nil { + request = NewReplaceRoutesRequest() + } + request.SetContext(ctx) + + response = NewReplaceRoutesResponse() + err = c.Send(request, response) + return +} + +func NewReplaceSecurityGroupPolicyRequest() (request *ReplaceSecurityGroupPolicyRequest) { + request = &ReplaceSecurityGroupPolicyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ReplaceSecurityGroupPolicy") + + return +} + +func NewReplaceSecurityGroupPolicyResponse() (response *ReplaceSecurityGroupPolicyResponse) { + response = &ReplaceSecurityGroupPolicyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ReplaceSecurityGroupPolicy +// 本接口(ReplaceSecurityGroupPolicy)用于替换单条安全组规则(SecurityGroupPolicy)。 +// +// 单个请求中只能替换单个方向的一条规则, 必须要指定索引(PolicyIndex)。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_CLBPOLICYLIMIT = "UnsupportedOperation.ClbPolicyLimit" +// UNSUPPORTEDOPERATION_DUPLICATEPOLICY = "UnsupportedOperation.DuplicatePolicy" +// UNSUPPORTEDOPERATION_VERSIONMISMATCH = "UnsupportedOperation.VersionMismatch" +func (c *Client) ReplaceSecurityGroupPolicy(request *ReplaceSecurityGroupPolicyRequest) (response *ReplaceSecurityGroupPolicyResponse, err error) { + if request == nil { + request = NewReplaceSecurityGroupPolicyRequest() + } + + response = NewReplaceSecurityGroupPolicyResponse() + err = c.Send(request, response) + return +} + +// ReplaceSecurityGroupPolicy +// 本接口(ReplaceSecurityGroupPolicy)用于替换单条安全组规则(SecurityGroupPolicy)。 +// +// 单个请求中只能替换单个方向的一条规则, 必须要指定索引(PolicyIndex)。 +// +// 可能返回的错误码: +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION_CLBPOLICYLIMIT = "UnsupportedOperation.ClbPolicyLimit" +// UNSUPPORTEDOPERATION_DUPLICATEPOLICY = "UnsupportedOperation.DuplicatePolicy" +// UNSUPPORTEDOPERATION_VERSIONMISMATCH = "UnsupportedOperation.VersionMismatch" +func (c *Client) ReplaceSecurityGroupPolicyWithContext(ctx context.Context, request *ReplaceSecurityGroupPolicyRequest) (response *ReplaceSecurityGroupPolicyResponse, err error) { + if request == nil { + request = NewReplaceSecurityGroupPolicyRequest() + } + request.SetContext(ctx) + + response = NewReplaceSecurityGroupPolicyResponse() + err = c.Send(request, response) + return +} + +func NewResetAttachCcnInstancesRequest() (request *ResetAttachCcnInstancesRequest) { + request = &ResetAttachCcnInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ResetAttachCcnInstances") + + return +} + +func NewResetAttachCcnInstancesResponse() (response *ResetAttachCcnInstancesResponse) { + response = &ResetAttachCcnInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetAttachCcnInstances +// 本接口(ResetAttachCcnInstances)用于跨账号关联实例申请过期时,重新申请关联操作。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ResetAttachCcnInstances(request *ResetAttachCcnInstancesRequest) (response *ResetAttachCcnInstancesResponse, err error) { + if request == nil { + request = NewResetAttachCcnInstancesRequest() + } + + response = NewResetAttachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +// ResetAttachCcnInstances +// 本接口(ResetAttachCcnInstances)用于跨账号关联实例申请过期时,重新申请关联操作。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ResetAttachCcnInstancesWithContext(ctx context.Context, request *ResetAttachCcnInstancesRequest) (response *ResetAttachCcnInstancesResponse, err error) { + if request == nil { + request = NewResetAttachCcnInstancesRequest() + } + request.SetContext(ctx) + + response = NewResetAttachCcnInstancesResponse() + err = c.Send(request, response) + return +} + +func NewResetNatGatewayConnectionRequest() (request *ResetNatGatewayConnectionRequest) { + request = &ResetNatGatewayConnectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ResetNatGatewayConnection") + + return +} + +func NewResetNatGatewayConnectionResponse() (response *ResetNatGatewayConnectionResponse) { + response = &ResetNatGatewayConnectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetNatGatewayConnection +// 本接口(ResetNatGatewayConnection)用来NAT网关并发连接上限。 +// +// 可能返回的错误码: +// RESOURCEINUSE = "ResourceInUse" +// UNSUPPORTEDOPERATION_UNPAIDORDERALREADYEXISTS = "UnsupportedOperation.UnpaidOrderAlreadyExists" +func (c *Client) ResetNatGatewayConnection(request *ResetNatGatewayConnectionRequest) (response *ResetNatGatewayConnectionResponse, err error) { + if request == nil { + request = NewResetNatGatewayConnectionRequest() + } + + response = NewResetNatGatewayConnectionResponse() + err = c.Send(request, response) + return +} + +// ResetNatGatewayConnection +// 本接口(ResetNatGatewayConnection)用来NAT网关并发连接上限。 +// +// 可能返回的错误码: +// RESOURCEINUSE = "ResourceInUse" +// UNSUPPORTEDOPERATION_UNPAIDORDERALREADYEXISTS = "UnsupportedOperation.UnpaidOrderAlreadyExists" +func (c *Client) ResetNatGatewayConnectionWithContext(ctx context.Context, request *ResetNatGatewayConnectionRequest) (response *ResetNatGatewayConnectionResponse, err error) { + if request == nil { + request = NewResetNatGatewayConnectionRequest() + } + request.SetContext(ctx) + + response = NewResetNatGatewayConnectionResponse() + err = c.Send(request, response) + return +} + +func NewResetRoutesRequest() (request *ResetRoutesRequest) { + request = &ResetRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ResetRoutes") + + return +} + +func NewResetRoutesResponse() (response *ResetRoutesResponse) { + response = &ResetRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetRoutes +// 本接口(ResetRoutes)用于对某个路由表名称和所有路由策略(Route)进行重新设置。<br /> +// +// 注意: 调用本接口是先删除当前路由表中所有路由策略, 再保存新提交的路由策略内容, 会引起网络中断。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CIDRNOTINPEERVPC = "InvalidParameterValue.CidrNotInPeerVpc" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// LIMITEXCEEDED = "LimitExceeded" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) ResetRoutes(request *ResetRoutesRequest) (response *ResetRoutesResponse, err error) { + if request == nil { + request = NewResetRoutesRequest() + } + + response = NewResetRoutesResponse() + err = c.Send(request, response) + return +} + +// ResetRoutes +// 本接口(ResetRoutes)用于对某个路由表名称和所有路由策略(Route)进行重新设置。<br /> +// +// 注意: 调用本接口是先删除当前路由表中所有路由策略, 再保存新提交的路由策略内容, 会引起网络中断。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_CIDRNOTINPEERVPC = "InvalidParameterValue.CidrNotInPeerVpc" +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" +// LIMITEXCEEDED = "LimitExceeded" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) ResetRoutesWithContext(ctx context.Context, request *ResetRoutesRequest) (response *ResetRoutesResponse, err error) { + if request == nil { + request = NewResetRoutesRequest() + } + request.SetContext(ctx) + + response = NewResetRoutesResponse() + err = c.Send(request, response) + return +} + +func NewResetVpnConnectionRequest() (request *ResetVpnConnectionRequest) { + request = &ResetVpnConnectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ResetVpnConnection") + + return +} + +func NewResetVpnConnectionResponse() (response *ResetVpnConnectionResponse) { + response = &ResetVpnConnectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetVpnConnection +// 本接口(ResetVpnConnection)用于重置VPN通道。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ResetVpnConnection(request *ResetVpnConnectionRequest) (response *ResetVpnConnectionResponse, err error) { + if request == nil { + request = NewResetVpnConnectionRequest() + } + + response = NewResetVpnConnectionResponse() + err = c.Send(request, response) + return +} + +// ResetVpnConnection +// 本接口(ResetVpnConnection)用于重置VPN通道。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) ResetVpnConnectionWithContext(ctx context.Context, request *ResetVpnConnectionRequest) (response *ResetVpnConnectionResponse, err error) { + if request == nil { + request = NewResetVpnConnectionRequest() + } + request.SetContext(ctx) + + response = NewResetVpnConnectionResponse() + err = c.Send(request, response) + return +} + +func NewResetVpnGatewayInternetMaxBandwidthRequest() (request *ResetVpnGatewayInternetMaxBandwidthRequest) { + request = &ResetVpnGatewayInternetMaxBandwidthRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "ResetVpnGatewayInternetMaxBandwidth") + + return +} + +func NewResetVpnGatewayInternetMaxBandwidthResponse() (response *ResetVpnGatewayInternetMaxBandwidthResponse) { + response = &ResetVpnGatewayInternetMaxBandwidthResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ResetVpnGatewayInternetMaxBandwidth +// 本接口(ResetVpnGatewayInternetMaxBandwidth)调整VPN网关带宽上限。目前支持升级配置,如果是包年包月VPN网关需要在有效期内。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) ResetVpnGatewayInternetMaxBandwidth(request *ResetVpnGatewayInternetMaxBandwidthRequest) (response *ResetVpnGatewayInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewResetVpnGatewayInternetMaxBandwidthRequest() + } + + response = NewResetVpnGatewayInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +// ResetVpnGatewayInternetMaxBandwidth +// 本接口(ResetVpnGatewayInternetMaxBandwidth)调整VPN网关带宽上限。目前支持升级配置,如果是包年包月VPN网关需要在有效期内。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +func (c *Client) ResetVpnGatewayInternetMaxBandwidthWithContext(ctx context.Context, request *ResetVpnGatewayInternetMaxBandwidthRequest) (response *ResetVpnGatewayInternetMaxBandwidthResponse, err error) { + if request == nil { + request = NewResetVpnGatewayInternetMaxBandwidthRequest() + } + request.SetContext(ctx) + + response = NewResetVpnGatewayInternetMaxBandwidthResponse() + err = c.Send(request, response) + return +} + +func NewSetCcnRegionBandwidthLimitsRequest() (request *SetCcnRegionBandwidthLimitsRequest) { + request = &SetCcnRegionBandwidthLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "SetCcnRegionBandwidthLimits") + + return +} + +func NewSetCcnRegionBandwidthLimitsResponse() (response *SetCcnRegionBandwidthLimitsResponse) { + response = &SetCcnRegionBandwidthLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// SetCcnRegionBandwidthLimits +// 本接口(SetCcnRegionBandwidthLimits)用于设置云联网(CCN)各地域出带宽上限,或者地域间带宽上限。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_NOTPOSTPAIDCCNOPERATION = "UnsupportedOperation.NotPostpaidCcnOperation" +func (c *Client) SetCcnRegionBandwidthLimits(request *SetCcnRegionBandwidthLimitsRequest) (response *SetCcnRegionBandwidthLimitsResponse, err error) { + if request == nil { + request = NewSetCcnRegionBandwidthLimitsRequest() + } + + response = NewSetCcnRegionBandwidthLimitsResponse() + err = c.Send(request, response) + return +} + +// SetCcnRegionBandwidthLimits +// 本接口(SetCcnRegionBandwidthLimits)用于设置云联网(CCN)各地域出带宽上限,或者地域间带宽上限。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_NOTPOSTPAIDCCNOPERATION = "UnsupportedOperation.NotPostpaidCcnOperation" +func (c *Client) SetCcnRegionBandwidthLimitsWithContext(ctx context.Context, request *SetCcnRegionBandwidthLimitsRequest) (response *SetCcnRegionBandwidthLimitsResponse, err error) { + if request == nil { + request = NewSetCcnRegionBandwidthLimitsRequest() + } + request.SetContext(ctx) + + response = NewSetCcnRegionBandwidthLimitsResponse() + err = c.Send(request, response) + return +} + +func NewTransformAddressRequest() (request *TransformAddressRequest) { + request = &TransformAddressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "TransformAddress") + + return +} + +func NewTransformAddressResponse() (response *TransformAddressResponse) { + response = &TransformAddressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// TransformAddress +// 本接口 (TransformAddress) 用于将实例的普通公网 IP 转换为[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)。 +// +// * 平台对用户每地域每日解绑 EIP 重新分配普通公网 IP 次数有所限制(可参见 [EIP 产品简介](/document/product/213/1941))。上述配额可通过 [DescribeAddressQuota](https://cloud.tencent.com/document/api/213/1378) 接口获取。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" +// ADDRESSQUOTALIMITEXCEEDED_DAILYALLOCATE = "AddressQuotaLimitExceeded.DailyAllocate" +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_ALREADYBINDEIP = "InvalidInstanceId.AlreadyBindEip" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_INSTANCENOWANIP = "InvalidParameterValue.InstanceNoWanIP" +// INVALIDPARAMETERVALUE_INVALIDINSTANCESTATE = "InvalidParameterValue.InvalidInstanceState" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INVALIDADDRESSINTERNETCHARGETYPE = "UnsupportedOperation.InvalidAddressInternetChargeType" +func (c *Client) TransformAddress(request *TransformAddressRequest) (response *TransformAddressResponse, err error) { + if request == nil { + request = NewTransformAddressRequest() + } + + response = NewTransformAddressResponse() + err = c.Send(request, response) + return +} + +// TransformAddress +// 本接口 (TransformAddress) 用于将实例的普通公网 IP 转换为[弹性公网IP](https://cloud.tencent.com/document/product/213/1941)(简称 EIP)。 +// +// * 平台对用户每地域每日解绑 EIP 重新分配普通公网 IP 次数有所限制(可参见 [EIP 产品简介](/document/product/213/1941))。上述配额可通过 [DescribeAddressQuota](https://cloud.tencent.com/document/api/213/1378) 接口获取。 +// +// 可能返回的错误码: +// ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" +// ADDRESSQUOTALIMITEXCEEDED_DAILYALLOCATE = "AddressQuotaLimitExceeded.DailyAllocate" +// INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" +// INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" +// INVALIDINSTANCEID_ALREADYBINDEIP = "InvalidInstanceId.AlreadyBindEip" +// INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" +// INVALIDPARAMETERVALUE_INSTANCENOWANIP = "InvalidParameterValue.InstanceNoWanIP" +// INVALIDPARAMETERVALUE_INVALIDINSTANCESTATE = "InvalidParameterValue.InvalidInstanceState" +// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" +// UNSUPPORTEDOPERATION_INVALIDADDRESSINTERNETCHARGETYPE = "UnsupportedOperation.InvalidAddressInternetChargeType" +func (c *Client) TransformAddressWithContext(ctx context.Context, request *TransformAddressRequest) (response *TransformAddressResponse, err error) { + if request == nil { + request = NewTransformAddressRequest() + } + request.SetContext(ctx) + + response = NewTransformAddressResponse() + err = c.Send(request, response) + return +} + +func NewUnassignIpv6AddressesRequest() (request *UnassignIpv6AddressesRequest) { + request = &UnassignIpv6AddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "UnassignIpv6Addresses") + + return +} + +func NewUnassignIpv6AddressesResponse() (response *UnassignIpv6AddressesResponse) { + response = &UnassignIpv6AddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UnassignIpv6Addresses +// 本接口(UnassignIpv6Addresses)用于释放弹性网卡`IPv6`地址。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_ATTACHMENTNOTFOUND = "UnauthorizedOperation.AttachmentNotFound" +// UNAUTHORIZEDOPERATION_PRIMARYIP = "UnauthorizedOperation.PrimaryIp" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHMENTNOTFOUND = "UnsupportedOperation.AttachmentNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) UnassignIpv6Addresses(request *UnassignIpv6AddressesRequest) (response *UnassignIpv6AddressesResponse, err error) { + if request == nil { + request = NewUnassignIpv6AddressesRequest() + } + + response = NewUnassignIpv6AddressesResponse() + err = c.Send(request, response) + return +} + +// UnassignIpv6Addresses +// 本接口(UnassignIpv6Addresses)用于释放弹性网卡`IPv6`地址。<br /> +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_ATTACHMENTNOTFOUND = "UnauthorizedOperation.AttachmentNotFound" +// UNAUTHORIZEDOPERATION_PRIMARYIP = "UnauthorizedOperation.PrimaryIp" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHMENTNOTFOUND = "UnsupportedOperation.AttachmentNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) UnassignIpv6AddressesWithContext(ctx context.Context, request *UnassignIpv6AddressesRequest) (response *UnassignIpv6AddressesResponse, err error) { + if request == nil { + request = NewUnassignIpv6AddressesRequest() + } + request.SetContext(ctx) + + response = NewUnassignIpv6AddressesResponse() + err = c.Send(request, response) + return +} + +func NewUnassignIpv6CidrBlockRequest() (request *UnassignIpv6CidrBlockRequest) { + request = &UnassignIpv6CidrBlockRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "UnassignIpv6CidrBlock") + + return +} + +func NewUnassignIpv6CidrBlockResponse() (response *UnassignIpv6CidrBlockResponse) { + response = &UnassignIpv6CidrBlockResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UnassignIpv6CidrBlock +// 本接口(UnassignIpv6CidrBlock)用于释放IPv6网段。<br /> +// +// 网段如果还有IP占用且未回收,则网段无法释放。 +// +// 可能返回的错误码: +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) UnassignIpv6CidrBlock(request *UnassignIpv6CidrBlockRequest) (response *UnassignIpv6CidrBlockResponse, err error) { + if request == nil { + request = NewUnassignIpv6CidrBlockRequest() + } + + response = NewUnassignIpv6CidrBlockResponse() + err = c.Send(request, response) + return +} + +// UnassignIpv6CidrBlock +// 本接口(UnassignIpv6CidrBlock)用于释放IPv6网段。<br /> +// +// 网段如果还有IP占用且未回收,则网段无法释放。 +// +// 可能返回的错误码: +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) UnassignIpv6CidrBlockWithContext(ctx context.Context, request *UnassignIpv6CidrBlockRequest) (response *UnassignIpv6CidrBlockResponse, err error) { + if request == nil { + request = NewUnassignIpv6CidrBlockRequest() + } + request.SetContext(ctx) + + response = NewUnassignIpv6CidrBlockResponse() + err = c.Send(request, response) + return +} + +func NewUnassignIpv6SubnetCidrBlockRequest() (request *UnassignIpv6SubnetCidrBlockRequest) { + request = &UnassignIpv6SubnetCidrBlockRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "UnassignIpv6SubnetCidrBlock") + + return +} + +func NewUnassignIpv6SubnetCidrBlockResponse() (response *UnassignIpv6SubnetCidrBlockResponse) { + response = &UnassignIpv6SubnetCidrBlockResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UnassignIpv6SubnetCidrBlock +// 本接口(UnassignIpv6SubnetCidrBlock)用于释放IPv6子网段。<br /> +// +// 子网段如果还有IP占用且未回收,则子网段无法释放。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) UnassignIpv6SubnetCidrBlock(request *UnassignIpv6SubnetCidrBlockRequest) (response *UnassignIpv6SubnetCidrBlockResponse, err error) { + if request == nil { + request = NewUnassignIpv6SubnetCidrBlockRequest() + } + + response = NewUnassignIpv6SubnetCidrBlockResponse() + err = c.Send(request, response) + return +} + +// UnassignIpv6SubnetCidrBlock +// 本接口(UnassignIpv6SubnetCidrBlock)用于释放IPv6子网段。<br /> +// +// 子网段如果还有IP占用且未回收,则子网段无法释放。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) UnassignIpv6SubnetCidrBlockWithContext(ctx context.Context, request *UnassignIpv6SubnetCidrBlockRequest) (response *UnassignIpv6SubnetCidrBlockResponse, err error) { + if request == nil { + request = NewUnassignIpv6SubnetCidrBlockRequest() + } + request.SetContext(ctx) + + response = NewUnassignIpv6SubnetCidrBlockResponse() + err = c.Send(request, response) + return +} + +func NewUnassignPrivateIpAddressesRequest() (request *UnassignPrivateIpAddressesRequest) { + request = &UnassignPrivateIpAddressesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "UnassignPrivateIpAddresses") + + return +} + +func NewUnassignPrivateIpAddressesResponse() (response *UnassignPrivateIpAddressesResponse) { + response = &UnassignPrivateIpAddressesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UnassignPrivateIpAddresses +// 本接口(UnassignPrivateIpAddresses)用于弹性网卡退还内网 IP。 +// +// * 退还弹性网卡上的辅助内网IP,接口自动解关联弹性公网 IP。不能退还弹性网卡的主内网IP。 +// +// +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHMENTNOTFOUND = "UnsupportedOperation.AttachmentNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) UnassignPrivateIpAddresses(request *UnassignPrivateIpAddressesRequest) (response *UnassignPrivateIpAddressesResponse, err error) { + if request == nil { + request = NewUnassignPrivateIpAddressesRequest() + } + + response = NewUnassignPrivateIpAddressesResponse() + err = c.Send(request, response) + return +} + +// UnassignPrivateIpAddresses +// 本接口(UnassignPrivateIpAddresses)用于弹性网卡退还内网 IP。 +// +// * 退还弹性网卡上的辅助内网IP,接口自动解关联弹性公网 IP。不能退还弹性网卡的主内网IP。 +// +// +// +// 本接口是异步完成,如需查询异步任务执行结果,请使用本接口返回的`RequestId`轮询`DescribeVpcTaskResult`接口。 +// +// 可能返回的错误码: +// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ATTACHMENTNOTFOUND = "UnsupportedOperation.AttachmentNotFound" +// UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" +// UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" +func (c *Client) UnassignPrivateIpAddressesWithContext(ctx context.Context, request *UnassignPrivateIpAddressesRequest) (response *UnassignPrivateIpAddressesResponse, err error) { + if request == nil { + request = NewUnassignPrivateIpAddressesRequest() + } + request.SetContext(ctx) + + response = NewUnassignPrivateIpAddressesResponse() + err = c.Send(request, response) + return +} + +func NewWithdrawNotifyRoutesRequest() (request *WithdrawNotifyRoutesRequest) { + request = &WithdrawNotifyRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("vpc", APIVersion, "WithdrawNotifyRoutes") + + return +} + +func NewWithdrawNotifyRoutesResponse() (response *WithdrawNotifyRoutesResponse) { + response = &WithdrawNotifyRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// WithdrawNotifyRoutes +// 路由表列表页操作增加“从云联网撤销”,用于撤销已发布到云联网的路由。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDROUTEID_NOTFOUND = "InvalidRouteId.NotFound" +// INVALIDROUTETABLEID_MALFORMED = "InvalidRouteTableId.Malformed" +// INVALIDROUTETABLEID_NOTFOUND = "InvalidRouteTableId.NotFound" +// UNSUPPORTEDOPERATION_NOTIFYCCN = "UnsupportedOperation.NotifyCcn" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) WithdrawNotifyRoutes(request *WithdrawNotifyRoutesRequest) (response *WithdrawNotifyRoutesResponse, err error) { + if request == nil { + request = NewWithdrawNotifyRoutesRequest() + } + + response = NewWithdrawNotifyRoutesResponse() + err = c.Send(request, response) + return +} + +// WithdrawNotifyRoutes +// 路由表列表页操作增加“从云联网撤销”,用于撤销已发布到云联网的路由。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALSERVERERROR = "InternalServerError" +// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" +// INVALIDROUTEID_NOTFOUND = "InvalidRouteId.NotFound" +// INVALIDROUTETABLEID_MALFORMED = "InvalidRouteTableId.Malformed" +// INVALIDROUTETABLEID_NOTFOUND = "InvalidRouteTableId.NotFound" +// UNSUPPORTEDOPERATION_NOTIFYCCN = "UnsupportedOperation.NotifyCcn" +// UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" +func (c *Client) WithdrawNotifyRoutesWithContext(ctx context.Context, request *WithdrawNotifyRoutesRequest) (response *WithdrawNotifyRoutesResponse, err error) { + if request == nil { + request = NewWithdrawNotifyRoutesRequest() + } + request.SetContext(ctx) + + response = NewWithdrawNotifyRoutesResponse() + err = c.Send(request, response) + return +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/errors.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/errors.go new file mode 100644 index 0000000000000000000000000000000000000000..6de3eefd77a75881ada139c3a87ac301db8d9d0f --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/errors.go @@ -0,0 +1,621 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v20170312 + +const ( + // 此产品的特有错误码 + + // 账户配额不足,每个腾讯云账户每个地域下最多可创建 20 个 EIP。 + ADDRESSQUOTALIMITEXCEEDED = "AddressQuotaLimitExceeded" + + // 申购次数不足,每个腾讯云账户每个地域每天申购次数为配额数*2 次。 + ADDRESSQUOTALIMITEXCEEDED_DAILYALLOCATE = "AddressQuotaLimitExceeded.DailyAllocate" + + // CAM签名/鉴权错误。 + AUTHFAILURE = "AuthFailure" + + // 地址没有弹性网卡信息。 + FAILEDOPERATION_ADDRESSENIINFONOTFOUND = "FailedOperation.AddressEniInfoNotFound" + + // 内部错误。 + INTERNALERROR = "InternalError" + + // 操作内部错误。 + INTERNALSERVERERROR = "InternalServerError" + + // 不支持此账户。 + INVALIDACCOUNT_NOTSUPPORTED = "InvalidAccount.NotSupported" + + // 指定EIP处于被封堵状态。当EIP处于封堵状态的时候是不能够进行绑定操作的,需要先进行解封。 + INVALIDADDRESSID_BLOCKED = "InvalidAddressId.Blocked" + + // 指定的EIP不存在。 + INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound" + + // 指定EIP处于欠费状态。 + INVALIDADDRESSIDSTATE_INARREARS = "InvalidAddressIdState.InArrears" + + // 指定 EIP 当前状态不能进行绑定操作。只有 EIP 的状态是 UNBIND 时才能进行绑定操作。 + INVALIDADDRESSIDSTATUS_NOTPERMIT = "InvalidAddressIdStatus.NotPermit" + + // 指定EIP的当前状态不允许进行该操作。 + INVALIDADDRESSSTATE = "InvalidAddressState" + + // 不被支持的实例。 + INVALIDINSTANCE_NOTSUPPORTED = "InvalidInstance.NotSupported" + + // 指定实例已经绑定了EIP。需先解绑当前的EIP才能再次进行绑定操作。 + INVALIDINSTANCEID_ALREADYBINDEIP = "InvalidInstanceId.AlreadyBindEip" + + // 无效实例ID。指定的实例ID不存在。 + INVALIDINSTANCEID_NOTFOUND = "InvalidInstanceId.NotFound" + + // 指定 NetworkInterfaceId 不存在或指定的PrivateIpAddress不在NetworkInterfaceId上。 + INVALIDNETWORKINTERFACEID_NOTFOUND = "InvalidNetworkInterfaceId.NotFound" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + + // 参数不支持同时指定。 + INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist" + + // 指定过滤条件不存在。 + INVALIDPARAMETER_FILTERINVALIDKEY = "InvalidParameter.FilterInvalidKey" + + // 指定过滤条件不是键值对。 + INVALIDPARAMETER_FILTERNOTDICT = "InvalidParameter.FilterNotDict" + + // 指定过滤选项值不是列表。 + INVALIDPARAMETER_FILTERVALUESNOTLIST = "InvalidParameter.FilterValuesNotList" + + // 该过滤规则不合法。 + INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter" + + // 下一跳类型与下一跳网关不匹配。 + INVALIDPARAMETER_NEXTHOPMISMATCH = "InvalidParameter.NextHopMismatch" + + // 专线网关跨可用区容灾组不存在。 + INVALIDPARAMETER_VPGHAGROUPNOTFOUND = "InvalidParameter.VpgHaGroupNotFound" + + // 指定的两个参数冲突,不能同时存在。 EIP只能绑定在实例上或指定网卡的指定内网 IP 上。 + INVALIDPARAMETERCONFLICT = "InvalidParameterConflict" + + // 参数取值错误。 + INVALIDPARAMETERVALUE = "InvalidParameterValue" + + // 该地址ID不合法。 + INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed" + + // 该地址计费方式与其他地址冲突。 + INVALIDPARAMETERVALUE_ADDRESSINTERNETCHARGETYPECONFLICT = "InvalidParameterValue.AddressInternetChargeTypeConflict" + + // 该IP地址现在不可用。 + INVALIDPARAMETERVALUE_ADDRESSIPNOTAVAILABLE = "InvalidParameterValue.AddressIpNotAvailable" + + // IP地址未找到。 + INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound" + + // VPC中不存在此IP地址。 + INVALIDPARAMETERVALUE_ADDRESSIPNOTINVPC = "InvalidParameterValue.AddressIpNotInVpc" + + // 该地址不可与此实例申请。 + INVALIDPARAMETERVALUE_ADDRESSNOTAPPLICABLE = "InvalidParameterValue.AddressNotApplicable" + + // 该地址不是CalcIP。 + INVALIDPARAMETERVALUE_ADDRESSNOTCALCIP = "InvalidParameterValue.AddressNotCalcIP" + + // 该地址不是EIP。 + INVALIDPARAMETERVALUE_ADDRESSNOTEIP = "InvalidParameterValue.AddressNotEIP" + + // 未找到该地址。 + INVALIDPARAMETERVALUE_ADDRESSNOTFOUND = "InvalidParameterValue.AddressNotFound" + + // 该IPv6地址已经发布。 + INVALIDPARAMETERVALUE_ADDRESSPUBLISHED = "InvalidParameterValue.AddressPublished" + + // 带宽超出限制。 + INVALIDPARAMETERVALUE_BANDWIDTHOUTOFRANGE = "InvalidParameterValue.BandwidthOutOfRange" + + // 带宽包ID不正确。 + INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEIDMALFORMED = "InvalidParameterValue.BandwidthPackageIdMalformed" + + // 该带宽包正在被使用。 + INVALIDPARAMETERVALUE_BANDWIDTHPACKAGEINUSE = "InvalidParameterValue.BandwidthPackageInUse" + + // 未查询到该带宽包。 + INVALIDPARAMETERVALUE_BANDWIDTHPACKAGENOTFOUND = "InvalidParameterValue.BandwidthPackageNotFound" + + // 选择带宽低于可允许的最小范围。 + INVALIDPARAMETERVALUE_BANDWIDTHTOOSMALL = "InvalidParameterValue.BandwidthTooSmall" + + // 指定云联网关联黑石私有网络数量达到上限。 + INVALIDPARAMETERVALUE_CCNATTACHBMVPCLIMITEXCEEDED = "InvalidParameterValue.CcnAttachBmvpcLimitExceeded" + + // 目的网段不在对端VPC的CIDR范围内。 + INVALIDPARAMETERVALUE_CIDRNOTINPEERVPC = "InvalidParameterValue.CidrNotInPeerVpc" + + // 非法入参组合。 + INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination" + + // 入参重复。 + INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate" + + // 缺少参数。 + INVALIDPARAMETERVALUE_EMPTY = "InvalidParameterValue.Empty" + + // IPv6规则没有更改。 + INVALIDPARAMETERVALUE_IPV6RULENOTCHANGE = "InvalidParameterValue.IPv6RuleNotChange" + + // 该实例的计费方式与其他实例不同。 + INVALIDPARAMETERVALUE_INCONSISTENTINSTANCEINTERNETCHARGETYPE = "InvalidParameterValue.InconsistentInstanceInternetChargeType" + + // 该实例不支持AnycastEIP。 + INVALIDPARAMETERVALUE_INSTANCEDOESNOTSUPPORTANYCAST = "InvalidParameterValue.InstanceDoesNotSupportAnycast" + + // 该实例已有WanIP。 + INVALIDPARAMETERVALUE_INSTANCEHASWANIP = "InvalidParameterValue.InstanceHasWanIP" + + // 该实例没有CalcIP,无法完成请求。 + INVALIDPARAMETERVALUE_INSTANCENOCALCIP = "InvalidParameterValue.InstanceNoCalcIP" + + // 该实例没有WanIP,无法完成请求。 + INVALIDPARAMETERVALUE_INSTANCENOWANIP = "InvalidParameterValue.InstanceNoWanIP" + + // 由于该IP被禁用,无法绑定该实例。 + INVALIDPARAMETERVALUE_INSTANCENORMALPUBLICIPBLOCKED = "InvalidParameterValue.InstanceNormalPublicIpBlocked" + + // 弹性网卡绑定的实例与地址绑定的实例不一致。 + INVALIDPARAMETERVALUE_INSTANCENOTMATCHASSOCIATEENI = "InvalidParameterValue.InstanceNotMatchAssociateEni" + + // 网络计费模式没有更改。 + INVALIDPARAMETERVALUE_INTERNETCHARGETYPENOTCHANGED = "InvalidParameterValue.InternetChargeTypeNotChanged" + + // 无效的带宽包计费方式。 + INVALIDPARAMETERVALUE_INVALIDBANDWIDTHPACKAGECHARGETYPE = "InvalidParameterValue.InvalidBandwidthPackageChargeType" + + // 参数的值不存在或不支持。 + INVALIDPARAMETERVALUE_INVALIDBUSINESS = "InvalidParameterValue.InvalidBusiness" + + // 传入的DedicatedClusterId有误。 + INVALIDPARAMETERVALUE_INVALIDDEDICATEDCLUSTERID = "InvalidParameterValue.InvalidDedicatedClusterId" + + // 该IP只能绑定小时流量后付费和带宽包实例。 + INVALIDPARAMETERVALUE_INVALIDINSTANCEINTERNETCHARGETYPE = "InvalidParameterValue.InvalidInstanceInternetChargeType" + + // 该实例状态无法完成操作。 + INVALIDPARAMETERVALUE_INVALIDINSTANCESTATE = "InvalidParameterValue.InvalidInstanceState" + + // 无效的IPv6地址。 + INVALIDPARAMETERVALUE_INVALIDIPV6 = "InvalidParameterValue.InvalidIpv6" + + // 该Tag不合法。 + INVALIDPARAMETERVALUE_INVALIDTAG = "InvalidParameterValue.InvalidTag" + + // 负载均衡实例已经绑定了EIP。 + INVALIDPARAMETERVALUE_LBALREADYBINDEIP = "InvalidParameterValue.LBAlreadyBindEip" + + // 参数值超出限制。 + INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded" + + // 入参格式不合法。 + INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed" + + // 缺少绑定的实例。 + INVALIDPARAMETERVALUE_MISSINGASSOCIATEENTITY = "InvalidParameterValue.MissingAssociateEntity" + + // 集群类型不同的IP不可在同一请求中。 + INVALIDPARAMETERVALUE_MIXEDADDRESSIPSETTYPE = "InvalidParameterValue.MixedAddressIpSetType" + + // NAT网关的SNAT规则已经存在。 + INVALIDPARAMETERVALUE_NATSNATRULEEXISTS = "InvalidParameterValue.NatSnatRuleExists" + + // 探测目的IP和网络探测在同一个VPC内。 + INVALIDPARAMETERVALUE_NETDETECTINVPC = "InvalidParameterValue.NetDetectInVpc" + + // 探测目的IP在云联网的路由表中找不到匹配的下一跳。 + INVALIDPARAMETERVALUE_NETDETECTNOTFOUNDIP = "InvalidParameterValue.NetDetectNotFoundIp" + + // 探测目的IP与同一个私有网络内的同一个子网下的其他网络探测的探测目的IP相同。 + INVALIDPARAMETERVALUE_NETDETECTSAMEIP = "InvalidParameterValue.NetDetectSameIp" + + // 网络接口ID不正确。 + INVALIDPARAMETERVALUE_NETWORKINTERFACEIDMALFORMED = "InvalidParameterValue.NetworkInterfaceIdMalformed" + + // 未找到网络接口ID,或私有IP地址未在网络接口配置。 + INVALIDPARAMETERVALUE_NETWORKINTERFACENOTFOUND = "InvalidParameterValue.NetworkInterfaceNotFound" + + // 该操作仅对主网卡支持。 + INVALIDPARAMETERVALUE_ONLYSUPPORTEDFORMASTERNETWORKCARD = "InvalidParameterValue.OnlySupportedForMasterNetworkCard" + + // 参数值不在指定范围。 + INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range" + + // 参数值是一个系统保留对象。 + INVALIDPARAMETERVALUE_RESERVED = "InvalidParameterValue.Reserved" + + // 该资源已加入其他带宽包。 + INVALIDPARAMETERVALUE_RESOURCEALREADYEXISTED = "InvalidParameterValue.ResourceAlreadyExisted" + + // 该资源已过期。 + INVALIDPARAMETERVALUE_RESOURCEEXPIRED = "InvalidParameterValue.ResourceExpired" + + // 资源ID不正确。 + INVALIDPARAMETERVALUE_RESOURCEIDMALFORMED = "InvalidParameterValue.ResourceIdMalformed" + + // 该资源不在此带宽包中。 + INVALIDPARAMETERVALUE_RESOURCENOTEXISTED = "InvalidParameterValue.ResourceNotExisted" + + // 未查询到该资源。 + INVALIDPARAMETERVALUE_RESOURCENOTFOUND = "InvalidParameterValue.ResourceNotFound" + + // 该资源不支持此操作。 + INVALIDPARAMETERVALUE_RESOURCENOTSUPPORT = "InvalidParameterValue.ResourceNotSupport" + + // 子网CIDR冲突。 + INVALIDPARAMETERVALUE_SUBNETCONFLICT = "InvalidParameterValue.SubnetConflict" + + // 子网与辅助Cidr网段重叠。 + INVALIDPARAMETERVALUE_SUBNETOVERLAPASSISTCIDR = "InvalidParameterValue.SubnetOverlapAssistCidr" + + // 子网CIDR不合法。 + INVALIDPARAMETERVALUE_SUBNETRANGE = "InvalidParameterValue.SubnetRange" + + // 该标签和值不存在。 + INVALIDPARAMETERVALUE_TAGNOTEXISTED = "InvalidParameterValue.TagNotExisted" + + // 无效参数值。参数值太长。 + INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong" + + // 该可用区不可用。 + INVALIDPARAMETERVALUE_UNAVAILABLEZONE = "InvalidParameterValue.UnavailableZone" + + // 目的网段和当前VPC的CIDR冲突。 + INVALIDPARAMETERVALUE_VPCCIDRCONFLICT = "InvalidParameterValue.VpcCidrConflict" + + // 当前功能不支持此专线网关。 + INVALIDPARAMETERVALUE_VPGTYPENOTMATCH = "InvalidParameterValue.VpgTypeNotMatch" + + // 目的网段和当前VPN通道的CIDR冲突。 + INVALIDPARAMETERVALUE_VPNCONNCIDRCONFLICT = "InvalidParameterValue.VpnConnCidrConflict" + + // VPN通道探测ip冲突。 + INVALIDPARAMETERVALUE_VPNCONNHEALTHCHECKIPCONFLICT = "InvalidParameterValue.VpnConnHealthCheckIpConflict" + + // 参数Zone的值与CDC所在Zone冲突。 + INVALIDPARAMETERVALUE_ZONECONFLICT = "InvalidParameterValue.ZoneConflict" + + // 指定弹性网卡的指定内网IP已经绑定了EIP,不能重复绑定。 + INVALIDPRIVATEIPADDRESS_ALREADYBINDEIP = "InvalidPrivateIpAddress.AlreadyBindEip" + + // 无效的路由策略ID(RouteId)。 + INVALIDROUTEID_NOTFOUND = "InvalidRouteId.NotFound" + + // 无效的路由表,路由表实例ID不合法。 + INVALIDROUTETABLEID_MALFORMED = "InvalidRouteTableId.Malformed" + + // 无效的路由表,路由表资源不存在,请再次核实您输入的资源信息是否正确。 + INVALIDROUTETABLEID_NOTFOUND = "InvalidRouteTableId.NotFound" + + // 无效的安全组,安全组实例ID不合法。 + INVALIDSECURITYGROUPID_MALFORMED = "InvalidSecurityGroupID.Malformed" + + // 无效的安全组,安全组实例ID不存在。 + INVALIDSECURITYGROUPID_NOTFOUND = "InvalidSecurityGroupID.NotFound" + + // 无效的VPC,VPC实例ID不合法。 + INVALIDVPCID_MALFORMED = "InvalidVpcId.Malformed" + + // 无效的VPC,VPC资源不存在。 + INVALIDVPCID_NOTFOUND = "InvalidVpcId.NotFound" + + // 无效的VPN网关,VPN实例ID不合法。 + INVALIDVPNGATEWAYID_MALFORMED = "InvalidVpnGatewayId.Malformed" + + // 无效的VPN网关,VPN实例不存在,请再次核实您输入的资源信息是否正确。 + INVALIDVPNGATEWAYID_NOTFOUND = "InvalidVpnGatewayId.NotFound" + + // 超过配额限制。 + LIMITEXCEEDED = "LimitExceeded" + + // 分配IP地址数量达到上限。 + LIMITEXCEEDED_ADDRESS = "LimitExceeded.Address" + + // 租户申请的弹性IP超过上限。 + LIMITEXCEEDED_ADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.AddressQuotaLimitExceeded" + + // VPC分配网段数量达到上限。 + LIMITEXCEEDED_CIDRBLOCK = "LimitExceeded.CidrBlock" + + // 租户每天申请的弹性IP超过上限。 + LIMITEXCEEDED_DAILYALLOCATEADDRESSQUOTALIMITEXCEEDED = "LimitExceeded.DailyAllocateAddressQuotaLimitExceeded" + + // 私有网络创建的NAT网关超过上限。 + LIMITEXCEEDED_NATGATEWAYPERVPCLIMITEXCEEDED = "LimitExceeded.NatGatewayPerVpcLimitExceeded" + + // NAT网关绑定的弹性IP超过上限。 + LIMITEXCEEDED_PUBLICIPADDRESSPERNATGATEWAYLIMITEXCEEDED = "LimitExceeded.PublicIpAddressPerNatGatewayLimitExceeded" + + // 安全组规则数量超过上限。 + LIMITEXCEEDED_SECURITYGROUPPOLICYSET = "LimitExceeded.SecurityGroupPolicySet" + + // 子网分配子网段数量达到上限。 + LIMITEXCEEDED_SUBNETCIDRBLOCK = "LimitExceeded.SubnetCidrBlock" + + // 缺少参数错误。 + MISSINGPARAMETER = "MissingParameter" + + // 资源被占用。 + RESOURCEINUSE = "ResourceInUse" + + // 指定IP地址已经在使用中。 + RESOURCEINUSE_ADDRESS = "ResourceInUse.Address" + + // 资源不足。 + RESOURCEINSUFFICIENT = "ResourceInsufficient" + + // 网段资源不足。 + RESOURCEINSUFFICIENT_CIDRBLOCK = "ResourceInsufficient.CidrBlock" + + // 资源不存在。 + RESOURCENOTFOUND = "ResourceNotFound" + + // Svc不存在。 + RESOURCENOTFOUND_SVCNOTEXIST = "ResourceNotFound.SvcNotExist" + + // 资源不可用。 + RESOURCEUNAVAILABLE = "ResourceUnavailable" + + // 当前用户不在指定终端节点服务的白名单内。 + RESOURCEUNAVAILABLE_SERVICEWHITELISTNOTADDED = "ResourceUnavailable.ServiceWhiteListNotAdded" + + // 未授权操作。 + UNAUTHORIZEDOPERATION = "UnauthorizedOperation" + + // 绑定关系不存在。 + UNAUTHORIZEDOPERATION_ATTACHMENTNOTFOUND = "UnauthorizedOperation.AttachmentNotFound" + + // 账号未实名。 + UNAUTHORIZEDOPERATION_NOREALNAMEAUTHENTICATION = "UnauthorizedOperation.NoRealNameAuthentication" + + // 主IP不支持指定操作。 + UNAUTHORIZEDOPERATION_PRIMARYIP = "UnauthorizedOperation.PrimaryIp" + + // 未知参数错误。 + UNKNOWNPARAMETER = "UnknownParameter" + + // 参数无法识别,可以尝试相似参数代替。 + UNKNOWNPARAMETER_WITHGUESS = "UnknownParameter.WithGuess" + + // 操作不支持。 + UNSUPPORTEDOPERATION = "UnsupportedOperation" + + // 接口不存在。 + UNSUPPORTEDOPERATION_ACTIONNOTFOUND = "UnsupportedOperation.ActionNotFound" + + // 欠费状态不支持该操作。 + UNSUPPORTEDOPERATION_ADDRESSIPINARREAR = "UnsupportedOperation.AddressIpInArrear" + + // 此付费模式的IP地址不支持该操作。 + UNSUPPORTEDOPERATION_ADDRESSIPINTERNETCHARGETYPENOTPERMIT = "UnsupportedOperation.AddressIpInternetChargeTypeNotPermit" + + // 绑定此实例的IP地址不支持该操作。 + UNSUPPORTEDOPERATION_ADDRESSIPNOTSUPPORTINSTANCE = "UnsupportedOperation.AddressIpNotSupportInstance" + + // 此IP地址状态不支持该操作。 + UNSUPPORTEDOPERATION_ADDRESSIPSTATUSNOTPERMIT = "UnsupportedOperation.AddressIpStatusNotPermit" + + // 该地址状态不支持此操作。 + UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit" + + // 资源不在指定的AppId下。 + UNSUPPORTEDOPERATION_APPIDMISMATCH = "UnsupportedOperation.AppIdMismatch" + + // APPId不存在。 + UNSUPPORTEDOPERATION_APPIDNOTFOUND = "UnsupportedOperation.AppIdNotFound" + + // 绑定关系已存在。 + UNSUPPORTEDOPERATION_ATTACHMENTALREADYEXISTS = "UnsupportedOperation.AttachmentAlreadyExists" + + // 绑定关系不存在。 + UNSUPPORTEDOPERATION_ATTACHMENTNOTFOUND = "UnsupportedOperation.AttachmentNotFound" + + // 当前云联网还有预付费带宽未到期,不支持主动删除。 + UNSUPPORTEDOPERATION_BANDWIDTHNOTEXPIRED = "UnsupportedOperation.BandwidthNotExpired" + + // 该带宽包不支持此操作。 + UNSUPPORTEDOPERATION_BANDWIDTHPACKAGEIDNOTSUPPORTED = "UnsupportedOperation.BandwidthPackageIdNotSupported" + + // 已绑定EIP。 + UNSUPPORTEDOPERATION_BINDEIP = "UnsupportedOperation.BindEIP" + + // 指定VPC CIDR范围不支持私有网络和基础网络设备互通。 + UNSUPPORTEDOPERATION_CIDRUNSUPPORTEDCLASSICLINK = "UnsupportedOperation.CIDRUnSupportedClassicLink" + + // 实例已关联CCN。 + UNSUPPORTEDOPERATION_CCNATTACHED = "UnsupportedOperation.CcnAttached" + + // 当前云联网有流日志,不支持删除。 + UNSUPPORTEDOPERATION_CCNHASFLOWLOG = "UnsupportedOperation.CcnHasFlowLog" + + // 实例未关联CCN。 + UNSUPPORTEDOPERATION_CCNNOTATTACHED = "UnsupportedOperation.CcnNotAttached" + + // 指定的路由表不存在。 + UNSUPPORTEDOPERATION_CCNROUTETABLENOTEXIST = "UnsupportedOperation.CcnRouteTableNotExist" + + // CDC子网不支持创建非本地网关类型的路由。 + UNSUPPORTEDOPERATION_CDCSUBNETNOTSUPPORTUNLOCALGATEWAY = "UnsupportedOperation.CdcSubnetNotSupportUnLocalGateway" + + // 实例已经和VPC绑定。 + UNSUPPORTEDOPERATION_CLASSICINSTANCEIDALREADYEXISTS = "UnsupportedOperation.ClassicInstanceIdAlreadyExists" + + // 公网Clb不支持该规则。 + UNSUPPORTEDOPERATION_CLBPOLICYLIMIT = "UnsupportedOperation.ClbPolicyLimit" + + // 与该VPC下的TKE容器的网段重叠。 + UNSUPPORTEDOPERATION_CONFLICTWITHDOCKERROUTE = "UnsupportedOperation.ConflictWithDockerRoute" + + // 指定的VPC未发现专线网关。 + UNSUPPORTEDOPERATION_DCGATEWAYSNOTFOUNDINVPC = "UnsupportedOperation.DcGatewaysNotFoundInVpc" + + // 专线网关正在更新BGP Community属性。 + UNSUPPORTEDOPERATION_DIRECTCONNECTGATEWAYISUPDATINGCOMMUNITY = "UnsupportedOperation.DirectConnectGatewayIsUpdatingCommunity" + + // 指定的路由策略已发布至云联网,请先撤销。 + UNSUPPORTEDOPERATION_DISABLEDNOTIFYCCN = "UnsupportedOperation.DisabledNotifyCcn" + + // 安全组规则重复。 + UNSUPPORTEDOPERATION_DUPLICATEPOLICY = "UnsupportedOperation.DuplicatePolicy" + + // 不支持ECMP。 + UNSUPPORTEDOPERATION_ECMP = "UnsupportedOperation.Ecmp" + + // 和云联网的路由形成ECMP。 + UNSUPPORTEDOPERATION_ECMPWITHCCNROUTE = "UnsupportedOperation.EcmpWithCcnRoute" + + // 和用户自定义的路由形成ECMP。 + UNSUPPORTEDOPERATION_ECMPWITHUSERROUTE = "UnsupportedOperation.EcmpWithUserRoute" + + // 终端节点服务本身不能是终端节点。 + UNSUPPORTEDOPERATION_ENDPOINTSERVICE = "UnsupportedOperation.EndPointService" + + // 该种类型地址不支持此操作。 + UNSUPPORTEDOPERATION_INCORRECTADDRESSRESOURCETYPE = "UnsupportedOperation.IncorrectAddressResourceType" + + // 用户配置的实例和路由表不匹配。 + UNSUPPORTEDOPERATION_INSTANCEANDRTBNOTMATCH = "UnsupportedOperation.InstanceAndRtbNotMatch" + + // 该地址绑定的实例状态不支持此操作。 + UNSUPPORTEDOPERATION_INSTANCESTATENOTSUPPORTED = "UnsupportedOperation.InstanceStateNotSupported" + + // 账户余额不足。 + UNSUPPORTEDOPERATION_INSUFFICIENTFUNDS = "UnsupportedOperation.InsufficientFunds" + + // 不支持该操作。 + UNSUPPORTEDOPERATION_INVALIDACTION = "UnsupportedOperation.InvalidAction" + + // 该地址的网络付费方式不支持此操作。 + UNSUPPORTEDOPERATION_INVALIDADDRESSINTERNETCHARGETYPE = "UnsupportedOperation.InvalidAddressInternetChargeType" + + // 该地址状态不支持此操作。 + UNSUPPORTEDOPERATION_INVALIDADDRESSSTATE = "UnsupportedOperation.InvalidAddressState" + + // 无效的实例状态。 + UNSUPPORTEDOPERATION_INVALIDINSTANCESTATE = "UnsupportedOperation.InvalidInstanceState" + + // 该计费方式不支持此操作。 + UNSUPPORTEDOPERATION_INVALIDRESOURCEINTERNETCHARGETYPE = "UnsupportedOperation.InvalidResourceInternetChargeType" + + // 不支持加入此协议的带宽包。 + UNSUPPORTEDOPERATION_INVALIDRESOURCEPROTOCOL = "UnsupportedOperation.InvalidResourceProtocol" + + // 资源状态不合法。 + UNSUPPORTEDOPERATION_INVALIDSTATE = "UnsupportedOperation.InvalidState" + + // 关联当前云联网的实例的账号存在不是金融云账号。 + UNSUPPORTEDOPERATION_ISNOTFINANCEACCOUNT = "UnsupportedOperation.IsNotFinanceAccount" + + // 该ISP不支持此操作。 + UNSUPPORTEDOPERATION_ISPNOTSUPPORTED = "UnsupportedOperation.IspNotSupported" + + // 指定的CDC已存在本地网关。 + UNSUPPORTEDOPERATION_LOCALGATEWAYALREADYEXISTS = "UnsupportedOperation.LocalGatewayAlreadyExists" + + // 资源互斥操作任务正在执行。 + UNSUPPORTEDOPERATION_MUTEXOPERATIONTASKRUNNING = "UnsupportedOperation.MutexOperationTaskRunning" + + // NAT网关类型不支持SNAT规则。 + UNSUPPORTEDOPERATION_NATGATEWAYTYPENOTSUPPORTSNAT = "UnsupportedOperation.NatGatewayTypeNotSupportSNAT" + + // NAT实例不支持该操作。 + UNSUPPORTEDOPERATION_NATNOTSUPPORTED = "UnsupportedOperation.NatNotSupported" + + // 指定的子网不支持创建本地网关类型的路由。 + UNSUPPORTEDOPERATION_NORMALSUBNETNOTSUPPORTLOCALGATEWAY = "UnsupportedOperation.NormalSubnetNotSupportLocalGateway" + + // 当前云联网实例未处于申请中状态,无法进行操作。 + UNSUPPORTEDOPERATION_NOTPENDINGCCNINSTANCE = "UnsupportedOperation.NotPendingCcnInstance" + + // 当前云联网为非后付费类型,无法进行此操作。 + UNSUPPORTEDOPERATION_NOTPOSTPAIDCCNOPERATION = "UnsupportedOperation.NotPostpaidCcnOperation" + + // 指定的路由策略不支持发布或撤销至云联网。 + UNSUPPORTEDOPERATION_NOTIFYCCN = "UnsupportedOperation.NotifyCcn" + + // 预付费云联网只支持地域间限速。 + UNSUPPORTEDOPERATION_PREPAIDCCNONLYSUPPORTINTERREGIONLIMIT = "UnsupportedOperation.PrepaidCcnOnlySupportInterRegionLimit" + + // 指定的值是主IP。 + UNSUPPORTEDOPERATION_PRIMARYIP = "UnsupportedOperation.PrimaryIp" + + // Nat网关至少存在一个弹性IP,弹性IP不能解绑。 + UNSUPPORTEDOPERATION_PUBLICIPADDRESSDISASSOCIATE = "UnsupportedOperation.PublicIpAddressDisassociate" + + // 绑定NAT网关的弹性IP不是BGP性质的IP。 + UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTBGPIP = "UnsupportedOperation.PublicIpAddressIsNotBGPIp" + + // 绑定NAT网关的弹性IP不存在。 + UNSUPPORTEDOPERATION_PUBLICIPADDRESSISNOTEXISTED = "UnsupportedOperation.PublicIpAddressIsNotExisted" + + // 绑定NAT网关的弹性IP不是按流量计费的。 + UNSUPPORTEDOPERATION_PUBLICIPADDRESSNOTBILLEDBYTRAFFIC = "UnsupportedOperation.PublicIpAddressNotBilledByTraffic" + + // 输入的资源ID与IP绑定的资源不匹配,请检查。 + UNSUPPORTEDOPERATION_RESOURCEMISMATCH = "UnsupportedOperation.ResourceMismatch" + + // 指定的终端节点服务所创建的终端节点不支持绑定安全组。 + UNSUPPORTEDOPERATION_SPECIALENDPOINTSERVICE = "UnsupportedOperation.SpecialEndPointService" + + // 系统路由,禁止操作。 + UNSUPPORTEDOPERATION_SYSTEMROUTE = "UnsupportedOperation.SystemRoute" + + // 账号ID不存在。 + UNSUPPORTEDOPERATION_UINNOTFOUND = "UnsupportedOperation.UinNotFound" + + // 不支持跨境。 + UNSUPPORTEDOPERATION_UNABLECROSSBORDER = "UnsupportedOperation.UnableCrossBorder" + + // 当前云联网无法关联金融云实例。 + UNSUPPORTEDOPERATION_UNABLECROSSFINANCE = "UnsupportedOperation.UnableCrossFinance" + + // 未分配IPv6网段。 + UNSUPPORTEDOPERATION_UNASSIGNCIDRBLOCK = "UnsupportedOperation.UnassignCidrBlock" + + // 未绑定EIP。 + UNSUPPORTEDOPERATION_UNBINDEIP = "UnsupportedOperation.UnbindEIP" + + // 账户还有未支付订单,请先完成付款。 + UNSUPPORTEDOPERATION_UNPAIDORDERALREADYEXISTS = "UnsupportedOperation.UnpaidOrderAlreadyExists" + + // 指定机型不支持弹性网卡。 + UNSUPPORTEDOPERATION_UNSUPPORTEDINSTANCEFAMILY = "UnsupportedOperation.UnsupportedInstanceFamily" + + // 当前用户付费类型不支持创建所选付费类型的云联网。 + UNSUPPORTEDOPERATION_USERANDCCNCHARGETYPENOTMATCH = "UnsupportedOperation.UserAndCcnChargeTypeNotMatch" + + // 指定安全组规则版本号和当前最新版本不一致。 + UNSUPPORTEDOPERATION_VERSIONMISMATCH = "UnsupportedOperation.VersionMismatch" + + // 资源不属于同一个VPC。 + UNSUPPORTEDOPERATION_VPCMISMATCH = "UnsupportedOperation.VpcMismatch" + + // 指定资源在不同的可用区。 + UNSUPPORTEDOPERATION_ZONEMISMATCH = "UnsupportedOperation.ZoneMismatch" + + // 已经达到指定区域vpc资源申请数量上限。 + VPCLIMITEXCEEDED = "VpcLimitExceeded" +) diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go new file mode 100644 index 0000000000000000000000000000000000000000..fcd615419599f79190b92219b59c1da4e284dd50 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go @@ -0,0 +1,17592 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v20170312 + +import ( + "encoding/json" + + tcerr "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +type AcceptAttachCcnInstancesRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 接受关联实例列表。 + Instances []*CcnInstance `json:"Instances,omitempty" name:"Instances"` +} + +func (r *AcceptAttachCcnInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AcceptAttachCcnInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "Instances") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AcceptAttachCcnInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AcceptAttachCcnInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AcceptAttachCcnInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AcceptAttachCcnInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AccountAttribute struct { + + // 属性名 + AttributeName *string `json:"AttributeName,omitempty" name:"AttributeName"` + + // 属性值 + AttributeValues []*string `json:"AttributeValues,omitempty" name:"AttributeValues"` +} + +type AddBandwidthPackageResourcesRequest struct { + *tchttp.BaseRequest + + // 资源唯一ID,当前支持EIP资源和LB资源,形如'eip-xxxx', 'lb-xxxx' + ResourceIds []*string `json:"ResourceIds,omitempty" name:"ResourceIds"` + + // 带宽包唯一标识ID,形如'bwp-xxxx' + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` + + // 带宽包类型,当前支持'BGP'类型,表示内部资源是BGP IP。 + NetworkType *string `json:"NetworkType,omitempty" name:"NetworkType"` + + // 资源类型,包括'Address', 'LoadBalance' + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 带宽包协议类型。当前支持'ipv4'和'ipv6'协议类型。 + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` +} + +func (r *AddBandwidthPackageResourcesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddBandwidthPackageResourcesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ResourceIds") + delete(f, "BandwidthPackageId") + delete(f, "NetworkType") + delete(f, "ResourceType") + delete(f, "Protocol") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddBandwidthPackageResourcesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddBandwidthPackageResourcesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddBandwidthPackageResourcesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddBandwidthPackageResourcesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddIp6RulesRequest struct { + *tchttp.BaseRequest + + // IPV6转换实例唯一ID,形如ip6-xxxxxxxx + Ip6TranslatorId *string `json:"Ip6TranslatorId,omitempty" name:"Ip6TranslatorId"` + + // IPV6转换规则信息 + Ip6RuleInfos []*Ip6RuleInfo `json:"Ip6RuleInfos,omitempty" name:"Ip6RuleInfos"` + + // IPV6转换规则名称 + Ip6RuleName *string `json:"Ip6RuleName,omitempty" name:"Ip6RuleName"` +} + +func (r *AddIp6RulesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddIp6RulesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6TranslatorId") + delete(f, "Ip6RuleInfos") + delete(f, "Ip6RuleName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddIp6RulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddIp6RulesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // IPV6转换规则唯一ID数组,形如rule6-xxxxxxxx + Ip6RuleSet []*string `json:"Ip6RuleSet,omitempty" name:"Ip6RuleSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddIp6RulesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddIp6RulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddTemplateMemberRequest struct { + *tchttp.BaseRequest + + // 参数模板实例ID,支持IP地址、协议端口、IP地址组、协议端口组四种参数模板的实例ID。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 需要添加的参数模板成员信息,支持IP地址、协议端口、IP地址组、协议端口组四种类型,类型需要与TemplateId参数类型一致。 + TemplateMember []*MemberInfo `json:"TemplateMember,omitempty" name:"TemplateMember"` +} + +func (r *AddTemplateMemberRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddTemplateMemberRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "TemplateMember") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddTemplateMemberRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddTemplateMemberResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddTemplateMemberResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddTemplateMemberResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Address struct { + + // `EIP`的`ID`,是`EIP`的唯一标识。 + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // `EIP`名称。 + AddressName *string `json:"AddressName,omitempty" name:"AddressName"` + + // `EIP`状态,包含'CREATING'(创建中),'BINDING'(绑定中),'BIND'(已绑定),'UNBINDING'(解绑中),'UNBIND'(已解绑),'OFFLINING'(释放中),'BIND_ENI'(绑定悬空弹性网卡) + AddressStatus *string `json:"AddressStatus,omitempty" name:"AddressStatus"` + + // 外网IP地址 + AddressIp *string `json:"AddressIp,omitempty" name:"AddressIp"` + + // 绑定的资源实例`ID`。可能是一个`CVM`,`NAT`。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 绑定的弹性网卡ID + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 绑定的资源内网ip + PrivateAddressIp *string `json:"PrivateAddressIp,omitempty" name:"PrivateAddressIp"` + + // 资源隔离状态。true表示eip处于隔离状态,false表示资源处于未隔离状态 + IsArrears *bool `json:"IsArrears,omitempty" name:"IsArrears"` + + // 资源封堵状态。true表示eip处于封堵状态,false表示eip处于未封堵状态 + IsBlocked *bool `json:"IsBlocked,omitempty" name:"IsBlocked"` + + // eip是否支持直通模式。true表示eip支持直通模式,false表示资源不支持直通模式 + IsEipDirectConnection *bool `json:"IsEipDirectConnection,omitempty" name:"IsEipDirectConnection"` + + // EIP 资源类型,包括CalcIP、WanIP、EIP和AnycastEIP。其中:CalcIP 表示设备 IP,WanIP 表示普通公网 IP,EIP 表示弹性公网 IP,AnycastEip 表示加速 EIP。 + AddressType *string `json:"AddressType,omitempty" name:"AddressType"` + + // eip是否在解绑后自动释放。true表示eip将会在解绑后自动释放,false表示eip在解绑后不会自动释放 + CascadeRelease *bool `json:"CascadeRelease,omitempty" name:"CascadeRelease"` + + // EIP ALG开启的协议类型。 + EipAlgType *AlgType `json:"EipAlgType,omitempty" name:"EipAlgType"` + + // 弹性公网IP的运营商信息,当前可能返回值包括"CMCC","CTCC","CUCC","BGP" + InternetServiceProvider *string `json:"InternetServiceProvider,omitempty" name:"InternetServiceProvider"` + + // 是否本地带宽EIP + LocalBgp *bool `json:"LocalBgp,omitempty" name:"LocalBgp"` + + // 弹性公网IP的带宽值。注意,传统账户类型账户的弹性公网IP没有带宽属性,值为空。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Bandwidth *uint64 `json:"Bandwidth,omitempty" name:"Bandwidth"` + + // 弹性公网IP的网络计费模式。注意,传统账户类型账户的弹性公网IP没有网络计费模式属性,值为空。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 包括: + // <li><strong>BANDWIDTH_PREPAID_BY_MONTH</strong></li> + // <p style="padding-left: 30px;">表示包月带宽预付费。</p> + // <li><strong>TRAFFIC_POSTPAID_BY_HOUR</strong></li> + // <p style="padding-left: 30px;">表示按小时流量后付费。</p> + // <li><strong>BANDWIDTH_POSTPAID_BY_HOUR</strong></li> + // <p style="padding-left: 30px;">表示按小时带宽后付费。</p> + // <li><strong>BANDWIDTH_PACKAGE</strong></li> + // <p style="padding-left: 30px;">表示共享带宽包。</p> + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 弹性公网IP关联的标签列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` +} + +type AddressChargePrepaid struct { + + // 购买实例的时长,单位是月。可支持时长:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36 + Period *int64 `json:"Period,omitempty" name:"Period"` + + // 自动续费标志。0表示手动续费,1表示自动续费,2表示到期不续费。默认缺省为0即手动续费 + AutoRenewFlag *int64 `json:"AutoRenewFlag,omitempty" name:"AutoRenewFlag"` +} + +type AddressInfo struct { + + // ip地址。 + Address *string `json:"Address,omitempty" name:"Address"` + + // 备注。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +type AddressTemplate struct { + + // IP地址模板名称。 + AddressTemplateName *string `json:"AddressTemplateName,omitempty" name:"AddressTemplateName"` + + // IP地址模板实例唯一ID。 + AddressTemplateId *string `json:"AddressTemplateId,omitempty" name:"AddressTemplateId"` + + // IP地址信息。 + AddressSet []*string `json:"AddressSet,omitempty" name:"AddressSet"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 带备注的IP地址信息。 + AddressExtraSet []*AddressInfo `json:"AddressExtraSet,omitempty" name:"AddressExtraSet"` +} + +type AddressTemplateGroup struct { + + // IP地址模板集合名称。 + AddressTemplateGroupName *string `json:"AddressTemplateGroupName,omitempty" name:"AddressTemplateGroupName"` + + // IP地址模板集合实例ID,例如:ipmg-dih8xdbq。 + AddressTemplateGroupId *string `json:"AddressTemplateGroupId,omitempty" name:"AddressTemplateGroupId"` + + // IP地址模板ID。 + AddressTemplateIdSet []*string `json:"AddressTemplateIdSet,omitempty" name:"AddressTemplateIdSet"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // IP地址模板实例。 + AddressTemplateSet []*AddressTemplateItem `json:"AddressTemplateSet,omitempty" name:"AddressTemplateSet"` +} + +type AddressTemplateItem struct { + + // 起始地址。 + From *string `json:"From,omitempty" name:"From"` + + // 结束地址。 + To *string `json:"To,omitempty" name:"To"` +} + +type AddressTemplateSpecification struct { + + // IP地址ID,例如:ipm-2uw6ujo6。 + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // IP地址组ID,例如:ipmg-2uw6ujo6。 + AddressGroupId *string `json:"AddressGroupId,omitempty" name:"AddressGroupId"` +} + +type AlgType struct { + + // Ftp协议Alg功能是否开启 + Ftp *bool `json:"Ftp,omitempty" name:"Ftp"` + + // Sip协议Alg功能是否开启 + Sip *bool `json:"Sip,omitempty" name:"Sip"` +} + +type AllocateAddressesRequest struct { + *tchttp.BaseRequest + + // EIP数量。默认值:1。 + AddressCount *int64 `json:"AddressCount,omitempty" name:"AddressCount"` + + // EIP线路类型。默认值:BGP。 + // <ul style="margin:0"><li>已开通静态单线IP白名单的用户,可选值:<ul><li>CMCC:中国移动</li> + // <li>CTCC:中国电信</li> + // <li>CUCC:中国联通</li></ul>注意:仅部分地域支持静态单线IP。</li></ul> + InternetServiceProvider *string `json:"InternetServiceProvider,omitempty" name:"InternetServiceProvider"` + + // EIP计费方式。 + // <ul style="margin:0"><li>已开通标准账户类型白名单的用户,可选值:<ul><li>BANDWIDTH_PACKAGE:[共享带宽包](https://cloud.tencent.com/document/product/684/15255)付费(需额外开通共享带宽包白名单)</li> + // <li>BANDWIDTH_POSTPAID_BY_HOUR:带宽按小时后付费</li> + // <li>BANDWIDTH_PREPAID_BY_MONTH:包月按带宽预付费</li> + // <li>TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费</li></ul>默认值:TRAFFIC_POSTPAID_BY_HOUR。</li> + // <li>未开通标准账户类型白名单的用户,EIP计费方式与其绑定的实例的计费方式一致,无需传递此参数。</li></ul> + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // EIP出带宽上限,单位:Mbps。 + // <ul style="margin:0"><li>已开通标准账户类型白名单的用户,可选值范围取决于EIP计费方式:<ul><li>BANDWIDTH_PACKAGE:1 Mbps 至 1000 Mbps</li> + // <li>BANDWIDTH_POSTPAID_BY_HOUR:1 Mbps 至 100 Mbps</li> + // <li>BANDWIDTH_PREPAID_BY_MONTH:1 Mbps 至 200 Mbps</li> + // <li>TRAFFIC_POSTPAID_BY_HOUR:1 Mbps 至 100 Mbps</li></ul>默认值:1 Mbps。</li> + // <li>未开通标准账户类型白名单的用户,EIP出带宽上限取决于与其绑定的实例的公网出带宽上限,无需传递此参数。</li></ul> + InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 包月按带宽预付费EIP的计费参数。EIP为包月按带宽预付费时,该参数必传,其余场景不需传递 + AddressChargePrepaid *AddressChargePrepaid `json:"AddressChargePrepaid,omitempty" name:"AddressChargePrepaid"` + + // EIP类型。默认值:EIP。 + // <ul style="margin:0"><li>已开通Anycast公网加速白名单的用户,可选值:<ul><li>AnycastEIP:加速IP,可参见 [Anycast 公网加速](https://cloud.tencent.com/document/product/644)</li></ul>注意:仅部分地域支持加速IP。</li></ul> + // <ul style="margin:0"><li>已开通精品IP白名单的用户,可选值:<ul><li>HighQualityEIP:精品IP</li></ul>注意:仅部分地域支持精品IP。</li></ul> + AddressType *string `json:"AddressType,omitempty" name:"AddressType"` + + // Anycast发布域。 + // <ul style="margin:0"><li>已开通Anycast公网加速白名单的用户,可选值:<ul><li>ANYCAST_ZONE_GLOBAL:全球发布域(需要额外开通Anycast全球加速白名单)</li><li>ANYCAST_ZONE_OVERSEAS:境外发布域</li><li><b>[已废弃]</b> ANYCAST_ZONE_A:发布域A(已更新为全球发布域)</li><li><b>[已废弃]</b> ANYCAST_ZONE_B:发布域B(已更新为全球发布域)</li></ul>默认值:ANYCAST_ZONE_OVERSEAS。</li></ul> + AnycastZone *string `json:"AnycastZone,omitempty" name:"AnycastZone"` + + // <b>[已废弃]</b> AnycastEIP不再区分是否负载均衡。原参数说明如下: + // AnycastEIP是否用于绑定负载均衡。 + // <ul style="margin:0"><li>已开通Anycast公网加速白名单的用户,可选值:<ul><li>TRUE:AnycastEIP可绑定对象为负载均衡</li> + // <li>FALSE:AnycastEIP可绑定对象为云服务器、NAT网关、高可用虚拟IP等</li></ul>默认值:FALSE。</li></ul> + ApplicableForCLB *bool `json:"ApplicableForCLB,omitempty" name:"ApplicableForCLB"` + + // 需要关联的标签列表。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // BGP带宽包唯一ID参数。设定该参数且InternetChargeType为BANDWIDTH_PACKAGE,则表示创建的EIP加入该BGP带宽包并采用带宽包计费 + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` + + // EIP名称,用于申请EIP时用户自定义该EIP的个性化名称,默认值:未命名 + AddressName *string `json:"AddressName,omitempty" name:"AddressName"` +} + +func (r *AllocateAddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AllocateAddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressCount") + delete(f, "InternetServiceProvider") + delete(f, "InternetChargeType") + delete(f, "InternetMaxBandwidthOut") + delete(f, "AddressChargePrepaid") + delete(f, "AddressType") + delete(f, "AnycastZone") + delete(f, "ApplicableForCLB") + delete(f, "Tags") + delete(f, "BandwidthPackageId") + delete(f, "AddressName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AllocateAddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AllocateAddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 申请到的 EIP 的唯一 ID 列表。 + AddressSet []*string `json:"AddressSet,omitempty" name:"AddressSet"` + + // 异步任务TaskId。可以使用[DescribeTaskResult](https://cloud.tencent.com/document/api/215/36271)接口查询任务状态。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AllocateAddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AllocateAddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AllocateIp6AddressesBandwidthRequest struct { + *tchttp.BaseRequest + + // 需要开通公网访问能力的IPV6地址 + Ip6Addresses []*string `json:"Ip6Addresses,omitempty" name:"Ip6Addresses"` + + // 带宽,单位Mbps。默认是1Mbps + InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 网络计费模式。IPV6当前对标准账户类型支持"TRAFFIC_POSTPAID_BY_HOUR",对传统账户类型支持"BANDWIDTH_PACKAGE"。默认网络计费模式是"TRAFFIC_POSTPAID_BY_HOUR"。 + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 带宽包id,上移账号,申请带宽包计费模式的ipv6地址需要传入. + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` +} + +func (r *AllocateIp6AddressesBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AllocateIp6AddressesBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6Addresses") + delete(f, "InternetMaxBandwidthOut") + delete(f, "InternetChargeType") + delete(f, "BandwidthPackageId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AllocateIp6AddressesBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AllocateIp6AddressesBandwidthResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 弹性公网 IPV6 的唯一 ID 列表。 + AddressSet []*string `json:"AddressSet,omitempty" name:"AddressSet"` + + // 异步任务TaskId。可以使用[DescribeTaskResult](https://cloud.tencent.com/document/api/215/36271)接口查询任务状态。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AllocateIp6AddressesBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AllocateIp6AddressesBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssignIpv6AddressesRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例`ID`,形如:`eni-m6dyj72l`。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 指定的`IPv6`地址列表,单次最多指定10个。与入参`Ipv6AddressCount`合并计算配额。与Ipv6AddressCount必填一个。 + Ipv6Addresses []*Ipv6Address `json:"Ipv6Addresses,omitempty" name:"Ipv6Addresses"` + + // 自动分配`IPv6`地址个数,内网IP地址个数总和不能超过配数。与入参`Ipv6Addresses`合并计算配额。与Ipv6Addresses必填一个。 + Ipv6AddressCount *uint64 `json:"Ipv6AddressCount,omitempty" name:"Ipv6AddressCount"` +} + +func (r *AssignIpv6AddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssignIpv6AddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "Ipv6Addresses") + delete(f, "Ipv6AddressCount") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssignIpv6AddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssignIpv6AddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 分配给弹性网卡的`IPv6`地址列表。 + Ipv6AddressSet []*Ipv6Address `json:"Ipv6AddressSet,omitempty" name:"Ipv6AddressSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssignIpv6AddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssignIpv6AddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssignIpv6CidrBlockRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`,形如:`vpc-f49l6u0z`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *AssignIpv6CidrBlockRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssignIpv6CidrBlockRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssignIpv6CidrBlockRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssignIpv6CidrBlockResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 分配的 `IPv6` 网段。形如:`3402:4e00:20:1000::/56` + Ipv6CidrBlock *string `json:"Ipv6CidrBlock,omitempty" name:"Ipv6CidrBlock"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssignIpv6CidrBlockResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssignIpv6CidrBlockResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssignIpv6SubnetCidrBlockRequest struct { + *tchttp.BaseRequest + + // 子网所在私有网络`ID`。形如:`vpc-f49l6u0z`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 分配 `IPv6` 子网段列表。 + Ipv6SubnetCidrBlocks []*Ipv6SubnetCidrBlock `json:"Ipv6SubnetCidrBlocks,omitempty" name:"Ipv6SubnetCidrBlocks"` +} + +func (r *AssignIpv6SubnetCidrBlockRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssignIpv6SubnetCidrBlockRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "Ipv6SubnetCidrBlocks") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssignIpv6SubnetCidrBlockRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssignIpv6SubnetCidrBlockResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 分配 `IPv6` 子网段列表。 + Ipv6SubnetCidrBlockSet []*Ipv6SubnetCidrBlock `json:"Ipv6SubnetCidrBlockSet,omitempty" name:"Ipv6SubnetCidrBlockSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssignIpv6SubnetCidrBlockResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssignIpv6SubnetCidrBlockResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssignPrivateIpAddressesRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID,例如:eni-m6dyj72l。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 指定的内网IP信息,单次最多指定10个。与SecondaryPrivateIpAddressCount至少提供一个。 + PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` + + // 新申请的内网IP地址个数,与PrivateIpAddresses至少提供一个。内网IP地址个数总和不能超过配额数,详见<a href="/document/product/576/18527">弹性网卡使用限制</a>。 + SecondaryPrivateIpAddressCount *uint64 `json:"SecondaryPrivateIpAddressCount,omitempty" name:"SecondaryPrivateIpAddressCount"` +} + +func (r *AssignPrivateIpAddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssignPrivateIpAddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "PrivateIpAddresses") + delete(f, "SecondaryPrivateIpAddressCount") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssignPrivateIpAddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssignPrivateIpAddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 内网IP详细信息。 + PrivateIpAddressSet []*PrivateIpAddressSpecification `json:"PrivateIpAddressSet,omitempty" name:"PrivateIpAddressSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssignPrivateIpAddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssignPrivateIpAddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssistantCidr struct { + + // `VPC`实例`ID`。形如:`vpc-6v2ht8q5` + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 辅助CIDR。形如:`172.16.0.0/16` + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 辅助CIDR类型(0:普通辅助CIDR,1:容器辅助CIDR),默认都是0。 + AssistantType *int64 `json:"AssistantType,omitempty" name:"AssistantType"` + + // 辅助CIDR拆分的子网。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SubnetSet []*Subnet `json:"SubnetSet,omitempty" name:"SubnetSet"` +} + +type AssociateAddressRequest struct { + *tchttp.BaseRequest + + // 标识 EIP 的唯一 ID。EIP 唯一 ID 形如:`eip-11112222`。 + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // 要绑定的实例 ID。实例 ID 形如:`ins-11112222`。可通过登录[控制台](https://console.cloud.tencent.com/cvm)查询,也可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 要绑定的弹性网卡 ID。 弹性网卡 ID 形如:`eni-11112222`。`NetworkInterfaceId` 与 `InstanceId` 不可同时指定。弹性网卡 ID 可通过登录[控制台](https://console.cloud.tencent.com/vpc/eni)查询,也可通过[DescribeNetworkInterfaces](https://cloud.tencent.com/document/api/215/15817)接口返回值中的`networkInterfaceId`获取。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 要绑定的内网 IP。如果指定了 `NetworkInterfaceId` 则也必须指定 `PrivateIpAddress` ,表示将 EIP 绑定到指定弹性网卡的指定内网 IP 上。同时要确保指定的 `PrivateIpAddress` 是指定的 `NetworkInterfaceId` 上的一个内网 IP。指定弹性网卡的内网 IP 可通过登录[控制台](https://console.cloud.tencent.com/vpc/eni)查询,也可通过[DescribeNetworkInterfaces](https://cloud.tencent.com/document/api/215/15817)接口返回值中的`privateIpAddress`获取。 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` + + // 指定绑定时是否设置直通。弹性公网 IP 直通请参见 [EIP 直通](https://cloud.tencent.com/document/product/1199/41709)。取值:True、False,默认值为 False。当绑定 CVM 实例、EKS 弹性集群时,可设定此参数为 True。此参数目前处于内测中,如需使用,请提交 [工单申请](https://console.cloud.tencent.com/workorder/category?level1_id=6&level2_id=163&source=0&data_title=%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%20CLB&level3_id=1071&queue=96&scene_code=34639&step=2)。 + EipDirectConnection *bool `json:"EipDirectConnection,omitempty" name:"EipDirectConnection"` +} + +func (r *AssociateAddressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateAddressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressId") + delete(f, "InstanceId") + delete(f, "NetworkInterfaceId") + delete(f, "PrivateIpAddress") + delete(f, "EipDirectConnection") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateAddressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateAddressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 异步任务TaskId。可以使用[DescribeTaskResult](https://cloud.tencent.com/document/api/215/36271)接口查询任务状态。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateAddressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateAddressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateDhcpIpWithAddressIpRequest struct { + *tchttp.BaseRequest + + // `DhcpIp`唯一`ID`,形如:`dhcpip-9o233uri`。必须是没有绑定`EIP`的`DhcpIp` + DhcpIpId *string `json:"DhcpIpId,omitempty" name:"DhcpIpId"` + + // 弹性公网`IP`。必须是没有绑定`DhcpIp`的`EIP` + AddressIp *string `json:"AddressIp,omitempty" name:"AddressIp"` +} + +func (r *AssociateDhcpIpWithAddressIpRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateDhcpIpWithAddressIpRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DhcpIpId") + delete(f, "AddressIp") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateDhcpIpWithAddressIpRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateDhcpIpWithAddressIpResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateDhcpIpWithAddressIpResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateDhcpIpWithAddressIpResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateDirectConnectGatewayNatGatewayRequest struct { + *tchttp.BaseRequest + + // 专线网关ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // NAT网关ID。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` +} + +func (r *AssociateDirectConnectGatewayNatGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateDirectConnectGatewayNatGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "NatGatewayId") + delete(f, "DirectConnectGatewayId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateDirectConnectGatewayNatGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateDirectConnectGatewayNatGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateDirectConnectGatewayNatGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateDirectConnectGatewayNatGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateNatGatewayAddressRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df45454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // 需要申请的弹性IP个数,系统会按您的要求生产N个弹性IP, 其中AddressCount和PublicAddresses至少传递一个。 + AddressCount *uint64 `json:"AddressCount,omitempty" name:"AddressCount"` + + // 绑定NAT网关的弹性IP数组,其中AddressCount和PublicAddresses至少传递一个。 + PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses"` + + // 弹性IP可用区,自动分配弹性IP时传递。 + Zone *string `json:"Zone,omitempty" name:"Zone"` +} + +func (r *AssociateNatGatewayAddressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateNatGatewayAddressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "AddressCount") + delete(f, "PublicIpAddresses") + delete(f, "Zone") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateNatGatewayAddressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateNatGatewayAddressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateNatGatewayAddressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateNatGatewayAddressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateNetworkAclSubnetsRequest struct { + *tchttp.BaseRequest + + // 网络ACL实例ID。例如:acl-12345678。 + NetworkAclId *string `json:"NetworkAclId,omitempty" name:"NetworkAclId"` + + // 子网实例ID数组。例如:[subnet-12345678] + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` +} + +func (r *AssociateNetworkAclSubnetsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateNetworkAclSubnetsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkAclId") + delete(f, "SubnetIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateNetworkAclSubnetsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateNetworkAclSubnetsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateNetworkAclSubnetsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateNetworkAclSubnetsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AssociateNetworkInterfaceSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID。形如:eni-pxir56ns。每次请求的实例的上限为100。 + NetworkInterfaceIds []*string `json:"NetworkInterfaceIds,omitempty" name:"NetworkInterfaceIds"` + + // 安全组实例ID,例如:sg-33ocnj9n,可通过DescribeSecurityGroups获取。每次请求的实例的上限为100。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +func (r *AssociateNetworkInterfaceSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateNetworkInterfaceSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceIds") + delete(f, "SecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateNetworkInterfaceSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AssociateNetworkInterfaceSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AssociateNetworkInterfaceSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AssociateNetworkInterfaceSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AttachCcnInstancesRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 关联网络实例列表 + Instances []*CcnInstance `json:"Instances,omitempty" name:"Instances"` + + // CCN所属UIN(根账号),默认当前账号所属UIN + CcnUin *string `json:"CcnUin,omitempty" name:"CcnUin"` +} + +func (r *AttachCcnInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachCcnInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "Instances") + delete(f, "CcnUin") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AttachCcnInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AttachCcnInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AttachCcnInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachCcnInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AttachClassicLinkVpcRequest struct { + *tchttp.BaseRequest + + // VPC实例ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // CVM实例ID + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *AttachClassicLinkVpcRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachClassicLinkVpcRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AttachClassicLinkVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AttachClassicLinkVpcResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AttachClassicLinkVpcResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachClassicLinkVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AttachNetworkInterfaceRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID,例如:eni-m6dyj72l。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // CVM实例ID。形如:ins-r8hr2upy。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 网卡的挂载类型:0 标准型,1扩展型,默认值0。 + AttachType *uint64 `json:"AttachType,omitempty" name:"AttachType"` +} + +func (r *AttachNetworkInterfaceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachNetworkInterfaceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "InstanceId") + delete(f, "AttachType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AttachNetworkInterfaceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AttachNetworkInterfaceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AttachNetworkInterfaceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AttachNetworkInterfaceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AuditCrossBorderComplianceRequest struct { + *tchttp.BaseRequest + + // 服务商, 可选值:`UNICOM`。 + ServiceProvider *string `json:"ServiceProvider,omitempty" name:"ServiceProvider"` + + // 表单唯一`ID`。 + ComplianceId *uint64 `json:"ComplianceId,omitempty" name:"ComplianceId"` + + // 通过:`APPROVED `,拒绝:`DENY`。 + AuditBehavior *string `json:"AuditBehavior,omitempty" name:"AuditBehavior"` +} + +func (r *AuditCrossBorderComplianceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AuditCrossBorderComplianceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ServiceProvider") + delete(f, "ComplianceId") + delete(f, "AuditBehavior") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AuditCrossBorderComplianceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AuditCrossBorderComplianceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AuditCrossBorderComplianceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AuditCrossBorderComplianceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type BandwidthPackage struct { + + // 带宽包唯一标识Id + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` + + // 带宽包类型,包括'BGP','SINGLEISP','ANYCAST' + NetworkType *string `json:"NetworkType,omitempty" name:"NetworkType"` + + // 带宽包计费类型,包括'TOP5_POSTPAID_BY_MONTH'和'PERCENT95_POSTPAID_BY_MONTH' + ChargeType *string `json:"ChargeType,omitempty" name:"ChargeType"` + + // 带宽包名称 + BandwidthPackageName *string `json:"BandwidthPackageName,omitempty" name:"BandwidthPackageName"` + + // 带宽包创建时间。按照`ISO8601`标准表示,并且使用`UTC`时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 带宽包状态,包括'CREATING','CREATED','DELETING','DELETED' + Status *string `json:"Status,omitempty" name:"Status"` + + // 带宽包资源信息 + ResourceSet []*Resource `json:"ResourceSet,omitempty" name:"ResourceSet"` + + // 带宽包限速大小。单位:Mbps,-1表示不限速。 + Bandwidth *int64 `json:"Bandwidth,omitempty" name:"Bandwidth"` +} + +type BandwidthPackageBillBandwidth struct { + + // 当前计费用量,单位为 Mbps + BandwidthUsage *uint64 `json:"BandwidthUsage,omitempty" name:"BandwidthUsage"` +} + +type CCN struct { + + // 云联网唯一ID + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 云联网名称 + CcnName *string `json:"CcnName,omitempty" name:"CcnName"` + + // 云联网描述信息 + CcnDescription *string `json:"CcnDescription,omitempty" name:"CcnDescription"` + + // 关联实例数量 + InstanceCount *uint64 `json:"InstanceCount,omitempty" name:"InstanceCount"` + + // 创建时间 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 实例状态, 'ISOLATED': 隔离中(欠费停服),'AVAILABLE':运行中。 + State *string `json:"State,omitempty" name:"State"` + + // 实例服务质量,’PT’:白金,'AU':金,'AG':银。 + QosLevel *string `json:"QosLevel,omitempty" name:"QosLevel"` + + // 付费类型,PREPAID为预付费,POSTPAID为后付费。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 限速类型,INTER_REGION_LIMIT为地域间限速;OUTER_REGION_LIMIT为地域出口限速。 + // 注意:此字段可能返回 null,表示取不到有效值。 + BandwidthLimitType *string `json:"BandwidthLimitType,omitempty" name:"BandwidthLimitType"` + + // 标签键值对。 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` + + // 是否支持云联网路由优先级的功能。False:不支持,True:支持。 + RoutePriorityFlag *bool `json:"RoutePriorityFlag,omitempty" name:"RoutePriorityFlag"` + + // 实例关联的路由表个数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableCount *uint64 `json:"RouteTableCount,omitempty" name:"RouteTableCount"` + + // 是否开启云联网多路由表特性。False:未开启,True:开启。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableFlag *bool `json:"RouteTableFlag,omitempty" name:"RouteTableFlag"` +} + +type CcnAttachedInstance struct { + + // 云联网实例ID。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 关联实例类型: + // <li>`VPC`:私有网络</li> + // <li>`DIRECTCONNECT`:专线网关</li> + // <li>`BMVPC`:黑石私有网络</li> + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 关联实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 关联实例名称。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 关联实例所属大区,例如:ap-guangzhou。 + InstanceRegion *string `json:"InstanceRegion,omitempty" name:"InstanceRegion"` + + // 关联实例所属UIN(根账号)。 + InstanceUin *string `json:"InstanceUin,omitempty" name:"InstanceUin"` + + // 关联实例CIDR。 + CidrBlock []*string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 关联实例状态: + // <li>`PENDING`:申请中</li> + // <li>`ACTIVE`:已连接</li> + // <li>`EXPIRED`:已过期</li> + // <li>`REJECTED`:已拒绝</li> + // <li>`DELETED`:已删除</li> + // <li>`FAILED`:失败的(2小时后将异步强制解关联)</li> + // <li>`ATTACHING`:关联中</li> + // <li>`DETACHING`:解关联中</li> + // <li>`DETACHFAILED`:解关联失败(2小时后将异步强制解关联)</li> + State *string `json:"State,omitempty" name:"State"` + + // 关联时间。 + AttachedTime *string `json:"AttachedTime,omitempty" name:"AttachedTime"` + + // 云联网所属UIN(根账号)。 + CcnUin *string `json:"CcnUin,omitempty" name:"CcnUin"` + + // 关联实例所属的大地域,如: CHINA_MAINLAND + InstanceArea *string `json:"InstanceArea,omitempty" name:"InstanceArea"` + + // 备注 + Description *string `json:"Description,omitempty" name:"Description"` + + // 路由表ID + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由表名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` +} + +type CcnBandwidthInfo struct { + + // 带宽所属的云联网ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 实例的创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 实例的过期时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExpiredTime *string `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + + // 带宽实例的唯一ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RegionFlowControlId *string `json:"RegionFlowControlId,omitempty" name:"RegionFlowControlId"` + + // 带宽是否自动续费的标记。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 描述带宽的地域和限速上限信息。在地域间限速的情况下才会返回参数,出口限速模式不返回。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CcnRegionBandwidthLimit *CcnRegionBandwidthLimit `json:"CcnRegionBandwidthLimit,omitempty" name:"CcnRegionBandwidthLimit"` +} + +type CcnInstance struct { + + // 关联实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 关联实例ID所属大区,例如:ap-guangzhou。 + InstanceRegion *string `json:"InstanceRegion,omitempty" name:"InstanceRegion"` + + // 关联实例类型,可选值: + // <li>`VPC`:私有网络</li> + // <li>`DIRECTCONNECT`:专线网关</li> + // <li>`BMVPC`:黑石私有网络</li> + // <li>`VPNGW`:VPNGW类型</li> + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 备注 + Description *string `json:"Description,omitempty" name:"Description"` + + // 实例关联的路由表ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` +} + +type CcnRegionBandwidthLimit struct { + + // 地域,例如:ap-guangzhou + Region *string `json:"Region,omitempty" name:"Region"` + + // 出带宽上限,单位:Mbps + BandwidthLimit *uint64 `json:"BandwidthLimit,omitempty" name:"BandwidthLimit"` + + // 是否黑石地域,默认`false`。 + IsBm *bool `json:"IsBm,omitempty" name:"IsBm"` + + // 目的地域,例如:ap-shanghai + // 注意:此字段可能返回 null,表示取不到有效值。 + DstRegion *string `json:"DstRegion,omitempty" name:"DstRegion"` + + // 目的地域是否为黑石地域,默认`false`。 + DstIsBm *bool `json:"DstIsBm,omitempty" name:"DstIsBm"` +} + +type CcnRoute struct { + + // 路由策略ID + RouteId *string `json:"RouteId,omitempty" name:"RouteId"` + + // 目的端 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 下一跳类型(关联实例类型),所有类型:VPC、DIRECTCONNECT + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 下一跳(关联实例) + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 下一跳名称(关联实例名称) + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 下一跳所属地域(关联实例所属地域) + InstanceRegion *string `json:"InstanceRegion,omitempty" name:"InstanceRegion"` + + // 更新时间 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` + + // 路由是否启用 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 关联实例所属UIN(根账号) + InstanceUin *string `json:"InstanceUin,omitempty" name:"InstanceUin"` + + // 路由的扩展状态 + ExtraState *string `json:"ExtraState,omitempty" name:"ExtraState"` + + // 是否动态路由 + IsBgp *bool `json:"IsBgp,omitempty" name:"IsBgp"` + + // 路由优先级 + RoutePriority *uint64 `json:"RoutePriority,omitempty" name:"RoutePriority"` + + // 下一跳扩展名称(关联实例的扩展名称) + InstanceExtraName *string `json:"InstanceExtraName,omitempty" name:"InstanceExtraName"` +} + +type CheckAssistantCidrRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`。形如:`vpc-6v2ht8q5` + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 待添加的负载CIDR。CIDR数组,格式如["10.0.0.0/16", "172.16.0.0/16"]。入参NewCidrBlocks和OldCidrBlocks至少需要其一。 + NewCidrBlocks []*string `json:"NewCidrBlocks,omitempty" name:"NewCidrBlocks"` + + // 待删除的负载CIDR。CIDR数组,格式如["10.0.0.0/16", "172.16.0.0/16"]。入参NewCidrBlocks和OldCidrBlocks至少需要其一。 + OldCidrBlocks []*string `json:"OldCidrBlocks,omitempty" name:"OldCidrBlocks"` +} + +func (r *CheckAssistantCidrRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CheckAssistantCidrRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "NewCidrBlocks") + delete(f, "OldCidrBlocks") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CheckAssistantCidrRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CheckAssistantCidrResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 冲突资源信息数组。 + ConflictSourceSet []*ConflictSource `json:"ConflictSourceSet,omitempty" name:"ConflictSourceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CheckAssistantCidrResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CheckAssistantCidrResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CheckDefaultSubnetRequest struct { + *tchttp.BaseRequest + + // 子网所在的可用区ID,不同子网选择不同可用区可以做跨可用区灾备。 + Zone *string `json:"Zone,omitempty" name:"Zone"` +} + +func (r *CheckDefaultSubnetRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CheckDefaultSubnetRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Zone") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CheckDefaultSubnetRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CheckDefaultSubnetResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 检查结果。true为可以创建默认子网,false为不可以创建默认子网。 + Result *bool `json:"Result,omitempty" name:"Result"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CheckDefaultSubnetResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CheckDefaultSubnetResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CheckNetDetectStateRequest struct { + *tchttp.BaseRequest + + // 探测目的IPv4地址数组,最多两个。 + DetectDestinationIp []*string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp"` + + // 下一跳类型,目前我们支持的类型有: + // VPN:VPN网关; + // DIRECTCONNECT:专线网关; + // PEERCONNECTION:对等连接; + // NAT:NAT网关; + // NORMAL_CVM:普通云服务器; + NextHopType *string `json:"NextHopType,omitempty" name:"NextHopType"` + + // 下一跳目的网关,取值与“下一跳类型”相关: + // 下一跳类型为VPN,取值VPN网关ID,形如:vpngw-12345678; + // 下一跳类型为DIRECTCONNECT,取值专线网关ID,形如:dcg-12345678; + // 下一跳类型为PEERCONNECTION,取值对等连接ID,形如:pcx-12345678; + // 下一跳类型为NAT,取值Nat网关,形如:nat-12345678; + // 下一跳类型为NORMAL_CVM,取值云服务器IPv4地址,形如:10.0.0.12; + NextHopDestination *string `json:"NextHopDestination,omitempty" name:"NextHopDestination"` + + // 网络探测实例ID。形如:netd-12345678。该参数与(VpcId,SubnetId,NetDetectName),至少要有一个。当NetDetectId存在时,使用NetDetectId。 + NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"` + + // `VPC`实例`ID`。形如:`vpc-12345678`。该参数与(SubnetId,NetDetectName)配合使用,与NetDetectId至少要有一个。当NetDetectId存在时,使用NetDetectId。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网实例ID。形如:subnet-12345678。该参数与(VpcId,NetDetectName)配合使用,与NetDetectId至少要有一个。当NetDetectId存在时,使用NetDetectId。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 网络探测名称,最大长度不能超过60个字节。该参数与(VpcId,SubnetId)配合使用,与NetDetectId至少要有一个。当NetDetectId存在时,使用NetDetectId。 + NetDetectName *string `json:"NetDetectName,omitempty" name:"NetDetectName"` +} + +func (r *CheckNetDetectStateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CheckNetDetectStateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DetectDestinationIp") + delete(f, "NextHopType") + delete(f, "NextHopDestination") + delete(f, "NetDetectId") + delete(f, "VpcId") + delete(f, "SubnetId") + delete(f, "NetDetectName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CheckNetDetectStateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CheckNetDetectStateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 网络探测验证结果对象数组。 + NetDetectIpStateSet []*NetDetectIpState `json:"NetDetectIpStateSet,omitempty" name:"NetDetectIpStateSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CheckNetDetectStateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CheckNetDetectStateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CidrForCcn struct { + + // local cidr值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Cidr *string `json:"Cidr,omitempty" name:"Cidr"` + + // 是否发布到了云联网。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PublishedToVbc *bool `json:"PublishedToVbc,omitempty" name:"PublishedToVbc"` +} + +type ClassicLinkInstance struct { + + // VPC实例ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 云服务器实例唯一ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +type CloneSecurityGroupRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 安全组名称,可任意命名,但不得超过60个字符。未提供参数时,克隆后的安全组名称和SecurityGroupId对应的安全组名称相同。 + GroupName *string `json:"GroupName,omitempty" name:"GroupName"` + + // 安全组备注,最多100个字符。未提供参数时,克隆后的安全组备注和SecurityGroupId对应的安全组备注相同。 + GroupDescription *string `json:"GroupDescription,omitempty" name:"GroupDescription"` + + // 项目ID,默认0。可在qcloud控制台项目管理页面查询到。 + ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + + // 源Region,跨地域克隆安全组时,需要传入源安全组所属地域信息,例如:克隆广州的安全组到上海,则这里需要传入广州安全的地域信息:ap-guangzhou。 + RemoteRegion *string `json:"RemoteRegion,omitempty" name:"RemoteRegion"` +} + +func (r *CloneSecurityGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CloneSecurityGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupId") + delete(f, "GroupName") + delete(f, "GroupDescription") + delete(f, "ProjectId") + delete(f, "RemoteRegion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CloneSecurityGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CloneSecurityGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 安全组对象。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityGroup *SecurityGroup `json:"SecurityGroup,omitempty" name:"SecurityGroup"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CloneSecurityGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CloneSecurityGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ConflictItem struct { + + // 冲突资源的ID + ConfilctId *string `json:"ConfilctId,omitempty" name:"ConfilctId"` + + // 冲突目的资源 + DestinationItem *string `json:"DestinationItem,omitempty" name:"DestinationItem"` +} + +type ConflictSource struct { + + // 冲突资源ID + ConflictSourceId *string `json:"ConflictSourceId,omitempty" name:"ConflictSourceId"` + + // 冲突资源 + SourceItem *string `json:"SourceItem,omitempty" name:"SourceItem"` + + // 冲突资源条目信息 + ConflictItemSet []*ConflictItem `json:"ConflictItemSet,omitempty" name:"ConflictItemSet"` +} + +type CreateAddressTemplateGroupRequest struct { + *tchttp.BaseRequest + + // IP地址模版集合名称。 + AddressTemplateGroupName *string `json:"AddressTemplateGroupName,omitempty" name:"AddressTemplateGroupName"` + + // IP地址模版实例ID,例如:ipm-mdunqeb6。 + AddressTemplateIds []*string `json:"AddressTemplateIds,omitempty" name:"AddressTemplateIds"` +} + +func (r *CreateAddressTemplateGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAddressTemplateGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressTemplateGroupName") + delete(f, "AddressTemplateIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAddressTemplateGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateAddressTemplateGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // IP地址模板集合对象。 + AddressTemplateGroup *AddressTemplateGroup `json:"AddressTemplateGroup,omitempty" name:"AddressTemplateGroup"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateAddressTemplateGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAddressTemplateGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateAddressTemplateRequest struct { + *tchttp.BaseRequest + + // IP地址模版名称 + AddressTemplateName *string `json:"AddressTemplateName,omitempty" name:"AddressTemplateName"` + + // 地址信息,支持 IP、CIDR、IP 范围。Addresses与AddressesExtra必填其一。 + Addresses []*string `json:"Addresses,omitempty" name:"Addresses"` + + // 地址信息,支持携带备注,支持 IP、CIDR、IP 范围。Addresses与AddressesExtra必填其一。 + AddressesExtra []*AddressInfo `json:"AddressesExtra,omitempty" name:"AddressesExtra"` +} + +func (r *CreateAddressTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAddressTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressTemplateName") + delete(f, "Addresses") + delete(f, "AddressesExtra") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAddressTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateAddressTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // IP地址模板对象。 + AddressTemplate *AddressTemplate `json:"AddressTemplate,omitempty" name:"AddressTemplate"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateAddressTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAddressTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateAndAttachNetworkInterfaceRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 弹性网卡名称,最大长度不能超过60个字节。 + NetworkInterfaceName *string `json:"NetworkInterfaceName,omitempty" name:"NetworkInterfaceName"` + + // 弹性网卡所在的子网实例ID,例如:subnet-0ap8nwca。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 云服务器实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 指定的内网IP信息,单次最多指定10个。 + PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` + + // 新申请的内网IP地址个数,内网IP地址个数总和不能超过配数。 + SecondaryPrivateIpAddressCount *uint64 `json:"SecondaryPrivateIpAddressCount,omitempty" name:"SecondaryPrivateIpAddressCount"` + + // 指定绑定的安全组,例如:['sg-1dd51d']。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 弹性网卡描述,可任意命名,但不得超过60个字符。 + NetworkInterfaceDescription *string `json:"NetworkInterfaceDescription,omitempty" name:"NetworkInterfaceDescription"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 绑定类型:0 标准型 1 扩展型。 + AttachType *uint64 `json:"AttachType,omitempty" name:"AttachType"` +} + +func (r *CreateAndAttachNetworkInterfaceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAndAttachNetworkInterfaceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "NetworkInterfaceName") + delete(f, "SubnetId") + delete(f, "InstanceId") + delete(f, "PrivateIpAddresses") + delete(f, "SecondaryPrivateIpAddressCount") + delete(f, "SecurityGroupIds") + delete(f, "NetworkInterfaceDescription") + delete(f, "Tags") + delete(f, "AttachType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAndAttachNetworkInterfaceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateAndAttachNetworkInterfaceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 弹性网卡实例。 + NetworkInterface *NetworkInterface `json:"NetworkInterface,omitempty" name:"NetworkInterface"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateAndAttachNetworkInterfaceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAndAttachNetworkInterfaceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateAssistantCidrRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`。形如:`vpc-6v2ht8q5` + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // CIDR数组,格式如["10.0.0.0/16", "172.16.0.0/16"] + CidrBlocks []*string `json:"CidrBlocks,omitempty" name:"CidrBlocks"` +} + +func (r *CreateAssistantCidrRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAssistantCidrRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "CidrBlocks") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAssistantCidrRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateAssistantCidrResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 辅助CIDR数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AssistantCidrSet []*AssistantCidr `json:"AssistantCidrSet,omitempty" name:"AssistantCidrSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateAssistantCidrResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateAssistantCidrResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateBandwidthPackageRequest struct { + *tchttp.BaseRequest + + // 带宽包类型, 默认值: BGP, 可选值: + // <li>BGP: 普通BGP共享带宽包</li> + // <li>HIGH_QUALITY_BGP: 精品BGP共享带宽包</li> + NetworkType *string `json:"NetworkType,omitempty" name:"NetworkType"` + + // 带宽包计费类型, 默认为: TOP5_POSTPAID_BY_MONTH, 可选值: + // <li>TOP5_POSTPAID_BY_MONTH: 按月后付费TOP5计费</li> + // <li>PERCENT95_POSTPAID_BY_MONTH: 按月后付费月95计费</li> + // <li>FIXED_PREPAID_BY_MONTH: 包月预付费计费</li> + ChargeType *string `json:"ChargeType,omitempty" name:"ChargeType"` + + // 带宽包名称。 + BandwidthPackageName *string `json:"BandwidthPackageName,omitempty" name:"BandwidthPackageName"` + + // 带宽包数量(传统账户类型只能填1), 标准账户类型取值范围为1~20。 + BandwidthPackageCount *uint64 `json:"BandwidthPackageCount,omitempty" name:"BandwidthPackageCount"` + + // 带宽包限速大小。单位:Mbps,-1表示不限速。该功能当前内测中,暂不对外开放。 + InternetMaxBandwidth *int64 `json:"InternetMaxBandwidth,omitempty" name:"InternetMaxBandwidth"` + + // 需要关联的标签列表。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 带宽包协议类型。当前支持'ipv4'和'ipv6'协议带宽包,默认值是'ipv4'。 + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` +} + +func (r *CreateBandwidthPackageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateBandwidthPackageRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkType") + delete(f, "ChargeType") + delete(f, "BandwidthPackageName") + delete(f, "BandwidthPackageCount") + delete(f, "InternetMaxBandwidth") + delete(f, "Tags") + delete(f, "Protocol") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateBandwidthPackageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateBandwidthPackageResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 带宽包唯一ID。 + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` + + // 带宽包唯一ID列表(申请数量大于1时有效)。 + BandwidthPackageIds []*string `json:"BandwidthPackageIds,omitempty" name:"BandwidthPackageIds"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateBandwidthPackageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateBandwidthPackageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateCcnRequest struct { + *tchttp.BaseRequest + + // CCN名称,最大长度不能超过60个字节。 + CcnName *string `json:"CcnName,omitempty" name:"CcnName"` + + // CCN描述信息,最大长度不能超过100个字节。 + CcnDescription *string `json:"CcnDescription,omitempty" name:"CcnDescription"` + + // CCN服务质量,'PT':白金,'AU':金,'AG':银,默认为‘AU’。 + QosLevel *string `json:"QosLevel,omitempty" name:"QosLevel"` + + // 计费模式,PREPAID:表示预付费,即包年包月,POSTPAID:表示后付费,即按量计费。默认:POSTPAID。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 限速类型,OUTER_REGION_LIMIT表示地域出口限速,INTER_REGION_LIMIT为地域间限速,默认为OUTER_REGION_LIMIT。预付费模式仅支持地域间限速,后付费模式支持地域间限速和地域出口限速。 + BandwidthLimitType *string `json:"BandwidthLimitType,omitempty" name:"BandwidthLimitType"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateCcnRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateCcnRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnName") + delete(f, "CcnDescription") + delete(f, "QosLevel") + delete(f, "InstanceChargeType") + delete(f, "BandwidthLimitType") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateCcnRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateCcnResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云联网(CCN)对象。 + Ccn *CCN `json:"Ccn,omitempty" name:"Ccn"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateCcnResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateCcnResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateCustomerGatewayRequest struct { + *tchttp.BaseRequest + + // 对端网关名称,可任意命名,但不得超过60个字符。 + CustomerGatewayName *string `json:"CustomerGatewayName,omitempty" name:"CustomerGatewayName"` + + // 对端网关公网IP。 + IpAddress *string `json:"IpAddress,omitempty" name:"IpAddress"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateCustomerGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateCustomerGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CustomerGatewayName") + delete(f, "IpAddress") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateCustomerGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateCustomerGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 对端网关对象 + CustomerGateway *CustomerGateway `json:"CustomerGateway,omitempty" name:"CustomerGateway"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateCustomerGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateCustomerGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateDefaultSecurityGroupRequest struct { + *tchttp.BaseRequest + + // 项目ID,默认0。可在qcloud控制台项目管理页面查询到。 + ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` +} + +func (r *CreateDefaultSecurityGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDefaultSecurityGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ProjectId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDefaultSecurityGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateDefaultSecurityGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 安全组对象。 + SecurityGroup *SecurityGroup `json:"SecurityGroup,omitempty" name:"SecurityGroup"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateDefaultSecurityGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDefaultSecurityGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateDefaultVpcRequest struct { + *tchttp.BaseRequest + + // 子网所在的可用区,该参数可通过[DescribeZones](https://cloud.tencent.com/document/product/213/15707)接口获取,例如ap-guangzhou-1,不指定时将随机选择可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 是否强制返回默认VPC。 + Force *bool `json:"Force,omitempty" name:"Force"` +} + +func (r *CreateDefaultVpcRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDefaultVpcRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Zone") + delete(f, "Force") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDefaultVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateDefaultVpcResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 默认VPC和子网ID + Vpc *DefaultVpcSubnet `json:"Vpc,omitempty" name:"Vpc"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateDefaultVpcResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDefaultVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateDhcpIpRequest struct { + *tchttp.BaseRequest + + // 私有网络`ID`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网`ID`。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // `DhcpIp`名称。 + DhcpIpName *string `json:"DhcpIpName,omitempty" name:"DhcpIpName"` + + // 新申请的内网IP地址个数。总数不能超过64个。 + SecondaryPrivateIpAddressCount *uint64 `json:"SecondaryPrivateIpAddressCount,omitempty" name:"SecondaryPrivateIpAddressCount"` +} + +func (r *CreateDhcpIpRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDhcpIpRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "SubnetId") + delete(f, "DhcpIpName") + delete(f, "SecondaryPrivateIpAddressCount") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDhcpIpRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateDhcpIpResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 新创建的`DhcpIp`信息 + DhcpIpSet []*DhcpIp `json:"DhcpIpSet,omitempty" name:"DhcpIpSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateDhcpIpResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDhcpIpResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateDirectConnectGatewayCcnRoutesRequest struct { + *tchttp.BaseRequest + + // 专线网关ID,形如:dcg-prpqlmg1 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` + + // 需要连通的IDC网段列表 + Routes []*DirectConnectGatewayCcnRoute `json:"Routes,omitempty" name:"Routes"` +} + +func (r *CreateDirectConnectGatewayCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDirectConnectGatewayCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DirectConnectGatewayId") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDirectConnectGatewayCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateDirectConnectGatewayCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateDirectConnectGatewayCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDirectConnectGatewayCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateDirectConnectGatewayRequest struct { + *tchttp.BaseRequest + + // 专线网关名称 + DirectConnectGatewayName *string `json:"DirectConnectGatewayName,omitempty" name:"DirectConnectGatewayName"` + + // 关联网络类型,可选值: + // <li>VPC - 私有网络</li> + // <li>CCN - 云联网</li> + NetworkType *string `json:"NetworkType,omitempty" name:"NetworkType"` + + // <li>NetworkType 为 VPC 时,这里传值为私有网络实例ID</li> + // <li>NetworkType 为 CCN 时,这里传值为云联网实例ID</li> + NetworkInstanceId *string `json:"NetworkInstanceId,omitempty" name:"NetworkInstanceId"` + + // 网关类型,可选值: + // <li>NORMAL - (默认)标准型,注:云联网只支持标准型</li> + // <li>NAT - NAT型</li>NAT类型支持网络地址转换配置,类型确定后不能修改;一个私有网络可以创建一个NAT类型的专线网关和一个非NAT类型的专线网关 + GatewayType *string `json:"GatewayType,omitempty" name:"GatewayType"` + + // 云联网路由发布模式,可选值:`standard`(标准模式)、`exquisite`(精细模式)。只有云联网类型专线网关才支持`ModeType`。 + ModeType *string `json:"ModeType,omitempty" name:"ModeType"` + + // 专线网关可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 专线网关高可用区容灾组ID + HaZoneGroupId *string `json:"HaZoneGroupId,omitempty" name:"HaZoneGroupId"` +} + +func (r *CreateDirectConnectGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDirectConnectGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DirectConnectGatewayName") + delete(f, "NetworkType") + delete(f, "NetworkInstanceId") + delete(f, "GatewayType") + delete(f, "ModeType") + delete(f, "Zone") + delete(f, "HaZoneGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDirectConnectGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateDirectConnectGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 专线网关对象。 + DirectConnectGateway *DirectConnectGateway `json:"DirectConnectGateway,omitempty" name:"DirectConnectGateway"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateDirectConnectGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateDirectConnectGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateFlowLogRequest struct { + *tchttp.BaseRequest + + // 流日志实例名字 + FlowLogName *string `json:"FlowLogName,omitempty" name:"FlowLogName"` + + // 流日志所属资源类型,VPC|SUBNET|NETWORKINTERFACE|CCN + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 资源唯一ID + ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + + // 流日志采集类型,ACCEPT|REJECT|ALL + TrafficType *string `json:"TrafficType,omitempty" name:"TrafficType"` + + // 流日志存储ID + CloudLogId *string `json:"CloudLogId,omitempty" name:"CloudLogId"` + + // 私用网络ID或者统一ID,建议使用统一ID,当ResourceType为CCN时不填,其他类型必填。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 流日志实例描述 + FlowLogDescription *string `json:"FlowLogDescription,omitempty" name:"FlowLogDescription"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateFlowLogRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateFlowLogRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "FlowLogName") + delete(f, "ResourceType") + delete(f, "ResourceId") + delete(f, "TrafficType") + delete(f, "CloudLogId") + delete(f, "VpcId") + delete(f, "FlowLogDescription") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateFlowLogRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateFlowLogResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 创建的流日志信息 + FlowLog []*FlowLog `json:"FlowLog,omitempty" name:"FlowLog"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateFlowLogResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateFlowLogResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateHaVipRequest struct { + *tchttp.BaseRequest + + // `HAVIP`所在私有网络`ID`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // `HAVIP`所在子网`ID`。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // `HAVIP`名称。 + HaVipName *string `json:"HaVipName,omitempty" name:"HaVipName"` + + // 指定虚拟IP地址,必须在`VPC`网段内且未被占用。不指定则自动分配。 + Vip *string `json:"Vip,omitempty" name:"Vip"` +} + +func (r *CreateHaVipRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateHaVipRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "SubnetId") + delete(f, "HaVipName") + delete(f, "Vip") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateHaVipRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateHaVipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // `HAVIP`对象。 + HaVip *HaVip `json:"HaVip,omitempty" name:"HaVip"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateHaVipResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateHaVipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateIp6TranslatorsRequest struct { + *tchttp.BaseRequest + + // 转换实例名称 + Ip6TranslatorName *string `json:"Ip6TranslatorName,omitempty" name:"Ip6TranslatorName"` + + // 创建转换实例数量,默认是1个 + Ip6TranslatorCount *int64 `json:"Ip6TranslatorCount,omitempty" name:"Ip6TranslatorCount"` + + // 转换实例运营商属性,可取"CMCC","CTCC","CUCC","BGP" + Ip6InternetServiceProvider *string `json:"Ip6InternetServiceProvider,omitempty" name:"Ip6InternetServiceProvider"` +} + +func (r *CreateIp6TranslatorsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateIp6TranslatorsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6TranslatorName") + delete(f, "Ip6TranslatorCount") + delete(f, "Ip6InternetServiceProvider") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateIp6TranslatorsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateIp6TranslatorsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 转换实例的唯一ID数组,形如"ip6-xxxxxxxx" + Ip6TranslatorSet []*string `json:"Ip6TranslatorSet,omitempty" name:"Ip6TranslatorSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateIp6TranslatorsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateIp6TranslatorsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateLocalGatewayRequest struct { + *tchttp.BaseRequest + + // 本地网关名称 + LocalGatewayName *string `json:"LocalGatewayName,omitempty" name:"LocalGatewayName"` + + // VPC实例ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // CDC实例ID + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` +} + +func (r *CreateLocalGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLocalGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LocalGatewayName") + delete(f, "VpcId") + delete(f, "CdcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLocalGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateLocalGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 本地网关信息 + LocalGateway *LocalGateway `json:"LocalGateway,omitempty" name:"LocalGateway"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateLocalGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateLocalGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateNatGatewayDestinationIpPortTranslationNatRuleRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df45454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // NAT网关的端口转换规则。 + DestinationIpPortTranslationNatRules []*DestinationIpPortTranslationNatRule `json:"DestinationIpPortTranslationNatRules,omitempty" name:"DestinationIpPortTranslationNatRules"` +} + +func (r *CreateNatGatewayDestinationIpPortTranslationNatRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNatGatewayDestinationIpPortTranslationNatRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "DestinationIpPortTranslationNatRules") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateNatGatewayDestinationIpPortTranslationNatRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateNatGatewayDestinationIpPortTranslationNatRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateNatGatewayDestinationIpPortTranslationNatRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNatGatewayDestinationIpPortTranslationNatRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateNatGatewayRequest struct { + *tchttp.BaseRequest + + // NAT网关名称 + NatGatewayName *string `json:"NatGatewayName,omitempty" name:"NatGatewayName"` + + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // NAT网关最大外网出带宽(单位:Mbps),支持的参数值:`20, 50, 100, 200, 500, 1000, 2000, 5000`,默认: `100Mbps`。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // NAT网关并发连接上限,支持参数值:`1000000、3000000、10000000`,默认值为`100000`。 + MaxConcurrentConnection *uint64 `json:"MaxConcurrentConnection,omitempty" name:"MaxConcurrentConnection"` + + // 需要申请的弹性IP个数,系统会按您的要求生产N个弹性IP,其中AddressCount和PublicAddresses至少传递一个。 + AddressCount *uint64 `json:"AddressCount,omitempty" name:"AddressCount"` + + // 绑定NAT网关的弹性IP数组,其中AddressCount和PublicAddresses至少传递一个。 + PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses"` + + // 可用区,形如:`ap-guangzhou-1`。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // NAT网关所属子网 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` +} + +func (r *CreateNatGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNatGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayName") + delete(f, "VpcId") + delete(f, "InternetMaxBandwidthOut") + delete(f, "MaxConcurrentConnection") + delete(f, "AddressCount") + delete(f, "PublicIpAddresses") + delete(f, "Zone") + delete(f, "Tags") + delete(f, "SubnetId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateNatGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateNatGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // NAT网关对象数组。 + NatGatewaySet []*NatGateway `json:"NatGatewaySet,omitempty" name:"NatGatewaySet"` + + // 符合条件的 NAT网关对象数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateNatGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNatGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateNatGatewaySourceIpTranslationNatRuleRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:"nat-df45454" + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // NAT网关的SNAT转换规则 + SourceIpTranslationNatRules []*SourceIpTranslationNatRule `json:"SourceIpTranslationNatRules,omitempty" name:"SourceIpTranslationNatRules"` +} + +func (r *CreateNatGatewaySourceIpTranslationNatRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNatGatewaySourceIpTranslationNatRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "SourceIpTranslationNatRules") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateNatGatewaySourceIpTranslationNatRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateNatGatewaySourceIpTranslationNatRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateNatGatewaySourceIpTranslationNatRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNatGatewaySourceIpTranslationNatRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateNetDetectRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`。形如:`vpc-12345678` + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网实例ID。形如:subnet-12345678。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 网络探测名称,最大长度不能超过60个字节。 + NetDetectName *string `json:"NetDetectName,omitempty" name:"NetDetectName"` + + // 探测目的IPv4地址数组。最多两个。 + DetectDestinationIp []*string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp"` + + // 下一跳类型,目前我们支持的类型有: + // VPN:VPN网关; + // DIRECTCONNECT:专线网关; + // PEERCONNECTION:对等连接; + // NAT:NAT网关; + // NORMAL_CVM:普通云服务器; + // CCN:云联网网关; + NextHopType *string `json:"NextHopType,omitempty" name:"NextHopType"` + + // 下一跳目的网关,取值与“下一跳类型”相关: + // 下一跳类型为VPN,取值VPN网关ID,形如:vpngw-12345678; + // 下一跳类型为DIRECTCONNECT,取值专线网关ID,形如:dcg-12345678; + // 下一跳类型为PEERCONNECTION,取值对等连接ID,形如:pcx-12345678; + // 下一跳类型为NAT,取值Nat网关,形如:nat-12345678; + // 下一跳类型为NORMAL_CVM,取值云服务器IPv4地址,形如:10.0.0.12; + // 下一跳类型为CCN,取值云联网ID,形如:ccn-12345678; + NextHopDestination *string `json:"NextHopDestination,omitempty" name:"NextHopDestination"` + + // 网络探测描述。 + NetDetectDescription *string `json:"NetDetectDescription,omitempty" name:"NetDetectDescription"` +} + +func (r *CreateNetDetectRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNetDetectRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "SubnetId") + delete(f, "NetDetectName") + delete(f, "DetectDestinationIp") + delete(f, "NextHopType") + delete(f, "NextHopDestination") + delete(f, "NetDetectDescription") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateNetDetectRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateNetDetectResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 网络探测(NetDetect)对象。 + NetDetect *NetDetect `json:"NetDetect,omitempty" name:"NetDetect"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateNetDetectResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNetDetectResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateNetworkAclRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 网络ACL名称,最大长度不能超过60个字节。 + NetworkAclName *string `json:"NetworkAclName,omitempty" name:"NetworkAclName"` +} + +func (r *CreateNetworkAclRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNetworkAclRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "NetworkAclName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateNetworkAclRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateNetworkAclResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 网络ACL实例。 + NetworkAcl *NetworkAcl `json:"NetworkAcl,omitempty" name:"NetworkAcl"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateNetworkAclResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNetworkAclResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateNetworkInterfaceRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 弹性网卡名称,最大长度不能超过60个字节。 + NetworkInterfaceName *string `json:"NetworkInterfaceName,omitempty" name:"NetworkInterfaceName"` + + // 弹性网卡所在的子网实例ID,例如:subnet-0ap8nwca。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 弹性网卡描述,可任意命名,但不得超过60个字符。 + NetworkInterfaceDescription *string `json:"NetworkInterfaceDescription,omitempty" name:"NetworkInterfaceDescription"` + + // 新申请的内网IP地址个数,内网IP地址个数总和不能超过配数。 + SecondaryPrivateIpAddressCount *uint64 `json:"SecondaryPrivateIpAddressCount,omitempty" name:"SecondaryPrivateIpAddressCount"` + + // 指定绑定的安全组,例如:['sg-1dd51d']。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 指定的内网IP信息,单次最多指定10个。 + PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateNetworkInterfaceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNetworkInterfaceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "NetworkInterfaceName") + delete(f, "SubnetId") + delete(f, "NetworkInterfaceDescription") + delete(f, "SecondaryPrivateIpAddressCount") + delete(f, "SecurityGroupIds") + delete(f, "PrivateIpAddresses") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateNetworkInterfaceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateNetworkInterfaceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 弹性网卡实例。 + NetworkInterface *NetworkInterface `json:"NetworkInterface,omitempty" name:"NetworkInterface"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateNetworkInterfaceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateNetworkInterfaceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateRouteTableRequest struct { + *tchttp.BaseRequest + + // 待操作的VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 路由表名称,最大长度不能超过60个字节。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateRouteTableRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateRouteTableRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "RouteTableName") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateRouteTableRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateRouteTableResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 路由表对象。 + RouteTable *RouteTable `json:"RouteTable,omitempty" name:"RouteTable"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateRouteTableResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateRouteTableResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表实例ID。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由策略对象。 + Routes []*Route `json:"Routes,omitempty" name:"Routes"` +} + +func (r *CreateRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 新增的实例个数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 路由表对象。 + RouteTableSet []*RouteTable `json:"RouteTableSet,omitempty" name:"RouteTableSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateSecurityGroupPoliciesRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 安全组规则集合。 + SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet,omitempty" name:"SecurityGroupPolicySet"` +} + +func (r *CreateSecurityGroupPoliciesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSecurityGroupPoliciesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupId") + delete(f, "SecurityGroupPolicySet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSecurityGroupPoliciesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateSecurityGroupPoliciesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateSecurityGroupPoliciesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSecurityGroupPoliciesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateSecurityGroupRequest struct { + *tchttp.BaseRequest + + // 安全组名称,可任意命名,但不得超过60个字符。 + GroupName *string `json:"GroupName,omitempty" name:"GroupName"` + + // 安全组备注,最多100个字符。 + GroupDescription *string `json:"GroupDescription,omitempty" name:"GroupDescription"` + + // 项目ID,默认0。可在qcloud控制台项目管理页面查询到。 + ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateSecurityGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSecurityGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "GroupName") + delete(f, "GroupDescription") + delete(f, "ProjectId") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSecurityGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateSecurityGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 安全组对象。 + SecurityGroup *SecurityGroup `json:"SecurityGroup,omitempty" name:"SecurityGroup"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateSecurityGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSecurityGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateSecurityGroupWithPoliciesRequest struct { + *tchttp.BaseRequest + + // 安全组名称,可任意命名,但不得超过60个字符。 + GroupName *string `json:"GroupName,omitempty" name:"GroupName"` + + // 安全组备注,最多100个字符。 + GroupDescription *string `json:"GroupDescription,omitempty" name:"GroupDescription"` + + // 项目ID,默认0。可在qcloud控制台项目管理页面查询到。 + ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + + // 安全组规则集合。 + SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet,omitempty" name:"SecurityGroupPolicySet"` +} + +func (r *CreateSecurityGroupWithPoliciesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSecurityGroupWithPoliciesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "GroupName") + delete(f, "GroupDescription") + delete(f, "ProjectId") + delete(f, "SecurityGroupPolicySet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSecurityGroupWithPoliciesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateSecurityGroupWithPoliciesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 安全组对象。 + SecurityGroup *SecurityGroup `json:"SecurityGroup,omitempty" name:"SecurityGroup"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateSecurityGroupWithPoliciesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSecurityGroupWithPoliciesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateServiceTemplateGroupRequest struct { + *tchttp.BaseRequest + + // 协议端口模板集合名称 + ServiceTemplateGroupName *string `json:"ServiceTemplateGroupName,omitempty" name:"ServiceTemplateGroupName"` + + // 协议端口模板实例ID,例如:ppm-4dw6agho。 + ServiceTemplateIds []*string `json:"ServiceTemplateIds,omitempty" name:"ServiceTemplateIds"` +} + +func (r *CreateServiceTemplateGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateServiceTemplateGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ServiceTemplateGroupName") + delete(f, "ServiceTemplateIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateServiceTemplateGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateServiceTemplateGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 协议端口模板集合对象。 + ServiceTemplateGroup *ServiceTemplateGroup `json:"ServiceTemplateGroup,omitempty" name:"ServiceTemplateGroup"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateServiceTemplateGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateServiceTemplateGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateServiceTemplateRequest struct { + *tchttp.BaseRequest + + // 协议端口模板名称 + ServiceTemplateName *string `json:"ServiceTemplateName,omitempty" name:"ServiceTemplateName"` + + // 支持单个端口、多个端口、连续端口及所有端口,协议支持:TCP、UDP、ICMP、GRE 协议。Services与ServicesExtra必填其一。 + Services []*string `json:"Services,omitempty" name:"Services"` + + // 支持添加备注,单个端口、多个端口、连续端口及所有端口,协议支持:TCP、UDP、ICMP、GRE 协议。Services与ServicesExtra必填其一。 + ServicesExtra []*ServicesInfo `json:"ServicesExtra,omitempty" name:"ServicesExtra"` +} + +func (r *CreateServiceTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateServiceTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ServiceTemplateName") + delete(f, "Services") + delete(f, "ServicesExtra") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateServiceTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateServiceTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 协议端口模板对象。 + ServiceTemplate *ServiceTemplate `json:"ServiceTemplate,omitempty" name:"ServiceTemplate"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateServiceTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateServiceTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateSubnetRequest struct { + *tchttp.BaseRequest + + // 待操作的VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网名称,最大长度不能超过60个字节。 + SubnetName *string `json:"SubnetName,omitempty" name:"SubnetName"` + + // 子网网段,子网网段必须在VPC网段内,相同VPC内子网网段不能重叠。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 子网所在的可用区ID,不同子网选择不同可用区可以做跨可用区灾备。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // CDC实例ID。 + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` +} + +func (r *CreateSubnetRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSubnetRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "SubnetName") + delete(f, "CidrBlock") + delete(f, "Zone") + delete(f, "Tags") + delete(f, "CdcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSubnetRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateSubnetResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 子网对象。 + Subnet *Subnet `json:"Subnet,omitempty" name:"Subnet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateSubnetResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSubnetResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateSubnetsRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`。形如:`vpc-6v2ht8q5` + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网对象列表。 + Subnets []*SubnetInput `json:"Subnets,omitempty" name:"Subnets"` + + // 指定绑定的标签列表,注意这里的标签集合为列表中所有子网对象所共享,不能为每个子网对象单独指定标签,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 需要增加到的CDC实例ID。 + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` +} + +func (r *CreateSubnetsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSubnetsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "Subnets") + delete(f, "Tags") + delete(f, "CdcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSubnetsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateSubnetsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 新创建的子网列表。 + SubnetSet []*Subnet `json:"SubnetSet,omitempty" name:"SubnetSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateSubnetsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateSubnetsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpcEndPointRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网实例ID。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 终端节点名称。 + EndPointName *string `json:"EndPointName,omitempty" name:"EndPointName"` + + // 终端节点服务ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` + + // 终端节点VIP,可以指定IP申请。 + EndPointVip *string `json:"EndPointVip,omitempty" name:"EndPointVip"` + + // 安全组ID。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` +} + +func (r *CreateVpcEndPointRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpcEndPointRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "SubnetId") + delete(f, "EndPointName") + delete(f, "EndPointServiceId") + delete(f, "EndPointVip") + delete(f, "SecurityGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateVpcEndPointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpcEndPointResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 终端节点对象详细信息。 + EndPoint *EndPoint `json:"EndPoint,omitempty" name:"EndPoint"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateVpcEndPointResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpcEndPointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpcEndPointServiceRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 终端节点服务名称。 + EndPointServiceName *string `json:"EndPointServiceName,omitempty" name:"EndPointServiceName"` + + // 是否自动接受。 + AutoAcceptFlag *bool `json:"AutoAcceptFlag,omitempty" name:"AutoAcceptFlag"` + + // 后端服务ID,比如lb-xxx。 + ServiceInstanceId *string `json:"ServiceInstanceId,omitempty" name:"ServiceInstanceId"` + + // 是否是PassService类型。 + IsPassService *bool `json:"IsPassService,omitempty" name:"IsPassService"` +} + +func (r *CreateVpcEndPointServiceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpcEndPointServiceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "EndPointServiceName") + delete(f, "AutoAcceptFlag") + delete(f, "ServiceInstanceId") + delete(f, "IsPassService") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateVpcEndPointServiceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpcEndPointServiceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 终端节点服务对象详细信息。 + EndPointService *EndPointService `json:"EndPointService,omitempty" name:"EndPointService"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateVpcEndPointServiceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpcEndPointServiceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpcEndPointServiceWhiteListRequest struct { + *tchttp.BaseRequest + + // UIN。 + UserUin *string `json:"UserUin,omitempty" name:"UserUin"` + + // 终端节点服务ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` + + // 白名单描述。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +func (r *CreateVpcEndPointServiceWhiteListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpcEndPointServiceWhiteListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "UserUin") + delete(f, "EndPointServiceId") + delete(f, "Description") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateVpcEndPointServiceWhiteListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpcEndPointServiceWhiteListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateVpcEndPointServiceWhiteListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpcEndPointServiceWhiteListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpcRequest struct { + *tchttp.BaseRequest + + // vpc名称,最大长度不能超过60个字节。 + VpcName *string `json:"VpcName,omitempty" name:"VpcName"` + + // vpc的cidr,仅能在10.0.0.0/16,172.16.0.0/16,192.168.0.0/16这三个内网网段内。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 是否开启组播。true: 开启, false: 不开启。 + EnableMulticast *string `json:"EnableMulticast,omitempty" name:"EnableMulticast"` + + // DNS地址,最多支持4个。 + DnsServers []*string `json:"DnsServers,omitempty" name:"DnsServers"` + + // DHCP使用的域名。 + DomainName *string `json:"DomainName,omitempty" name:"DomainName"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateVpcRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpcRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcName") + delete(f, "CidrBlock") + delete(f, "EnableMulticast") + delete(f, "DnsServers") + delete(f, "DomainName") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpcResponse struct { + *tchttp.BaseResponse + Response *struct { + + // Vpc对象。 + Vpc *Vpc `json:"Vpc,omitempty" name:"Vpc"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateVpcResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpnConnectionRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 对端网关ID,例如:cgw-2wqq41m9,可通过DescribeCustomerGateways接口查询对端网关。 + CustomerGatewayId *string `json:"CustomerGatewayId,omitempty" name:"CustomerGatewayId"` + + // 通道名称,可任意命名,但不得超过60个字符。 + VpnConnectionName *string `json:"VpnConnectionName,omitempty" name:"VpnConnectionName"` + + // 预共享密钥。 + PreShareKey *string `json:"PreShareKey,omitempty" name:"PreShareKey"` + + // VPC实例ID。可通过[DescribeVpcs](https://cloud.tencent.com/document/product/215/15778)接口返回值中的VpcId获取。 + // CCN VPN 形的通道 可以不传VPCID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // SPD策略组,例如:{"10.0.0.5/24":["172.123.10.5/16"]},10.0.0.5/24是vpc内网段172.123.10.5/16是IDC网段。用户指定VPC内哪些网段可以和您IDC中哪些网段通信。 + SecurityPolicyDatabases []*SecurityPolicyDatabase `json:"SecurityPolicyDatabases,omitempty" name:"SecurityPolicyDatabases"` + + // IKE配置(Internet Key Exchange,因特网密钥交换),IKE具有一套自我保护机制,用户配置网络安全协议 + IKEOptionsSpecification *IKEOptionsSpecification `json:"IKEOptionsSpecification,omitempty" name:"IKEOptionsSpecification"` + + // IPSec配置,腾讯云提供IPSec安全会话设置 + IPSECOptionsSpecification *IPSECOptionsSpecification `json:"IPSECOptionsSpecification,omitempty" name:"IPSECOptionsSpecification"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 是否支持隧道内健康检查 + EnableHealthCheck *bool `json:"EnableHealthCheck,omitempty" name:"EnableHealthCheck"` + + // 健康检查本端地址 + HealthCheckLocalIp *string `json:"HealthCheckLocalIp,omitempty" name:"HealthCheckLocalIp"` + + // 健康检查对端地址 + HealthCheckRemoteIp *string `json:"HealthCheckRemoteIp,omitempty" name:"HealthCheckRemoteIp"` + + // 通道类型, 例如:["STATIC", "StaticRoute", "Policy"] + RouteType *string `json:"RouteType,omitempty" name:"RouteType"` + + // 协商类型,默认为active(主动协商)。可选值:active(主动协商),passive(被动协商),flowTrigger(流量协商) + NegotiationType *string `json:"NegotiationType,omitempty" name:"NegotiationType"` + + // DPD探测开关。默认为0,表示关闭DPD探测。可选值:0(关闭),1(开启) + DpdEnable *int64 `json:"DpdEnable,omitempty" name:"DpdEnable"` + + // DPD超时时间。即探测确认对端不存在需要的时间。dpdEnable为1(开启)时有效。默认30,单位为秒 + DpdTimeout *string `json:"DpdTimeout,omitempty" name:"DpdTimeout"` + + // DPD超时后的动作。默认为clear。dpdEnable为1(开启)时有效。可取值为clear(断开)和restart(重试) + DpdAction *string `json:"DpdAction,omitempty" name:"DpdAction"` +} + +func (r *CreateVpnConnectionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpnConnectionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "CustomerGatewayId") + delete(f, "VpnConnectionName") + delete(f, "PreShareKey") + delete(f, "VpcId") + delete(f, "SecurityPolicyDatabases") + delete(f, "IKEOptionsSpecification") + delete(f, "IPSECOptionsSpecification") + delete(f, "Tags") + delete(f, "EnableHealthCheck") + delete(f, "HealthCheckLocalIp") + delete(f, "HealthCheckRemoteIp") + delete(f, "RouteType") + delete(f, "NegotiationType") + delete(f, "DpdEnable") + delete(f, "DpdTimeout") + delete(f, "DpdAction") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateVpnConnectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpnConnectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 通道实例对象。 + VpnConnection *VpnConnection `json:"VpnConnection,omitempty" name:"VpnConnection"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateVpnConnectionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpnConnectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpnGatewayRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。可通过[DescribeVpcs](https://cloud.tencent.com/document/product/215/15778)接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // VPN网关名称,最大长度不能超过60个字节。 + VpnGatewayName *string `json:"VpnGatewayName,omitempty" name:"VpnGatewayName"` + + // 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // VPN网关计费模式,PREPAID:表示预付费,即包年包月,POSTPAID_BY_HOUR:表示后付费,即按量计费。默认:POSTPAID_BY_HOUR,如果指定预付费模式,参数InstanceChargePrepaid必填。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` + + // 可用区,如:ap-guangzhou-2。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // VPN网关类型。值“CCN”云联网类型VPN网关,值SSL为SSL-VPN + Type *string `json:"Type,omitempty" name:"Type"` + + // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // CDC实例ID + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` + + // SSL-VPN 最大CLIENT 连接数。可选 [5, 10, 20, 50, 100]。仅SSL-VPN 需要选这个参数。 + MaxConnection *uint64 `json:"MaxConnection,omitempty" name:"MaxConnection"` +} + +func (r *CreateVpnGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpnGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "VpnGatewayName") + delete(f, "InternetMaxBandwidthOut") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + delete(f, "Zone") + delete(f, "Type") + delete(f, "Tags") + delete(f, "CdcId") + delete(f, "MaxConnection") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateVpnGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpnGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // VPN网关对象 + VpnGateway *VpnGateway `json:"VpnGateway,omitempty" name:"VpnGateway"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateVpnGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpnGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpnGatewayRoutesRequest struct { + *tchttp.BaseRequest + + // VPN网关的ID + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // VPN网关目的路由列表 + Routes []*VpnGatewayRoute `json:"Routes,omitempty" name:"Routes"` +} + +func (r *CreateVpnGatewayRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpnGatewayRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateVpnGatewayRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateVpnGatewayRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // VPN网关目的路由 + Routes []*VpnGatewayRoute `json:"Routes,omitempty" name:"Routes"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateVpnGatewayRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateVpnGatewayRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CrossBorderCompliance struct { + + // 服务商,可选值:`UNICOM`。 + ServiceProvider *string `json:"ServiceProvider,omitempty" name:"ServiceProvider"` + + // 合规化审批单`ID`。 + ComplianceId *uint64 `json:"ComplianceId,omitempty" name:"ComplianceId"` + + // 公司全称。 + Company *string `json:"Company,omitempty" name:"Company"` + + // 统一社会信用代码。 + UniformSocialCreditCode *string `json:"UniformSocialCreditCode,omitempty" name:"UniformSocialCreditCode"` + + // 法定代表人。 + LegalPerson *string `json:"LegalPerson,omitempty" name:"LegalPerson"` + + // 发证机关。 + IssuingAuthority *string `json:"IssuingAuthority,omitempty" name:"IssuingAuthority"` + + // 营业执照。 + BusinessLicense *string `json:"BusinessLicense,omitempty" name:"BusinessLicense"` + + // 营业执照住所。 + BusinessAddress *string `json:"BusinessAddress,omitempty" name:"BusinessAddress"` + + // 邮编。 + PostCode *uint64 `json:"PostCode,omitempty" name:"PostCode"` + + // 经办人。 + Manager *string `json:"Manager,omitempty" name:"Manager"` + + // 经办人身份证号。 + ManagerId *string `json:"ManagerId,omitempty" name:"ManagerId"` + + // 经办人身份证。 + ManagerIdCard *string `json:"ManagerIdCard,omitempty" name:"ManagerIdCard"` + + // 经办人身份证地址。 + ManagerAddress *string `json:"ManagerAddress,omitempty" name:"ManagerAddress"` + + // 经办人联系电话。 + ManagerTelephone *string `json:"ManagerTelephone,omitempty" name:"ManagerTelephone"` + + // 电子邮箱。 + Email *string `json:"Email,omitempty" name:"Email"` + + // 服务受理单。 + ServiceHandlingForm *string `json:"ServiceHandlingForm,omitempty" name:"ServiceHandlingForm"` + + // 授权函。 + AuthorizationLetter *string `json:"AuthorizationLetter,omitempty" name:"AuthorizationLetter"` + + // 信息安全承诺书。 + SafetyCommitment *string `json:"SafetyCommitment,omitempty" name:"SafetyCommitment"` + + // 服务开始时间。 + ServiceStartDate *string `json:"ServiceStartDate,omitempty" name:"ServiceStartDate"` + + // 服务截止时间。 + ServiceEndDate *string `json:"ServiceEndDate,omitempty" name:"ServiceEndDate"` + + // 状态。待审批:`PENDING`,已通过:`APPROVED`,已拒绝:`DENY`。 + State *string `json:"State,omitempty" name:"State"` + + // 审批单创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type CustomerGateway struct { + + // 用户网关唯一ID + CustomerGatewayId *string `json:"CustomerGatewayId,omitempty" name:"CustomerGatewayId"` + + // 网关名称 + CustomerGatewayName *string `json:"CustomerGatewayName,omitempty" name:"CustomerGatewayName"` + + // 公网地址 + IpAddress *string `json:"IpAddress,omitempty" name:"IpAddress"` + + // 创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type CustomerGatewayVendor struct { + + // 平台。 + Platform *string `json:"Platform,omitempty" name:"Platform"` + + // 软件版本。 + SoftwareVersion *string `json:"SoftwareVersion,omitempty" name:"SoftwareVersion"` + + // 供应商名称。 + VendorName *string `json:"VendorName,omitempty" name:"VendorName"` +} + +type CvmInstance struct { + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网实例ID。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 云主机实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 云主机名称。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 云主机状态。 + InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` + + // 实例的CPU核数,单位:核。 + CPU *uint64 `json:"CPU,omitempty" name:"CPU"` + + // 实例内存容量,单位:GB。 + Memory *uint64 `json:"Memory,omitempty" name:"Memory"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 实例机型。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例弹性网卡配额(包含主网卡)。 + EniLimit *uint64 `json:"EniLimit,omitempty" name:"EniLimit"` + + // 实例弹性网卡内网IP配额(包含主网卡)。 + EniIpLimit *uint64 `json:"EniIpLimit,omitempty" name:"EniIpLimit"` + + // 实例已绑定弹性网卡的个数(包含主网卡)。 + InstanceEniCount *uint64 `json:"InstanceEniCount,omitempty" name:"InstanceEniCount"` +} + +type DefaultVpcSubnet struct { + + // 默认VpcId + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 默认SubnetId + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` +} + +type DeleteAddressTemplateGroupRequest struct { + *tchttp.BaseRequest + + // IP地址模板集合实例ID,例如:ipmg-90cex8mq。 + AddressTemplateGroupId *string `json:"AddressTemplateGroupId,omitempty" name:"AddressTemplateGroupId"` +} + +func (r *DeleteAddressTemplateGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAddressTemplateGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressTemplateGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAddressTemplateGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteAddressTemplateGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteAddressTemplateGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAddressTemplateGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteAddressTemplateRequest struct { + *tchttp.BaseRequest + + // IP地址模板实例ID,例如:ipm-09o5m8kc。 + AddressTemplateId *string `json:"AddressTemplateId,omitempty" name:"AddressTemplateId"` +} + +func (r *DeleteAddressTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAddressTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressTemplateId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAddressTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteAddressTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteAddressTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAddressTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteAssistantCidrRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`。形如:`vpc-6v2ht8q5` + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // CIDR数组,格式如["10.0.0.0/16", "172.16.0.0/16"] + CidrBlocks []*string `json:"CidrBlocks,omitempty" name:"CidrBlocks"` +} + +func (r *DeleteAssistantCidrRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAssistantCidrRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "CidrBlocks") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAssistantCidrRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteAssistantCidrResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteAssistantCidrResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAssistantCidrResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteBandwidthPackageRequest struct { + *tchttp.BaseRequest + + // 待删除带宽包唯一ID + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` +} + +func (r *DeleteBandwidthPackageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteBandwidthPackageRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BandwidthPackageId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteBandwidthPackageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteBandwidthPackageResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteBandwidthPackageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteBandwidthPackageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteCcnRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` +} + +func (r *DeleteCcnRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteCcnRequest) 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", "DeleteCcnRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteCcnResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteCcnResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteCcnResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteCustomerGatewayRequest struct { + *tchttp.BaseRequest + + // 对端网关ID,例如:cgw-2wqq41m9,可通过DescribeCustomerGateways接口查询对端网关。 + CustomerGatewayId *string `json:"CustomerGatewayId,omitempty" name:"CustomerGatewayId"` +} + +func (r *DeleteCustomerGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteCustomerGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CustomerGatewayId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteCustomerGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteCustomerGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteCustomerGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteCustomerGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDhcpIpRequest struct { + *tchttp.BaseRequest + + // `DhcpIp`的`ID`,是`DhcpIp`的唯一标识。 + DhcpIpId *string `json:"DhcpIpId,omitempty" name:"DhcpIpId"` +} + +func (r *DeleteDhcpIpRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteDhcpIpRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DhcpIpId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteDhcpIpRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDhcpIpResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteDhcpIpResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteDhcpIpResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDirectConnectGatewayCcnRoutesRequest struct { + *tchttp.BaseRequest + + // 专线网关ID,形如:dcg-prpqlmg1 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` + + // 路由ID。形如:ccnr-f49l6u0z。 + RouteIds []*string `json:"RouteIds,omitempty" name:"RouteIds"` +} + +func (r *DeleteDirectConnectGatewayCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteDirectConnectGatewayCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DirectConnectGatewayId") + delete(f, "RouteIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteDirectConnectGatewayCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDirectConnectGatewayCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteDirectConnectGatewayCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteDirectConnectGatewayCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDirectConnectGatewayRequest struct { + *tchttp.BaseRequest + + // 专线网关唯一`ID`,形如:`dcg-9o233uri`。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` +} + +func (r *DeleteDirectConnectGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteDirectConnectGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DirectConnectGatewayId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteDirectConnectGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteDirectConnectGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteDirectConnectGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteDirectConnectGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteFlowLogRequest struct { + *tchttp.BaseRequest + + // 流日志唯一ID + FlowLogId *string `json:"FlowLogId,omitempty" name:"FlowLogId"` + + // 私用网络ID或者统一ID,建议使用统一ID,删除云联网流日志时,可不填,其他流日志类型必填。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *DeleteFlowLogRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteFlowLogRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "FlowLogId") + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteFlowLogRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteFlowLogResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteFlowLogResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteFlowLogResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteHaVipRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。 + HaVipId *string `json:"HaVipId,omitempty" name:"HaVipId"` +} + +func (r *DeleteHaVipRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteHaVipRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "HaVipId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteHaVipRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteHaVipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteHaVipResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteHaVipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteIp6TranslatorsRequest struct { + *tchttp.BaseRequest + + // 待释放的IPV6转换实例的唯一ID,形如‘ip6-xxxxxxxx’ + Ip6TranslatorIds []*string `json:"Ip6TranslatorIds,omitempty" name:"Ip6TranslatorIds"` +} + +func (r *DeleteIp6TranslatorsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteIp6TranslatorsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6TranslatorIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteIp6TranslatorsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteIp6TranslatorsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteIp6TranslatorsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteIp6TranslatorsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLocalGatewayRequest struct { + *tchttp.BaseRequest + + // 本地网关实例ID + LocalGatewayId *string `json:"LocalGatewayId,omitempty" name:"LocalGatewayId"` + + // CDC实例ID + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` + + // VPC实例ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *DeleteLocalGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLocalGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LocalGatewayId") + delete(f, "CdcId") + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteLocalGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteLocalGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteLocalGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteLocalGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df45454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // NAT网关的端口转换规则。 + DestinationIpPortTranslationNatRules []*DestinationIpPortTranslationNatRule `json:"DestinationIpPortTranslationNatRules,omitempty" name:"DestinationIpPortTranslationNatRules"` +} + +func (r *DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "DestinationIpPortTranslationNatRules") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNatGatewayRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df45454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` +} + +func (r *DeleteNatGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNatGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteNatGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNatGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteNatGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNatGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNatGatewaySourceIpTranslationNatRuleRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df45454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // NAT网关的SNAT ID列表,形如:`snat-df43254`。 + NatGatewaySnatIds []*string `json:"NatGatewaySnatIds,omitempty" name:"NatGatewaySnatIds"` +} + +func (r *DeleteNatGatewaySourceIpTranslationNatRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNatGatewaySourceIpTranslationNatRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "NatGatewaySnatIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteNatGatewaySourceIpTranslationNatRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNatGatewaySourceIpTranslationNatRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteNatGatewaySourceIpTranslationNatRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNatGatewaySourceIpTranslationNatRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNetDetectRequest struct { + *tchttp.BaseRequest + + // 网络探测实例`ID`。形如:`netd-12345678` + NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"` +} + +func (r *DeleteNetDetectRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNetDetectRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetDetectId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteNetDetectRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNetDetectResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteNetDetectResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNetDetectResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNetworkAclRequest struct { + *tchttp.BaseRequest + + // 网络ACL实例ID。例如:acl-12345678。 + NetworkAclId *string `json:"NetworkAclId,omitempty" name:"NetworkAclId"` +} + +func (r *DeleteNetworkAclRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNetworkAclRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkAclId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteNetworkAclRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNetworkAclResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteNetworkAclResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNetworkAclResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNetworkInterfaceRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID,例如:eni-m6dyj72l。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` +} + +func (r *DeleteNetworkInterfaceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNetworkInterfaceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteNetworkInterfaceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteNetworkInterfaceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteNetworkInterfaceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteNetworkInterfaceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteRouteTableRequest struct { + *tchttp.BaseRequest + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` +} + +func (r *DeleteRouteTableRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteRouteTableRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteRouteTableRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteRouteTableResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteRouteTableResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteRouteTableResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表实例ID。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由策略对象,删除路由策略时,仅需使用Route的RouteId字段。 + Routes []*Route `json:"Routes,omitempty" name:"Routes"` +} + +func (r *DeleteRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 已删除的路由策略详情。 + RouteSet []*Route `json:"RouteSet,omitempty" name:"RouteSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteSecurityGroupPoliciesRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 安全组规则集合。一个请求中只能删除单个方向的一条或多条规则。支持指定索引(PolicyIndex) 匹配删除和安全组规则匹配删除两种方式,一个请求中只能使用一种匹配方式。 + SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet,omitempty" name:"SecurityGroupPolicySet"` +} + +func (r *DeleteSecurityGroupPoliciesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteSecurityGroupPoliciesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupId") + delete(f, "SecurityGroupPolicySet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteSecurityGroupPoliciesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteSecurityGroupPoliciesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteSecurityGroupPoliciesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteSecurityGroupPoliciesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteSecurityGroupRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` +} + +func (r *DeleteSecurityGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteSecurityGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteSecurityGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteSecurityGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteSecurityGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteSecurityGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteServiceTemplateGroupRequest struct { + *tchttp.BaseRequest + + // 协议端口模板集合实例ID,例如:ppmg-n17uxvve。 + ServiceTemplateGroupId *string `json:"ServiceTemplateGroupId,omitempty" name:"ServiceTemplateGroupId"` +} + +func (r *DeleteServiceTemplateGroupRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteServiceTemplateGroupRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ServiceTemplateGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteServiceTemplateGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteServiceTemplateGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteServiceTemplateGroupResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteServiceTemplateGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteServiceTemplateRequest struct { + *tchttp.BaseRequest + + // 协议端口模板实例ID,例如:ppm-e6dy460g。 + ServiceTemplateId *string `json:"ServiceTemplateId,omitempty" name:"ServiceTemplateId"` +} + +func (r *DeleteServiceTemplateRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteServiceTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ServiceTemplateId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteServiceTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteServiceTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteServiceTemplateResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteServiceTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteSubnetRequest struct { + *tchttp.BaseRequest + + // 子网实例ID。可通过DescribeSubnets接口返回值中的SubnetId获取。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` +} + +func (r *DeleteSubnetRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteSubnetRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SubnetId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteSubnetRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteSubnetResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteSubnetResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteSubnetResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteTemplateMemberRequest struct { + *tchttp.BaseRequest + + // 参数模板实例ID,支持IP地址、协议端口、IP地址组、协议端口组四种参数模板的实例ID。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 需要添加的参数模板成员信息,支持IP地址、协议端口、IP地址组、协议端口组四种类型,类型需要与TemplateId参数类型一致。 + TemplateMember []*MemberInfo `json:"TemplateMember,omitempty" name:"TemplateMember"` +} + +func (r *DeleteTemplateMemberRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteTemplateMemberRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "TemplateMember") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteTemplateMemberRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteTemplateMemberResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteTemplateMemberResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteTemplateMemberResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpcEndPointRequest struct { + *tchttp.BaseRequest + + // 终端节点ID。 + EndPointId *string `json:"EndPointId,omitempty" name:"EndPointId"` +} + +func (r *DeleteVpcEndPointRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpcEndPointRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EndPointId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteVpcEndPointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpcEndPointResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteVpcEndPointResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpcEndPointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpcEndPointServiceRequest struct { + *tchttp.BaseRequest + + // 终端节点ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` +} + +func (r *DeleteVpcEndPointServiceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpcEndPointServiceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EndPointServiceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteVpcEndPointServiceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpcEndPointServiceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteVpcEndPointServiceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpcEndPointServiceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpcEndPointServiceWhiteListRequest struct { + *tchttp.BaseRequest + + // 用户UIN数组。 + UserUin []*string `json:"UserUin,omitempty" name:"UserUin"` + + // 终端节点服务ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` +} + +func (r *DeleteVpcEndPointServiceWhiteListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpcEndPointServiceWhiteListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "UserUin") + delete(f, "EndPointServiceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteVpcEndPointServiceWhiteListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpcEndPointServiceWhiteListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteVpcEndPointServiceWhiteListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpcEndPointServiceWhiteListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpcRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *DeleteVpcRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpcRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpcResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteVpcResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpnConnectionRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // VPN通道实例ID。形如:vpnx-f49l6u0z。 + VpnConnectionId *string `json:"VpnConnectionId,omitempty" name:"VpnConnectionId"` +} + +func (r *DeleteVpnConnectionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpnConnectionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "VpnConnectionId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteVpnConnectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpnConnectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteVpnConnectionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpnConnectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpnGatewayRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` +} + +func (r *DeleteVpnGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpnGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteVpnGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpnGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteVpnGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpnGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpnGatewayRoutesRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 路由ID信息列表 + RouteIds []*string `json:"RouteIds,omitempty" name:"RouteIds"` +} + +func (r *DeleteVpnGatewayRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpnGatewayRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "RouteIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteVpnGatewayRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteVpnGatewayRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteVpnGatewayRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteVpnGatewayRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAccountAttributesRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeAccountAttributesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAccountAttributesRequest) 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", "DescribeAccountAttributesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAccountAttributesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 用户账号属性对象 + AccountAttributeSet []*AccountAttribute `json:"AccountAttributeSet,omitempty" name:"AccountAttributeSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAccountAttributesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAccountAttributesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAddressQuotaRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeAddressQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAddressQuotaRequest) 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", "DescribeAddressQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAddressQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 账户 EIP 配额信息。 + QuotaSet []*Quota `json:"QuotaSet,omitempty" name:"QuotaSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAddressQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAddressQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAddressTemplateGroupsRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + // <li>address-template-group-name - String - (过滤条件)IP地址模板集合名称。</li> + // <li>address-template-group-id - String - (过滤条件)IP地址模板实集合例ID,例如:ipmg-mdunqeb6。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeAddressTemplateGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAddressTemplateGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAddressTemplateGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAddressTemplateGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // IP地址模板。 + AddressTemplateGroupSet []*AddressTemplateGroup `json:"AddressTemplateGroupSet,omitempty" name:"AddressTemplateGroupSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAddressTemplateGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAddressTemplateGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAddressTemplatesRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + // <li>address-template-name - IP地址模板名称。</li> + // <li>address-template-id - IP地址模板实例ID,例如:ipm-mdunqeb6。</li> + // <li>address-ip - IP地址。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeAddressTemplatesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAddressTemplatesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAddressTemplatesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAddressTemplatesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // IP地址模版。 + AddressTemplateSet []*AddressTemplate `json:"AddressTemplateSet,omitempty" name:"AddressTemplateSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAddressTemplatesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAddressTemplatesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAddressesRequest struct { + *tchttp.BaseRequest + + // 标识 EIP 的唯一 ID 列表。EIP 唯一 ID 形如:`eip-11112222`。参数不支持同时指定`AddressIds`和`Filters.address-id`。 + AddressIds []*string `json:"AddressIds,omitempty" name:"AddressIds"` + + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为100。详细的过滤条件如下: + // <li> address-id - String - 是否必填:否 - (过滤条件)按照 EIP 的唯一 ID 过滤。EIP 唯一 ID 形如:eip-11112222。</li> + // <li> address-name - String - 是否必填:否 - (过滤条件)按照 EIP 名称过滤。不支持模糊过滤。</li> + // <li> address-ip - String - 是否必填:否 - (过滤条件)按照 EIP 的 IP 地址过滤。</li> + // <li> address-status - String - 是否必填:否 - (过滤条件)按照 EIP 的状态过滤。状态包含:'CREATING','BINDING','BIND','UNBINDING','UNBIND','OFFLINING','BIND_ENI'。</li> + // <li> instance-id - String - 是否必填:否 - (过滤条件)按照 EIP 绑定的实例 ID 过滤。实例 ID 形如:ins-11112222。</li> + // <li> private-ip-address - String - 是否必填:否 - (过滤条件)按照 EIP 绑定的内网 IP 过滤。</li> + // <li> network-interface-id - String - 是否必填:否 - (过滤条件)按照 EIP 绑定的弹性网卡 ID 过滤。弹性网卡 ID 形如:eni-11112222。</li> + // <li> is-arrears - String - 是否必填:否 - (过滤条件)按照 EIP 是否欠费进行过滤。(TRUE:EIP 处于欠费状态|FALSE:EIP 费用状态正常)</li> + // <li> address-type - String - 是否必填:否 - (过滤条件)按照 IP类型 进行过滤。可选值:'WanIP', 'EIP','AnycastEIP','HighQualityEIP'。默认值是'EIP'。</li> + // <li> address-isp - String - 是否必填:否 - (过滤条件)按照 运营商类型 进行过滤。可选值:'BGP','CMCC','CUCC', 'CTCC'</li> + // <li> dedicated-cluster-id - String - 是否必填:否 - (过滤条件)按照 CDC 的唯一 ID 过滤。CDC 唯一 ID 形如:cluster-11112222。</li> + // <li> tag-key - String - 是否必填:否 - (过滤条件)按照标签键进行过滤。</li> + // <li> tag-value - String - 是否必填:否 - (过滤条件)按照标签值进行过滤。</li> + // <li> tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。tag-key使用具体的标签键进行替换。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeAddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的 EIP 数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // EIP 详细信息列表。 + AddressSet []*Address `json:"AddressSet,omitempty" name:"AddressSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAssistantCidrRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`数组。形如:[`vpc-6v2ht8q5`] + VpcIds []*string `json:"VpcIds,omitempty" name:"VpcIds"` + + // 过滤条件,参数不支持同时指定VpcIds和Filters。 + // <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeAssistantCidrRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAssistantCidrRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAssistantCidrRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAssistantCidrResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的辅助CIDR数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AssistantCidrSet []*AssistantCidr `json:"AssistantCidrSet,omitempty" name:"AssistantCidrSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAssistantCidrResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAssistantCidrResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBandwidthPackageBillUsageRequest struct { + *tchttp.BaseRequest + + // 后付费共享带宽包的唯一ID + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` +} + +func (r *DescribeBandwidthPackageBillUsageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeBandwidthPackageBillUsageRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BandwidthPackageId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBandwidthPackageBillUsageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBandwidthPackageBillUsageResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 当前计费用量 + BandwidthPackageBillBandwidthSet []*BandwidthPackageBillBandwidth `json:"BandwidthPackageBillBandwidthSet,omitempty" name:"BandwidthPackageBillBandwidthSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeBandwidthPackageBillUsageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeBandwidthPackageBillUsageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBandwidthPackageQuotaRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeBandwidthPackageQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeBandwidthPackageQuotaRequest) 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", "DescribeBandwidthPackageQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBandwidthPackageQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 带宽包配额详细信息 + QuotaSet []*Quota `json:"QuotaSet,omitempty" name:"QuotaSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeBandwidthPackageQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeBandwidthPackageQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBandwidthPackageResourcesRequest struct { + *tchttp.BaseRequest + + // 标识 共享带宽包 的唯一 ID 列表。共享带宽包 唯一 ID 形如:`bwp-11112222`。 + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` + + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`AddressIds`和`Filters`。详细的过滤条件如下: + // <li> resource-id - String - 是否必填:否 - (过滤条件)按照 共享带宽包内资源 的唯一 ID 过滤。共享带宽包内资源 唯一 ID 形如:eip-11112222。</li> + // <li> resource-type - String - 是否必填:否 - (过滤条件)按照 共享带宽包内资源 类型过滤,目前仅支持 弹性IP 和 负载均衡 两种类型,可选值为 Address 和 LoadBalance。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeBandwidthPackageResourcesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeBandwidthPackageResourcesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BandwidthPackageId") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBandwidthPackageResourcesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBandwidthPackageResourcesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的 共享带宽包内资源 数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 共享带宽包内资源 详细信息列表。 + ResourceSet []*Resource `json:"ResourceSet,omitempty" name:"ResourceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeBandwidthPackageResourcesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeBandwidthPackageResourcesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBandwidthPackagesRequest struct { + *tchttp.BaseRequest + + // 带宽包唯一ID列表 + BandwidthPackageIds []*string `json:"BandwidthPackageIds,omitempty" name:"BandwidthPackageIds"` + + // 每次请求的`Filters`的上限为10。参数不支持同时指定`BandwidthPackageIds`和`Filters`。详细的过滤条件如下: + // <li> bandwidth-package_id - String - 是否必填:否 - (过滤条件)按照带宽包的唯一标识ID过滤。</li> + // <li> bandwidth-package-name - String - 是否必填:否 - (过滤条件)按照 带宽包名称过滤。不支持模糊过滤。</li> + // <li> network-type - String - 是否必填:否 - (过滤条件)按照带宽包的类型过滤。类型包括'HIGH_QUALITY_BGP','BGP','SINGLEISP'和'ANYCAST'。</li> + // <li> charge-type - String - 是否必填:否 - (过滤条件)按照带宽包的计费类型过滤。计费类型包括'TOP5_POSTPAID_BY_MONTH'和'PERCENT95_POSTPAID_BY_MONTH'。</li> + // <li> resource.resource-type - String - 是否必填:否 - (过滤条件)按照带宽包资源类型过滤。资源类型包括'Address'和'LoadBalance'</li> + // <li> resource.resource-id - String - 是否必填:否 - (过滤条件)按照带宽包资源Id过滤。资源Id形如'eip-xxxx','lb-xxxx'</li> + // <li> resource.address-ip - String - 是否必填:否 - (过滤条件)按照带宽包资源Ip过滤。</li> + // <li> tag-key - String - 是否必填:否 - (过滤条件)按照标签键进行过滤。</li> + // <li> tag-value - String - 是否必填:否 - (过滤条件)按照标签值进行过滤。</li> + // <li> tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。tag-key使用具体的标签键进行替换。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 查询带宽包偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 查询带宽包数量限制 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeBandwidthPackagesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeBandwidthPackagesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BandwidthPackageIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBandwidthPackagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeBandwidthPackagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的带宽包数量 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 描述带宽包详细信息 + BandwidthPackageSet []*BandwidthPackage `json:"BandwidthPackageSet,omitempty" name:"BandwidthPackageSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeBandwidthPackagesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeBandwidthPackagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCcnAttachedInstancesRequest struct { + *tchttp.BaseRequest + + // 偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤条件: + // <li>ccn-id - String -(过滤条件)CCN实例ID。</li> + // <li>instance-type - String -(过滤条件)关联实例类型。</li> + // <li>instance-region - String -(过滤条件)关联实例所属地域。</li> + // <li>instance-id - String -(过滤条件)关联实例实例ID。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 云联网实例ID + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 排序字段。支持:`CcnId` `InstanceType` `InstanceId` `InstanceName` `InstanceRegion` `AttachedTime` `State`。 + OrderField *string `json:"OrderField,omitempty" name:"OrderField"` + + // 排序方法。顺序:`ASC`,倒序:`DESC`。 + OrderDirection *string `json:"OrderDirection,omitempty" name:"OrderDirection"` +} + +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 + } + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + delete(f, "CcnId") + delete(f, "OrderField") + delete(f, "OrderDirection") + 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 { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 关联实例列表。 + InstanceSet []*CcnAttachedInstance `json:"InstanceSet,omitempty" name:"InstanceSet"` + + // 唯一请求 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 DescribeCcnRegionBandwidthLimitsRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` +} + +func (r *DescribeCcnRegionBandwidthLimitsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCcnRegionBandwidthLimitsRequest) 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", "DescribeCcnRegionBandwidthLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCcnRegionBandwidthLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云联网(CCN)各地域出带宽上限 + CcnRegionBandwidthLimitSet []*CcnRegionBandwidthLimit `json:"CcnRegionBandwidthLimitSet,omitempty" name:"CcnRegionBandwidthLimitSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeCcnRegionBandwidthLimitsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCcnRegionBandwidthLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCcnRoutesRequest struct { + *tchttp.BaseRequest + + // CCN实例ID,形如:ccn-gree226l。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // CCN路由策略唯一ID。形如:ccnr-f49l6u0z。 + RouteIds []*string `json:"RouteIds,omitempty" name:"RouteIds"` + + // 过滤条件,参数不支持同时指定RouteIds和Filters。 + // <li>route-id - String -(过滤条件)路由策略ID。</li> + // <li>cidr-block - String -(过滤条件)目的端。</li> + // <li>instance-type - String -(过滤条件)下一跳类型。</li> + // <li>instance-region - String -(过滤条件)下一跳所属地域。</li> + // <li>instance-id - String -(过滤条件)下一跳实例ID。</li> + // <li>route-table-id - String -(过滤条件)路由表ID列表,形如ccntr-1234edfr,可以根据路由表ID 过滤。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "RouteIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // CCN路由策略对象。 + RouteSet []*CcnRoute `json:"RouteSet,omitempty" name:"RouteSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCcnsRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定CcnIds和Filters。 + CcnIds []*string `json:"CcnIds,omitempty" name:"CcnIds"` + + // 过滤条件,参数不支持同时指定CcnIds和Filters。 + // <li>ccn-id - String - (过滤条件)CCN唯一ID,形如:vpc-f49l6u0z。</li> + // <li>ccn-name - String - (过滤条件)CCN名称。</li> + // <li>ccn-description - String - (过滤条件)CCN描述。</li> + // <li>state - String - (过滤条件)实例状态, 'ISOLATED': 隔离中(欠费停服),'AVAILABLE':运行中。</li> + // <li>tag-key - String -是否必填:否- (过滤条件)按照标签键进行过滤。</li> + // <li>tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例:查询绑定了标签的CCN列表。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 排序字段。支持:`CcnId` `CcnName` `CreateTime` `State` `QosLevel` + OrderField *string `json:"OrderField,omitempty" name:"OrderField"` + + // 排序方法。顺序:`ASC`,倒序:`DESC`。 + OrderDirection *string `json:"OrderDirection,omitempty" name:"OrderDirection"` +} + +func (r *DescribeCcnsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCcnsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "OrderField") + delete(f, "OrderDirection") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCcnsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCcnsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // CCN对象。 + CcnSet []*CCN `json:"CcnSet,omitempty" name:"CcnSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeCcnsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCcnsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClassicLinkInstancesRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + // <li>vpc-id - String - (过滤条件)VPC实例ID。</li> + // <li>vm-ip - String - (过滤条件)基础网络云服务器IP。</li> + Filters []*FilterObject `json:"Filters,omitempty" name:"Filters"` + + // 偏移量 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 返回数量 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeClassicLinkInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClassicLinkInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClassicLinkInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClassicLinkInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 私有网络和基础网络互通设备。 + ClassicLinkInstanceSet []*ClassicLinkInstance `json:"ClassicLinkInstanceSet,omitempty" name:"ClassicLinkInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClassicLinkInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClassicLinkInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCrossBorderComplianceRequest struct { + *tchttp.BaseRequest + + // (精确匹配)服务商,可选值:`UNICOM`。 + ServiceProvider *string `json:"ServiceProvider,omitempty" name:"ServiceProvider"` + + // (精确匹配)合规化审批单`ID`。 + ComplianceId *uint64 `json:"ComplianceId,omitempty" name:"ComplianceId"` + + // (模糊查询)公司名称。 + Company *string `json:"Company,omitempty" name:"Company"` + + // (精确匹配)统一社会信用代码。 + UniformSocialCreditCode *string `json:"UniformSocialCreditCode,omitempty" name:"UniformSocialCreditCode"` + + // (模糊查询)法定代表人。 + LegalPerson *string `json:"LegalPerson,omitempty" name:"LegalPerson"` + + // (模糊查询)发证机关。 + IssuingAuthority *string `json:"IssuingAuthority,omitempty" name:"IssuingAuthority"` + + // (模糊查询)营业执照住所。 + BusinessAddress *string `json:"BusinessAddress,omitempty" name:"BusinessAddress"` + + // (精确匹配)邮编。 + PostCode *uint64 `json:"PostCode,omitempty" name:"PostCode"` + + // (模糊查询)经办人。 + Manager *string `json:"Manager,omitempty" name:"Manager"` + + // (精确查询)经办人身份证号。 + ManagerId *string `json:"ManagerId,omitempty" name:"ManagerId"` + + // (模糊查询)经办人身份证地址。 + ManagerAddress *string `json:"ManagerAddress,omitempty" name:"ManagerAddress"` + + // (精确匹配)经办人联系电话。 + ManagerTelephone *string `json:"ManagerTelephone,omitempty" name:"ManagerTelephone"` + + // (精确匹配)电子邮箱。 + Email *string `json:"Email,omitempty" name:"Email"` + + // (精确匹配)服务开始日期,如:`2020-07-28`。 + ServiceStartDate *string `json:"ServiceStartDate,omitempty" name:"ServiceStartDate"` + + // (精确匹配)服务结束日期,如:`2021-07-28`。 + ServiceEndDate *string `json:"ServiceEndDate,omitempty" name:"ServiceEndDate"` + + // (精确匹配)状态。待审批:`PENDING`,通过:`APPROVED `,拒绝:`DENY`。 + State *string `json:"State,omitempty" name:"State"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeCrossBorderComplianceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCrossBorderComplianceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ServiceProvider") + delete(f, "ComplianceId") + delete(f, "Company") + delete(f, "UniformSocialCreditCode") + delete(f, "LegalPerson") + delete(f, "IssuingAuthority") + delete(f, "BusinessAddress") + delete(f, "PostCode") + delete(f, "Manager") + delete(f, "ManagerId") + delete(f, "ManagerAddress") + delete(f, "ManagerTelephone") + delete(f, "Email") + delete(f, "ServiceStartDate") + delete(f, "ServiceEndDate") + delete(f, "State") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCrossBorderComplianceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCrossBorderComplianceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 合规化审批单列表。 + CrossBorderComplianceSet []*CrossBorderCompliance `json:"CrossBorderComplianceSet,omitempty" name:"CrossBorderComplianceSet"` + + // 合规化审批单总数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeCrossBorderComplianceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCrossBorderComplianceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCustomerGatewayVendorsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeCustomerGatewayVendorsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCustomerGatewayVendorsRequest) 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", "DescribeCustomerGatewayVendorsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCustomerGatewayVendorsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 对端网关厂商信息对象。 + CustomerGatewayVendorSet []*CustomerGatewayVendor `json:"CustomerGatewayVendorSet,omitempty" name:"CustomerGatewayVendorSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeCustomerGatewayVendorsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCustomerGatewayVendorsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCustomerGatewaysRequest struct { + *tchttp.BaseRequest + + // 对端网关ID,例如:cgw-2wqq41m9。每次请求的实例的上限为100。参数不支持同时指定CustomerGatewayIds和Filters。 + CustomerGatewayIds []*string `json:"CustomerGatewayIds,omitempty" name:"CustomerGatewayIds"` + + // 过滤条件,详见下表:实例过滤条件表。每次请求的Filters的上限为10,Filter.Values的上限为5。参数不支持同时指定CustomerGatewayIds和Filters。 + // <li>customer-gateway-id - String - (过滤条件)用户网关唯一ID形如:`cgw-mgp33pll`。</li> + // <li>customer-gateway-name - String - (过滤条件)用户网关名称形如:`test-cgw`。</li> + // <li>ip-address - String - (过滤条件)公网地址形如:`58.211.1.12`。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API 简介中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeCustomerGatewaysRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCustomerGatewaysRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CustomerGatewayIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCustomerGatewaysRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeCustomerGatewaysResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 对端网关对象列表 + CustomerGatewaySet []*CustomerGateway `json:"CustomerGatewaySet,omitempty" name:"CustomerGatewaySet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeCustomerGatewaysResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeCustomerGatewaysResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDhcpIpsRequest struct { + *tchttp.BaseRequest + + // DhcpIp实例ID。形如:dhcpip-pxir56ns。每次请求的实例的上限为100。参数不支持同时指定DhcpIpIds和Filters。 + DhcpIpIds []*string `json:"DhcpIpIds,omitempty" name:"DhcpIpIds"` + + // 过滤条件,参数不支持同时指定DhcpIpIds和Filters。 + // <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。</li> + // <li>subnet-id - String - (过滤条件)所属子网实例ID,形如:subnet-f49l6u0z。</li> + // <li>dhcpip-id - String - (过滤条件)DhcpIp实例ID,形如:dhcpip-pxir56ns。</li> + // <li>dhcpip-name - String - (过滤条件)DhcpIp实例名称。</li> + // <li>address-ip - String - (过滤条件)DhcpIp实例的IP,根据IP精确查找。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeDhcpIpsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDhcpIpsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DhcpIpIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDhcpIpsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDhcpIpsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例详细信息列表。 + DhcpIpSet []*DhcpIp `json:"DhcpIpSet,omitempty" name:"DhcpIpSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDhcpIpsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDhcpIpsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDirectConnectGatewayCcnRoutesRequest struct { + *tchttp.BaseRequest + + // 专线网关ID,形如:`dcg-prpqlmg1`。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` + + // 云联网路由学习类型,可选值: + // <li>`BGP` - 自动学习。</li> + // <li>`STATIC` - 静态,即用户配置,默认值。</li> + CcnRouteType *string `json:"CcnRouteType,omitempty" name:"CcnRouteType"` + + // 偏移量。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeDirectConnectGatewayCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDirectConnectGatewayCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DirectConnectGatewayId") + delete(f, "CcnRouteType") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDirectConnectGatewayCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDirectConnectGatewayCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 云联网路由(IDC网段)列表。 + RouteSet []*DirectConnectGatewayCcnRoute `json:"RouteSet,omitempty" name:"RouteSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDirectConnectGatewayCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDirectConnectGatewayCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDirectConnectGatewaysRequest struct { + *tchttp.BaseRequest + + // 专线网关唯一`ID`,形如:`dcg-9o233uri`。 + DirectConnectGatewayIds []*string `json:"DirectConnectGatewayIds,omitempty" name:"DirectConnectGatewayIds"` + + // 过滤条件,参数不支持同时指定`DirectConnectGatewayIds`和`Filters`。 + // <li>direct-connect-gateway-id - String - 专线网关唯一`ID`,形如:`dcg-9o233uri`。</li> + // <li>direct-connect-gateway-name - String - 专线网关名称,默认模糊查询。</li> + // <li>direct-connect-gateway-ip - String - 专线网关`IP`。</li> + // <li>gateway-type - String - 网关类型,可选值:`NORMAL`(普通型)、`NAT`(NAT型)。</li> + // <li>network-type- String - 网络类型,可选值:`VPC`(私有网络类型)、`CCN`(云联网类型)。</li> + // <li>ccn-id - String - 专线网关所在云联网`ID`。</li> + // <li>vpc-id - String - 专线网关所在私有网络`ID`。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeDirectConnectGatewaysRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDirectConnectGatewaysRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DirectConnectGatewayIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDirectConnectGatewaysRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDirectConnectGatewaysResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 专线网关对象数组。 + DirectConnectGatewaySet []*DirectConnectGateway `json:"DirectConnectGatewaySet,omitempty" name:"DirectConnectGatewaySet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDirectConnectGatewaysResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDirectConnectGatewaysResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeFlowLogRequest struct { + *tchttp.BaseRequest + + // 私用网络ID或者统一ID,建议使用统一ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 流日志唯一ID + FlowLogId *string `json:"FlowLogId,omitempty" name:"FlowLogId"` +} + +func (r *DescribeFlowLogRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeFlowLogRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "FlowLogId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeFlowLogRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeFlowLogResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 流日志信息 + FlowLog []*FlowLog `json:"FlowLog,omitempty" name:"FlowLog"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeFlowLogResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeFlowLogResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeFlowLogsRequest struct { + *tchttp.BaseRequest + + // 私用网络ID或者统一ID,建议使用统一ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 流日志唯一ID + FlowLogId *string `json:"FlowLogId,omitempty" name:"FlowLogId"` + + // 流日志实例名字 + FlowLogName *string `json:"FlowLogName,omitempty" name:"FlowLogName"` + + // 流日志所属资源类型,VPC|SUBNET|NETWORKINTERFACE + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 资源唯一ID + ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + + // 流日志采集类型,ACCEPT|REJECT|ALL + TrafficType *string `json:"TrafficType,omitempty" name:"TrafficType"` + + // 流日志存储ID + CloudLogId *string `json:"CloudLogId,omitempty" name:"CloudLogId"` + + // 流日志存储ID状态 + CloudLogState *string `json:"CloudLogState,omitempty" name:"CloudLogState"` + + // 按某个字段排序,支持字段:flowLogName,createTime,默认按createTime + OrderField *string `json:"OrderField,omitempty" name:"OrderField"` + + // 升序(asc)还是降序(desc),默认:desc + OrderDirection *string `json:"OrderDirection,omitempty" name:"OrderDirection"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 每页行数,默认为10 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤条件,参数不支持同时指定FlowLogIds和Filters。 + // <li>tag-key - String -是否必填:否- (过滤条件)按照标签键进行过滤。</li> + // <li>tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。</li> + Filters *Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeFlowLogsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeFlowLogsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "FlowLogId") + delete(f, "FlowLogName") + delete(f, "ResourceType") + delete(f, "ResourceId") + delete(f, "TrafficType") + delete(f, "CloudLogId") + delete(f, "CloudLogState") + delete(f, "OrderField") + delete(f, "OrderDirection") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeFlowLogsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeFlowLogsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 流日志实例集合 + FlowLog []*FlowLog `json:"FlowLog,omitempty" name:"FlowLog"` + + // 流日志总数目 + TotalNum *uint64 `json:"TotalNum,omitempty" name:"TotalNum"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeFlowLogsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeFlowLogsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeGatewayFlowMonitorDetailRequest struct { + *tchttp.BaseRequest + + // 时间点。表示要查询这分钟内的明细。如:`2019-02-28 18:15:20`,将查询 `18:15` 这一分钟内的明细。 + TimePoint *string `json:"TimePoint,omitempty" name:"TimePoint"` + + // VPN网关实例ID,形如:`vpn-ltjahce6`。 + VpnId *string `json:"VpnId,omitempty" name:"VpnId"` + + // 专线网关实例ID,形如:`dcg-ltjahce6`。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` + + // 对等连接实例ID,形如:`pcx-ltjahce6`。 + PeeringConnectionId *string `json:"PeeringConnectionId,omitempty" name:"PeeringConnectionId"` + + // NAT网关实例ID,形如:`nat-ltjahce6`。 + NatId *string `json:"NatId,omitempty" name:"NatId"` + + // 偏移量。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 排序字段。支持 `InPkg` `OutPkg` `InTraffic` `OutTraffic`。 + OrderField *string `json:"OrderField,omitempty" name:"OrderField"` + + // 排序方法。顺序:`ASC`,倒序:`DESC`。 + OrderDirection *string `json:"OrderDirection,omitempty" name:"OrderDirection"` +} + +func (r *DescribeGatewayFlowMonitorDetailRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeGatewayFlowMonitorDetailRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TimePoint") + delete(f, "VpnId") + delete(f, "DirectConnectGatewayId") + delete(f, "PeeringConnectionId") + delete(f, "NatId") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "OrderField") + delete(f, "OrderDirection") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeGatewayFlowMonitorDetailRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeGatewayFlowMonitorDetailResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 网关流量监控明细。 + GatewayFlowMonitorDetailSet []*GatewayFlowMonitorDetail `json:"GatewayFlowMonitorDetailSet,omitempty" name:"GatewayFlowMonitorDetailSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeGatewayFlowMonitorDetailResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeGatewayFlowMonitorDetailResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeGatewayFlowQosRequest struct { + *tchttp.BaseRequest + + // 网关实例ID,目前我们支持的网关实例类型有, + // 专线网关实例ID,形如,`dcg-ltjahce6`; + // Nat网关实例ID,形如,`nat-ltjahce6`; + // VPN网关实例ID,形如,`vpn-ltjahce6`。 + GatewayId *string `json:"GatewayId,omitempty" name:"GatewayId"` + + // 限流的云服务器内网IP。 + IpAddresses []*string `json:"IpAddresses,omitempty" name:"IpAddresses"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeGatewayFlowQosRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeGatewayFlowQosRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "GatewayId") + delete(f, "IpAddresses") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeGatewayFlowQosRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeGatewayFlowQosResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例详细信息列表。 + GatewayQosSet []*GatewayQos `json:"GatewayQosSet,omitempty" name:"GatewayQosSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeGatewayFlowQosResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeGatewayFlowQosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeHaVipsRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。 + HaVipIds []*string `json:"HaVipIds,omitempty" name:"HaVipIds"` + + // 过滤条件,参数不支持同时指定`HaVipIds`和`Filters`。 + // <li>havip-id - String - `HAVIP`唯一`ID`,形如:`havip-9o233uri`。</li> + // <li>havip-name - String - `HAVIP`名称。</li> + // <li>vpc-id - String - `HAVIP`所在私有网络`ID`。</li> + // <li>subnet-id - String - `HAVIP`所在子网`ID`。</li> + // <li>vip - String - `HAVIP`的地址`VIP`。</li> + // <li>address-ip - String - `HAVIP`绑定的弹性公网`IP`。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeHaVipsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeHaVipsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "HaVipIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHaVipsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeHaVipsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // `HAVIP`对象数组。 + HaVipSet []*HaVip `json:"HaVipSet,omitempty" name:"HaVipSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeHaVipsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeHaVipsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIp6AddressesRequest struct { + *tchttp.BaseRequest + + // 标识 IPV6 的唯一 ID 列表。IPV6 唯一 ID 形如:`eip-11112222`。参数不支持同时指定`Ip6AddressIds`和`Filters`。 + Ip6AddressIds []*string `json:"Ip6AddressIds,omitempty" name:"Ip6AddressIds"` + + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`AddressIds`和`Filters`。详细的过滤条件如下: + // <li> address-ip - String - 是否必填:否 - (过滤条件)按照 EIP 的 IP 地址过滤。</li> + // <li> network-interface-id - String - 是否必填:否 - (过滤条件)按照弹性网卡的唯一ID过滤。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeIp6AddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIp6AddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6AddressIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeIp6AddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIp6AddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的 IPV6 数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // IPV6 详细信息列表。 + AddressSet []*Address `json:"AddressSet,omitempty" name:"AddressSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeIp6AddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIp6AddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIp6TranslatorQuotaRequest struct { + *tchttp.BaseRequest + + // 待查询IPV6转换实例的唯一ID列表,形如ip6-xxxxxxxx + Ip6TranslatorIds []*string `json:"Ip6TranslatorIds,omitempty" name:"Ip6TranslatorIds"` +} + +func (r *DescribeIp6TranslatorQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIp6TranslatorQuotaRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6TranslatorIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeIp6TranslatorQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIp6TranslatorQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 账户在指定地域的IPV6转换实例及规则配额信息 + // QUOTAID属性是TOTAL_TRANSLATOR_QUOTA,表示账户在指定地域的IPV6转换实例配额信息;QUOTAID属性是IPV6转换实例唯一ID(形如ip6-xxxxxxxx),表示账户在该转换实例允许创建的转换规则配额 + QuotaSet []*Quota `json:"QuotaSet,omitempty" name:"QuotaSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeIp6TranslatorQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIp6TranslatorQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIp6TranslatorsRequest struct { + *tchttp.BaseRequest + + // IPV6转换实例唯一ID数组,形如ip6-xxxxxxxx + Ip6TranslatorIds []*string `json:"Ip6TranslatorIds,omitempty" name:"Ip6TranslatorIds"` + + // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。参数不支持同时指定`Ip6TranslatorIds`和`Filters`。详细的过滤条件如下: + // <li> ip6-translator-id - String - 是否必填:否 - (过滤条件)按照IPV6转换实例的唯一ID过滤,形如ip6-xxxxxxx。</li> + // <li> ip6-translator-vip6 - String - 是否必填:否 - (过滤条件)按照IPV6地址过滤。不支持模糊过滤。</li> + // <li> ip6-translator-name - String - 是否必填:否 - (过滤条件)按照IPV6转换实例名称过滤。不支持模糊过滤。</li> + // <li> ip6-translator-status - String - 是否必填:否 - (过滤条件)按照IPV6转换实例的状态过滤。状态取值范围为"CREATING","RUNNING","DELETING","MODIFYING" + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeIp6TranslatorsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIp6TranslatorsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6TranslatorIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeIp6TranslatorsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIp6TranslatorsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合过滤条件的IPV6转换实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 符合过滤条件的IPV6转换实例详细信息 + Ip6TranslatorSet []*Ip6Translator `json:"Ip6TranslatorSet,omitempty" name:"Ip6TranslatorSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeIp6TranslatorsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIp6TranslatorsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIpGeolocationDatabaseUrlRequest struct { + *tchttp.BaseRequest + + // IP地理位置库协议类型,目前仅支持"ipv4"。 + Type *string `json:"Type,omitempty" name:"Type"` +} + +func (r *DescribeIpGeolocationDatabaseUrlRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIpGeolocationDatabaseUrlRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Type") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeIpGeolocationDatabaseUrlRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIpGeolocationDatabaseUrlResponse struct { + *tchttp.BaseResponse + Response *struct { + + // IP地理位置库下载链接地址。 + DownLoadUrl *string `json:"DownLoadUrl,omitempty" name:"DownLoadUrl"` + + // 链接到期时间。按照`ISO8601`标准表示,并且使用`UTC`时间。 + ExpiredAt *string `json:"ExpiredAt,omitempty" name:"ExpiredAt"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeIpGeolocationDatabaseUrlResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIpGeolocationDatabaseUrlResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIpGeolocationInfosRequest struct { + *tchttp.BaseRequest + + // 需查询的IP地址列表,目前仅支持IPv4地址。查询的IP地址数量上限为100个。 + AddressIps []*string `json:"AddressIps,omitempty" name:"AddressIps"` + + // 需查询的IP地址的字段信息。 + Fields *IpField `json:"Fields,omitempty" name:"Fields"` +} + +func (r *DescribeIpGeolocationInfosRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIpGeolocationInfosRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressIps") + delete(f, "Fields") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeIpGeolocationInfosRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeIpGeolocationInfosResponse struct { + *tchttp.BaseResponse + Response *struct { + + // IP地址信息列表。 + AddressInfo []*IpGeolocationInfo `json:"AddressInfo,omitempty" name:"AddressInfo"` + + // IP地址信息个数。 + Total *int64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeIpGeolocationInfosResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeIpGeolocationInfosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLocalGatewayRequest struct { + *tchttp.BaseRequest + + // 查询条件: + // vpc-id:按照VPCID过滤,local-gateway-name:按照本地网关名称过滤,名称支持模糊搜索,local-gateway-id:按照本地网关实例ID过滤,cdc-id:按照cdc实例ID过滤查询。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/11646)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeLocalGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLocalGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLocalGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeLocalGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 本地网关信息集合 + LocalGatewaySet []*LocalGateway `json:"LocalGatewaySet,omitempty" name:"LocalGatewaySet"` + + // 本地网关总数 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeLocalGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeLocalGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNatGatewayDestinationIpPortTranslationNatRulesRequest struct { + *tchttp.BaseRequest + + // NAT网关ID。 + NatGatewayIds []*string `json:"NatGatewayIds,omitempty" name:"NatGatewayIds"` + + // 过滤条件: + // 参数不支持同时指定NatGatewayIds和Filters。 + // <li> nat-gateway-id,NAT网关的ID,如`nat-0yi4hekt`</li> + // <li> vpc-id,私有网络VPC的ID,如`vpc-0yi4hekt`</li> + // <li> public-ip-address, 弹性IP,如`139.199.232.238`。</li> + // <li>public-port, 公网端口。</li> + // <li>private-ip-address, 内网IP,如`10.0.0.1`。</li> + // <li>private-port, 内网端口。</li> + // <li>description,规则描述。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeNatGatewayDestinationIpPortTranslationNatRulesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNatGatewayDestinationIpPortTranslationNatRulesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNatGatewayDestinationIpPortTranslationNatRulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNatGatewayDestinationIpPortTranslationNatRulesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // NAT网关端口转发规则对象数组。 + NatGatewayDestinationIpPortTranslationNatRuleSet []*NatGatewayDestinationIpPortTranslationNatRule `json:"NatGatewayDestinationIpPortTranslationNatRuleSet,omitempty" name:"NatGatewayDestinationIpPortTranslationNatRuleSet"` + + // 符合条件的NAT网关端口转发规则对象数目。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNatGatewayDestinationIpPortTranslationNatRulesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNatGatewayDestinationIpPortTranslationNatRulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNatGatewayDirectConnectGatewayRouteRequest struct { + *tchttp.BaseRequest + + // nat的唯一标识 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // vpc的唯一标识 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 0到200之间 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 大于0 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *DescribeNatGatewayDirectConnectGatewayRouteRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNatGatewayDirectConnectGatewayRouteRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "VpcId") + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNatGatewayDirectConnectGatewayRouteRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNatGatewayDirectConnectGatewayRouteResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 路由数据 + NatDirectConnectGatewayRouteSet []*NatDirectConnectGatewayRoute `json:"NatDirectConnectGatewayRouteSet,omitempty" name:"NatDirectConnectGatewayRouteSet"` + + // 路由总数 + Total *int64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNatGatewayDirectConnectGatewayRouteResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNatGatewayDirectConnectGatewayRouteResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNatGatewaySourceIpTranslationNatRulesRequest struct { + *tchttp.BaseRequest + + // NAT网关统一 ID,形如:`nat-123xx454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // 过滤条件: + // <li> resource-id,Subnet的ID或者Cvm ID,如`subnet-0yi4hekt`</li> + // <li> public-ip-address,弹性IP,如`139.199.232.238`</li> + // <li>description,规则描述。</li> + 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 *DescribeNatGatewaySourceIpTranslationNatRulesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNatGatewaySourceIpTranslationNatRulesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNatGatewaySourceIpTranslationNatRulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNatGatewaySourceIpTranslationNatRulesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // NAT网关SNAT规则对象数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SourceIpTranslationNatRuleSet []*SourceIpTranslationNatRule `json:"SourceIpTranslationNatRuleSet,omitempty" name:"SourceIpTranslationNatRuleSet"` + + // 符合条件的NAT网关端口转发规则对象数目。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNatGatewaySourceIpTranslationNatRulesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNatGatewaySourceIpTranslationNatRulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNatGatewaysRequest struct { + *tchttp.BaseRequest + + // NAT网关统一 ID,形如:`nat-123xx454`。 + NatGatewayIds []*string `json:"NatGatewayIds,omitempty" name:"NatGatewayIds"` + + // 过滤条件,参数不支持同时指定NatGatewayIds和Filters。 + // <li>nat-gateway-id - String - (过滤条件)协议端口模板实例ID,形如:`nat-123xx454`。</li> + // <li>vpc-id - String - (过滤条件)私有网络 唯一ID,形如:`vpc-123xx454`。</li> + // <li>nat-gateway-name - String - (过滤条件)协议端口模板实例ID,形如:`test_nat`。</li> + // <li>tag-key - String - (过滤条件)标签键,形如:`test-key`。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeNatGatewaysRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNatGatewaysRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNatGatewaysRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNatGatewaysResponse struct { + *tchttp.BaseResponse + Response *struct { + + // NAT网关对象数组。 + NatGatewaySet []*NatGateway `json:"NatGatewaySet,omitempty" name:"NatGatewaySet"` + + // 符合条件的NAT网关对象个数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNatGatewaysResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNatGatewaysResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetDetectStatesRequest struct { + *tchttp.BaseRequest + + // 网络探测实例`ID`数组。形如:[`netd-12345678`] + NetDetectIds []*string `json:"NetDetectIds,omitempty" name:"NetDetectIds"` + + // 过滤条件,参数不支持同时指定NetDetectIds和Filters。 + // <li>net-detect-id - String - (过滤条件)网络探测实例ID,形如:netd-12345678</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeNetDetectStatesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetDetectStatesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetDetectIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNetDetectStatesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetDetectStatesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的网络探测验证结果对象数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + NetDetectStateSet []*NetDetectState `json:"NetDetectStateSet,omitempty" name:"NetDetectStateSet"` + + // 符合条件的网络探测验证结果对象数量。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNetDetectStatesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetDetectStatesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetDetectsRequest struct { + *tchttp.BaseRequest + + // 网络探测实例`ID`数组。形如:[`netd-12345678`] + NetDetectIds []*string `json:"NetDetectIds,omitempty" name:"NetDetectIds"` + + // 过滤条件,参数不支持同时指定NetDetectIds和Filters。 + // <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-12345678</li> + // <li>net-detect-id - String - (过滤条件)网络探测实例ID,形如:netd-12345678</li> + // <li>subnet-id - String - (过滤条件)子网实例ID,形如:subnet-12345678</li> + // <li>net-detect-name - String - (过滤条件)网络探测名称</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeNetDetectsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetDetectsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetDetectIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNetDetectsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetDetectsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的网络探测对象数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + NetDetectSet []*NetDetect `json:"NetDetectSet,omitempty" name:"NetDetectSet"` + + // 符合条件的网络探测对象数量。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNetDetectsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetDetectsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetworkAclsRequest struct { + *tchttp.BaseRequest + + // 过滤条件,参数不支持同时指定NetworkAclIds和Filters。 + // <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-12345678。</li> + // <li>network-acl-id - String - (过滤条件)网络ACL实例ID,形如:acl-12345678。</li> + // <li>network-acl-name - String - (过滤条件)网络ACL实例名称。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 网络ACL实例ID数组。形如:[acl-12345678]。每次请求的实例的上限为100。参数不支持同时指定NetworkAclIds和Filters。 + NetworkAclIds []*string `json:"NetworkAclIds,omitempty" name:"NetworkAclIds"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最小值为1,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeNetworkAclsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetworkAclsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "NetworkAclIds") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNetworkAclsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetworkAclsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例详细信息列表。 + NetworkAclSet []*NetworkAcl `json:"NetworkAclSet,omitempty" name:"NetworkAclSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNetworkAclsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetworkAclsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetworkInterfaceLimitRequest struct { + *tchttp.BaseRequest + + // 要查询的CVM实例ID或弹性网卡ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribeNetworkInterfaceLimitRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetworkInterfaceLimitRequest) 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", "DescribeNetworkInterfaceLimitRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetworkInterfaceLimitResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 标准型弹性网卡配额 + EniQuantity *int64 `json:"EniQuantity,omitempty" name:"EniQuantity"` + + // 每个标准型弹性网卡可以分配的IP配额 + EniPrivateIpAddressQuantity *int64 `json:"EniPrivateIpAddressQuantity,omitempty" name:"EniPrivateIpAddressQuantity"` + + // 扩展型网卡配额 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExtendEniQuantity *int64 `json:"ExtendEniQuantity,omitempty" name:"ExtendEniQuantity"` + + // 每个扩展型弹性网卡可以分配的IP配额 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExtendEniPrivateIpAddressQuantity *int64 `json:"ExtendEniPrivateIpAddressQuantity,omitempty" name:"ExtendEniPrivateIpAddressQuantity"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNetworkInterfaceLimitResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetworkInterfaceLimitResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetworkInterfacesRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID查询。形如:eni-pxir56ns。每次请求的实例的上限为100。参数不支持同时指定NetworkInterfaceIds和Filters。 + NetworkInterfaceIds []*string `json:"NetworkInterfaceIds,omitempty" name:"NetworkInterfaceIds"` + + // 过滤条件,参数不支持同时指定NetworkInterfaceIds和Filters。 + // <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。</li> + // <li>subnet-id - String - (过滤条件)所属子网实例ID,形如:subnet-f49l6u0z。</li> + // <li>network-interface-id - String - (过滤条件)弹性网卡实例ID,形如:eni-5k56k7k7。</li> + // <li>attachment.instance-id - String - (过滤条件)绑定的云服务器实例ID,形如:ins-3nqpdn3i。</li> + // <li>groups.security-group-id - String - (过滤条件)绑定的安全组实例ID,例如:sg-f9ekbxeq。</li> + // <li>network-interface-name - String - (过滤条件)网卡实例名称。</li> + // <li>network-interface-description - String - (过滤条件)网卡实例描述。</li> + // <li>address-ip - String - (过滤条件)内网IPv4地址,单IP后缀模糊匹配,多IP精确匹配。可以与`ip-exact-match`配合做单IP的精确匹配查询。</li> + // <li>ip-exact-match - Boolean - (过滤条件)内网IPv4精确匹配查询,存在多值情况,只取第一个。</li> + // <li>tag-key - String -是否必填:否- (过滤条件)按照标签键进行过滤。使用请参考示例2</li> + // <li>tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例3。</li> + // <li>is-primary - Boolean - 是否必填:否 - (过滤条件)按照是否主网卡进行过滤。值为true时,仅过滤主网卡;值为false时,仅过滤辅助网卡;此过滤参数未提供时,同时过滤主网卡和辅助网卡。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeNetworkInterfacesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetworkInterfacesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeNetworkInterfacesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeNetworkInterfacesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例详细信息列表。 + NetworkInterfaceSet []*NetworkInterface `json:"NetworkInterfaceSet,omitempty" name:"NetworkInterfaceSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeNetworkInterfacesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeNetworkInterfacesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeProductQuotaRequest struct { + *tchttp.BaseRequest + + // 查询的网络产品名称,如vpc、ccn等 + Product *string `json:"Product,omitempty" name:"Product"` +} + +func (r *DescribeProductQuotaRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeProductQuotaRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Product") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeProductQuotaRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeProductQuotaResponse struct { + *tchttp.BaseResponse + Response *struct { + + // ProductQuota对象数组 + ProductQuotaSet []*ProductQuota `json:"ProductQuotaSet,omitempty" name:"ProductQuotaSet"` + + // 符合条件的产品类型个数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeProductQuotaResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeProductQuotaResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRouteConflictsRequest struct { + *tchttp.BaseRequest + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 要检查的与之冲突的目的端列表 + DestinationCidrBlocks []*string `json:"DestinationCidrBlocks,omitempty" name:"DestinationCidrBlocks"` +} + +func (r *DescribeRouteConflictsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRouteConflictsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "DestinationCidrBlocks") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRouteConflictsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRouteConflictsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 路由策略冲突列表 + RouteConflictSet []*RouteConflict `json:"RouteConflictSet,omitempty" name:"RouteConflictSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeRouteConflictsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRouteConflictsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRouteTablesRequest struct { + *tchttp.BaseRequest + + // 过滤条件,参数不支持同时指定RouteTableIds和Filters。 + // <li>route-table-id - String - (过滤条件)路由表实例ID。</li> + // <li>route-table-name - String - (过滤条件)路由表名称。</li> + // <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。</li> + // <li>association.main - String - (过滤条件)是否主路由表。</li> + // <li>tag-key - String -是否必填:否- (过滤条件)按照标签键进行过滤。</li> + // <li>tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例2。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableIds []*string `json:"RouteTableIds,omitempty" name:"RouteTableIds"` + + // 偏移量。 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 请求对象个数。 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeRouteTablesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRouteTablesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "RouteTableIds") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRouteTablesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRouteTablesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 路由表对象。 + RouteTableSet []*RouteTable `json:"RouteTableSet,omitempty" name:"RouteTableSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeRouteTablesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRouteTablesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupAssociationStatisticsRequest struct { + *tchttp.BaseRequest + + // 安全实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +func (r *DescribeSecurityGroupAssociationStatisticsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupAssociationStatisticsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityGroupAssociationStatisticsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupAssociationStatisticsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 安全组关联实例统计。 + SecurityGroupAssociationStatisticsSet []*SecurityGroupAssociationStatistics `json:"SecurityGroupAssociationStatisticsSet,omitempty" name:"SecurityGroupAssociationStatisticsSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSecurityGroupAssociationStatisticsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupAssociationStatisticsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupLimitsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeSecurityGroupLimitsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupLimitsRequest) 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", "DescribeSecurityGroupLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 用户安全组配额限制。 + SecurityGroupLimitSet *SecurityGroupLimitSet `json:"SecurityGroupLimitSet,omitempty" name:"SecurityGroupLimitSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSecurityGroupLimitsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupPoliciesRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如:sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 过滤条件,不支持同时指定SecurityGroupId和Filters参数。 + // <li>security-group-id - String - 安全组ID。</li> + // <li>ip - String - IP,支持IPV4和IPV6模糊匹配。</li> + // <li>address-module - String - IP地址模板或IP地址组模板ID。</li> + // <li>service-module - String - 协议端口模板或协议端口组模板ID。</li> + // <li>protocol-type - String - 安全组策略支持的协议,可选值:`TCP`, `UDP`, `ICMP`, `ICMPV6`, `GRE`, `ALL`。</li> + // <li>port - String - 是否必填:否 -协议端口,支持模糊匹配,值为`ALL`时,查询所有的端口。</li> + // <li>poly - String - 协议策略,可选值:`ALL`,所有策略;`ACCEPT`,允许;`DROP`,拒绝。</li> + // <li>direction - String - 协议规则,可选值:`ALL`,所有策略;`INBOUND`,入站规则;`OUTBOUND`,出站规则。</li> + // <li>description - String - 协议描述,该过滤条件支持模糊匹配。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeSecurityGroupPoliciesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupPoliciesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupId") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityGroupPoliciesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupPoliciesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 安全组规则集合。 + SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet,omitempty" name:"SecurityGroupPolicySet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSecurityGroupPoliciesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupPoliciesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupReferencesRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID数组。格式如:['sg-12345678'] + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +func (r *DescribeSecurityGroupReferencesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupReferencesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityGroupReferencesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupReferencesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 安全组被引用信息。 + ReferredSecurityGroupSet []*ReferredSecurityGroup `json:"ReferredSecurityGroupSet,omitempty" name:"ReferredSecurityGroupSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSecurityGroupReferencesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupReferencesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如:sg-33ocnj9n,可通过DescribeSecurityGroups获取。每次请求的实例的上限为100。参数不支持同时指定SecurityGroupIds和Filters。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 过滤条件,参数不支持同时指定SecurityGroupIds和Filters。 + // <li>security-group-id - String - (过滤条件)安全组ID。</li> + // <li>project-id - Integer - (过滤条件)项目ID。</li> + // <li>security-group-name - String - (过滤条件)安全组名称。</li> + // <li>tag-key - String -是否必填:否- (过滤条件)按照标签键进行过滤。使用请参考示例2。</li> + // <li>tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例3。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 安全组对象。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityGroupSet []*SecurityGroup `json:"SecurityGroupSet,omitempty" name:"SecurityGroupSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeServiceTemplateGroupsRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + // <li>service-template-group-name - String - (过滤条件)协议端口模板集合名称。</li> + // <li>service-template-group-id - String - (过滤条件)协议端口模板集合实例ID,例如:ppmg-e6dy460g。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeServiceTemplateGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeServiceTemplateGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeServiceTemplateGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeServiceTemplateGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 协议端口模板集合。 + ServiceTemplateGroupSet []*ServiceTemplateGroup `json:"ServiceTemplateGroupSet,omitempty" name:"ServiceTemplateGroupSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeServiceTemplateGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeServiceTemplateGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeServiceTemplatesRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + // <li>service-template-name - 协议端口模板名称。</li> + // <li>service-template-id - 协议端口模板实例ID,例如:ppm-e6dy460g。</li> + // <li>service-port- 协议端口。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeServiceTemplatesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeServiceTemplatesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeServiceTemplatesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeServiceTemplatesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 协议端口模板对象。 + ServiceTemplateSet []*ServiceTemplate `json:"ServiceTemplateSet,omitempty" name:"ServiceTemplateSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeServiceTemplatesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeServiceTemplatesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSubnetsRequest struct { + *tchttp.BaseRequest + + // 子网实例ID查询。形如:subnet-pxir56ns。每次请求的实例的上限为100。参数不支持同时指定SubnetIds和Filters。 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 过滤条件,参数不支持同时指定SubnetIds和Filters。 + // <li>subnet-id - String - (过滤条件)Subnet实例名称。</li> + // <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。</li> + // <li>cidr-block - String - (过滤条件)子网网段,形如: 192.168.1.0 。</li> + // <li>is-default - Boolean - (过滤条件)是否是默认子网。</li> + // <li>is-remote-vpc-snat - Boolean - (过滤条件)是否为VPC SNAT地址池子网。</li> + // <li>subnet-name - String - (过滤条件)子网名称。</li> + // <li>zone - String - (过滤条件)可用区。</li> + // <li>tag-key - String -是否必填:否- (过滤条件)按照标签键进行过滤。</li> + // <li>tag:tag-key - String - 是否必填:否 - (过滤条件)按照标签键值对进行过滤。 tag-key使用具体的标签键进行替换。使用请参考示例2。</li> + // <li>cdc-id - String - 是否必填:否 - (过滤条件)按照cdc信息进行过滤。过滤出来制定cdc下的子网。</li> + // <li>is-cdc-subnet - String - 是否必填:否 - (过滤条件)按照是否是cdc子网进行过滤。取值:“0”-非cdc子网,“1”--cdc子网</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeSubnetsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSubnetsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SubnetIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSubnetsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeSubnetsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 子网对象。 + SubnetSet []*Subnet `json:"SubnetSet,omitempty" name:"SubnetSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeSubnetsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeSubnetsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeTaskResultRequest struct { + *tchttp.BaseRequest + + // 异步任务ID。TaskId和DealName必填一个参数 + TaskId *uint64 `json:"TaskId,omitempty" name:"TaskId"` + + // 计费订单号。TaskId和DealName必填一个参数 + DealName *string `json:"DealName,omitempty" name:"DealName"` +} + +func (r *DescribeTaskResultRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeTaskResultRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TaskId") + delete(f, "DealName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeTaskResultRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeTaskResultResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 任务ID + TaskId *uint64 `json:"TaskId,omitempty" name:"TaskId"` + + // 执行结果,包括"SUCCESS", "FAILED", "RUNNING" + Result *string `json:"Result,omitempty" name:"Result"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeTaskResultResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeTaskResultResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeTemplateLimitsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeTemplateLimitsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeTemplateLimitsRequest) 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", "DescribeTemplateLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeTemplateLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 参数模板配额对象。 + TemplateLimit *TemplateLimit `json:"TemplateLimit,omitempty" name:"TemplateLimit"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeTemplateLimitsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeTemplateLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcEndPointRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + // <li> end-point-service-id- String - (过滤条件)终端节点服务ID。</li> + // <li>end-point-name - String - (过滤条件)终端节点实例名称。</li> + // <li> end-point-id- String - (过滤条件)终端节点实例ID。</li> + // <li> vpc-id- String - (过滤条件)VPC实例ID。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 单页返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 终端节点ID列表。 + EndPointId []*string `json:"EndPointId,omitempty" name:"EndPointId"` +} + +func (r *DescribeVpcEndPointRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcEndPointRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "EndPointId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcEndPointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcEndPointResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 终端节点对象。 + EndPointSet []*EndPoint `json:"EndPointSet,omitempty" name:"EndPointSet"` + + // 符合查询条件的终端节点个数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcEndPointResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcEndPointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcEndPointServiceRequest struct { + *tchttp.BaseRequest + + // 过滤条件。 + // <li> service-id- String - (过滤条件)终端节点服务唯一ID。</li> + // <li>service-name - String - (过滤条件)终端节点实例名称。</li> + // <li>service-instance-id - String - (过滤条件)后端服务的唯一ID,比如lb-xxx。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 单页返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 终端节点服务ID。 + EndPointServiceIds []*string `json:"EndPointServiceIds,omitempty" name:"EndPointServiceIds"` +} + +func (r *DescribeVpcEndPointServiceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcEndPointServiceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "EndPointServiceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcEndPointServiceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcEndPointServiceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 终端节点服务对象数组。 + EndPointServiceSet []*EndPointService `json:"EndPointServiceSet,omitempty" name:"EndPointServiceSet"` + + // 符合查询条件的个数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcEndPointServiceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcEndPointServiceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcEndPointServiceWhiteListRequest struct { + *tchttp.BaseRequest + + // 偏移量,默认为0。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 单页返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤条件。 + // <li> user-uin String - (过滤条件)用户UIN。</li> + // <li> end-point-service-id String - (过滤条件)终端节点服务ID。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeVpcEndPointServiceWhiteListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcEndPointServiceWhiteListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcEndPointServiceWhiteListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcEndPointServiceWhiteListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 白名单对象数组。 + VpcEndpointServiceUserSet []*VpcEndPointServiceUser `json:"VpcEndpointServiceUserSet,omitempty" name:"VpcEndpointServiceUserSet"` + + // 符合条件的白名单个数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcEndPointServiceWhiteListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcEndPointServiceWhiteListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcInstancesRequest struct { + *tchttp.BaseRequest + + // 过滤条件,参数不支持同时指定RouteTableIds和Filters。 + // <li>vpc-id - String - (过滤条件)VPC实例ID,形如:vpc-f49l6u0z。</li> + // <li>instance-id - String - (过滤条件)云主机实例ID。</li> + // <li>instance-name - String - (过滤条件)云主机名称。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 请求对象个数。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeVpcInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云主机实例列表。 + InstanceSet []*CvmInstance `json:"InstanceSet,omitempty" name:"InstanceSet"` + + // 满足条件的云主机实例个数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcIpv6AddressesRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`,形如:`vpc-f49l6u0z`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // `IP`地址列表,批量查询单次请求最多支持`10`个。 + Ipv6Addresses []*string `json:"Ipv6Addresses,omitempty" name:"Ipv6Addresses"` + + // 偏移量。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeVpcIpv6AddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcIpv6AddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "Ipv6Addresses") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcIpv6AddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcIpv6AddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // `IPv6`地址列表。 + Ipv6AddressSet []*VpcIpv6Address `json:"Ipv6AddressSet,omitempty" name:"Ipv6AddressSet"` + + // `IPv6`地址总数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcIpv6AddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcIpv6AddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcLimitsRequest struct { + *tchttp.BaseRequest + + // 配额名称。每次最大查询100个配额类型。 + LimitTypes []*string `json:"LimitTypes,omitempty" name:"LimitTypes"` +} + +func (r *DescribeVpcLimitsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcLimitsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LimitTypes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有网络配额 + VpcLimitSet []*VpcLimit `json:"VpcLimitSet,omitempty" name:"VpcLimitSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcLimitsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcPrivateIpAddressesRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`,形如:`vpc-f49l6u0z`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 内网`IP`地址列表,批量查询单次请求最多支持`10`个。 + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` +} + +func (r *DescribeVpcPrivateIpAddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcPrivateIpAddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "PrivateIpAddresses") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcPrivateIpAddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcPrivateIpAddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 内网`IP`地址信息列表。 + VpcPrivateIpAddressSet []*VpcPrivateIpAddress `json:"VpcPrivateIpAddressSet,omitempty" name:"VpcPrivateIpAddressSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcPrivateIpAddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcPrivateIpAddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcResourceDashboardRequest struct { + *tchttp.BaseRequest + + // Vpc实例ID,例如:vpc-f1xjkw1b。 + VpcIds []*string `json:"VpcIds,omitempty" name:"VpcIds"` +} + +func (r *DescribeVpcResourceDashboardRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcResourceDashboardRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcResourceDashboardRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcResourceDashboardResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 资源对象列表。 + ResourceDashboardSet []*ResourceDashboard `json:"ResourceDashboardSet,omitempty" name:"ResourceDashboardSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcResourceDashboardResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcResourceDashboardResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcTaskResultRequest struct { + *tchttp.BaseRequest + + // 异步任务请求返回的RequestId。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` +} + +func (r *DescribeVpcTaskResultRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcTaskResultRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TaskId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcTaskResultRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcTaskResultResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 异步任务执行结果。结果:SUCCESS、FAILED、RUNNING。3者其中之一。其中SUCCESS表示任务执行成功,FAILED表示任务执行失败,RUNNING表示任务执行中。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 异步任务执行输出。 + Output *string `json:"Output,omitempty" name:"Output"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcTaskResultResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcTaskResultResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcsRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。形如:vpc-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定VpcIds和Filters。 + VpcIds []*string `json:"VpcIds,omitempty" name:"VpcIds"` + + // 过滤条件,不支持同时指定VpcIds和Filters参数。 + // 支持的过滤条件如下: + // <li>vpc-name:VPC实例名称。</li> + // <li>is-default :是否默认VPC。</li> + // <li>vpc-id :VPC实例ID,例如:vpc-f49l6u0z。</li> + // <li>cidr-block:VPC的CIDR。</li> + // <li>tag-key :按照标签键进行过滤,非必填参数。</li> + // <li>tag:tag-key:按照标签键值对进行过滤,非必填参数。 其中 tag-key 请使用具体的标签键进行替换,可参考示例2。</li> + // **说明:**若同一个过滤条件(Filter)存在多个Values,则同一Filter下Values间的关系为逻辑或(OR)关系;若存在多个过滤条件(Filter),Filter之间的关系为逻辑与(AND)关系。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。 + Offset *string `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *string `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeVpcsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // VPC对象。 + VpcSet []*Vpc `json:"VpcSet,omitempty" name:"VpcSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpcsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpnConnectionsRequest struct { + *tchttp.BaseRequest + + // VPN通道实例ID。形如:vpnx-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定VpnConnectionIds和Filters。 + VpnConnectionIds []*string `json:"VpnConnectionIds,omitempty" name:"VpnConnectionIds"` + + // 过滤条件。每次请求的Filters的上限为10,Filter.Values的上限为5。参数不支持同时指定VpnConnectionIds和Filters。 + // <li>vpc-id - String - VPC实例ID,形如:`vpc-0a36uwkr`。</li> + // <li>vpn-gateway-id - String - VPN网关实例ID,形如:`vpngw-p4lmqawn`。</li> + // <li>customer-gateway-id - String - 对端网关实例ID,形如:`cgw-l4rblw63`。</li> + // <li>vpn-connection-name - String - 通道名称,形如:`test-vpn`。</li> + // <li>vpn-connection-id - String - 通道实例ID,形如:`vpnx-5p7vkch8"`。</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API 简介中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeVpnConnectionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpnConnectionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnConnectionIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpnConnectionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpnConnectionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // VPN通道实例。 + VpnConnectionSet []*VpnConnection `json:"VpnConnectionSet,omitempty" name:"VpnConnectionSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpnConnectionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpnConnectionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpnGatewayCcnRoutesRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeVpnGatewayCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpnGatewayCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpnGatewayCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpnGatewayCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云联网路由(IDC网段)列表。 + RouteSet []*VpngwCcnRoutes `json:"RouteSet,omitempty" name:"RouteSet"` + + // 符合条件的对象数。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpnGatewayCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpnGatewayCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpnGatewayRoutesRequest struct { + *tchttp.BaseRequest + + // VPN网关的ID + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 过滤条件, 条件包括(DestinationCidr, InstanceId,InstanceType) + 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 *DescribeVpnGatewayRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpnGatewayRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpnGatewayRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpnGatewayRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // VPN网关目的路由 + Routes []*VpnGatewayRoute `json:"Routes,omitempty" name:"Routes"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpnGatewayRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpnGatewayRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpnGatewaysRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。形如:vpngw-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定VpnGatewayIds和Filters。 + VpnGatewayIds []*string `json:"VpnGatewayIds,omitempty" name:"VpnGatewayIds"` + + // 过滤条件,参数不支持同时指定VpnGatewayIds和Filters。 + // <li>vpc-id - String - (过滤条件)VPC实例ID形如:vpc-f49l6u0z。</li> + // <li>vpn-gateway-id - String - (过滤条件)VPN实例ID形如:vpngw-5aluhh9t。</li> + // <li>vpn-gateway-name - String - (过滤条件)VPN实例名称。</li> + // <li>type - String - (过滤条件)VPN网关类型:'IPSEC', 'SSL'。</li> + // <li>public-ip-address- String - (过滤条件)公网IP。</li> + // <li>renew-flag - String - (过滤条件)网关续费类型,手动续费:'NOTIFY_AND_MANUAL_RENEW'、自动续费:'NOTIFY_AND_AUTO_RENEW'。</li> + // <li>zone - String - (过滤条件)VPN所在可用区,形如:ap-guangzhou-2。</li> + Filters []*FilterObject `json:"Filters,omitempty" name:"Filters"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 请求对象个数 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeVpnGatewaysRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpnGatewaysRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayIds") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpnGatewaysRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpnGatewaysResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // VPN网关实例详细信息列表。 + VpnGatewaySet []*VpnGateway `json:"VpnGatewaySet,omitempty" name:"VpnGatewaySet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpnGatewaysResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeVpnGatewaysResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DestinationIpPortTranslationNatRule struct { + + // 网络协议,可选值:`TCP`、`UDP`。 + IpProtocol *string `json:"IpProtocol,omitempty" name:"IpProtocol"` + + // 弹性IP。 + PublicIpAddress *string `json:"PublicIpAddress,omitempty" name:"PublicIpAddress"` + + // 公网端口。 + PublicPort *uint64 `json:"PublicPort,omitempty" name:"PublicPort"` + + // 内网地址。 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` + + // 内网端口。 + PrivatePort *uint64 `json:"PrivatePort,omitempty" name:"PrivatePort"` + + // NAT网关转发规则描述。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +type DetachCcnInstancesRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 要解关联网络实例列表 + Instances []*CcnInstance `json:"Instances,omitempty" name:"Instances"` +} + +func (r *DetachCcnInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachCcnInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "Instances") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DetachCcnInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DetachCcnInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DetachCcnInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachCcnInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DetachClassicLinkVpcRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // CVM实例ID查询。形如:ins-r8hr2upy。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *DetachClassicLinkVpcRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachClassicLinkVpcRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DetachClassicLinkVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DetachClassicLinkVpcResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DetachClassicLinkVpcResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachClassicLinkVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DetachNetworkInterfaceRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID,例如:eni-m6dyj72l。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // CVM实例ID。形如:ins-r8hr2upy。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DetachNetworkInterfaceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachNetworkInterfaceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "InstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DetachNetworkInterfaceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DetachNetworkInterfaceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DetachNetworkInterfaceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DetachNetworkInterfaceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DhcpIp struct { + + // `DhcpIp`的`ID`,是`DhcpIp`的唯一标识。 + DhcpIpId *string `json:"DhcpIpId,omitempty" name:"DhcpIpId"` + + // `DhcpIp`所在私有网络`ID`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // `DhcpIp`所在子网`ID`。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // `DhcpIp`的名称。 + DhcpIpName *string `json:"DhcpIpName,omitempty" name:"DhcpIpName"` + + // IP地址。 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` + + // 绑定`EIP`。 + AddressIp *string `json:"AddressIp,omitempty" name:"AddressIp"` + + // `DhcpIp`关联弹性网卡`ID`。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 被绑定的实例`ID`。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 状态: + // <li>`AVAILABLE`:运行中</li> + // <li>`UNBIND`:未绑定</li> + State *string `json:"State,omitempty" name:"State"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type DirectConnectGateway struct { + + // 专线网关`ID`。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` + + // 专线网关名称。 + DirectConnectGatewayName *string `json:"DirectConnectGatewayName,omitempty" name:"DirectConnectGatewayName"` + + // 专线网关关联`VPC`实例`ID`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 关联网络类型: + // <li>`VPC` - 私有网络</li> + // <li>`CCN` - 云联网</li> + NetworkType *string `json:"NetworkType,omitempty" name:"NetworkType"` + + // 关联网络实例`ID`: + // <li>`NetworkType`为`VPC`时,这里为私有网络实例`ID`</li> + // <li>`NetworkType`为`CCN`时,这里为云联网实例`ID`</li> + NetworkInstanceId *string `json:"NetworkInstanceId,omitempty" name:"NetworkInstanceId"` + + // 网关类型: + // <li>NORMAL - 标准型,注:云联网只支持标准型</li> + // <li>NAT - NAT型</li> + // NAT类型支持网络地址转换配置,类型确定后不能修改;一个私有网络可以创建一个NAT类型的专线网关和一个非NAT类型的专线网关 + GatewayType *string `json:"GatewayType,omitempty" name:"GatewayType"` + + // 创建时间。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 专线网关IP。 + DirectConnectGatewayIp *string `json:"DirectConnectGatewayIp,omitempty" name:"DirectConnectGatewayIp"` + + // 专线网关关联`CCN`实例`ID`。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 云联网路由学习类型: + // <li>`BGP` - 自动学习。</li> + // <li>`STATIC` - 静态,即用户配置。</li> + CcnRouteType *string `json:"CcnRouteType,omitempty" name:"CcnRouteType"` + + // 是否启用BGP。 + EnableBGP *bool `json:"EnableBGP,omitempty" name:"EnableBGP"` + + // 开启和关闭BGP的community属性。 + EnableBGPCommunity *bool `json:"EnableBGPCommunity,omitempty" name:"EnableBGPCommunity"` + + // 绑定的NAT网关ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // 专线网关是否支持VXLAN架构 + // 注意:此字段可能返回 null,表示取不到有效值。 + VXLANSupport []*bool `json:"VXLANSupport,omitempty" name:"VXLANSupport"` + + // 云联网路由发布模式:`standard`(标准模式)、`exquisite`(精细模式)。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ModeType *string `json:"ModeType,omitempty" name:"ModeType"` + + // 是否为localZone专线网关。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LocalZone *bool `json:"LocalZone,omitempty" name:"LocalZone"` + + // 专线网关所在可用区 + // 注意:此字段可能返回 null,表示取不到有效值。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 网关流控明细启用状态: + // 0:关闭 + // 1:开启 + // 注意:此字段可能返回 null,表示取不到有效值。 + EnableFlowDetails *uint64 `json:"EnableFlowDetails,omitempty" name:"EnableFlowDetails"` + + // 开启、关闭网关流控明细时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + FlowDetailsUpdateTime *string `json:"FlowDetailsUpdateTime,omitempty" name:"FlowDetailsUpdateTime"` + + // 是否支持开启网关流控明细 + // 0:不支持 + // 1:支持 + // 注意:此字段可能返回 null,表示取不到有效值。 + NewAfc *uint64 `json:"NewAfc,omitempty" name:"NewAfc"` + + // 专线网关接入网络类型: + // <li>`VXLAN` - VXLAN类型。</li> + // <li>`MPLS` - MPLS类型。</li> + // <li>`Hybrid` - Hybrid类型。</li> + // 注意:此字段可能返回 null,表示取不到有效值。 + AccessNetworkType *string `json:"AccessNetworkType,omitempty" name:"AccessNetworkType"` + + // 跨可用区容灾专线网关的可用区列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + HaZoneList []*string `json:"HaZoneList,omitempty" name:"HaZoneList"` +} + +type DirectConnectGatewayCcnRoute struct { + + // 路由ID。 + RouteId *string `json:"RouteId,omitempty" name:"RouteId"` + + // IDC网段。 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // `BGP`的`AS-Path`属性。 + ASPath []*string `json:"ASPath,omitempty" name:"ASPath"` + + // 备注 + Description *string `json:"Description,omitempty" name:"Description"` + + // 最后更新时间 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` +} + +type DirectConnectSubnet struct { + + // 专线网关ID + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` + + // IDC子网网段 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` +} + +type DisableCcnRoutesRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // CCN路由策略唯一ID。形如:ccnr-f49l6u0z。 + RouteIds []*string `json:"RouteIds,omitempty" name:"RouteIds"` +} + +func (r *DisableCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "RouteIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisableCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisableGatewayFlowMonitorRequest struct { + *tchttp.BaseRequest + + // 网关实例ID,目前我们支持的网关实例类型有, + // 专线网关实例ID,形如,`dcg-ltjahce6`; + // Nat网关实例ID,形如,`nat-ltjahce6`; + // VPN网关实例ID,形如,`vpn-ltjahce6`。 + GatewayId *string `json:"GatewayId,omitempty" name:"GatewayId"` +} + +func (r *DisableGatewayFlowMonitorRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableGatewayFlowMonitorRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "GatewayId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableGatewayFlowMonitorRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisableGatewayFlowMonitorResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableGatewayFlowMonitorResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableGatewayFlowMonitorResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisableRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表唯一ID。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由策略ID。不能和RouteItemIds同时使用,但至少输入一个。该参数取值可通过查询路由列表([DescribeRouteTables](https://cloud.tencent.com/document/product/215/15763))获取。 + RouteIds []*uint64 `json:"RouteIds,omitempty" name:"RouteIds"` + + // 路由策略唯一ID。不能和RouteIds同时使用,但至少输入一个。该参数取值可通过查询路由列表([DescribeRouteTables](https://cloud.tencent.com/document/product/215/15763))获取。 + RouteItemIds []*string `json:"RouteItemIds,omitempty" name:"RouteItemIds"` +} + +func (r *DisableRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "RouteIds") + delete(f, "RouteItemIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisableRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateAddressRequest struct { + *tchttp.BaseRequest + + // 标识 EIP 的唯一 ID。EIP 唯一 ID 形如:`eip-11112222`。 + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // 表示解绑 EIP 之后是否分配普通公网 IP。取值范围:<br><li>TRUE:表示解绑 EIP 之后分配普通公网 IP。<br><li>FALSE:表示解绑 EIP 之后不分配普通公网 IP。<br>默认取值:FALSE。<br><br>只有满足以下条件时才能指定该参数:<br><li> 只有在解绑主网卡的主内网 IP 上的 EIP 时才能指定该参数。<br><li>解绑 EIP 后重新分配普通公网 IP 操作一个账号每天最多操作 10 次;详情可通过 [DescribeAddressQuota](https://cloud.tencent.com/document/api/213/1378) 接口获取。 + ReallocateNormalPublicIp *bool `json:"ReallocateNormalPublicIp,omitempty" name:"ReallocateNormalPublicIp"` +} + +func (r *DisassociateAddressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateAddressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressId") + delete(f, "ReallocateNormalPublicIp") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateAddressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateAddressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 异步任务TaskId。可以使用[DescribeTaskResult](https://cloud.tencent.com/document/api/215/36271)接口查询任务状态。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateAddressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateAddressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateDhcpIpWithAddressIpRequest struct { + *tchttp.BaseRequest + + // `DhcpIp`唯一`ID`,形如:`dhcpip-9o233uri`。必须是已绑定`EIP`的`DhcpIp`。 + DhcpIpId *string `json:"DhcpIpId,omitempty" name:"DhcpIpId"` +} + +func (r *DisassociateDhcpIpWithAddressIpRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateDhcpIpWithAddressIpRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DhcpIpId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateDhcpIpWithAddressIpRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateDhcpIpWithAddressIpResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateDhcpIpWithAddressIpResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateDhcpIpWithAddressIpResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateDirectConnectGatewayNatGatewayRequest struct { + *tchttp.BaseRequest + + // 专线网关ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // NAT网关ID。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // VPC实例ID。可通过DescribeVpcs接口返回值中的VpcId获取。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` +} + +func (r *DisassociateDirectConnectGatewayNatGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateDirectConnectGatewayNatGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "NatGatewayId") + delete(f, "DirectConnectGatewayId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateDirectConnectGatewayNatGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateDirectConnectGatewayNatGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateDirectConnectGatewayNatGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateDirectConnectGatewayNatGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateNatGatewayAddressRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df45454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // 待解绑NAT网关的弹性IP数组。 + PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses"` +} + +func (r *DisassociateNatGatewayAddressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateNatGatewayAddressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "PublicIpAddresses") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateNatGatewayAddressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateNatGatewayAddressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateNatGatewayAddressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateNatGatewayAddressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateNetworkAclSubnetsRequest struct { + *tchttp.BaseRequest + + // 网络ACL实例ID。例如:acl-12345678。 + NetworkAclId *string `json:"NetworkAclId,omitempty" name:"NetworkAclId"` + + // 子网实例ID数组。例如:[subnet-12345678] + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` +} + +func (r *DisassociateNetworkAclSubnetsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateNetworkAclSubnetsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkAclId") + delete(f, "SubnetIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateNetworkAclSubnetsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateNetworkAclSubnetsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateNetworkAclSubnetsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateNetworkAclSubnetsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateNetworkInterfaceSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID。形如:eni-pxir56ns。每次请求的实例的上限为100。 + NetworkInterfaceIds []*string `json:"NetworkInterfaceIds,omitempty" name:"NetworkInterfaceIds"` + + // 安全组实例ID,例如:sg-33ocnj9n,可通过DescribeSecurityGroups获取。每次请求的实例的上限为100。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +func (r *DisassociateNetworkInterfaceSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateNetworkInterfaceSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceIds") + delete(f, "SecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateNetworkInterfaceSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateNetworkInterfaceSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateNetworkInterfaceSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateNetworkInterfaceSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateVpcEndPointSecurityGroupsRequest struct { + *tchttp.BaseRequest + + // 安全组ID数组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 终端节点ID。 + EndPointId *string `json:"EndPointId,omitempty" name:"EndPointId"` +} + +func (r *DisassociateVpcEndPointSecurityGroupsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateVpcEndPointSecurityGroupsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupIds") + delete(f, "EndPointId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisassociateVpcEndPointSecurityGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisassociateVpcEndPointSecurityGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisassociateVpcEndPointSecurityGroupsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisassociateVpcEndPointSecurityGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DownloadCustomerGatewayConfigurationRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // VPN通道实例ID。形如:vpnx-f49l6u0z。 + VpnConnectionId *string `json:"VpnConnectionId,omitempty" name:"VpnConnectionId"` + + // 对端网关厂商信息对象,可通过DescribeCustomerGatewayVendors获取。 + CustomerGatewayVendor *CustomerGatewayVendor `json:"CustomerGatewayVendor,omitempty" name:"CustomerGatewayVendor"` + + // 通道接入设备物理接口名称。 + InterfaceName *string `json:"InterfaceName,omitempty" name:"InterfaceName"` +} + +func (r *DownloadCustomerGatewayConfigurationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DownloadCustomerGatewayConfigurationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "VpnConnectionId") + delete(f, "CustomerGatewayVendor") + delete(f, "InterfaceName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DownloadCustomerGatewayConfigurationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DownloadCustomerGatewayConfigurationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // XML格式配置信息。 + CustomerGatewayConfiguration *string `json:"CustomerGatewayConfiguration,omitempty" name:"CustomerGatewayConfiguration"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DownloadCustomerGatewayConfigurationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DownloadCustomerGatewayConfigurationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnableCcnRoutesRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // CCN路由策略唯一ID。形如:ccnr-f49l6u0z。 + RouteIds []*string `json:"RouteIds,omitempty" name:"RouteIds"` +} + +func (r *EnableCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "RouteIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnableGatewayFlowMonitorRequest struct { + *tchttp.BaseRequest + + // 网关实例ID,目前我们支持的网关实例有, + // 专线网关实例ID,形如,`dcg-ltjahce6`; + // Nat网关实例ID,形如,`nat-ltjahce6`; + // VPN网关实例ID,形如,`vpn-ltjahce6`。 + GatewayId *string `json:"GatewayId,omitempty" name:"GatewayId"` +} + +func (r *EnableGatewayFlowMonitorRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableGatewayFlowMonitorRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "GatewayId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableGatewayFlowMonitorRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableGatewayFlowMonitorResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableGatewayFlowMonitorResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableGatewayFlowMonitorResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnableRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表唯一ID。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由策略ID。不能和RouteItemIds同时使用,但至少输入一个。该参数取值可通过查询路由列表([DescribeRouteTables](https://cloud.tencent.com/document/product/215/15763))获取。 + RouteIds []*uint64 `json:"RouteIds,omitempty" name:"RouteIds"` + + // 路由策略唯一ID。不能和RouteIds同时使用,但至少输入一个。该参数取值可通过查询路由列表([DescribeRouteTables](https://cloud.tencent.com/document/product/215/15763))获取。 + RouteItemIds []*string `json:"RouteItemIds,omitempty" name:"RouteItemIds"` +} + +func (r *EnableRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "RouteIds") + delete(f, "RouteItemIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnableVpcEndPointConnectRequest struct { + *tchttp.BaseRequest + + // 终端节点服务ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` + + // 终端节点ID。 + EndPointId []*string `json:"EndPointId,omitempty" name:"EndPointId"` + + // 是否接受终端节点连接请求。 + AcceptFlag *bool `json:"AcceptFlag,omitempty" name:"AcceptFlag"` +} + +func (r *EnableVpcEndPointConnectRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableVpcEndPointConnectRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EndPointServiceId") + delete(f, "EndPointId") + delete(f, "AcceptFlag") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableVpcEndPointConnectRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableVpcEndPointConnectResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableVpcEndPointConnectResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *EnableVpcEndPointConnectResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EndPoint struct { + + // 终端节点ID。 + EndPointId *string `json:"EndPointId,omitempty" name:"EndPointId"` + + // VPCID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网ID。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // APPID。 + EndPointOwner *string `json:"EndPointOwner,omitempty" name:"EndPointOwner"` + + // 终端节点名称。 + EndPointName *string `json:"EndPointName,omitempty" name:"EndPointName"` + + // 终端节点服务的VPCID。 + ServiceVpcId *string `json:"ServiceVpcId,omitempty" name:"ServiceVpcId"` + + // 终端节点服务的VIP。 + ServiceVip *string `json:"ServiceVip,omitempty" name:"ServiceVip"` + + // 终端节点服务的ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` + + // 终端节点的VIP。 + EndPointVip *string `json:"EndPointVip,omitempty" name:"EndPointVip"` + + // 终端节点状态,ACTIVE:可用,PENDING:待接受,ACCEPTING:接受中,REJECTED:已拒绝,FAILED:失败。 + State *string `json:"State,omitempty" name:"State"` + + // 创建时间。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 终端节点绑定的安全组实例ID列表。 + GroupSet []*string `json:"GroupSet,omitempty" name:"GroupSet"` + + // 终端节点服务名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceName *string `json:"ServiceName,omitempty" name:"ServiceName"` +} + +type EndPointService struct { + + // 终端节点服务ID + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` + + // VPCID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // APPID。 + ServiceOwner *string `json:"ServiceOwner,omitempty" name:"ServiceOwner"` + + // 终端节点服务名称。 + ServiceName *string `json:"ServiceName,omitempty" name:"ServiceName"` + + // 后端服务的VIP。 + ServiceVip *string `json:"ServiceVip,omitempty" name:"ServiceVip"` + + // 后端服务的ID,比如lb-xxx。 + ServiceInstanceId *string `json:"ServiceInstanceId,omitempty" name:"ServiceInstanceId"` + + // 是否自动接受。 + AutoAcceptFlag *bool `json:"AutoAcceptFlag,omitempty" name:"AutoAcceptFlag"` + + // 关联的终端节点个数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + EndPointCount *uint64 `json:"EndPointCount,omitempty" name:"EndPointCount"` + + // 终端节点对象数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + EndPointSet []*EndPoint `json:"EndPointSet,omitempty" name:"EndPointSet"` + + // 创建时间。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` +} + +type Filter struct { + + // 属性名称, 若存在多个Filter时,Filter间的关系为逻辑与(AND)关系。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 属性值, 若同一个Filter存在多个Values,同一Filter下Values间的关系为逻辑或(OR)关系。 + Values []*string `json:"Values,omitempty" name:"Values"` +} + +type FilterObject struct { + + // 属性名称, 若存在多个Filter时,Filter间的关系为逻辑与(AND)关系。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 属性值, 若同一个Filter存在多个Values,同一Filter下Values间的关系为逻辑或(OR)关系。 + Values []*string `json:"Values,omitempty" name:"Values"` +} + +type FlowLog struct { + + // 私用网络ID或者统一ID,建议使用统一ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 流日志唯一ID + FlowLogId *string `json:"FlowLogId,omitempty" name:"FlowLogId"` + + // 流日志实例名字 + FlowLogName *string `json:"FlowLogName,omitempty" name:"FlowLogName"` + + // 流日志所属资源类型,VPC|SUBNET|NETWORKINTERFACE|CCN + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 资源唯一ID + ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + + // 流日志采集类型,ACCEPT|REJECT|ALL + TrafficType *string `json:"TrafficType,omitempty" name:"TrafficType"` + + // 流日志存储ID + CloudLogId *string `json:"CloudLogId,omitempty" name:"CloudLogId"` + + // 流日志存储ID状态 + CloudLogState *string `json:"CloudLogState,omitempty" name:"CloudLogState"` + + // 流日志描述信息 + FlowLogDescription *string `json:"FlowLogDescription,omitempty" name:"FlowLogDescription"` + + // 流日志创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 标签列表,例如:[{"Key": "city", "Value": "shanghai"}] + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` +} + +type GatewayFlowMonitorDetail struct { + + // 来源`IP`。 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` + + // 入包量。 + InPkg *uint64 `json:"InPkg,omitempty" name:"InPkg"` + + // 出包量。 + OutPkg *uint64 `json:"OutPkg,omitempty" name:"OutPkg"` + + // 入流量,单位:`Byte`。 + InTraffic *uint64 `json:"InTraffic,omitempty" name:"InTraffic"` + + // 出流量,单位:`Byte`。 + OutTraffic *uint64 `json:"OutTraffic,omitempty" name:"OutTraffic"` +} + +type GatewayQos struct { + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 云服务器内网IP。 + IpAddress *string `json:"IpAddress,omitempty" name:"IpAddress"` + + // 流控带宽值。 + Bandwidth *int64 `json:"Bandwidth,omitempty" name:"Bandwidth"` + + // 创建时间。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` +} + +type GetCcnRegionBandwidthLimitsRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 过滤条件。 + // <li>sregion - String - (过滤条件)源地域,形如:ap-guangzhou。</li> + // <li>dregion - String - (过滤条件)目的地域,形如:ap-shanghai-bm</li> + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 排序条件,目前支持带宽(BandwidthLimit)和过期时间(ExpireTime) + SortedBy *string `json:"SortedBy,omitempty" name:"SortedBy"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 排序方式,'ASC':升序,'DESC':降序。 + OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"` +} + +func (r *GetCcnRegionBandwidthLimitsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *GetCcnRegionBandwidthLimitsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "Filters") + delete(f, "SortedBy") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "OrderBy") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetCcnRegionBandwidthLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type GetCcnRegionBandwidthLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 云联网(CCN)各地域出带宽带宽详情。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CcnBandwidthSet []*CcnBandwidthInfo `json:"CcnBandwidthSet,omitempty" name:"CcnBandwidthSet"` + + // 符合条件的对象数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *GetCcnRegionBandwidthLimitsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *GetCcnRegionBandwidthLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type HaVip struct { + + // `HAVIP`的`ID`,是`HAVIP`的唯一标识。 + HaVipId *string `json:"HaVipId,omitempty" name:"HaVipId"` + + // `HAVIP`名称。 + HaVipName *string `json:"HaVipName,omitempty" name:"HaVipName"` + + // 虚拟IP地址。 + Vip *string `json:"Vip,omitempty" name:"Vip"` + + // `HAVIP`所在私有网络`ID`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // `HAVIP`所在子网`ID`。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // `HAVIP`关联弹性网卡`ID`。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 被绑定的实例`ID`。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 绑定`EIP`。 + AddressIp *string `json:"AddressIp,omitempty" name:"AddressIp"` + + // 状态: + // <li>`AVAILABLE`:运行中</li> + // <li>`UNBIND`:未绑定</li> + State *string `json:"State,omitempty" name:"State"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 使用havip的业务标识。 + Business *string `json:"Business,omitempty" name:"Business"` +} + +type HaVipAssociateAddressIpRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。必须是没有绑定`EIP`的`HAVIP` + HaVipId *string `json:"HaVipId,omitempty" name:"HaVipId"` + + // 弹性公网`IP`。必须是没有绑定`HAVIP`的`EIP` + AddressIp *string `json:"AddressIp,omitempty" name:"AddressIp"` +} + +func (r *HaVipAssociateAddressIpRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *HaVipAssociateAddressIpRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "HaVipId") + delete(f, "AddressIp") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "HaVipAssociateAddressIpRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type HaVipAssociateAddressIpResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *HaVipAssociateAddressIpResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *HaVipAssociateAddressIpResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type HaVipDisassociateAddressIpRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。必须是已绑定`EIP`的`HAVIP`。 + HaVipId *string `json:"HaVipId,omitempty" name:"HaVipId"` +} + +func (r *HaVipDisassociateAddressIpRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *HaVipDisassociateAddressIpRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "HaVipId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "HaVipDisassociateAddressIpRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type HaVipDisassociateAddressIpResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *HaVipDisassociateAddressIpResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *HaVipDisassociateAddressIpResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type IKEOptionsSpecification struct { + + // 加密算法,可选值:'3DES-CBC', 'AES-CBC-128', 'AES-CBS-192', 'AES-CBC-256', 'DES-CBC','SM4', 默认为3DES-CBC + PropoEncryAlgorithm *string `json:"PropoEncryAlgorithm,omitempty" name:"PropoEncryAlgorithm"` + + // 认证算法:可选值:'MD5', 'SHA1','SHA-256' 默认为MD5 + PropoAuthenAlgorithm *string `json:"PropoAuthenAlgorithm,omitempty" name:"PropoAuthenAlgorithm"` + + // 协商模式:可选值:'AGGRESSIVE', 'MAIN',默认为MAIN + ExchangeMode *string `json:"ExchangeMode,omitempty" name:"ExchangeMode"` + + // 本端标识类型:可选值:'ADDRESS', 'FQDN',默认为ADDRESS + LocalIdentity *string `json:"LocalIdentity,omitempty" name:"LocalIdentity"` + + // 对端标识类型:可选值:'ADDRESS', 'FQDN',默认为ADDRESS + RemoteIdentity *string `json:"RemoteIdentity,omitempty" name:"RemoteIdentity"` + + // 本端标识,当LocalIdentity选为ADDRESS时,LocalAddress必填。localAddress默认为vpn网关公网IP + LocalAddress *string `json:"LocalAddress,omitempty" name:"LocalAddress"` + + // 对端标识,当RemoteIdentity选为ADDRESS时,RemoteAddress必填 + RemoteAddress *string `json:"RemoteAddress,omitempty" name:"RemoteAddress"` + + // 本端标识,当LocalIdentity选为FQDN时,LocalFqdnName必填 + LocalFqdnName *string `json:"LocalFqdnName,omitempty" name:"LocalFqdnName"` + + // 对端标识,当remoteIdentity选为FQDN时,RemoteFqdnName必填 + RemoteFqdnName *string `json:"RemoteFqdnName,omitempty" name:"RemoteFqdnName"` + + // DH group,指定IKE交换密钥时使用的DH组,可选值:'GROUP1', 'GROUP2', 'GROUP5', 'GROUP14', 'GROUP24', + DhGroupName *string `json:"DhGroupName,omitempty" name:"DhGroupName"` + + // IKE SA Lifetime,单位:秒,设置IKE SA的生存周期,取值范围:60-604800 + IKESaLifetimeSeconds *uint64 `json:"IKESaLifetimeSeconds,omitempty" name:"IKESaLifetimeSeconds"` + + // IKE版本 + IKEVersion *string `json:"IKEVersion,omitempty" name:"IKEVersion"` +} + +type IPSECOptionsSpecification struct { + + // 加密算法,可选值:'3DES-CBC', 'AES-CBC-128', 'AES-CBC-192', 'AES-CBC-256', 'DES-CBC', 'SM4', 'NULL', 默认为AES-CBC-128 + EncryptAlgorithm *string `json:"EncryptAlgorithm,omitempty" name:"EncryptAlgorithm"` + + // 认证算法:可选值:'MD5', 'SHA1','SHA-256' 默认为 + IntegrityAlgorith *string `json:"IntegrityAlgorith,omitempty" name:"IntegrityAlgorith"` + + // IPsec SA lifetime(s):单位秒,取值范围:180-604800 + IPSECSaLifetimeSeconds *uint64 `json:"IPSECSaLifetimeSeconds,omitempty" name:"IPSECSaLifetimeSeconds"` + + // PFS:可选值:'NULL', 'DH-GROUP1', 'DH-GROUP2', 'DH-GROUP5', 'DH-GROUP14', 'DH-GROUP24',默认为NULL + PfsDhGroup *string `json:"PfsDhGroup,omitempty" name:"PfsDhGroup"` + + // IPsec SA lifetime(KB):单位KB,取值范围:2560-604800 + IPSECSaLifetimeTraffic *uint64 `json:"IPSECSaLifetimeTraffic,omitempty" name:"IPSECSaLifetimeTraffic"` +} + +type InquirePriceCreateDirectConnectGatewayRequest struct { + *tchttp.BaseRequest +} + +func (r *InquirePriceCreateDirectConnectGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquirePriceCreateDirectConnectGatewayRequest) 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", "InquirePriceCreateDirectConnectGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquirePriceCreateDirectConnectGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 专线网关标准接入费用 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCost *int64 `json:"TotalCost,omitempty" name:"TotalCost"` + + // 专线网关真实接入费用 + // 注意:此字段可能返回 null,表示取不到有效值。 + RealTotalCost *int64 `json:"RealTotalCost,omitempty" name:"RealTotalCost"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *InquirePriceCreateDirectConnectGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquirePriceCreateDirectConnectGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceCreateVpnGatewayRequest struct { + *tchttp.BaseRequest + + // 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // VPN网关计费模式,PREPAID:表示预付费,即包年包月,POSTPAID_BY_HOUR:表示后付费,即按量计费。默认:POSTPAID_BY_HOUR,如果指定预付费模式,参数InstanceChargePrepaid必填。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *InquiryPriceCreateVpnGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceCreateVpnGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InternetMaxBandwidthOut") + delete(f, "InstanceChargeType") + delete(f, "InstanceChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceCreateVpnGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceCreateVpnGatewayResponse 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 *InquiryPriceCreateVpnGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceCreateVpnGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRenewVpnGatewayRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *InquiryPriceRenewVpnGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceRenewVpnGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "InstanceChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceRenewVpnGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceRenewVpnGatewayResponse 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 *InquiryPriceRenewVpnGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceRenewVpnGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` +} + +func (r *InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "InternetMaxBandwidthOut") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceResetVpnGatewayInternetMaxBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse 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 *InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *InquiryPriceResetVpnGatewayInternetMaxBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type InstanceChargePrepaid struct { + + // 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36。 + Period *uint64 `json:"Period,omitempty" name:"Period"` + + // 自动续费标识。取值范围: NOTIFY_AND_AUTO_RENEW:通知过期且自动续费, NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费。默认:NOTIFY_AND_MANUAL_RENEW + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` +} + +type InstanceStatistic struct { + + // 实例的类型 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 实例的个数 + InstanceCount *uint64 `json:"InstanceCount,omitempty" name:"InstanceCount"` +} + +type Ip6Rule struct { + + // IPV6转换规则唯一ID,形如rule6-xxxxxxxx + Ip6RuleId *string `json:"Ip6RuleId,omitempty" name:"Ip6RuleId"` + + // IPV6转换规则名称 + Ip6RuleName *string `json:"Ip6RuleName,omitempty" name:"Ip6RuleName"` + + // IPV6地址 + Vip6 *string `json:"Vip6,omitempty" name:"Vip6"` + + // IPV6端口号 + Vport6 *int64 `json:"Vport6,omitempty" name:"Vport6"` + + // 协议类型,支持TCP/UDP + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` + + // IPV4地址 + Vip *string `json:"Vip,omitempty" name:"Vip"` + + // IPV4端口号 + Vport *int64 `json:"Vport,omitempty" name:"Vport"` + + // 转换规则状态,限于CREATING,RUNNING,DELETING,MODIFYING + RuleStatus *string `json:"RuleStatus,omitempty" name:"RuleStatus"` + + // 转换规则创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type Ip6RuleInfo struct { + + // IPV6端口号,可在0~65535范围取值 + Vport6 *int64 `json:"Vport6,omitempty" name:"Vport6"` + + // 协议类型,支持TCP/UDP + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` + + // IPV4地址 + Vip *string `json:"Vip,omitempty" name:"Vip"` + + // IPV4端口号,可在0~65535范围取值 + Vport *int64 `json:"Vport,omitempty" name:"Vport"` +} + +type Ip6Translator struct { + + // IPV6转换实例唯一ID,形如ip6-xxxxxxxx + Ip6TranslatorId *string `json:"Ip6TranslatorId,omitempty" name:"Ip6TranslatorId"` + + // IPV6转换实例名称 + Ip6TranslatorName *string `json:"Ip6TranslatorName,omitempty" name:"Ip6TranslatorName"` + + // IPV6地址 + Vip6 *string `json:"Vip6,omitempty" name:"Vip6"` + + // IPV6转换地址所属运营商 + IspName *string `json:"IspName,omitempty" name:"IspName"` + + // 转换实例状态,限于CREATING,RUNNING,DELETING,MODIFYING + TranslatorStatus *string `json:"TranslatorStatus,omitempty" name:"TranslatorStatus"` + + // IPV6转换实例创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 绑定的IPV6转换规则数量 + Ip6RuleCount *int64 `json:"Ip6RuleCount,omitempty" name:"Ip6RuleCount"` + + // IPV6转换规则信息 + IP6RuleSet []*Ip6Rule `json:"IP6RuleSet,omitempty" name:"IP6RuleSet"` +} + +type IpField struct { + + // 国家字段信息 + Country *bool `json:"Country,omitempty" name:"Country"` + + // 省、州、郡一级行政区域字段信息 + Province *bool `json:"Province,omitempty" name:"Province"` + + // 市一级行政区域字段信息 + City *bool `json:"City,omitempty" name:"City"` + + // 市内区域字段信息 + Region *bool `json:"Region,omitempty" name:"Region"` + + // 接入运营商字段信息 + Isp *bool `json:"Isp,omitempty" name:"Isp"` + + // 骨干运营商字段信息 + AsName *bool `json:"AsName,omitempty" name:"AsName"` + + // 骨干As号 + AsId *bool `json:"AsId,omitempty" name:"AsId"` + + // 注释字段 + Comment *bool `json:"Comment,omitempty" name:"Comment"` +} + +type IpGeolocationInfo struct { + + // 国家信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Country *string `json:"Country,omitempty" name:"Country"` + + // 省、州、郡一级行政区域信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Province *string `json:"Province,omitempty" name:"Province"` + + // 市一级行政区域信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + City *string `json:"City,omitempty" name:"City"` + + // 市内区域信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Region *string `json:"Region,omitempty" name:"Region"` + + // 接入运营商信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Isp *string `json:"Isp,omitempty" name:"Isp"` + + // 骨干运营商名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + AsName *string `json:"AsName,omitempty" name:"AsName"` + + // 骨干运营商AS号 + // 注意:此字段可能返回 null,表示取不到有效值。 + AsId *string `json:"AsId,omitempty" name:"AsId"` + + // 注释信息。目前的填充值为移动接入用户的APN值,如无APN属性则为空 + // 注意:此字段可能返回 null,表示取不到有效值。 + Comment *string `json:"Comment,omitempty" name:"Comment"` + + // IP地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + AddressIp *string `json:"AddressIp,omitempty" name:"AddressIp"` +} + +type Ipv6Address struct { + + // `IPv6`地址,形如:`3402:4e00:20:100:0:8cd9:2a67:71f3` + Address *string `json:"Address,omitempty" name:"Address"` + + // 是否是主`IP`。 + Primary *bool `json:"Primary,omitempty" name:"Primary"` + + // `EIP`实例`ID`,形如:`eip-hxlqja90`。 + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // 描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` + + // 公网IP是否被封堵。 + IsWanIpBlocked *bool `json:"IsWanIpBlocked,omitempty" name:"IsWanIpBlocked"` + + // `IPv6`地址状态: + // <li>`PENDING`:生产中</li> + // <li>`MIGRATING`:迁移中</li> + // <li>`DELETING`:删除中</li> + // <li>`AVAILABLE`:可用的</li> + State *string `json:"State,omitempty" name:"State"` +} + +type Ipv6SubnetCidrBlock struct { + + // 子网实例`ID`。形如:`subnet-pxir56ns`。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // `IPv6`子网段。形如:`3402:4e00:20:1001::/64` + Ipv6CidrBlock *string `json:"Ipv6CidrBlock,omitempty" name:"Ipv6CidrBlock"` +} + +type ItemPrice struct { + + // 按量计费后付费单价,单位:元。 + UnitPrice *float64 `json:"UnitPrice,omitempty" name:"UnitPrice"` + + // 按量计费后付费计价单元,可取值范围: HOUR:表示计价单元是按每小时来计算。当前涉及该计价单元的场景有:实例按小时后付费(POSTPAID_BY_HOUR)、带宽按小时后付费(BANDWIDTH_POSTPAID_BY_HOUR): GB:表示计价单元是按每GB来计算。当前涉及该计价单元的场景有:流量按小时后付费(TRAFFIC_POSTPAID_BY_HOUR)。 + ChargeUnit *string `json:"ChargeUnit,omitempty" name:"ChargeUnit"` + + // 预付费商品的原价,单位:元。 + OriginalPrice *float64 `json:"OriginalPrice,omitempty" name:"OriginalPrice"` + + // 预付费商品的折扣价,单位:元。 + DiscountPrice *float64 `json:"DiscountPrice,omitempty" name:"DiscountPrice"` +} + +type LocalGateway struct { + + // CDC实例ID + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` + + // VPC实例ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 本地网关实例ID + UniqLocalGwId *string `json:"UniqLocalGwId,omitempty" name:"UniqLocalGwId"` + + // 本地网关名称 + LocalGatewayName *string `json:"LocalGatewayName,omitempty" name:"LocalGatewayName"` + + // 本地网关IP地址 + LocalGwIp *string `json:"LocalGwIp,omitempty" name:"LocalGwIp"` + + // 本地网关创建时间 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` +} + +type MemberInfo struct { + + // 模板对象成员 + Member *string `json:"Member,omitempty" name:"Member"` + + // 模板对象成员描述信息 + Description *string `json:"Description,omitempty" name:"Description"` +} + +type MigrateNetworkInterfaceRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID,例如:eni-m6dyj72l。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 弹性网卡当前绑定的CVM实例ID。形如:ins-r8hr2upy。 + SourceInstanceId *string `json:"SourceInstanceId,omitempty" name:"SourceInstanceId"` + + // 待迁移的目的CVM实例ID。 + DestinationInstanceId *string `json:"DestinationInstanceId,omitempty" name:"DestinationInstanceId"` + + // 网卡绑定类型:0 标准型 1 扩展型。 + AttachType *uint64 `json:"AttachType,omitempty" name:"AttachType"` +} + +func (r *MigrateNetworkInterfaceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *MigrateNetworkInterfaceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "SourceInstanceId") + delete(f, "DestinationInstanceId") + delete(f, "AttachType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "MigrateNetworkInterfaceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type MigrateNetworkInterfaceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *MigrateNetworkInterfaceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *MigrateNetworkInterfaceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type MigratePrivateIpAddressRequest struct { + *tchttp.BaseRequest + + // 当内网IP绑定的弹性网卡实例ID,例如:eni-m6dyj72l。 + SourceNetworkInterfaceId *string `json:"SourceNetworkInterfaceId,omitempty" name:"SourceNetworkInterfaceId"` + + // 待迁移的目的弹性网卡实例ID。 + DestinationNetworkInterfaceId *string `json:"DestinationNetworkInterfaceId,omitempty" name:"DestinationNetworkInterfaceId"` + + // 迁移的内网IP地址,例如:10.0.0.6。 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` +} + +func (r *MigratePrivateIpAddressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *MigratePrivateIpAddressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SourceNetworkInterfaceId") + delete(f, "DestinationNetworkInterfaceId") + delete(f, "PrivateIpAddress") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "MigratePrivateIpAddressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type MigratePrivateIpAddressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *MigratePrivateIpAddressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *MigratePrivateIpAddressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressAttributeRequest struct { + *tchttp.BaseRequest + + // 标识 EIP 的唯一 ID。EIP 唯一 ID 形如:`eip-11112222`。 + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // 修改后的 EIP 名称。长度上限为20个字符。 + AddressName *string `json:"AddressName,omitempty" name:"AddressName"` + + // 设定EIP是否直通,"TRUE"表示直通,"FALSE"表示非直通。注意该参数仅对EIP直通功能可见的用户可以设定。 + EipDirectConnection *string `json:"EipDirectConnection,omitempty" name:"EipDirectConnection"` +} + +func (r *ModifyAddressAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressId") + delete(f, "AddressName") + delete(f, "EipDirectConnection") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAddressAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyAddressAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressInternetChargeTypeRequest struct { + *tchttp.BaseRequest + + // 弹性公网IP的唯一ID,形如eip-xxx + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // 弹性公网IP调整目标计费模式,只支持"BANDWIDTH_PREPAID_BY_MONTH"和"TRAFFIC_POSTPAID_BY_HOUR" + InternetChargeType *string `json:"InternetChargeType,omitempty" name:"InternetChargeType"` + + // 弹性公网IP调整目标带宽值 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 包月带宽网络计费模式参数。弹性公网IP的调整目标计费模式是"BANDWIDTH_PREPAID_BY_MONTH"时,必传该参数。 + AddressChargePrepaid *AddressChargePrepaid `json:"AddressChargePrepaid,omitempty" name:"AddressChargePrepaid"` +} + +func (r *ModifyAddressInternetChargeTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressInternetChargeTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressId") + delete(f, "InternetChargeType") + delete(f, "InternetMaxBandwidthOut") + delete(f, "AddressChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAddressInternetChargeTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressInternetChargeTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyAddressInternetChargeTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressInternetChargeTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressTemplateAttributeRequest struct { + *tchttp.BaseRequest + + // IP地址模板实例ID,例如:ipm-mdunqeb6。 + AddressTemplateId *string `json:"AddressTemplateId,omitempty" name:"AddressTemplateId"` + + // IP地址模板名称。 + AddressTemplateName *string `json:"AddressTemplateName,omitempty" name:"AddressTemplateName"` + + // 地址信息,支持 IP、CIDR、IP 范围。 + Addresses []*string `json:"Addresses,omitempty" name:"Addresses"` + + // 支持添加备注的地址信息,支持 IP、CIDR、IP 范围。 + AddressesExtra []*AddressInfo `json:"AddressesExtra,omitempty" name:"AddressesExtra"` +} + +func (r *ModifyAddressTemplateAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressTemplateAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressTemplateId") + delete(f, "AddressTemplateName") + delete(f, "Addresses") + delete(f, "AddressesExtra") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAddressTemplateAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressTemplateAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyAddressTemplateAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressTemplateAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressTemplateGroupAttributeRequest struct { + *tchttp.BaseRequest + + // IP地址模板集合实例ID,例如:ipmg-2uw6ujo6。 + AddressTemplateGroupId *string `json:"AddressTemplateGroupId,omitempty" name:"AddressTemplateGroupId"` + + // IP地址模板集合名称。 + AddressTemplateGroupName *string `json:"AddressTemplateGroupName,omitempty" name:"AddressTemplateGroupName"` + + // IP地址模板实例ID, 例如:ipm-mdunqeb6。 + AddressTemplateIds []*string `json:"AddressTemplateIds,omitempty" name:"AddressTemplateIds"` +} + +func (r *ModifyAddressTemplateGroupAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressTemplateGroupAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressTemplateGroupId") + delete(f, "AddressTemplateGroupName") + delete(f, "AddressTemplateIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAddressTemplateGroupAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressTemplateGroupAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyAddressTemplateGroupAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressTemplateGroupAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressesBandwidthRequest struct { + *tchttp.BaseRequest + + // EIP唯一标识ID列表,形如'eip-xxxx' + AddressIds []*string `json:"AddressIds,omitempty" name:"AddressIds"` + + // 调整带宽目标值 + InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 包月带宽起始时间(已废弃,输入无效) + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 包月带宽结束时间(已废弃,输入无效) + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` +} + +func (r *ModifyAddressesBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressesBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressIds") + delete(f, "InternetMaxBandwidthOut") + delete(f, "StartTime") + delete(f, "EndTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAddressesBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAddressesBandwidthResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 异步任务TaskId。可以使用[DescribeTaskResult](https://cloud.tencent.com/document/api/215/36271)接口查询任务状态。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyAddressesBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAddressesBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAssistantCidrRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`。形如:`vpc-6v2ht8q5` + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 待添加的辅助CIDR。CIDR数组,格式如["10.0.0.0/16", "172.16.0.0/16"],入参NewCidrBlocks和OldCidrBlocks至少需要其一。 + NewCidrBlocks []*string `json:"NewCidrBlocks,omitempty" name:"NewCidrBlocks"` + + // 待删除的辅助CIDR。CIDR数组,格式如["10.0.0.0/16", "172.16.0.0/16"],入参NewCidrBlocks和OldCidrBlocks至少需要其一。 + OldCidrBlocks []*string `json:"OldCidrBlocks,omitempty" name:"OldCidrBlocks"` +} + +func (r *ModifyAssistantCidrRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAssistantCidrRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "NewCidrBlocks") + delete(f, "OldCidrBlocks") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAssistantCidrRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyAssistantCidrResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 辅助CIDR数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AssistantCidrSet []*AssistantCidr `json:"AssistantCidrSet,omitempty" name:"AssistantCidrSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyAssistantCidrResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyAssistantCidrResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyBandwidthPackageAttributeRequest struct { + *tchttp.BaseRequest + + // 带宽包唯一标识ID + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` + + // 带宽包名称 + BandwidthPackageName *string `json:"BandwidthPackageName,omitempty" name:"BandwidthPackageName"` + + // 带宽包计费模式 + ChargeType *string `json:"ChargeType,omitempty" name:"ChargeType"` + + // 退款时迁移为后付费带宽包。默认值:否 + MigrateOnRefund *bool `json:"MigrateOnRefund,omitempty" name:"MigrateOnRefund"` +} + +func (r *ModifyBandwidthPackageAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyBandwidthPackageAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BandwidthPackageId") + delete(f, "BandwidthPackageName") + delete(f, "ChargeType") + delete(f, "MigrateOnRefund") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyBandwidthPackageAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyBandwidthPackageAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyBandwidthPackageAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyBandwidthPackageAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCcnAttachedInstancesAttributeRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 关联网络实例列表 + Instances []*CcnInstance `json:"Instances,omitempty" name:"Instances"` +} + +func (r *ModifyCcnAttachedInstancesAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCcnAttachedInstancesAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "Instances") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyCcnAttachedInstancesAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCcnAttachedInstancesAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyCcnAttachedInstancesAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCcnAttachedInstancesAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCcnAttributeRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // CCN名称,最大长度不能超过60个字节,限制:CcnName和CcnDescription必须至少选择一个参数输入,否则报错。 + CcnName *string `json:"CcnName,omitempty" name:"CcnName"` + + // CCN描述信息,最大长度不能超过100个字节,限制:CcnName和CcnDescription必须至少选择一个参数输入,否则报错。 + CcnDescription *string `json:"CcnDescription,omitempty" name:"CcnDescription"` +} + +func (r *ModifyCcnAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCcnAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "CcnName") + delete(f, "CcnDescription") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyCcnAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCcnAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyCcnAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCcnAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCcnRegionBandwidthLimitsTypeRequest struct { + *tchttp.BaseRequest + + // 云联网实例ID。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 云联网限速类型,INTER_REGION_LIMIT:地域间限速,OUTER_REGION_LIMIT:地域出口限速。 + BandwidthLimitType *string `json:"BandwidthLimitType,omitempty" name:"BandwidthLimitType"` +} + +func (r *ModifyCcnRegionBandwidthLimitsTypeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCcnRegionBandwidthLimitsTypeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "BandwidthLimitType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyCcnRegionBandwidthLimitsTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCcnRegionBandwidthLimitsTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyCcnRegionBandwidthLimitsTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCcnRegionBandwidthLimitsTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCustomerGatewayAttributeRequest struct { + *tchttp.BaseRequest + + // 对端网关ID,例如:cgw-2wqq41m9,可通过DescribeCustomerGateways接口查询对端网关。 + CustomerGatewayId *string `json:"CustomerGatewayId,omitempty" name:"CustomerGatewayId"` + + // 对端网关名称,可任意命名,但不得超过60个字符。 + CustomerGatewayName *string `json:"CustomerGatewayName,omitempty" name:"CustomerGatewayName"` +} + +func (r *ModifyCustomerGatewayAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCustomerGatewayAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CustomerGatewayId") + delete(f, "CustomerGatewayName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyCustomerGatewayAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyCustomerGatewayAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyCustomerGatewayAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyCustomerGatewayAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDhcpIpAttributeRequest struct { + *tchttp.BaseRequest + + // `DhcpIp`唯一`ID`,形如:`dhcpip-9o233uri`。 + DhcpIpId *string `json:"DhcpIpId,omitempty" name:"DhcpIpId"` + + // `DhcpIp`名称,可任意命名,但不得超过60个字符。 + DhcpIpName *string `json:"DhcpIpName,omitempty" name:"DhcpIpName"` +} + +func (r *ModifyDhcpIpAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyDhcpIpAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DhcpIpId") + delete(f, "DhcpIpName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDhcpIpAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDhcpIpAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyDhcpIpAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyDhcpIpAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDirectConnectGatewayAttributeRequest struct { + *tchttp.BaseRequest + + // 专线网关唯一`ID`,形如:`dcg-9o233uri`。 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` + + // 专线网关名称,可任意命名,但不得超过60个字符。 + DirectConnectGatewayName *string `json:"DirectConnectGatewayName,omitempty" name:"DirectConnectGatewayName"` + + // 云联网路由学习类型,可选值:`BGP`(自动学习)、`STATIC`(静态,即用户配置)。只有云联网类型专线网关且开启了BGP功能才支持修改`CcnRouteType`。 + CcnRouteType *string `json:"CcnRouteType,omitempty" name:"CcnRouteType"` + + // 云联网路由发布模式,可选值:`standard`(标准模式)、`exquisite`(精细模式)。只有云联网类型专线网关才支持修改`ModeType`。 + ModeType *string `json:"ModeType,omitempty" name:"ModeType"` +} + +func (r *ModifyDirectConnectGatewayAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyDirectConnectGatewayAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DirectConnectGatewayId") + delete(f, "DirectConnectGatewayName") + delete(f, "CcnRouteType") + delete(f, "ModeType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDirectConnectGatewayAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyDirectConnectGatewayAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyDirectConnectGatewayAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyDirectConnectGatewayAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyFlowLogAttributeRequest struct { + *tchttp.BaseRequest + + // 流日志唯一ID + FlowLogId *string `json:"FlowLogId,omitempty" name:"FlowLogId"` + + // 私用网络ID或者统一ID,建议使用统一ID,修改云联网流日志属性时可不填,其他流日志类型必填。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 流日志实例名字 + FlowLogName *string `json:"FlowLogName,omitempty" name:"FlowLogName"` + + // 流日志实例描述 + FlowLogDescription *string `json:"FlowLogDescription,omitempty" name:"FlowLogDescription"` +} + +func (r *ModifyFlowLogAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyFlowLogAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "FlowLogId") + delete(f, "VpcId") + delete(f, "FlowLogName") + delete(f, "FlowLogDescription") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyFlowLogAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyFlowLogAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyFlowLogAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyFlowLogAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyGatewayFlowQosRequest struct { + *tchttp.BaseRequest + + // 网关实例ID,目前我们支持的网关实例类型有, + // 专线网关实例ID,形如,`dcg-ltjahce6`; + // Nat网关实例ID,形如,`nat-ltjahce6`; + // VPN网关实例ID,形如,`vpn-ltjahce6`。 + GatewayId *string `json:"GatewayId,omitempty" name:"GatewayId"` + + // 流控带宽值。取值大于0,表示限流到指定的Mbps;取值等于0,表示完全限流;取值为-1,不限流。 + Bandwidth *int64 `json:"Bandwidth,omitempty" name:"Bandwidth"` + + // 限流的云服务器内网IP。 + IpAddresses []*string `json:"IpAddresses,omitempty" name:"IpAddresses"` +} + +func (r *ModifyGatewayFlowQosRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyGatewayFlowQosRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "GatewayId") + delete(f, "Bandwidth") + delete(f, "IpAddresses") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyGatewayFlowQosRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyGatewayFlowQosResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyGatewayFlowQosResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyGatewayFlowQosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyHaVipAttributeRequest struct { + *tchttp.BaseRequest + + // `HAVIP`唯一`ID`,形如:`havip-9o233uri`。 + HaVipId *string `json:"HaVipId,omitempty" name:"HaVipId"` + + // `HAVIP`名称,可任意命名,但不得超过60个字符。 + HaVipName *string `json:"HaVipName,omitempty" name:"HaVipName"` +} + +func (r *ModifyHaVipAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyHaVipAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "HaVipId") + delete(f, "HaVipName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyHaVipAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyHaVipAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyHaVipAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyHaVipAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyIp6AddressesBandwidthRequest struct { + *tchttp.BaseRequest + + // 修改的目标带宽,单位Mbps + InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // IPV6地址。Ip6Addresses和Ip6AddressId必须且只能传一个 + Ip6Addresses []*string `json:"Ip6Addresses,omitempty" name:"Ip6Addresses"` + + // IPV6地址对应的唯一ID,形如eip-xxxxxxxx。Ip6Addresses和Ip6AddressId必须且只能传一个 + Ip6AddressIds []*string `json:"Ip6AddressIds,omitempty" name:"Ip6AddressIds"` +} + +func (r *ModifyIp6AddressesBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyIp6AddressesBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InternetMaxBandwidthOut") + delete(f, "Ip6Addresses") + delete(f, "Ip6AddressIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyIp6AddressesBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyIp6AddressesBandwidthResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 任务ID + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyIp6AddressesBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyIp6AddressesBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyIp6RuleRequest struct { + *tchttp.BaseRequest + + // IPV6转换实例唯一ID,形如ip6-xxxxxxxx + Ip6TranslatorId *string `json:"Ip6TranslatorId,omitempty" name:"Ip6TranslatorId"` + + // IPV6转换规则唯一ID,形如rule6-xxxxxxxx + Ip6RuleId *string `json:"Ip6RuleId,omitempty" name:"Ip6RuleId"` + + // IPV6转换规则修改后的名称 + Ip6RuleName *string `json:"Ip6RuleName,omitempty" name:"Ip6RuleName"` + + // IPV6转换规则修改后的IPV4地址 + Vip *string `json:"Vip,omitempty" name:"Vip"` + + // IPV6转换规则修改后的IPV4端口号 + Vport *int64 `json:"Vport,omitempty" name:"Vport"` +} + +func (r *ModifyIp6RuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyIp6RuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6TranslatorId") + delete(f, "Ip6RuleId") + delete(f, "Ip6RuleName") + delete(f, "Vip") + delete(f, "Vport") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyIp6RuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyIp6RuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyIp6RuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyIp6RuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyIp6TranslatorRequest struct { + *tchttp.BaseRequest + + // IPV6转换实例唯一ID,形如ip6-xxxxxxxxx + Ip6TranslatorId *string `json:"Ip6TranslatorId,omitempty" name:"Ip6TranslatorId"` + + // IPV6转换实例修改名称 + Ip6TranslatorName *string `json:"Ip6TranslatorName,omitempty" name:"Ip6TranslatorName"` +} + +func (r *ModifyIp6TranslatorRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyIp6TranslatorRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6TranslatorId") + delete(f, "Ip6TranslatorName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyIp6TranslatorRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyIp6TranslatorResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyIp6TranslatorResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyIp6TranslatorResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyIpv6AddressesAttributeRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例`ID`,形如:`eni-m6dyj72l`。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 指定的内网IPv6`地址信息。 + Ipv6Addresses []*Ipv6Address `json:"Ipv6Addresses,omitempty" name:"Ipv6Addresses"` +} + +func (r *ModifyIpv6AddressesAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyIpv6AddressesAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "Ipv6Addresses") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyIpv6AddressesAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyIpv6AddressesAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyIpv6AddressesAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyIpv6AddressesAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLocalGatewayRequest struct { + *tchttp.BaseRequest + + // 本地网关名称 + LocalGatewayName *string `json:"LocalGatewayName,omitempty" name:"LocalGatewayName"` + + // CDC实例ID + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` + + // 本地网关实例ID + LocalGatewayId *string `json:"LocalGatewayId,omitempty" name:"LocalGatewayId"` + + // VPC实例ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *ModifyLocalGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLocalGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "LocalGatewayName") + delete(f, "CdcId") + delete(f, "LocalGatewayId") + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyLocalGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyLocalGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyLocalGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyLocalGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNatGatewayAttributeRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df45454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // NAT网关的名称,形如:`test_nat`。 + NatGatewayName *string `json:"NatGatewayName,omitempty" name:"NatGatewayName"` + + // NAT网关最大外网出带宽(单位:Mbps)。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 是否修改NAT网关绑定的安全组。 + ModifySecurityGroup *bool `json:"ModifySecurityGroup,omitempty" name:"ModifySecurityGroup"` + + // NAT网关绑定的安全组列表,最终状态,空列表表示删除所有安全组,形如: `['sg-1n232323', 'sg-o4242424']` + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +func (r *ModifyNatGatewayAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNatGatewayAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "NatGatewayName") + delete(f, "InternetMaxBandwidthOut") + delete(f, "ModifySecurityGroup") + delete(f, "SecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNatGatewayAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNatGatewayAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNatGatewayAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNatGatewayAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNatGatewayDestinationIpPortTranslationNatRuleRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df45454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // 源NAT网关的端口转换规则。 + SourceNatRule *DestinationIpPortTranslationNatRule `json:"SourceNatRule,omitempty" name:"SourceNatRule"` + + // 目的NAT网关的端口转换规则。 + DestinationNatRule *DestinationIpPortTranslationNatRule `json:"DestinationNatRule,omitempty" name:"DestinationNatRule"` +} + +func (r *ModifyNatGatewayDestinationIpPortTranslationNatRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNatGatewayDestinationIpPortTranslationNatRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "SourceNatRule") + delete(f, "DestinationNatRule") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNatGatewayDestinationIpPortTranslationNatRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNatGatewayDestinationIpPortTranslationNatRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNatGatewayDestinationIpPortTranslationNatRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNatGatewayDestinationIpPortTranslationNatRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNatGatewaySourceIpTranslationNatRuleRequest struct { + *tchttp.BaseRequest + + // NAT网关的ID,形如:`nat-df453454`。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // NAT网关的SNAT转换规则。 + SourceIpTranslationNatRule *SourceIpTranslationNatRule `json:"SourceIpTranslationNatRule,omitempty" name:"SourceIpTranslationNatRule"` +} + +func (r *ModifyNatGatewaySourceIpTranslationNatRuleRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNatGatewaySourceIpTranslationNatRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "SourceIpTranslationNatRule") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNatGatewaySourceIpTranslationNatRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNatGatewaySourceIpTranslationNatRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNatGatewaySourceIpTranslationNatRuleResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNatGatewaySourceIpTranslationNatRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetDetectRequest struct { + *tchttp.BaseRequest + + // 网络探测实例`ID`。形如:`netd-12345678` + NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"` + + // 网络探测名称,最大长度不能超过60个字节。 + NetDetectName *string `json:"NetDetectName,omitempty" name:"NetDetectName"` + + // 探测目的IPv4地址数组,最多两个。 + DetectDestinationIp []*string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp"` + + // 下一跳类型,目前我们支持的类型有: + // VPN:VPN网关; + // DIRECTCONNECT:专线网关; + // PEERCONNECTION:对等连接; + // NAT:NAT网关; + // NORMAL_CVM:普通云服务器; + NextHopType *string `json:"NextHopType,omitempty" name:"NextHopType"` + + // 下一跳目的网关,取值与“下一跳类型”相关: + // 下一跳类型为VPN,取值VPN网关ID,形如:vpngw-12345678; + // 下一跳类型为DIRECTCONNECT,取值专线网关ID,形如:dcg-12345678; + // 下一跳类型为PEERCONNECTION,取值对等连接ID,形如:pcx-12345678; + // 下一跳类型为NAT,取值Nat网关,形如:nat-12345678; + // 下一跳类型为NORMAL_CVM,取值云服务器IPv4地址,形如:10.0.0.12; + NextHopDestination *string `json:"NextHopDestination,omitempty" name:"NextHopDestination"` + + // 网络探测描述。 + NetDetectDescription *string `json:"NetDetectDescription,omitempty" name:"NetDetectDescription"` +} + +func (r *ModifyNetDetectRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetDetectRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetDetectId") + delete(f, "NetDetectName") + delete(f, "DetectDestinationIp") + delete(f, "NextHopType") + delete(f, "NextHopDestination") + delete(f, "NetDetectDescription") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNetDetectRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetDetectResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNetDetectResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetDetectResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetworkAclAttributeRequest struct { + *tchttp.BaseRequest + + // 网络ACL实例ID。例如:acl-12345678。 + NetworkAclId *string `json:"NetworkAclId,omitempty" name:"NetworkAclId"` + + // 网络ACL名称,最大长度不能超过60个字节。 + NetworkAclName *string `json:"NetworkAclName,omitempty" name:"NetworkAclName"` +} + +func (r *ModifyNetworkAclAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetworkAclAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkAclId") + delete(f, "NetworkAclName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNetworkAclAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetworkAclAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNetworkAclAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetworkAclAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetworkAclEntriesRequest struct { + *tchttp.BaseRequest + + // 网络ACL实例ID。例如:acl-12345678。 + NetworkAclId *string `json:"NetworkAclId,omitempty" name:"NetworkAclId"` + + // 网络ACL规则集。 + NetworkAclEntrySet *NetworkAclEntrySet `json:"NetworkAclEntrySet,omitempty" name:"NetworkAclEntrySet"` +} + +func (r *ModifyNetworkAclEntriesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetworkAclEntriesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkAclId") + delete(f, "NetworkAclEntrySet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNetworkAclEntriesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetworkAclEntriesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNetworkAclEntriesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetworkAclEntriesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetworkInterfaceAttributeRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID,例如:eni-pxir56ns。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 弹性网卡名称,最大长度不能超过60个字节。 + NetworkInterfaceName *string `json:"NetworkInterfaceName,omitempty" name:"NetworkInterfaceName"` + + // 弹性网卡描述,可任意命名,但不得超过60个字符。 + NetworkInterfaceDescription *string `json:"NetworkInterfaceDescription,omitempty" name:"NetworkInterfaceDescription"` + + // 指定绑定的安全组,例如:['sg-1dd51d']。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +func (r *ModifyNetworkInterfaceAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetworkInterfaceAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "NetworkInterfaceName") + delete(f, "NetworkInterfaceDescription") + delete(f, "SecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNetworkInterfaceAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetworkInterfaceAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNetworkInterfaceAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetworkInterfaceAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetworkInterfaceQosRequest struct { + *tchttp.BaseRequest + + // 弹性网卡ID,支持批量修改。 + NetworkInterfaceIds []*string `json:"NetworkInterfaceIds,omitempty" name:"NetworkInterfaceIds"` + + // 服务质量,可选值:AU、AG、PT,分别代表金、银、白金三个等级。 + QosLevel *string `json:"QosLevel,omitempty" name:"QosLevel"` +} + +func (r *ModifyNetworkInterfaceQosRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetworkInterfaceQosRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceIds") + delete(f, "QosLevel") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNetworkInterfaceQosRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNetworkInterfaceQosResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNetworkInterfaceQosResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyNetworkInterfaceQosResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrivateIpAddressesAttributeRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID,例如:eni-m6dyj72l。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 指定的内网IP信息。 + PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` +} + +func (r *ModifyPrivateIpAddressesAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrivateIpAddressesAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "PrivateIpAddresses") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrivateIpAddressesAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrivateIpAddressesAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyPrivateIpAddressesAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrivateIpAddressesAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyRouteTableAttributeRequest struct { + *tchttp.BaseRequest + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` +} + +func (r *ModifyRouteTableAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyRouteTableAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "RouteTableName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyRouteTableAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyRouteTableAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyRouteTableAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyRouteTableAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifySecurityGroupAttributeRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 安全组名称,可任意命名,但不得超过60个字符。 + GroupName *string `json:"GroupName,omitempty" name:"GroupName"` + + // 安全组备注,最多100个字符。 + GroupDescription *string `json:"GroupDescription,omitempty" name:"GroupDescription"` +} + +func (r *ModifySecurityGroupAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifySecurityGroupAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupId") + delete(f, "GroupName") + delete(f, "GroupDescription") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifySecurityGroupAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifySecurityGroupAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifySecurityGroupAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifySecurityGroupAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifySecurityGroupPoliciesRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 安全组规则集合。 SecurityGroupPolicySet对象必须同时指定新的出(Egress)入(Ingress)站规则。 SecurityGroupPolicy对象不支持自定义索引(PolicyIndex)。 + SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet,omitempty" name:"SecurityGroupPolicySet"` + + // 排序安全组标识,默认值为False。当SortPolicys为False时,不改变安全组规则排序;当SortPolicys为True时,系统将严格按照SecurityGroupPolicySet参数传入的安全组规则及顺序进行重置,考虑到人为输入参数可能存在遗漏风险,建议通过控制台对安全组规则进行排序。 + SortPolicys *bool `json:"SortPolicys,omitempty" name:"SortPolicys"` +} + +func (r *ModifySecurityGroupPoliciesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifySecurityGroupPoliciesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupId") + delete(f, "SecurityGroupPolicySet") + delete(f, "SortPolicys") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifySecurityGroupPoliciesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifySecurityGroupPoliciesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifySecurityGroupPoliciesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifySecurityGroupPoliciesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyServiceTemplateAttributeRequest struct { + *tchttp.BaseRequest + + // 协议端口模板实例ID,例如:ppm-529nwwj8。 + ServiceTemplateId *string `json:"ServiceTemplateId,omitempty" name:"ServiceTemplateId"` + + // 协议端口模板名称。 + ServiceTemplateName *string `json:"ServiceTemplateName,omitempty" name:"ServiceTemplateName"` + + // 支持单个端口、多个端口、连续端口及所有端口,协议支持:TCP、UDP、ICMP、GRE 协议。 + Services []*string `json:"Services,omitempty" name:"Services"` + + // 支持添加备注的协议端口信息,支持单个端口、多个端口、连续端口及所有端口,协议支持:TCP、UDP、ICMP、GRE 协议。 + ServicesExtra []*ServicesInfo `json:"ServicesExtra,omitempty" name:"ServicesExtra"` +} + +func (r *ModifyServiceTemplateAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyServiceTemplateAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ServiceTemplateId") + delete(f, "ServiceTemplateName") + delete(f, "Services") + delete(f, "ServicesExtra") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyServiceTemplateAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyServiceTemplateAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyServiceTemplateAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyServiceTemplateAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyServiceTemplateGroupAttributeRequest struct { + *tchttp.BaseRequest + + // 协议端口模板集合实例ID,例如:ppmg-ei8hfd9a。 + ServiceTemplateGroupId *string `json:"ServiceTemplateGroupId,omitempty" name:"ServiceTemplateGroupId"` + + // 协议端口模板集合名称。 + ServiceTemplateGroupName *string `json:"ServiceTemplateGroupName,omitempty" name:"ServiceTemplateGroupName"` + + // 协议端口模板实例ID,例如:ppm-4dw6agho。 + ServiceTemplateIds []*string `json:"ServiceTemplateIds,omitempty" name:"ServiceTemplateIds"` +} + +func (r *ModifyServiceTemplateGroupAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyServiceTemplateGroupAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ServiceTemplateGroupId") + delete(f, "ServiceTemplateGroupName") + delete(f, "ServiceTemplateIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyServiceTemplateGroupAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyServiceTemplateGroupAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyServiceTemplateGroupAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyServiceTemplateGroupAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifySubnetAttributeRequest struct { + *tchttp.BaseRequest + + // 子网实例ID。形如:subnet-pxir56ns。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 子网名称,最大长度不能超过60个字节。 + SubnetName *string `json:"SubnetName,omitempty" name:"SubnetName"` + + // 子网是否开启广播。 + EnableBroadcast *string `json:"EnableBroadcast,omitempty" name:"EnableBroadcast"` +} + +func (r *ModifySubnetAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifySubnetAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SubnetId") + delete(f, "SubnetName") + delete(f, "EnableBroadcast") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifySubnetAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifySubnetAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifySubnetAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifySubnetAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyTemplateMemberRequest struct { + *tchttp.BaseRequest + + // 参数模板实例ID,支持IP地址、协议端口、IP地址组、协议端口组四种参数模板的实例ID。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 需要修改的参数模板成员信息,支持IP地址、协议端口、IP地址组、协议端口组四种类型,类型需要与TemplateId参数类型一致,修改顺序与TemplateMember参数顺序一一对应,入参长度需要与TemplateMember参数保持一致。 + OriginalTemplateMember []*MemberInfo `json:"OriginalTemplateMember,omitempty" name:"OriginalTemplateMember"` + + // 新的参数模板成员信息,支持IP地址、协议端口、IP地址组、协议端口组四种类型,类型需要与TemplateId参数类型一致,修改顺序与OriginalTemplateMember参数顺序一一对应,入参长度需要与OriginalTemplateMember参数保持一致。 + TemplateMember []*MemberInfo `json:"TemplateMember,omitempty" name:"TemplateMember"` +} + +func (r *ModifyTemplateMemberRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyTemplateMemberRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "OriginalTemplateMember") + delete(f, "TemplateMember") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyTemplateMemberRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyTemplateMemberResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyTemplateMemberResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyTemplateMemberResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpcAttributeRequest struct { + *tchttp.BaseRequest + + // VPC实例ID。形如:vpc-f49l6u0z。每次请求的实例的上限为100。参数不支持同时指定VpcIds和Filters。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 私有网络名称,可任意命名,但不得超过60个字符。 + VpcName *string `json:"VpcName,omitempty" name:"VpcName"` + + // 是否开启组播。true: 开启, false: 关闭。 + EnableMulticast *string `json:"EnableMulticast,omitempty" name:"EnableMulticast"` + + // DNS地址,最多支持4个,第1个默认为主,其余为备 + DnsServers []*string `json:"DnsServers,omitempty" name:"DnsServers"` + + // 域名 + DomainName *string `json:"DomainName,omitempty" name:"DomainName"` +} + +func (r *ModifyVpcAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpcAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "VpcName") + delete(f, "EnableMulticast") + delete(f, "DnsServers") + delete(f, "DomainName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyVpcAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpcAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyVpcAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpcAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpcEndPointAttributeRequest struct { + *tchttp.BaseRequest + + // 终端节点ID。 + EndPointId *string `json:"EndPointId,omitempty" name:"EndPointId"` + + // 终端节点名称。 + EndPointName *string `json:"EndPointName,omitempty" name:"EndPointName"` + + // 安全组ID列表。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +func (r *ModifyVpcEndPointAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpcEndPointAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EndPointId") + delete(f, "EndPointName") + delete(f, "SecurityGroupIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyVpcEndPointAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpcEndPointAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyVpcEndPointAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpcEndPointAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpcEndPointServiceAttributeRequest struct { + *tchttp.BaseRequest + + // 终端节点服务ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` + + // VPCID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 终端节点服务名称。 + EndPointServiceName *string `json:"EndPointServiceName,omitempty" name:"EndPointServiceName"` + + // 是否自动接受终端节点的连接请求。<ui><li>true:自动接受<li>false:不自动接受</ul> + AutoAcceptFlag *bool `json:"AutoAcceptFlag,omitempty" name:"AutoAcceptFlag"` + + // 后端服务的ID,比如lb-xxx。 + ServiceInstanceId *string `json:"ServiceInstanceId,omitempty" name:"ServiceInstanceId"` +} + +func (r *ModifyVpcEndPointServiceAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpcEndPointServiceAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EndPointServiceId") + delete(f, "VpcId") + delete(f, "EndPointServiceName") + delete(f, "AutoAcceptFlag") + delete(f, "ServiceInstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyVpcEndPointServiceAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpcEndPointServiceAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyVpcEndPointServiceAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpcEndPointServiceAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpcEndPointServiceWhiteListRequest struct { + *tchttp.BaseRequest + + // 用户UIN。 + UserUin *string `json:"UserUin,omitempty" name:"UserUin"` + + // 终端节点服务ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` + + // 白名单描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +func (r *ModifyVpcEndPointServiceWhiteListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpcEndPointServiceWhiteListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "UserUin") + delete(f, "EndPointServiceId") + delete(f, "Description") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyVpcEndPointServiceWhiteListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpcEndPointServiceWhiteListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyVpcEndPointServiceWhiteListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpcEndPointServiceWhiteListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpnConnectionAttributeRequest struct { + *tchttp.BaseRequest + + // VPN通道实例ID。形如:vpnx-f49l6u0z。 + VpnConnectionId *string `json:"VpnConnectionId,omitempty" name:"VpnConnectionId"` + + // VPN通道名称,可任意命名,但不得超过60个字符。 + VpnConnectionName *string `json:"VpnConnectionName,omitempty" name:"VpnConnectionName"` + + // 预共享密钥。 + PreShareKey *string `json:"PreShareKey,omitempty" name:"PreShareKey"` + + // SPD策略组,例如:{"10.0.0.5/24":["172.123.10.5/16"]},10.0.0.5/24是vpc内网段172.123.10.5/16是IDC网段。用户指定VPC内哪些网段可以和您IDC中哪些网段通信。 + SecurityPolicyDatabases []*SecurityPolicyDatabase `json:"SecurityPolicyDatabases,omitempty" name:"SecurityPolicyDatabases"` + + // IKE配置(Internet Key Exchange,因特网密钥交换),IKE具有一套自我保护机制,用户配置网络安全协议。 + IKEOptionsSpecification *IKEOptionsSpecification `json:"IKEOptionsSpecification,omitempty" name:"IKEOptionsSpecification"` + + // IPSec配置,腾讯云提供IPSec安全会话设置。 + IPSECOptionsSpecification *IPSECOptionsSpecification `json:"IPSECOptionsSpecification,omitempty" name:"IPSECOptionsSpecification"` + + // 是否启用通道健康检查 + EnableHealthCheck *bool `json:"EnableHealthCheck,omitempty" name:"EnableHealthCheck"` + + // 本端通道探测ip + HealthCheckLocalIp *string `json:"HealthCheckLocalIp,omitempty" name:"HealthCheckLocalIp"` + + // 对端通道探测ip + HealthCheckRemoteIp *string `json:"HealthCheckRemoteIp,omitempty" name:"HealthCheckRemoteIp"` + + // 协商类型,默认为active(主动协商)。可选值:active(主动协商),passive(被动协商),flowTrigger(流量协商) + NegotiationType *string `json:"NegotiationType,omitempty" name:"NegotiationType"` + + // DPD探测开关。默认为0,表示关闭DPD探测。可选值:0(关闭),1(开启) + DpdEnable *int64 `json:"DpdEnable,omitempty" name:"DpdEnable"` + + // DPD超时时间。即探测确认对端不存在需要的时间。dpdEnable为1(开启)时有效。默认30,单位为秒 + DpdTimeout *string `json:"DpdTimeout,omitempty" name:"DpdTimeout"` + + // DPD超时后的动作。默认为clear。dpdEnable为1(开启)时有效。可取值为clear(断开)和restart(重试) + DpdAction *string `json:"DpdAction,omitempty" name:"DpdAction"` +} + +func (r *ModifyVpnConnectionAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpnConnectionAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnConnectionId") + delete(f, "VpnConnectionName") + delete(f, "PreShareKey") + delete(f, "SecurityPolicyDatabases") + delete(f, "IKEOptionsSpecification") + delete(f, "IPSECOptionsSpecification") + delete(f, "EnableHealthCheck") + delete(f, "HealthCheckLocalIp") + delete(f, "HealthCheckRemoteIp") + delete(f, "NegotiationType") + delete(f, "DpdEnable") + delete(f, "DpdTimeout") + delete(f, "DpdAction") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyVpnConnectionAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpnConnectionAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyVpnConnectionAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpnConnectionAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpnGatewayAttributeRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // VPN网关名称,最大长度不能超过60个字节。 + VpnGatewayName *string `json:"VpnGatewayName,omitempty" name:"VpnGatewayName"` + + // VPN网关计费模式,目前只支持预付费(即包年包月)到后付费(即按量计费)的转换。即参数只支持:POSTPAID_BY_HOUR。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` +} + +func (r *ModifyVpnGatewayAttributeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpnGatewayAttributeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "VpnGatewayName") + delete(f, "InstanceChargeType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyVpnGatewayAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpnGatewayAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyVpnGatewayAttributeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpnGatewayAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpnGatewayCcnRoutesRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 云联网路由(IDC网段)列表 + Routes []*VpngwCcnRoutes `json:"Routes,omitempty" name:"Routes"` +} + +func (r *ModifyVpnGatewayCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpnGatewayCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyVpnGatewayCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpnGatewayCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyVpnGatewayCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpnGatewayCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpnGatewayRoutesRequest struct { + *tchttp.BaseRequest + + // Vpn网关id + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 路由修改参数 + Routes []*VpnGatewayRouteModify `json:"Routes,omitempty" name:"Routes"` +} + +func (r *ModifyVpnGatewayRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpnGatewayRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyVpnGatewayRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyVpnGatewayRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // VPN路由信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Routes []*VpnGatewayRoute `json:"Routes,omitempty" name:"Routes"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyVpnGatewayRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyVpnGatewayRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type NatDirectConnectGatewayRoute struct { + + // 子网的 `IPv4` `CIDR` + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 下一跳网关的类型,目前此接口支持的类型有: + // DIRECTCONNECT:专线网关 + GatewayType *string `json:"GatewayType,omitempty" name:"GatewayType"` + + // 下一跳网关ID + GatewayId *string `json:"GatewayId,omitempty" name:"GatewayId"` + + // 路由的创建时间 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 路由的更新时间 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` +} + +type NatGateway struct { + + // NAT网关的ID。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // NAT网关的名称。 + NatGatewayName *string `json:"NatGatewayName,omitempty" name:"NatGatewayName"` + + // NAT网关创建的时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // NAT网关的状态。 + // 'PENDING':生产中,'DELETING':删除中,'AVAILABLE':运行中,'UPDATING':升级中, + // ‘FAILED’:失败。 + State *string `json:"State,omitempty" name:"State"` + + // 网关最大外网出带宽(单位:Mbps)。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 网关并发连接上限。 + MaxConcurrentConnection *uint64 `json:"MaxConcurrentConnection,omitempty" name:"MaxConcurrentConnection"` + + // 绑定NAT网关的公网IP对象数组。 + PublicIpAddressSet []*NatGatewayAddress `json:"PublicIpAddressSet,omitempty" name:"PublicIpAddressSet"` + + // NAT网关网络状态。“AVAILABLE”:运行中, “UNAVAILABLE”:不可用, “INSUFFICIENT”:欠费停服。 + NetworkState *string `json:"NetworkState,omitempty" name:"NetworkState"` + + // NAT网关的端口转发规则。 + DestinationIpPortTranslationNatRuleSet []*DestinationIpPortTranslationNatRule `json:"DestinationIpPortTranslationNatRuleSet,omitempty" name:"DestinationIpPortTranslationNatRuleSet"` + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // NAT网关所在的可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 绑定的专线网关ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + DirectConnectGatewayIds []*string `json:"DirectConnectGatewayIds,omitempty" name:"DirectConnectGatewayIds"` + + // 所属子网ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 标签键值对。 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` + + // NAT网关绑定的安全组列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityGroupSet []*string `json:"SecurityGroupSet,omitempty" name:"SecurityGroupSet"` + + // NAT网关的SNAT转发规则。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SourceIpTranslationNatRuleSet []*SourceIpTranslationNatRule `json:"SourceIpTranslationNatRuleSet,omitempty" name:"SourceIpTranslationNatRuleSet"` + + // 是否独享型NAT。 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsExclusive *bool `json:"IsExclusive,omitempty" name:"IsExclusive"` + + // 独享型NAT所在的网关集群的带宽(单位:Mbps),当IsExclusive为false时无此字段。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExclusiveGatewayBandwidth *uint64 `json:"ExclusiveGatewayBandwidth,omitempty" name:"ExclusiveGatewayBandwidth"` +} + +type NatGatewayAddress struct { + + // 弹性公网IP(EIP)的唯一 ID,形如:`eip-11112222`。 + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // 外网IP地址,形如:`123.121.34.33`。 + PublicIpAddress *string `json:"PublicIpAddress,omitempty" name:"PublicIpAddress"` + + // 资源封堵状态。true表示弹性ip处于封堵状态,false表示弹性ip处于未封堵状态。 + IsBlocked *bool `json:"IsBlocked,omitempty" name:"IsBlocked"` +} + +type NatGatewayDestinationIpPortTranslationNatRule struct { + + // 网络协议,可选值:`TCP`、`UDP`。 + IpProtocol *string `json:"IpProtocol,omitempty" name:"IpProtocol"` + + // 弹性IP。 + PublicIpAddress *string `json:"PublicIpAddress,omitempty" name:"PublicIpAddress"` + + // 公网端口。 + PublicPort *uint64 `json:"PublicPort,omitempty" name:"PublicPort"` + + // 内网地址。 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` + + // 内网端口。 + PrivatePort *uint64 `json:"PrivatePort,omitempty" name:"PrivatePort"` + + // NAT网关转发规则描述。 + Description *string `json:"Description,omitempty" name:"Description"` + + // NAT网关的ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // 私有网络VPC的ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // NAT网关转发规则创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type NetDetect struct { + + // `VPC`实例`ID`。形如:`vpc-12345678` + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // `VPC`实例名称。 + VpcName *string `json:"VpcName,omitempty" name:"VpcName"` + + // 子网实例ID。形如:subnet-12345678。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 子网实例名称。 + SubnetName *string `json:"SubnetName,omitempty" name:"SubnetName"` + + // 网络探测实例ID。形如:netd-12345678。 + NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"` + + // 网络探测名称,最大长度不能超过60个字节。 + NetDetectName *string `json:"NetDetectName,omitempty" name:"NetDetectName"` + + // 探测目的IPv4地址数组,最多两个。 + DetectDestinationIp []*string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp"` + + // 系统自动分配的探测源IPv4数组。长度为2。 + DetectSourceIp []*string `json:"DetectSourceIp,omitempty" name:"DetectSourceIp"` + + // 下一跳类型,目前我们支持的类型有: + // VPN:VPN网关; + // DIRECTCONNECT:专线网关; + // PEERCONNECTION:对等连接; + // NAT:NAT网关; + // NORMAL_CVM:普通云服务器; + // CCN:云联网网关; + NextHopType *string `json:"NextHopType,omitempty" name:"NextHopType"` + + // 下一跳目的网关,取值与“下一跳类型”相关: + // 下一跳类型为VPN,取值VPN网关ID,形如:vpngw-12345678; + // 下一跳类型为DIRECTCONNECT,取值专线网关ID,形如:dcg-12345678; + // 下一跳类型为PEERCONNECTION,取值对等连接ID,形如:pcx-12345678; + // 下一跳类型为NAT,取值Nat网关,形如:nat-12345678; + // 下一跳类型为NORMAL_CVM,取值云服务器IPv4地址,形如:10.0.0.12; + // 下一跳类型为CCN,取值云联网网关,形如:ccn-12345678; + NextHopDestination *string `json:"NextHopDestination,omitempty" name:"NextHopDestination"` + + // 下一跳网关名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + NextHopName *string `json:"NextHopName,omitempty" name:"NextHopName"` + + // 网络探测描述。 + // 注意:此字段可能返回 null,表示取不到有效值。 + NetDetectDescription *string `json:"NetDetectDescription,omitempty" name:"NetDetectDescription"` + + // 创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` +} + +type NetDetectIpState struct { + + // 探测目的IPv4地址。 + DetectDestinationIp *string `json:"DetectDestinationIp,omitempty" name:"DetectDestinationIp"` + + // 探测结果。 + // 0:成功; + // -1:查询不到路由丢包; + // -2:外出ACL丢包; + // -3:IN ACL丢包; + // -4:其他错误; + State *int64 `json:"State,omitempty" name:"State"` + + // 时延,单位毫秒 + Delay *uint64 `json:"Delay,omitempty" name:"Delay"` + + // 丢包率 + PacketLossRate *uint64 `json:"PacketLossRate,omitempty" name:"PacketLossRate"` +} + +type NetDetectState struct { + + // 网络探测实例ID。形如:netd-12345678。 + NetDetectId *string `json:"NetDetectId,omitempty" name:"NetDetectId"` + + // 网络探测目的IP验证结果对象数组。 + NetDetectIpStateSet []*NetDetectIpState `json:"NetDetectIpStateSet,omitempty" name:"NetDetectIpStateSet"` +} + +type NetworkAcl struct { + + // `VPC`实例`ID`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 网络ACL实例`ID`。 + NetworkAclId *string `json:"NetworkAclId,omitempty" name:"NetworkAclId"` + + // 网络ACL名称,最大长度为60。 + NetworkAclName *string `json:"NetworkAclName,omitempty" name:"NetworkAclName"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 网络ACL关联的子网数组。 + SubnetSet []*Subnet `json:"SubnetSet,omitempty" name:"SubnetSet"` + + // 网络ACl入站规则。 + IngressEntries []*NetworkAclEntry `json:"IngressEntries,omitempty" name:"IngressEntries"` + + // 网络ACL出站规则。 + EgressEntries []*NetworkAclEntry `json:"EgressEntries,omitempty" name:"EgressEntries"` +} + +type NetworkAclEntry struct { + + // 修改时间。 + ModifyTime *string `json:"ModifyTime,omitempty" name:"ModifyTime"` + + // 协议, 取值: TCP,UDP, ICMP, ALL。 + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` + + // 端口(all, 单个port, range)。当Protocol为ALL或ICMP时,不能指定Port。 + Port *string `json:"Port,omitempty" name:"Port"` + + // 网段或IP(互斥)。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 网段或IPv6(互斥)。 + Ipv6CidrBlock *string `json:"Ipv6CidrBlock,omitempty" name:"Ipv6CidrBlock"` + + // ACCEPT 或 DROP。 + Action *string `json:"Action,omitempty" name:"Action"` + + // 规则描述,最大长度100。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +type NetworkAclEntrySet struct { + + // 入站规则。 + Ingress []*NetworkAclEntry `json:"Ingress,omitempty" name:"Ingress"` + + // 出站规则。 + Egress []*NetworkAclEntry `json:"Egress,omitempty" name:"Egress"` +} + +type NetworkInterface struct { + + // 弹性网卡实例ID,例如:eni-f1xjkw1b。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 弹性网卡名称。 + NetworkInterfaceName *string `json:"NetworkInterfaceName,omitempty" name:"NetworkInterfaceName"` + + // 弹性网卡描述。 + NetworkInterfaceDescription *string `json:"NetworkInterfaceDescription,omitempty" name:"NetworkInterfaceDescription"` + + // 子网实例ID。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 绑定的安全组。 + GroupSet []*string `json:"GroupSet,omitempty" name:"GroupSet"` + + // 是否是主网卡。 + Primary *bool `json:"Primary,omitempty" name:"Primary"` + + // MAC地址。 + MacAddress *string `json:"MacAddress,omitempty" name:"MacAddress"` + + // 弹性网卡状态: + // <li>`PENDING`:创建中</li> + // <li>`AVAILABLE`:可用的</li> + // <li>`ATTACHING`:绑定中</li> + // <li>`DETACHING`:解绑中</li> + // <li>`DELETING`:删除中</li> + State *string `json:"State,omitempty" name:"State"` + + // 内网IP信息。 + PrivateIpAddressSet []*PrivateIpAddressSpecification `json:"PrivateIpAddressSet,omitempty" name:"PrivateIpAddressSet"` + + // 绑定的云服务器对象。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Attachment *NetworkInterfaceAttachment `json:"Attachment,omitempty" name:"Attachment"` + + // 可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // `IPv6`地址列表。 + Ipv6AddressSet []*Ipv6Address `json:"Ipv6AddressSet,omitempty" name:"Ipv6AddressSet"` + + // 标签键值对。 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` + + // 网卡类型。0 - 弹性网卡;1 - evm弹性网卡。 + EniType *uint64 `json:"EniType,omitempty" name:"EniType"` + + // 网卡绑定的子机类型:cvm,eks。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Business *string `json:"Business,omitempty" name:"Business"` + + // 网卡所关联的CDC实例ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` + + // 弹性网卡类型:0:标准型/1:扩展型。默认值为0。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AttachType *uint64 `json:"AttachType,omitempty" name:"AttachType"` +} + +type NetworkInterfaceAttachment struct { + + // 云主机实例ID。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 网卡在云主机实例内的序号。 + DeviceIndex *uint64 `json:"DeviceIndex,omitempty" name:"DeviceIndex"` + + // 云主机所有者账户信息。 + InstanceAccountId *string `json:"InstanceAccountId,omitempty" name:"InstanceAccountId"` + + // 绑定时间。 + AttachTime *string `json:"AttachTime,omitempty" name:"AttachTime"` +} + +type NotifyRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表唯一ID。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由策略唯一ID。 + RouteItemIds []*string `json:"RouteItemIds,omitempty" name:"RouteItemIds"` +} + +func (r *NotifyRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *NotifyRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "RouteItemIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "NotifyRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type NotifyRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *NotifyRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *NotifyRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Price struct { + + // 实例价格。 + InstancePrice *ItemPrice `json:"InstancePrice,omitempty" name:"InstancePrice"` + + // 网络价格。 + BandwidthPrice *ItemPrice `json:"BandwidthPrice,omitempty" name:"BandwidthPrice"` +} + +type PrivateIpAddressSpecification struct { + + // 内网IP地址。 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` + + // 是否是主IP。 + Primary *bool `json:"Primary,omitempty" name:"Primary"` + + // 公网IP地址。 + PublicIpAddress *string `json:"PublicIpAddress,omitempty" name:"PublicIpAddress"` + + // EIP实例ID,例如:eip-11112222。 + AddressId *string `json:"AddressId,omitempty" name:"AddressId"` + + // 内网IP描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` + + // 公网IP是否被封堵。 + IsWanIpBlocked *bool `json:"IsWanIpBlocked,omitempty" name:"IsWanIpBlocked"` + + // IP状态: + // PENDING:生产中 + // MIGRATING:迁移中 + // DELETING:删除中 + // AVAILABLE:可用的 + State *string `json:"State,omitempty" name:"State"` +} + +type ProductQuota struct { + + // 产品配额ID + QuotaId *string `json:"QuotaId,omitempty" name:"QuotaId"` + + // 产品配额名称 + QuotaName *string `json:"QuotaName,omitempty" name:"QuotaName"` + + // 产品当前配额 + QuotaCurrent *int64 `json:"QuotaCurrent,omitempty" name:"QuotaCurrent"` + + // 产品配额上限 + QuotaLimit *int64 `json:"QuotaLimit,omitempty" name:"QuotaLimit"` + + // 产品配额是否有地域属性 + QuotaRegion *bool `json:"QuotaRegion,omitempty" name:"QuotaRegion"` +} + +type Quota struct { + + // 配额名称,取值范围:<br><li>`TOTAL_EIP_QUOTA`:用户当前地域下EIP的配额数;<br><li>`DAILY_EIP_APPLY`:用户当前地域下今日申购次数;<br><li>`DAILY_PUBLIC_IP_ASSIGN`:用户当前地域下,重新分配公网 IP次数。 + QuotaId *string `json:"QuotaId,omitempty" name:"QuotaId"` + + // 当前数量 + QuotaCurrent *int64 `json:"QuotaCurrent,omitempty" name:"QuotaCurrent"` + + // 配额数量 + QuotaLimit *int64 `json:"QuotaLimit,omitempty" name:"QuotaLimit"` +} + +type ReferredSecurityGroup struct { + + // 安全组实例ID。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 引用安全组实例ID(SecurityGroupId)的所有安全组实例ID。 + ReferredSecurityGroupIds []*string `json:"ReferredSecurityGroupIds,omitempty" name:"ReferredSecurityGroupIds"` +} + +type RefreshDirectConnectGatewayRouteToNatGatewayRequest struct { + *tchttp.BaseRequest + + // vpc的ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // NAT网关ID + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // 是否是预刷新;True:是, False:否 + DryRun *bool `json:"DryRun,omitempty" name:"DryRun"` +} + +func (r *RefreshDirectConnectGatewayRouteToNatGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RefreshDirectConnectGatewayRouteToNatGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "NatGatewayId") + delete(f, "DryRun") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RefreshDirectConnectGatewayRouteToNatGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RefreshDirectConnectGatewayRouteToNatGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // IDC子网信息 + DirectConnectSubnetSet []*DirectConnectSubnet `json:"DirectConnectSubnetSet,omitempty" name:"DirectConnectSubnetSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RefreshDirectConnectGatewayRouteToNatGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RefreshDirectConnectGatewayRouteToNatGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RejectAttachCcnInstancesRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 拒绝关联实例列表。 + Instances []*CcnInstance `json:"Instances,omitempty" name:"Instances"` +} + +func (r *RejectAttachCcnInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RejectAttachCcnInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "Instances") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RejectAttachCcnInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RejectAttachCcnInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RejectAttachCcnInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RejectAttachCcnInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ReleaseAddressesRequest struct { + *tchttp.BaseRequest + + // 标识 EIP 的唯一 ID 列表。EIP 唯一 ID 形如:`eip-11112222`。 + AddressIds []*string `json:"AddressIds,omitempty" name:"AddressIds"` +} + +func (r *ReleaseAddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReleaseAddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ReleaseAddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ReleaseAddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 异步任务TaskId。可以使用[DescribeTaskResult](https://cloud.tencent.com/document/api/215/36271)接口查询任务状态。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ReleaseAddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReleaseAddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ReleaseIp6AddressesBandwidthRequest struct { + *tchttp.BaseRequest + + // IPV6地址。Ip6Addresses和Ip6AddressIds必须且只能传一个 + Ip6Addresses []*string `json:"Ip6Addresses,omitempty" name:"Ip6Addresses"` + + // IPV6地址对应的唯一ID,形如eip-xxxxxxxx。Ip6Addresses和Ip6AddressIds必须且只能传一个。 + Ip6AddressIds []*string `json:"Ip6AddressIds,omitempty" name:"Ip6AddressIds"` +} + +func (r *ReleaseIp6AddressesBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReleaseIp6AddressesBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6Addresses") + delete(f, "Ip6AddressIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ReleaseIp6AddressesBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ReleaseIp6AddressesBandwidthResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 异步任务TaskId。可以使用[DescribeTaskResult](https://cloud.tencent.com/document/api/215/36271)接口查询任务状态。 + TaskId *string `json:"TaskId,omitempty" name:"TaskId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ReleaseIp6AddressesBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReleaseIp6AddressesBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RemoveBandwidthPackageResourcesRequest struct { + *tchttp.BaseRequest + + // 带宽包唯一标识ID,形如'bwp-xxxx' + BandwidthPackageId *string `json:"BandwidthPackageId,omitempty" name:"BandwidthPackageId"` + + // 资源类型,包括‘Address’, ‘LoadBalance’ + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 资源ID,可支持资源形如'eip-xxxx', 'lb-xxxx' + ResourceIds []*string `json:"ResourceIds,omitempty" name:"ResourceIds"` +} + +func (r *RemoveBandwidthPackageResourcesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RemoveBandwidthPackageResourcesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "BandwidthPackageId") + delete(f, "ResourceType") + delete(f, "ResourceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RemoveBandwidthPackageResourcesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RemoveBandwidthPackageResourcesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RemoveBandwidthPackageResourcesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RemoveBandwidthPackageResourcesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RemoveIp6RulesRequest struct { + *tchttp.BaseRequest + + // IPV6转换规则所属的转换实例唯一ID,形如ip6-xxxxxxxx + Ip6TranslatorId *string `json:"Ip6TranslatorId,omitempty" name:"Ip6TranslatorId"` + + // 待删除IPV6转换规则,形如rule6-xxxxxxxx + Ip6RuleIds []*string `json:"Ip6RuleIds,omitempty" name:"Ip6RuleIds"` +} + +func (r *RemoveIp6RulesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RemoveIp6RulesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Ip6TranslatorId") + delete(f, "Ip6RuleIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RemoveIp6RulesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RemoveIp6RulesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RemoveIp6RulesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RemoveIp6RulesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RenewAddressesRequest struct { + *tchttp.BaseRequest + + // EIP唯一标识ID列表,形如'eip-xxxx' + AddressIds []*string `json:"AddressIds,omitempty" name:"AddressIds"` + + // 续费参数 + AddressChargePrepaid *AddressChargePrepaid `json:"AddressChargePrepaid,omitempty" name:"AddressChargePrepaid"` +} + +func (r *RenewAddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RenewAddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AddressIds") + delete(f, "AddressChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RenewAddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RenewAddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RenewAddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RenewAddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RenewVpnGatewayRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 预付费计费模式。 + InstanceChargePrepaid *InstanceChargePrepaid `json:"InstanceChargePrepaid,omitempty" name:"InstanceChargePrepaid"` +} + +func (r *RenewVpnGatewayRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RenewVpnGatewayRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "InstanceChargePrepaid") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RenewVpnGatewayRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RenewVpnGatewayResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RenewVpnGatewayResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RenewVpnGatewayResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ReplaceDirectConnectGatewayCcnRoutesRequest struct { + *tchttp.BaseRequest + + // 专线网关ID,形如:dcg-prpqlmg1 + DirectConnectGatewayId *string `json:"DirectConnectGatewayId,omitempty" name:"DirectConnectGatewayId"` + + // 需要连通的IDC网段列表 + Routes []*DirectConnectGatewayCcnRoute `json:"Routes,omitempty" name:"Routes"` +} + +func (r *ReplaceDirectConnectGatewayCcnRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReplaceDirectConnectGatewayCcnRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "DirectConnectGatewayId") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ReplaceDirectConnectGatewayCcnRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ReplaceDirectConnectGatewayCcnRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ReplaceDirectConnectGatewayCcnRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReplaceDirectConnectGatewayCcnRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ReplaceRouteTableAssociationRequest struct { + *tchttp.BaseRequest + + // 子网实例ID,例如:subnet-3x5lf5q0。可通过DescribeSubnets接口查询。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` +} + +func (r *ReplaceRouteTableAssociationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReplaceRouteTableAssociationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SubnetId") + delete(f, "RouteTableId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ReplaceRouteTableAssociationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ReplaceRouteTableAssociationResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ReplaceRouteTableAssociationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReplaceRouteTableAssociationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ReplaceRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由策略对象。需要指定路由策略ID(RouteId)。 + Routes []*Route `json:"Routes,omitempty" name:"Routes"` +} + +func (r *ReplaceRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReplaceRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ReplaceRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ReplaceRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 原路由策略信息。 + OldRouteSet []*Route `json:"OldRouteSet,omitempty" name:"OldRouteSet"` + + // 修改后的路由策略信息。 + NewRouteSet []*Route `json:"NewRouteSet,omitempty" name:"NewRouteSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ReplaceRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReplaceRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ReplaceSecurityGroupPolicyRequest struct { + *tchttp.BaseRequest + + // 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 安全组规则集合对象。 + SecurityGroupPolicySet *SecurityGroupPolicySet `json:"SecurityGroupPolicySet,omitempty" name:"SecurityGroupPolicySet"` + + // 旧的安全组规则集合对象,可选,日志记录用。 + OriginalSecurityGroupPolicySet *SecurityGroupPolicySet `json:"OriginalSecurityGroupPolicySet,omitempty" name:"OriginalSecurityGroupPolicySet"` +} + +func (r *ReplaceSecurityGroupPolicyRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReplaceSecurityGroupPolicyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "SecurityGroupId") + delete(f, "SecurityGroupPolicySet") + delete(f, "OriginalSecurityGroupPolicySet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ReplaceSecurityGroupPolicyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ReplaceSecurityGroupPolicyResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ReplaceSecurityGroupPolicyResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ReplaceSecurityGroupPolicyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetAttachCcnInstancesRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // CCN所属UIN(根账号)。 + CcnUin *string `json:"CcnUin,omitempty" name:"CcnUin"` + + // 重新申请关联网络实例列表。 + Instances []*CcnInstance `json:"Instances,omitempty" name:"Instances"` +} + +func (r *ResetAttachCcnInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetAttachCcnInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "CcnUin") + delete(f, "Instances") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetAttachCcnInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetAttachCcnInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetAttachCcnInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetAttachCcnInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetNatGatewayConnectionRequest struct { + *tchttp.BaseRequest + + // NAT网关ID。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // NAT网关并发连接上限,形如:1000000、3000000、10000000。 + MaxConcurrentConnection *uint64 `json:"MaxConcurrentConnection,omitempty" name:"MaxConcurrentConnection"` +} + +func (r *ResetNatGatewayConnectionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetNatGatewayConnectionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NatGatewayId") + delete(f, "MaxConcurrentConnection") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetNatGatewayConnectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetNatGatewayConnectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetNatGatewayConnectionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetNatGatewayConnectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由表名称,最大长度不能超过60个字节。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 路由策略。 + Routes []*Route `json:"Routes,omitempty" name:"Routes"` +} + +func (r *ResetRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "RouteTableName") + delete(f, "Routes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetVpnConnectionRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // VPN通道实例ID。形如:vpnx-f49l6u0z。 + VpnConnectionId *string `json:"VpnConnectionId,omitempty" name:"VpnConnectionId"` +} + +func (r *ResetVpnConnectionRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetVpnConnectionRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "VpnConnectionId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetVpnConnectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetVpnConnectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetVpnConnectionResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetVpnConnectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResetVpnGatewayInternetMaxBandwidthRequest struct { + *tchttp.BaseRequest + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 公网带宽设置。可选带宽规格:5, 10, 20, 50, 100;单位:Mbps。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` +} + +func (r *ResetVpnGatewayInternetMaxBandwidthRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetVpnGatewayInternetMaxBandwidthRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpnGatewayId") + delete(f, "InternetMaxBandwidthOut") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ResetVpnGatewayInternetMaxBandwidthRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ResetVpnGatewayInternetMaxBandwidthResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ResetVpnGatewayInternetMaxBandwidthResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ResetVpnGatewayInternetMaxBandwidthResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Resource struct { + + // 带宽包资源类型,包括'Address'和'LoadBalance' + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 带宽包资源Id,形如'eip-xxxx', 'lb-xxxx' + ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + + // 带宽包资源Ip + AddressIp *string `json:"AddressIp,omitempty" name:"AddressIp"` +} + +type ResourceDashboard struct { + + // Vpc实例ID,例如:vpc-bq4bzxpj。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网实例ID,例如:subnet-bthucmmy。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 基础网络互通。 + Classiclink *uint64 `json:"Classiclink,omitempty" name:"Classiclink"` + + // 专线网关。 + Dcg *uint64 `json:"Dcg,omitempty" name:"Dcg"` + + // 对等连接。 + Pcx *uint64 `json:"Pcx,omitempty" name:"Pcx"` + + // 统计当前除云服务器 IP、弹性网卡IP和网络探测IP以外的所有已使用的IP总数。云服务器 IP、弹性网卡IP和网络探测IP单独计数。 + Ip *uint64 `json:"Ip,omitempty" name:"Ip"` + + // NAT网关。 + Nat *uint64 `json:"Nat,omitempty" name:"Nat"` + + // VPN网关。 + Vpngw *uint64 `json:"Vpngw,omitempty" name:"Vpngw"` + + // 流日志。 + FlowLog *uint64 `json:"FlowLog,omitempty" name:"FlowLog"` + + // 网络探测。 + NetworkDetect *uint64 `json:"NetworkDetect,omitempty" name:"NetworkDetect"` + + // 网络ACL。 + NetworkACL *uint64 `json:"NetworkACL,omitempty" name:"NetworkACL"` + + // 云主机。 + CVM *uint64 `json:"CVM,omitempty" name:"CVM"` + + // 负载均衡。 + LB *uint64 `json:"LB,omitempty" name:"LB"` + + // 关系型数据库。 + CDB *uint64 `json:"CDB,omitempty" name:"CDB"` + + // 云数据库 TencentDB for Memcached。 + Cmem *uint64 `json:"Cmem,omitempty" name:"Cmem"` + + // 时序数据库。 + CTSDB *uint64 `json:"CTSDB,omitempty" name:"CTSDB"` + + // 数据库 TencentDB for MariaDB(TDSQL)。 + MariaDB *uint64 `json:"MariaDB,omitempty" name:"MariaDB"` + + // 数据库 TencentDB for SQL Server。 + SQLServer *uint64 `json:"SQLServer,omitempty" name:"SQLServer"` + + // 云数据库 TencentDB for PostgreSQL。 + Postgres *uint64 `json:"Postgres,omitempty" name:"Postgres"` + + // 网络附加存储。 + NAS *uint64 `json:"NAS,omitempty" name:"NAS"` + + // Snova云数据仓库。 + Greenplumn *uint64 `json:"Greenplumn,omitempty" name:"Greenplumn"` + + // 消息队列 CKAFKA。 + Ckafka *uint64 `json:"Ckafka,omitempty" name:"Ckafka"` + + // Grocery。 + Grocery *uint64 `json:"Grocery,omitempty" name:"Grocery"` + + // 数据加密服务。 + HSM *uint64 `json:"HSM,omitempty" name:"HSM"` + + // 游戏存储 Tcaplus。 + Tcaplus *uint64 `json:"Tcaplus,omitempty" name:"Tcaplus"` + + // Cnas。 + Cnas *uint64 `json:"Cnas,omitempty" name:"Cnas"` + + // HTAP 数据库 TiDB。 + TiDB *uint64 `json:"TiDB,omitempty" name:"TiDB"` + + // EMR 集群。 + Emr *uint64 `json:"Emr,omitempty" name:"Emr"` + + // SEAL。 + SEAL *uint64 `json:"SEAL,omitempty" name:"SEAL"` + + // 文件存储 CFS。 + CFS *uint64 `json:"CFS,omitempty" name:"CFS"` + + // Oracle。 + Oracle *uint64 `json:"Oracle,omitempty" name:"Oracle"` + + // ElasticSearch服务。 + ElasticSearch *uint64 `json:"ElasticSearch,omitempty" name:"ElasticSearch"` + + // 区块链服务。 + TBaaS *uint64 `json:"TBaaS,omitempty" name:"TBaaS"` + + // Itop。 + Itop *uint64 `json:"Itop,omitempty" name:"Itop"` + + // 云数据库审计。 + DBAudit *uint64 `json:"DBAudit,omitempty" name:"DBAudit"` + + // 企业级云数据库 CynosDB for Postgres。 + CynosDBPostgres *uint64 `json:"CynosDBPostgres,omitempty" name:"CynosDBPostgres"` + + // 数据库 TencentDB for Redis。 + Redis *uint64 `json:"Redis,omitempty" name:"Redis"` + + // 数据库 TencentDB for MongoDB。 + MongoDB *uint64 `json:"MongoDB,omitempty" name:"MongoDB"` + + // 分布式数据库 TencentDB for TDSQL。 + DCDB *uint64 `json:"DCDB,omitempty" name:"DCDB"` + + // 企业级云数据库 CynosDB for MySQL。 + CynosDBMySQL *uint64 `json:"CynosDBMySQL,omitempty" name:"CynosDBMySQL"` + + // 子网。 + Subnet *uint64 `json:"Subnet,omitempty" name:"Subnet"` + + // 路由表。 + RouteTable *uint64 `json:"RouteTable,omitempty" name:"RouteTable"` +} + +type Route struct { + + // 目的网段,取值不能在私有网络网段内,例如:112.20.51.0/24。 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 下一跳类型,目前我们支持的类型有: + // CVM:公网网关类型的云服务器; + // VPN:VPN网关; + // DIRECTCONNECT:专线网关; + // PEERCONNECTION:对等连接; + // HAVIP:高可用虚拟IP; + // NAT:NAT网关; + // NORMAL_CVM:普通云服务器; + // EIP:云服务器的公网IP; + // LOCAL_GATEWAY:本地网关。 + GatewayType *string `json:"GatewayType,omitempty" name:"GatewayType"` + + // 下一跳地址,这里只需要指定不同下一跳类型的网关ID,系统会自动匹配到下一跳地址。 + // 特别注意:当 GatewayType 为 EIP 时,GatewayId 固定值 '0' + GatewayId *string `json:"GatewayId,omitempty" name:"GatewayId"` + + // 路由策略ID。IPv4路由策略ID是有意义的值,IPv6路由策略是无意义的值0。后续建议完全使用字符串唯一ID `RouteItemId`操作路由策略。 + // 该字段在删除时必填,其他字段无需填写。 + RouteId *uint64 `json:"RouteId,omitempty" name:"RouteId"` + + // 路由策略描述。 + RouteDescription *string `json:"RouteDescription,omitempty" name:"RouteDescription"` + + // 是否启用 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 路由类型,目前我们支持的类型有: + // USER:用户路由; + // NETD:网络探测路由,创建网络探测实例时,系统默认下发,不可编辑与删除; + // CCN:云联网路由,系统默认下发,不可编辑与删除。 + // 用户只能添加和操作 USER 类型的路由。 + RouteType *string `json:"RouteType,omitempty" name:"RouteType"` + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 目的IPv6网段,取值不能在私有网络网段内,例如:2402:4e00:1000:810b::/64。 + DestinationIpv6CidrBlock *string `json:"DestinationIpv6CidrBlock,omitempty" name:"DestinationIpv6CidrBlock"` + + // 路由唯一策略ID。 + RouteItemId *string `json:"RouteItemId,omitempty" name:"RouteItemId"` + + // 路由策略是否发布到云联网。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PublishedToVbc *bool `json:"PublishedToVbc,omitempty" name:"PublishedToVbc"` + + // 路由策略创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type RouteConflict struct { + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 要检查的与之冲突的目的端 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 冲突的路由策略列表 + ConflictSet []*Route `json:"ConflictSet,omitempty" name:"ConflictSet"` +} + +type RouteTable struct { + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 路由表实例ID,例如:rtb-azd4dt1c。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 路由表关联关系。 + AssociationSet []*RouteTableAssociation `json:"AssociationSet,omitempty" name:"AssociationSet"` + + // IPv4路由策略集合。 + RouteSet []*Route `json:"RouteSet,omitempty" name:"RouteSet"` + + // 是否默认路由表。 + Main *bool `json:"Main,omitempty" name:"Main"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 标签键值对。 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` + + // local路由是否发布云联网。 + // 注意:此字段可能返回 null,表示取不到有效值。 + LocalCidrForCcn []*CidrForCcn `json:"LocalCidrForCcn,omitempty" name:"LocalCidrForCcn"` +} + +type RouteTableAssociation struct { + + // 子网实例ID。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 路由表实例ID。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` +} + +type SecurityGroup struct { + + // 安全组实例ID,例如:sg-ohuuioma。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 安全组名称,可任意命名,但不得超过60个字符。 + SecurityGroupName *string `json:"SecurityGroupName,omitempty" name:"SecurityGroupName"` + + // 安全组备注,最多100个字符。 + SecurityGroupDesc *string `json:"SecurityGroupDesc,omitempty" name:"SecurityGroupDesc"` + + // 项目id,默认0。可在qcloud控制台项目管理页面查询到。 + ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` + + // 是否是默认安全组,默认安全组不支持删除。 + IsDefault *bool `json:"IsDefault,omitempty" name:"IsDefault"` + + // 安全组创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 标签键值对。 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` + + // 安全组更新时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` +} + +type SecurityGroupAssociationStatistics struct { + + // 安全组实例ID。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // 云服务器实例数。 + CVM *uint64 `json:"CVM,omitempty" name:"CVM"` + + // MySQL数据库实例数。 + CDB *uint64 `json:"CDB,omitempty" name:"CDB"` + + // 弹性网卡实例数。 + ENI *uint64 `json:"ENI,omitempty" name:"ENI"` + + // 被安全组引用数。 + SG *uint64 `json:"SG,omitempty" name:"SG"` + + // 负载均衡实例数。 + CLB *uint64 `json:"CLB,omitempty" name:"CLB"` + + // 全量实例的绑定统计。 + InstanceStatistics []*InstanceStatistic `json:"InstanceStatistics,omitempty" name:"InstanceStatistics"` + + // 所有资源的总计数(不包含被安全组引用数)。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` +} + +type SecurityGroupLimitSet struct { + + // 每个项目每个地域可创建安全组数 + SecurityGroupLimit *uint64 `json:"SecurityGroupLimit,omitempty" name:"SecurityGroupLimit"` + + // 安全组下的最大规则数 + SecurityGroupPolicyLimit *uint64 `json:"SecurityGroupPolicyLimit,omitempty" name:"SecurityGroupPolicyLimit"` + + // 安全组下嵌套安全组规则数 + ReferedSecurityGroupLimit *uint64 `json:"ReferedSecurityGroupLimit,omitempty" name:"ReferedSecurityGroupLimit"` + + // 单安全组关联实例数 + SecurityGroupInstanceLimit *uint64 `json:"SecurityGroupInstanceLimit,omitempty" name:"SecurityGroupInstanceLimit"` + + // 实例关联安全组数 + InstanceSecurityGroupLimit *uint64 `json:"InstanceSecurityGroupLimit,omitempty" name:"InstanceSecurityGroupLimit"` +} + +type SecurityGroupPolicy struct { + + // 安全组规则索引号,值会随着安全组规则的变更动态变化。使用PolicyIndex时,请先调用`DescribeSecurityGroupPolicies`获取到规则的PolicyIndex,并且结合返回值中的Version一起使用处理规则。 + PolicyIndex *int64 `json:"PolicyIndex,omitempty" name:"PolicyIndex"` + + // 协议, 取值: TCP,UDP,ICMP,ICMPv6,ALL。 + Protocol *string `json:"Protocol,omitempty" name:"Protocol"` + + // 端口(all, 离散port, range)。 + Port *string `json:"Port,omitempty" name:"Port"` + + // 协议端口ID或者协议端口组ID。ServiceTemplate和Protocol+Port互斥。 + ServiceTemplate *ServiceTemplateSpecification `json:"ServiceTemplate,omitempty" name:"ServiceTemplate"` + + // 网段或IP(互斥)。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 网段或IPv6(互斥)。 + Ipv6CidrBlock *string `json:"Ipv6CidrBlock,omitempty" name:"Ipv6CidrBlock"` + + // 安全组实例ID,例如:sg-ohuuioma。 + SecurityGroupId *string `json:"SecurityGroupId,omitempty" name:"SecurityGroupId"` + + // IP地址ID或者ID地址组ID。 + AddressTemplate *AddressTemplateSpecification `json:"AddressTemplate,omitempty" name:"AddressTemplate"` + + // ACCEPT 或 DROP。 + Action *string `json:"Action,omitempty" name:"Action"` + + // 安全组规则描述。 + PolicyDescription *string `json:"PolicyDescription,omitempty" name:"PolicyDescription"` + + // 安全组最近修改时间。 + ModifyTime *string `json:"ModifyTime,omitempty" name:"ModifyTime"` +} + +type SecurityGroupPolicySet struct { + + // 安全组规则当前版本。用户每次更新安全规则版本会自动加1,防止更新的路由规则已过期,不填不考虑冲突。 + Version *string `json:"Version,omitempty" name:"Version"` + + // 出站规则。 + Egress []*SecurityGroupPolicy `json:"Egress,omitempty" name:"Egress"` + + // 入站规则。 + Ingress []*SecurityGroupPolicy `json:"Ingress,omitempty" name:"Ingress"` +} + +type SecurityPolicyDatabase struct { + + // 本端网段 + LocalCidrBlock *string `json:"LocalCidrBlock,omitempty" name:"LocalCidrBlock"` + + // 对端网段 + RemoteCidrBlock []*string `json:"RemoteCidrBlock,omitempty" name:"RemoteCidrBlock"` +} + +type ServiceTemplate struct { + + // 协议端口实例ID,例如:ppm-f5n1f8da。 + ServiceTemplateId *string `json:"ServiceTemplateId,omitempty" name:"ServiceTemplateId"` + + // 模板名称。 + ServiceTemplateName *string `json:"ServiceTemplateName,omitempty" name:"ServiceTemplateName"` + + // 协议端口信息。 + ServiceSet []*string `json:"ServiceSet,omitempty" name:"ServiceSet"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 带备注的协议端口信息。 + ServiceExtraSet []*ServicesInfo `json:"ServiceExtraSet,omitempty" name:"ServiceExtraSet"` +} + +type ServiceTemplateGroup struct { + + // 协议端口模板集合实例ID,例如:ppmg-2klmrefu。 + ServiceTemplateGroupId *string `json:"ServiceTemplateGroupId,omitempty" name:"ServiceTemplateGroupId"` + + // 协议端口模板集合名称。 + ServiceTemplateGroupName *string `json:"ServiceTemplateGroupName,omitempty" name:"ServiceTemplateGroupName"` + + // 协议端口模板实例ID。 + ServiceTemplateIdSet []*string `json:"ServiceTemplateIdSet,omitempty" name:"ServiceTemplateIdSet"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 协议端口模板实例信息。 + ServiceTemplateSet []*ServiceTemplate `json:"ServiceTemplateSet,omitempty" name:"ServiceTemplateSet"` +} + +type ServiceTemplateSpecification struct { + + // 协议端口ID,例如:ppm-f5n1f8da。 + ServiceId *string `json:"ServiceId,omitempty" name:"ServiceId"` + + // 协议端口组ID,例如:ppmg-f5n1f8da。 + ServiceGroupId *string `json:"ServiceGroupId,omitempty" name:"ServiceGroupId"` +} + +type ServicesInfo struct { + + // 协议端口。 + Service *string `json:"Service,omitempty" name:"Service"` + + // 备注。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Description *string `json:"Description,omitempty" name:"Description"` +} + +type SetCcnRegionBandwidthLimitsRequest struct { + *tchttp.BaseRequest + + // CCN实例ID。形如:ccn-f49l6u0z。 + CcnId *string `json:"CcnId,omitempty" name:"CcnId"` + + // 云联网(CCN)各地域出带宽上限。 + CcnRegionBandwidthLimits []*CcnRegionBandwidthLimit `json:"CcnRegionBandwidthLimits,omitempty" name:"CcnRegionBandwidthLimits"` + + // 是否恢复云联网地域出口/地域间带宽限速为默认值(1Gbps)。false表示不恢复;true表示恢复。恢复默认值后,限速实例将不在控制台展示。该参数默认为 false,不恢复。 + SetDefaultLimitFlag *bool `json:"SetDefaultLimitFlag,omitempty" name:"SetDefaultLimitFlag"` +} + +func (r *SetCcnRegionBandwidthLimitsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SetCcnRegionBandwidthLimitsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "CcnId") + delete(f, "CcnRegionBandwidthLimits") + delete(f, "SetDefaultLimitFlag") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SetCcnRegionBandwidthLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type SetCcnRegionBandwidthLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SetCcnRegionBandwidthLimitsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SetCcnRegionBandwidthLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SourceIpTranslationNatRule struct { + + // 资源ID + ResourceId *string `json:"ResourceId,omitempty" name:"ResourceId"` + + // 资源类型,目前包含SUBNET、NETWORKINTERFACE + // 注意:此字段可能返回 null,表示取不到有效值。 + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 源IP/网段 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` + + // 弹性IP地址池 + PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses"` + + // 描述 + Description *string `json:"Description,omitempty" name:"Description"` + + // Snat规则ID + NatGatewaySnatId *string `json:"NatGatewaySnatId,omitempty" name:"NatGatewaySnatId"` + + // NAT网关的ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + NatGatewayId *string `json:"NatGatewayId,omitempty" name:"NatGatewayId"` + + // 私有网络VPC的ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // NAT网关SNAT规则创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type Subnet struct { + + // `VPC`实例`ID`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网实例`ID`,例如:subnet-bthucmmy。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 子网名称。 + SubnetName *string `json:"SubnetName,omitempty" name:"SubnetName"` + + // 子网的 `IPv4` `CIDR`。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 是否默认子网。 + IsDefault *bool `json:"IsDefault,omitempty" name:"IsDefault"` + + // 是否开启广播。 + EnableBroadcast *bool `json:"EnableBroadcast,omitempty" name:"EnableBroadcast"` + + // 可用区。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 路由表实例ID,例如:rtb-l2h8d7c2。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 可用`IPv4`数。 + AvailableIpAddressCount *uint64 `json:"AvailableIpAddressCount,omitempty" name:"AvailableIpAddressCount"` + + // 子网的 `IPv6` `CIDR`。 + Ipv6CidrBlock *string `json:"Ipv6CidrBlock,omitempty" name:"Ipv6CidrBlock"` + + // 关联`ACL`ID + NetworkAclId *string `json:"NetworkAclId,omitempty" name:"NetworkAclId"` + + // 是否为 `SNAT` 地址池子网。 + IsRemoteVpcSnat *bool `json:"IsRemoteVpcSnat,omitempty" name:"IsRemoteVpcSnat"` + + // 子网`IPv4`总数。 + TotalIpAddressCount *uint64 `json:"TotalIpAddressCount,omitempty" name:"TotalIpAddressCount"` + + // 标签键值对。 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` + + // CDC实例ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` + + // 是否是CDC所属子网。0:否 1:是 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsCdcSubnet *int64 `json:"IsCdcSubnet,omitempty" name:"IsCdcSubnet"` +} + +type SubnetInput struct { + + // 子网的`CIDR`。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 子网名称。 + SubnetName *string `json:"SubnetName,omitempty" name:"SubnetName"` + + // 可用区。形如:`ap-guangzhou-2`。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 指定关联路由表,形如:`rtb-3ryrwzuu`。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` +} + +type Tag struct { + + // 标签键 + // 注意:此字段可能返回 null,表示取不到有效值。 + Key *string `json:"Key,omitempty" name:"Key"` + + // 标签值 + // 注意:此字段可能返回 null,表示取不到有效值。 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type TemplateLimit struct { + + // 参数模板IP地址成员配额。 + AddressTemplateMemberLimit *uint64 `json:"AddressTemplateMemberLimit,omitempty" name:"AddressTemplateMemberLimit"` + + // 参数模板IP地址组成员配额。 + AddressTemplateGroupMemberLimit *uint64 `json:"AddressTemplateGroupMemberLimit,omitempty" name:"AddressTemplateGroupMemberLimit"` + + // 参数模板I协议端口成员配额。 + ServiceTemplateMemberLimit *uint64 `json:"ServiceTemplateMemberLimit,omitempty" name:"ServiceTemplateMemberLimit"` + + // 参数模板协议端口组成员配额。 + ServiceTemplateGroupMemberLimit *uint64 `json:"ServiceTemplateGroupMemberLimit,omitempty" name:"ServiceTemplateGroupMemberLimit"` +} + +type TransformAddressRequest struct { + *tchttp.BaseRequest + + // 待操作有普通公网 IP 的实例 ID。实例 ID 形如:`ins-11112222`。可通过登录[控制台](https://console.cloud.tencent.com/cvm)查询,也可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/9389) 接口返回值中的`InstanceId`获取。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *TransformAddressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *TransformAddressRequest) 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", "TransformAddressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type TransformAddressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *TransformAddressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *TransformAddressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UnassignIpv6AddressesRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例`ID`,形如:`eni-m6dyj72l`。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 指定的`IPv6`地址列表,单次最多指定10个。 + Ipv6Addresses []*Ipv6Address `json:"Ipv6Addresses,omitempty" name:"Ipv6Addresses"` +} + +func (r *UnassignIpv6AddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UnassignIpv6AddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "Ipv6Addresses") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UnassignIpv6AddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UnassignIpv6AddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UnassignIpv6AddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UnassignIpv6AddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UnassignIpv6CidrBlockRequest struct { + *tchttp.BaseRequest + + // `VPC`实例`ID`,形如:`vpc-f49l6u0z`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // `IPv6`网段。形如:`3402:4e00:20:1000::/56` + Ipv6CidrBlock *string `json:"Ipv6CidrBlock,omitempty" name:"Ipv6CidrBlock"` +} + +func (r *UnassignIpv6CidrBlockRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UnassignIpv6CidrBlockRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "Ipv6CidrBlock") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UnassignIpv6CidrBlockRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UnassignIpv6CidrBlockResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UnassignIpv6CidrBlockResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UnassignIpv6CidrBlockResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UnassignIpv6SubnetCidrBlockRequest struct { + *tchttp.BaseRequest + + // 子网所在私有网络`ID`。形如:`vpc-f49l6u0z`。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // `IPv6` 子网段列表。 + Ipv6SubnetCidrBlocks []*Ipv6SubnetCidrBlock `json:"Ipv6SubnetCidrBlocks,omitempty" name:"Ipv6SubnetCidrBlocks"` +} + +func (r *UnassignIpv6SubnetCidrBlockRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UnassignIpv6SubnetCidrBlockRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "VpcId") + delete(f, "Ipv6SubnetCidrBlocks") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UnassignIpv6SubnetCidrBlockRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UnassignIpv6SubnetCidrBlockResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UnassignIpv6SubnetCidrBlockResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UnassignIpv6SubnetCidrBlockResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UnassignPrivateIpAddressesRequest struct { + *tchttp.BaseRequest + + // 弹性网卡实例ID,例如:eni-m6dyj72l。 + NetworkInterfaceId *string `json:"NetworkInterfaceId,omitempty" name:"NetworkInterfaceId"` + + // 指定的内网IP信息,单次最多指定10个。 + PrivateIpAddresses []*PrivateIpAddressSpecification `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` + + // 网卡绑定的子机实例ID,该参数仅用于指定网卡退还IP并解绑子机的场景,如果不涉及解绑子机,请勿填写。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *UnassignPrivateIpAddressesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UnassignPrivateIpAddressesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "NetworkInterfaceId") + delete(f, "PrivateIpAddresses") + delete(f, "InstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UnassignPrivateIpAddressesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UnassignPrivateIpAddressesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UnassignPrivateIpAddressesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UnassignPrivateIpAddressesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Vpc struct { + + // `VPC`名称。 + VpcName *string `json:"VpcName,omitempty" name:"VpcName"` + + // `VPC`实例`ID`,例如:vpc-azd4dt1c。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // `VPC`的`IPv4` `CIDR`。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 是否默认`VPC`。 + IsDefault *bool `json:"IsDefault,omitempty" name:"IsDefault"` + + // 是否开启组播。 + EnableMulticast *bool `json:"EnableMulticast,omitempty" name:"EnableMulticast"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // `DNS`列表。 + DnsServerSet []*string `json:"DnsServerSet,omitempty" name:"DnsServerSet"` + + // `DHCP`域名选项值。 + DomainName *string `json:"DomainName,omitempty" name:"DomainName"` + + // `DHCP`选项集`ID`。 + DhcpOptionsId *string `json:"DhcpOptionsId,omitempty" name:"DhcpOptionsId"` + + // 是否开启`DHCP`。 + EnableDhcp *bool `json:"EnableDhcp,omitempty" name:"EnableDhcp"` + + // `VPC`的`IPv6` `CIDR`。 + Ipv6CidrBlock *string `json:"Ipv6CidrBlock,omitempty" name:"Ipv6CidrBlock"` + + // 标签键值对 + TagSet []*Tag `json:"TagSet,omitempty" name:"TagSet"` + + // 辅助CIDR + // 注意:此字段可能返回 null,表示取不到有效值。 + AssistantCidrSet []*AssistantCidr `json:"AssistantCidrSet,omitempty" name:"AssistantCidrSet"` +} + +type VpcEndPointServiceUser struct { + + // AppId。 + Owner *uint64 `json:"Owner,omitempty" name:"Owner"` + + // Uin。 + UserUin *string `json:"UserUin,omitempty" name:"UserUin"` + + // 描述信息。 + Description *string `json:"Description,omitempty" name:"Description"` + + // 创建时间。 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 终端节点服务ID。 + EndPointServiceId *string `json:"EndPointServiceId,omitempty" name:"EndPointServiceId"` +} + +type VpcIpv6Address struct { + + // `VPC`内`IPv6`地址。 + Ipv6Address *string `json:"Ipv6Address,omitempty" name:"Ipv6Address"` + + // 所属子网 `IPv6` `CIDR`。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // `IPv6`类型。 + Ipv6AddressType *string `json:"Ipv6AddressType,omitempty" name:"Ipv6AddressType"` + + // `IPv6`申请时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type VpcLimit struct { + + // 私有网络配额描述 + LimitType *string `json:"LimitType,omitempty" name:"LimitType"` + + // 私有网络配额值 + LimitValue *uint64 `json:"LimitValue,omitempty" name:"LimitValue"` +} + +type VpcPrivateIpAddress struct { + + // `VPC`内网`IP`。 + PrivateIpAddress *string `json:"PrivateIpAddress,omitempty" name:"PrivateIpAddress"` + + // 所属子网`CIDR`。 + CidrBlock *string `json:"CidrBlock,omitempty" name:"CidrBlock"` + + // 内网`IP`类型。 + PrivateIpAddressType *string `json:"PrivateIpAddressType,omitempty" name:"PrivateIpAddressType"` + + // `IP`申请时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type VpnConnection struct { + + // 通道实例ID。 + VpnConnectionId *string `json:"VpnConnectionId,omitempty" name:"VpnConnectionId"` + + // 通道名称。 + VpnConnectionName *string `json:"VpnConnectionName,omitempty" name:"VpnConnectionName"` + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // VPN网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // 对端网关实例ID。 + CustomerGatewayId *string `json:"CustomerGatewayId,omitempty" name:"CustomerGatewayId"` + + // 预共享密钥。 + PreShareKey *string `json:"PreShareKey,omitempty" name:"PreShareKey"` + + // 通道传输协议。 + VpnProto *string `json:"VpnProto,omitempty" name:"VpnProto"` + + // 通道加密协议。 + EncryptProto *string `json:"EncryptProto,omitempty" name:"EncryptProto"` + + // 路由类型。 + RouteType *string `json:"RouteType,omitempty" name:"RouteType"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 通道的生产状态,PENDING:生产中,AVAILABLE:运行中,DELETING:删除中。 + State *string `json:"State,omitempty" name:"State"` + + // 通道连接状态,AVAILABLE:已连接。 + NetStatus *string `json:"NetStatus,omitempty" name:"NetStatus"` + + // SPD。 + SecurityPolicyDatabaseSet []*SecurityPolicyDatabase `json:"SecurityPolicyDatabaseSet,omitempty" name:"SecurityPolicyDatabaseSet"` + + // IKE选项。 + IKEOptionsSpecification *IKEOptionsSpecification `json:"IKEOptionsSpecification,omitempty" name:"IKEOptionsSpecification"` + + // IPSEC选择。 + IPSECOptionsSpecification *IPSECOptionsSpecification `json:"IPSECOptionsSpecification,omitempty" name:"IPSECOptionsSpecification"` + + // 是否支持健康状态探测 + EnableHealthCheck *bool `json:"EnableHealthCheck,omitempty" name:"EnableHealthCheck"` + + // 本端探测ip + HealthCheckLocalIp *string `json:"HealthCheckLocalIp,omitempty" name:"HealthCheckLocalIp"` + + // 对端探测ip + HealthCheckRemoteIp *string `json:"HealthCheckRemoteIp,omitempty" name:"HealthCheckRemoteIp"` + + // 通道健康检查状态,AVAILABLE:正常,UNAVAILABLE:不正常。 未配置健康检查不返回该对象 + HealthCheckStatus *string `json:"HealthCheckStatus,omitempty" name:"HealthCheckStatus"` +} + +type VpnGateway struct { + + // 网关实例ID。 + VpnGatewayId *string `json:"VpnGatewayId,omitempty" name:"VpnGatewayId"` + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 网关实例名称。 + VpnGatewayName *string `json:"VpnGatewayName,omitempty" name:"VpnGatewayName"` + + // 网关实例类型:'IPSEC', 'SSL','CCN'。 + Type *string `json:"Type,omitempty" name:"Type"` + + // 网关实例状态, 'PENDING':生产中,'DELETING':删除中,'AVAILABLE':运行中。 + State *string `json:"State,omitempty" name:"State"` + + // 网关公网IP。 + PublicIpAddress *string `json:"PublicIpAddress,omitempty" name:"PublicIpAddress"` + + // 网关续费类型:'NOTIFY_AND_MANUAL_RENEW':手动续费,'NOTIFY_AND_AUTO_RENEW':自动续费,'NOT_NOTIFY_AND_NOT_RENEW':到期不续费。 + RenewFlag *string `json:"RenewFlag,omitempty" name:"RenewFlag"` + + // 网关付费类型:POSTPAID_BY_HOUR:按小时后付费,PREPAID:包年包月预付费, + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 网关出带宽。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` + + // 创建时间。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 预付费网关过期时间。 + ExpiredTime *string `json:"ExpiredTime,omitempty" name:"ExpiredTime"` + + // 公网IP是否被封堵。 + IsAddressBlocked *bool `json:"IsAddressBlocked,omitempty" name:"IsAddressBlocked"` + + // 计费模式变更,PREPAID_TO_POSTPAID:包年包月预付费到期转按小时后付费。 + NewPurchasePlan *string `json:"NewPurchasePlan,omitempty" name:"NewPurchasePlan"` + + // 网关计费装,PROTECTIVELY_ISOLATED:被安全隔离的实例,NORMAL:正常。 + RestrictState *string `json:"RestrictState,omitempty" name:"RestrictState"` + + // 可用区,如:ap-guangzhou-2 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 网关带宽配额信息 + VpnGatewayQuotaSet []*VpnGatewayQuota `json:"VpnGatewayQuotaSet,omitempty" name:"VpnGatewayQuotaSet"` + + // 网关实例版本信息 + Version *string `json:"Version,omitempty" name:"Version"` + + // Type值为CCN时,该值表示云联网实例ID + NetworkInstanceId *string `json:"NetworkInstanceId,omitempty" name:"NetworkInstanceId"` + + // CDC 实例ID + CdcId *string `json:"CdcId,omitempty" name:"CdcId"` + + // SSL-VPN 客户端连接数。 + MaxConnection *uint64 `json:"MaxConnection,omitempty" name:"MaxConnection"` +} + +type VpnGatewayQuota struct { + + // 带宽配额 + Bandwidth *uint64 `json:"Bandwidth,omitempty" name:"Bandwidth"` + + // 配额中文名称 + Cname *string `json:"Cname,omitempty" name:"Cname"` + + // 配额英文名称 + Name *string `json:"Name,omitempty" name:"Name"` +} + +type VpnGatewayRoute struct { + + // 目的端IDC网段 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 下一跳类型(关联实例类型)可选值:"VPNCONN"(VPN通道), "CCN"(CCN实例) + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 下一跳实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 优先级, 可选值: 0, 100 + Priority *int64 `json:"Priority,omitempty" name:"Priority"` + + // 启用状态, 可选值: "ENABLE"(启用), "DISABLE"(禁用) + Status *string `json:"Status,omitempty" name:"Status"` + + // 路由条目ID + RouteId *string `json:"RouteId,omitempty" name:"RouteId"` + + // 路由类型, 可选值: "VPC"(VPC路由), "CCN"(云联网传播路由), "Static"(静态路由), "BGP"(BGP路由) + Type *string `json:"Type,omitempty" name:"Type"` + + // 创建时间 + CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` + + // 更新时间 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` +} + +type VpnGatewayRouteModify struct { + + // Vpn网关路由ID + RouteId *string `json:"RouteId,omitempty" name:"RouteId"` + + // Vpn网关状态, ENABEL 启用, DISABLE禁用 + Status *string `json:"Status,omitempty" name:"Status"` +} + +type VpngwCcnRoutes struct { + + // 路由信息ID + RouteId *string `json:"RouteId,omitempty" name:"RouteId"` + + // 路由信息是否启用 + // ENABLE:启用该路由 + // DISABLE:不启用该路由 + Status *string `json:"Status,omitempty" name:"Status"` +} + +type WithdrawNotifyRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表唯一ID。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` + + // 路由策略唯一ID。 + RouteItemIds []*string `json:"RouteItemIds,omitempty" name:"RouteItemIds"` +} + +func (r *WithdrawNotifyRoutesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *WithdrawNotifyRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableId") + delete(f, "RouteItemIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "WithdrawNotifyRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type WithdrawNotifyRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *WithdrawNotifyRoutesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *WithdrawNotifyRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_auto_scaling_group.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_auto_scaling_group.go new file mode 100644 index 0000000000000000000000000000000000000000..595a50c03cbed7fd46b6063b013f0de7e1bfa825 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_auto_scaling_group.go @@ -0,0 +1,258 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 tencentcloud + +import ( + "fmt" + "regexp" + "strings" + + apiv1 "k8s.io/api/core/v1" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" + "k8s.io/autoscaler/cluster-autoscaler/config" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework" +) + +// TcRef contains a reference to some entity in Tencentcloud/TKE world. +type TcRef struct { + ID string + Zone string +} + +func (ref TcRef) String() string { + if ref.Zone == "" { + return ref.ID + } + return fmt.Sprintf("%s/%s", ref.Zone, ref.ID) +} + +// ToProviderID converts tcRef to string in format used as ProviderId in Node object. +func (ref TcRef) ToProviderID() string { + return fmt.Sprintf("qcloud:///%s/%s", ref.Zone, ref.ID) +} + +// TcRefFromProviderID creates InstanceConfig object from provider id which +// must be in format: tencentcloud:///100003/ins-3ven36lk +func TcRefFromProviderID(id string) (TcRef, error) { + validIDRegex := regexp.MustCompile(`^qcloud\:\/\/\/[-0-9a-z]*\/[-0-9a-z]*$`) + if validIDRegex.FindStringSubmatch(id) == nil { + return TcRef{}, fmt.Errorf("valid provider id: expected format qcloud:///zoneid/ins-<name>, got %v", id) + } + splitted := strings.Split(id[10:], "/") + return TcRef{ + ID: splitted[1], + }, nil +} + +// Asg implements NodeGroup interface. +type Asg interface { + cloudprovider.NodeGroup + + TencentcloudRef() TcRef + GetScalingType() string + SetScalingType(string) +} + +type tcAsg struct { + tencentcloudRef TcRef + + tencentcloudManager TencentcloudManager + minSize int + maxSize int + scalingType string +} + +// TencentcloudRef returns ASG's TencentcloudRef +func (asg *tcAsg) TencentcloudRef() TcRef { + return asg.tencentcloudRef +} + +// GetScalingType returns ASG's scaling type. +func (asg *tcAsg) GetScalingType() string { + return asg.scalingType +} + +// SetScalingType set ASG's scaling type. +func (asg *tcAsg) SetScalingType(scalingType string) { + asg.scalingType = scalingType +} + +// MaxSize returns maximum size of the node group. +func (asg *tcAsg) MaxSize() int { + return asg.maxSize +} + +// MinSize returns minimum size of the node group. +func (asg *tcAsg) MinSize() int { + return asg.minSize +} + +// TargetSize returns the current TARGET size of the node group. It is possible that the +// number is different from the number of nodes registered in Kuberentes. +func (asg *tcAsg) TargetSize() (int, error) { + size, err := asg.tencentcloudManager.GetAsgSize(asg) + return int(size), err +} + +// IncreaseSize increases Asg size +func (asg *tcAsg) IncreaseSize(delta int) error { + if delta <= 0 { + return fmt.Errorf("size increase must be positive") + } + size, err := asg.tencentcloudManager.GetAsgSize(asg) + if err != nil { + return err + } + if int(size)+delta > asg.MaxSize() { + return fmt.Errorf("size increase too large - desired:%d max:%d", int(size)+delta, asg.MaxSize()) + } + return asg.tencentcloudManager.SetAsgSize(asg, size+int64(delta)) +} + +// DecreaseTargetSize decreases the target size of the node group. This function +// doesn't permit to delete any existing node and can be used only to reduce the +// request for new nodes that have not been yet fulfilled. Delta should be negative. +// It is assumed that cloud provider will not delete the existing nodes if the size +// when there is an option to just decrease the target. +func (asg *tcAsg) DecreaseTargetSize(delta int) error { + if delta >= 0 { + return fmt.Errorf("size decrease size must be negative") + } + size, err := asg.tencentcloudManager.GetAsgSize(asg) + if err != nil { + return err + } + if int(size)+delta < asg.MinSize() { + return fmt.Errorf("size increase too small - desired:%d min:%d", int(size)+delta, asg.MaxSize()) + } + nodes, err := asg.tencentcloudManager.GetAsgNodes(asg) + if err != nil { + return err + } + if int(size)+delta < len(nodes) { + return fmt.Errorf("attempt to delete existing nodes targetSize:%d delta:%d existingNodes: %d", + size, delta, len(nodes)) + } + return asg.tencentcloudManager.SetAsgSize(asg, size+int64(delta)) +} + +// Belongs returns true if the given node belongs to the NodeGroup. +func (asg *tcAsg) Belongs(node *apiv1.Node) (bool, error) { + if node.Spec.ProviderID == "" { + return false, nil + } + ref, err := TcRefFromProviderID(node.Spec.ProviderID) + if err != nil { + return false, err + } + targetAsg, err := asg.tencentcloudManager.GetAsgForInstance(ref) + if err != nil { + return false, err + } + if targetAsg == nil { + return false, fmt.Errorf("%s doesn't belong to a known asg", node.Name) + } + if targetAsg.Id() != asg.Id() { + return false, nil + } + return true, nil +} + +// Exist checks if the node group really exists on the cloud provider side. Allows to tell the +// theoretical node group from the real one. +func (asg *tcAsg) Exist() bool { + return true +} + +// Create creates the node group on the cloud provider side. +func (asg *tcAsg) Create() (cloudprovider.NodeGroup, error) { + return nil, cloudprovider.ErrAlreadyExist +} + +// Delete deletes the node group on the cloud provider side. +// This will be executed only for autoprovisioned node groups, once their size drops to 0. +func (asg *tcAsg) Delete() error { + return cloudprovider.ErrNotImplemented +} + +// Autoprovisioned returns true if the node group is autoprovisioned. +func (asg *tcAsg) Autoprovisioned() bool { + return false +} + +// DeleteNodes deletes the nodes from the group. +func (asg *tcAsg) DeleteNodes(nodes []*apiv1.Node) error { + size, err := asg.tencentcloudManager.GetAsgSize(asg) + if err != nil { + return err + } + + if int(size) <= asg.MinSize() { + return fmt.Errorf("min size reached, nodes will not be deleted") + } + + refs := make([]TcRef, 0, len(nodes)) + for _, node := range nodes { + belongs, err := asg.Belongs(node) + if err != nil { + return err + } + if !belongs { + return fmt.Errorf("%s,%s belongs to a different asg than %s", node.Name, node.Spec.ProviderID, asg.Id()) + } + tencentcloudref, err := TcRefFromProviderID(node.Spec.ProviderID) + if err != nil { + return err + } + refs = append(refs, tencentcloudref) + } + + return asg.tencentcloudManager.DeleteInstances(refs) +} + +// Id returns asg id. +func (asg *tcAsg) Id() string { + return asg.tencentcloudRef.ID +} + +// Debug returns a debug string for the Asg. +func (asg *tcAsg) Debug() string { + return fmt.Sprintf("%s (%d:%d)", asg.Id(), asg.MinSize(), asg.MaxSize()) +} + +// Nodes returns a list of all nodes that belong to this node group. +func (asg *tcAsg) Nodes() ([]cloudprovider.Instance, error) { + return asg.tencentcloudManager.GetAsgNodes(asg) +} + +// TemplateNodeInfo returns a node template for this node group. +func (asg *tcAsg) TemplateNodeInfo() (*schedulerframework.NodeInfo, error) { + node, err := asg.tencentcloudManager.GetAsgTemplateNode(asg) + if err != nil { + return nil, err + } + + nodeInfo := schedulerframework.NewNodeInfo() + nodeInfo.SetNode(node) + return nodeInfo, nil +} + +// GetOptions returns NodeGroupAutoscalingOptions that should be used for this particular +// NodeGroup. Returning a nil will result in using default options. +func (asg *tcAsg) GetOptions(defaults config.NodeGroupAutoscalingOptions) (*config.NodeGroupAutoscalingOptions, error) { + return nil, nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_cache.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_cache.go new file mode 100644 index 0000000000000000000000000000000000000000..02fe4694a8bbe039d905b7c5c82dad640ee20a59 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_cache.go @@ -0,0 +1,369 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 tencentcloud + +import ( + "fmt" + "reflect" + "sync" + + "k8s.io/klog/v2" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" + as "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419" +) + +// TencentcloudCache is used for caching cluster resources state. +// +// It is needed to: +// - keep track of autoscaled ASGs in the cluster, +// - keep track of instances and which ASG they belong to, +// - limit repetitive Tencentcloud API calls. +// +// Cached resources: +// 1) ASG configuration, +// 2) instance->ASG mapping, +// 3) resource limits (self-imposed quotas), +// 4) instance types. +// +// How it works: +// - asgs (1), resource limits (3) and machine types (4) are only stored in this cache, +// not updated by it. +// - instanceRefToAsgRef (2) is based on registered asgs (1). For each asg, its instances +// are fetched from Tencentcloud API using cloudService. +// - instanceRefToAsgRef (2) is NOT updated automatically when asgs field (1) is updated. Calling +// RegenerateInstancesCache is required to sync it with registered asgs. +type TencentcloudCache struct { + cacheMutex sync.RWMutex + + // Cache content. + asgs map[TcRef]Asg + instanceRefToAsgRef map[TcRef]TcRef + instancesFromUnknownAsgs map[TcRef]struct{} + asgTargetSizeCache map[TcRef]int64 + instanceTypeCache map[TcRef]string + instanceTemplatesCache map[TcRef]*InstanceTemplate + resourceLimiter *cloudprovider.ResourceLimiter + + // Service used to refresh cache. + cloudService CloudService +} + +// NewTencentcloudCache create a empty TencentcloudCache +func NewTencentcloudCache(service CloudService) *TencentcloudCache { + registry := &TencentcloudCache{ + cloudService: service, + asgs: make(map[TcRef]Asg), + instanceRefToAsgRef: make(map[TcRef]TcRef), + instancesFromUnknownAsgs: make(map[TcRef]struct{}), + asgTargetSizeCache: make(map[TcRef]int64), + instanceTypeCache: make(map[TcRef]string), + instanceTemplatesCache: make(map[TcRef]*InstanceTemplate), + } + + return registry +} + +// RegisterAsg registers asg in Tencentcloud Manager. +func (tc *TencentcloudCache) RegisterAsg(newAsg Asg) bool { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + oldAsg, found := tc.asgs[newAsg.TencentcloudRef()] + if found { + if !reflect.DeepEqual(oldAsg, newAsg) { + tc.asgs[newAsg.TencentcloudRef()] = newAsg + klog.V(4).Infof("Updated Asg %s", newAsg.TencentcloudRef().ID) + return true + } + return false + } + + klog.V(1).Infof("Registering %s", newAsg.TencentcloudRef().ID) + tc.asgs[newAsg.TencentcloudRef()] = newAsg + return true +} + +// UnregisterAsg returns true if the node group has been removed, and false if it was already missing from cache. +func (tc *TencentcloudCache) UnregisterAsg(toBeRemoved Asg) bool { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + _, found := tc.asgs[toBeRemoved.TencentcloudRef()] + if found { + klog.V(1).Infof("Unregistered Asg %s", toBeRemoved.TencentcloudRef().String()) + delete(tc.asgs, toBeRemoved.TencentcloudRef()) + tc.removeInstancesForAsgs(toBeRemoved.TencentcloudRef()) + return true + } + return false +} + +// FindForInstance returns Asg of the given Instance +func (tc *TencentcloudCache) FindForInstance(instanceRef TcRef) (Asg, error) { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + if asgRef, found := tc.instanceRefToAsgRef[instanceRef]; found { + asg, found := tc.getAsgNoLock(asgRef) + if !found { + return nil, nil + } + return asg, nil + } else if _, found := tc.instancesFromUnknownAsgs[instanceRef]; found { + return nil, nil + } + + asgRef, err := tc.cloudService.GetAsgRefByInstanceRef(instanceRef) + if err != nil { + return nil, err + } + + tc.instanceRefToAsgRef[instanceRef] = asgRef + asg, found := tc.getAsgNoLock(asgRef) + if !found { + return nil, nil + } + return asg, nil +} + +// GetAsgInstanceTemplate returns the cached InstanceTemplate for a Asg TcRef +func (tc *TencentcloudCache) GetAsgInstanceTemplate(ref TcRef) (*InstanceTemplate, bool) { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + instanceTemplate, found := tc.instanceTemplatesCache[ref] + if found { + klog.V(5).Infof("Instance template cache hit for %s", ref) + } + return instanceTemplate, found +} + +// SetAsgInstanceTemplate sets InstanceTemplate for a Asg TcRef +func (tc *TencentcloudCache) SetAsgInstanceTemplate(ref TcRef, instanceTemplate *InstanceTemplate) { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + tc.instanceTemplatesCache[ref] = instanceTemplate +} + +// GetAsgs returns a copy of asgs list. +func (tc *TencentcloudCache) GetAsgs() []Asg { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + asgs := make([]Asg, 0, len(tc.asgs)) + for _, asg := range tc.asgs { + asgs = append(asgs, asg) + } + return asgs +} + +// GetAsgs returns a copy of asgs list. +func (tc *TencentcloudCache) getAsgRefs() []TcRef { + asgRefs := make([]TcRef, 0, len(tc.asgs)) + for asgRef := range tc.asgs { + asgRefs = append(asgRefs, asgRef) + } + return asgRefs +} + +// GetInstanceType returns asg instanceType +func (tc *TencentcloudCache) GetInstanceType(ref TcRef) string { + tc.cacheMutex.RLock() + defer tc.cacheMutex.RUnlock() + + return tc.instanceTypeCache[ref] +} + +// GetAsgTargetSize returns the cached targetSize for a TencentcloudRef +func (tc *TencentcloudCache) GetAsgTargetSize(ref TcRef) (int64, bool) { + tc.cacheMutex.RLock() + defer tc.cacheMutex.RUnlock() + + size, found := tc.asgTargetSizeCache[ref] + if found { + klog.V(5).Infof("Target size cache hit for %s", ref) + } + return size, found +} + +// SetAsgTargetSize sets targetSize for a TencentcloudRef +func (tc *TencentcloudCache) SetAsgTargetSize(ref TcRef, size int64) { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + tc.asgTargetSizeCache[ref] = size +} + +// InvalidateAsgTargetSize clears the target size cache +func (tc *TencentcloudCache) InvalidateAsgTargetSize(ref TcRef) { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + if _, found := tc.asgTargetSizeCache[ref]; found { + klog.V(5).Infof("Target size cache invalidated for %s", ref) + delete(tc.asgTargetSizeCache, ref) + } +} + +// InvalidateAllAsgTargetSizes clears the target size cache +func (tc *TencentcloudCache) InvalidateAllAsgTargetSizes() { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + klog.V(5).Infof("Target size cache invalidated") + tc.asgTargetSizeCache = map[TcRef]int64{} +} + +func (tc *TencentcloudCache) removeInstancesForAsgs(asgRef TcRef) { + for instanceRef, instanceAsgRef := range tc.instanceRefToAsgRef { + if asgRef == instanceAsgRef { + delete(tc.instanceRefToAsgRef, instanceRef) + } + } +} + +func (tc *TencentcloudCache) getAsgNoLock(asgRef TcRef) (asg Asg, found bool) { + asg, found = tc.asgs[asgRef] + return +} + +// RegenerateInstanceCacheForAsg triggers instances cache regeneration for single ASG under lock. +func (tc *TencentcloudCache) RegenerateInstanceCacheForAsg(asgRef TcRef) error { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + return tc.regenerateInstanceCacheForAsgNoLock(asgRef) +} + +func (tc *TencentcloudCache) regenerateInstanceCacheForAsgNoLock(asgRef TcRef) error { + klog.V(4).Infof("Regenerating ASG information for %s", asgRef.String()) + + // cleanup old entries + tc.removeInstancesForAsgs(asgRef) + + instances, err := tc.cloudService.FetchAsgInstances(asgRef) + if err != nil { + klog.V(4).Infof("Failed ASG info request for %s: %v", asgRef.String(), err) + return err + } + for _, instance := range instances { + instanceRef, err := TcRefFromProviderID(instance.Id) + if err != nil { + return err + } + tc.instanceRefToAsgRef[instanceRef] = asgRef + } + return nil +} + +// RegenerateInstancesCache triggers instances cache regeneration under lock. +func (tc *TencentcloudCache) RegenerateInstancesCache() error { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + tc.instanceRefToAsgRef = make(map[TcRef]TcRef) + tc.instancesFromUnknownAsgs = make(map[TcRef]struct{}) + for _, asgRef := range tc.getAsgRefs() { + err := tc.regenerateInstanceCacheForAsgNoLock(asgRef) + if err != nil { + return err + } + } + return nil +} + +// SetResourceLimiter sets resource limiter. +func (tc *TencentcloudCache) SetResourceLimiter(resourceLimiter *cloudprovider.ResourceLimiter) { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + tc.resourceLimiter = resourceLimiter +} + +// GetResourceLimiter returns resource limiter. +func (tc *TencentcloudCache) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error) { + tc.cacheMutex.RLock() + defer tc.cacheMutex.RUnlock() + + return tc.resourceLimiter, nil +} + +// RegenerateAutoScalingGroupCache add some tencentcloud asg property +func (tc *TencentcloudCache) RegenerateAutoScalingGroupCache() error { + tc.cacheMutex.Lock() + defer tc.cacheMutex.Unlock() + + asgIDs := make([]string, 0) + + for ref := range tc.asgs { + asgIDs = append(asgIDs, ref.ID) + } + + tcAsgs, err := tc.cloudService.GetAutoScalingGroups(asgIDs) + if err != nil { + return err + } + + klog.V(5).Infof("input %d asgIDs(%v), return %d asg", len(asgIDs), asgIDs, len(tcAsgs)) + + asgMap := make(map[string]as.AutoScalingGroup) + ascMap := make(map[string]as.LaunchConfiguration) + asc2Asg := make(map[string]string) + ascs := make([]string, 0) + for _, tcAsg := range tcAsgs { + if tcAsg.AutoScalingGroupId == nil || tcAsg.ServiceSettings == nil || + tcAsg.ServiceSettings.ScalingMode == nil || tcAsg.LaunchConfigurationId == nil { + return fmt.Errorf("invalid autoscaling group") + } + asgMap[*tcAsg.AutoScalingGroupId] = tcAsg + ascs = append(ascs, *tcAsg.LaunchConfigurationId) + asc2Asg[*tcAsg.LaunchConfigurationId] = *tcAsg.AutoScalingGroupId + } + + tcAscs, err := tc.cloudService.GetAutoscalingConfigs(ascs) + if err != nil { + return err + } + + for _, tcAsc := range tcAscs { + if tcAsc.InstanceType == nil { + return fmt.Errorf("invalid launch configuration") + } + ascMap[asc2Asg[*tcAsc.LaunchConfigurationId]] = tcAsc + } + + // set asg + for _, ref := range tc.getAsgRefs() { + asg := tc.asgs[ref] + tcAsg, exist := asgMap[ref.ID] + if !exist { + klog.Warningf("Cannot get asg(%s) from AS interface", ref.String()) + continue + } + asg.SetScalingType(*tcAsg.ServiceSettings.ScalingMode) + tc.asgs[ref] = asg + if asgMap[ref.ID].DesiredCapacity == nil { + klog.Warningf("%s has a invalid desired capacity value", ref.String()) + continue + } + tc.asgTargetSizeCache[ref] = *asgMap[ref.ID].DesiredCapacity + tc.instanceTypeCache[ref] = *ascMap[ref.ID].InstanceType + } + + return nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_cloud_provider.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_cloud_provider.go new file mode 100644 index 0000000000000000000000000000000000000000..52768376dc4c2462ea6c6845e449abbea3e6f22f --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_cloud_provider.go @@ -0,0 +1,186 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 tencentcloud + +import ( + "fmt" + "io" + "os" + + apiv1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" + "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/autoscaler/cluster-autoscaler/utils/errors" + "k8s.io/klog/v2" +) + +const ( + // ProviderName is the cloud provider name for Tencentcloud + ProviderName = "tencentcloud" + + // GPULabel is the label added to nodes with GPU resource. + GPULabel = "cloud.tencent.com/tke-accelerator" +) + +var ( + availableGPUTypes = map[string]struct{}{ + "nvidia-tesla-k80": {}, + "nvidia-tesla-p100": {}, + "nvidia-tesla-v100": {}, + "nvidia-tesla-p4": {}, + "nvidia-tesla-t4": {}, + } +) + +// tencentCloudProvider implements CloudProvider interface. +type tencentCloudProvider struct { + tencentcloudManager TencentcloudManager + resourceLimiter *cloudprovider.ResourceLimiter +} + +// BuildTencentCloudProvider builds CloudProvider implementation for Tencentcloud. +func BuildTencentCloudProvider(tencentcloudManager TencentcloudManager, discoveryOpts cloudprovider.NodeGroupDiscoveryOptions, resourceLimiter *cloudprovider.ResourceLimiter) (cloudprovider.CloudProvider, error) { + if discoveryOpts.StaticDiscoverySpecified() { + return buildStaticallyDiscoveringProvider(tencentcloudManager, discoveryOpts.NodeGroupSpecs, resourceLimiter) + } + + return nil, fmt.Errorf("failed to build an tencentcloud cloud provider (no node group specs and no node group auto discovery)") +} + +func buildStaticallyDiscoveringProvider(tencentcloudManager TencentcloudManager, specs []string, resourceLimiter *cloudprovider.ResourceLimiter) (*tencentCloudProvider, error) { + return &tencentCloudProvider{ + tencentcloudManager: tencentcloudManager, + resourceLimiter: resourceLimiter, + }, nil +} + +// Cleanup ... +func (tencentcloud *tencentCloudProvider) Cleanup() error { + tencentcloud.tencentcloudManager.Cleanup() + return nil +} + +// Name returns name of the cloud provider. +func (tencentcloud *tencentCloudProvider) Name() string { + return ProviderName +} + +// NodeGroups returns all node groups configured for this cloud provider. +func (tencentcloud *tencentCloudProvider) NodeGroups() []cloudprovider.NodeGroup { + asgs := tencentcloud.tencentcloudManager.GetAsgs() + result := make([]cloudprovider.NodeGroup, 0, len(asgs)) + for _, asg := range asgs { + result = append(result, asg) + } + return result +} + +// NodeGroupForNode returns the node group for the given node. +func (tencentcloud *tencentCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.NodeGroup, error) { + if node.Spec.ProviderID == "" { + return nil, nil + } + ref, err := TcRefFromProviderID(node.Spec.ProviderID) + if err != nil { + return nil, err + } + + asg, err := tencentcloud.tencentcloudManager.GetAsgForInstance(ref) + klog.V(6).Infof("node: %v, asg: %v", ref, asg) + if err != nil { + return nil, err + } + + return asg, nil +} + +// GPULabel returns the label added to nodes with GPU resource. +func (tencentcloud *tencentCloudProvider) GPULabel() string { + return GPULabel +} + +// GetAvailableGPUTypes returns all available GPU types cloud provider supports. +func (tencentcloud *tencentCloudProvider) GetAvailableGPUTypes() map[string]struct{} { + return availableGPUTypes +} + +// Pricing returns pricing model for this cloud provider or error if not available. +func (tencentcloud *tencentCloudProvider) Pricing() (cloudprovider.PricingModel, errors.AutoscalerError) { + return nil, cloudprovider.ErrNotImplemented +} + +// GetAvailableMachineTypes get all machine types that can be requested from the cloud provider. +func (tencentcloud *tencentCloudProvider) GetAvailableMachineTypes() ([]string, error) { + return []string{}, nil +} + +// NewNodeGroup builds a theoretical node group based on the node definition provided. The node group is not automatically +// created on the cloud provider side. The node group is not returned by NodeGroups() until it is created. +func (tencentcloud *tencentCloudProvider) NewNodeGroup(machineType string, labels map[string]string, systemLabels map[string]string, + taints []apiv1.Taint, extraResources map[string]resource.Quantity) (cloudprovider.NodeGroup, error) { + return nil, cloudprovider.ErrNotImplemented +} + +// GetResourceLimiter returns struct containing limits (max, min) for resources (cores, memory etc.). +func (tencentcloud *tencentCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error) { + resourceLimiter, err := tencentcloud.tencentcloudManager.GetResourceLimiter() + if err != nil { + return nil, err + } + if resourceLimiter != nil { + return resourceLimiter, nil + } + return tencentcloud.resourceLimiter, nil +} + +// Refresh is called before every main loop and can be used to dynamically update cloud provider state. +// In particular the list of node groups returned by NodeGroups can change as a result of CloudProvider.Refresh(). +func (tencentcloud *tencentCloudProvider) Refresh() error { + + klog.V(4).Infof("Refresh loop") + + if tencentcloud.tencentcloudManager.GetAsgs() == nil { + return fmt.Errorf("Refresh tencentcloud tencentcloudManager asg is nil") + } + + return tencentcloud.tencentcloudManager.Refresh() +} + +// BuildTencentcloud returns tencentcloud provider +func BuildTencentcloud(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { + var config io.ReadCloser + if opts.CloudConfig != "" { + var err error + config, err = os.Open(opts.CloudConfig) + if err != nil { + klog.Fatalf("Couldn't open cloud provider configuration %s: %#v", opts.CloudConfig, err) + } + defer config.Close() + } + + manager, err := CreateTencentcloudManager(config, do, opts.Regional) + if err != nil { + klog.Fatalf("Failed to create Tencentcloud Manager: %v", err) + } + + cloudProvider, err := BuildTencentCloudProvider(manager, do, rl) + if err != nil { + klog.Fatalf("Failed to create Tencentcloud cloud provider: %v", err) + } + return cloudProvider +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_manager.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_manager.go new file mode 100644 index 0000000000000000000000000000000000000000..533c25336b253450787d9047578fbc59165b2405 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_manager.go @@ -0,0 +1,631 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 tencentcloud + +import ( + "encoding/json" + "fmt" + "io" + "math/rand" + "os" + "sync" + "time" + + apiv1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/klog/v2" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" + as "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + cvm "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" + tke "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525" + vpc "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312" + "k8s.io/autoscaler/cluster-autoscaler/config/dynamic" + "k8s.io/autoscaler/cluster-autoscaler/utils/gpu" +) + +const ( + retryCountStop = 5 + intervalTimeStop = 5 * time.Second + tokenExpiredTime = 7200 + + serviceName = "cluster-autoscaler" + refreshInterval = 1 * time.Minute + scaleToZeroSupported = true +) + +// network extended resources +const ( + TKERouteENIIP = "tke.cloud.tencent.com/eni-ip" + TKEDirectENI = "tke.cloud.tencent.com/direct-eni" +) + +// vcuda resources +const ( + VCudaCore = "tencent.com/vcuda-core" + VCudaMemory = "tencent.com/vcuda-memory" +) + +// GPUMemoryMap is a coefficient to get gpu extended resources +var ( + GPUMemoryMap = map[string]int64{ + "GN10X": 32, + "GN10S": 16, + "GN10": 16, + "GN8": 24, + "GN7": 16, + "GN6": 8, + "GN6S": 8, + "GN2": 24, + "GN7vw": 16, + "GC1": 11, + } +) + +// TencentcloudManager is handles tencentcloud communication and data caching. +type TencentcloudManager interface { + // Refresh triggers refresh of cached resources. + Refresh() error + // Cleanup cleans up open resources before the cloud provider is destroyed, i.e. go routines etc. + Cleanup() error + + RegisterAsg(asg Asg) + // GetAsgs returns list of registered Asgs. + GetAsgs() []Asg + // GetAsgNodes returns Asg nodes. + GetAsgNodes(Asg Asg) ([]cloudprovider.Instance, error) + // GetAsgForInstance returns Asg to which the given instance belongs. + GetAsgForInstance(instance TcRef) (Asg, error) + // GetAsgTemplateNode returns a template node for Asg. + GetAsgTemplateNode(Asg Asg) (*apiv1.Node, error) + // GetResourceLimiter returns resource limiter. + GetResourceLimiter() (*cloudprovider.ResourceLimiter, error) + // GetAsgSize gets Asg size. + GetAsgSize(Asg Asg) (int64, error) + + // SetAsgSize sets Asg size. + SetAsgSize(Asg Asg, size int64) error + // DeleteInstances deletes the given instances. All instances must be controlled by the same Asg. + DeleteInstances(instances []TcRef) error +} + +type tencentcloudManagerImpl struct { + mutex sync.Mutex + lastRefresh time.Time + cloudService CloudService + cache *TencentcloudCache + regional bool + explicitlyConfigured map[TcRef]bool + interrupt chan struct{} +} + +// CloudConfig represent tencentcloud configuration +type CloudConfig struct { + Region string `json:"region"` + RegionName string `json:"regionName"` + Zone string `json:"zone"` + DryRun bool `json:dryRun` + SecretID string + SecretKey string + ClusterID string + IsTest bool +} + +// LabelAutoScalingGroupID represents the label of AutoScalingGroup +const LabelAutoScalingGroupID = "cloud.tencent.com/auto-scaling-group-id" + +var cloudConfig CloudConfig + +func readCloudConfig(configReader io.Reader) error { + if configReader == nil { + return fmt.Errorf("tencentcloud cloud config is not exists") + } + + if err := json.NewDecoder(configReader).Decode(&cloudConfig); err != nil { + return err + } + + testEnv := os.Getenv("TEST_ENV") + if testEnv == "true" { + cloudConfig.IsTest = true + } + + dryRun := os.Getenv("DRY_RUN") + if dryRun == "true" { + cloudConfig.DryRun = true + } + + secretID := os.Getenv("SECRET_ID") + secretKey := os.Getenv("SECRET_KEY") + region := os.Getenv("REGION") + regionName := os.Getenv("REGION_NAME") + clusterID := os.Getenv("CLUSTER_ID") + if secretID == "" { + return fmt.Errorf("please specify the environment variable: SECRET_ID") + } + if secretKey == "" { + return fmt.Errorf("please specify the environment variable: SECRET_KEY") + } + if region == "" { + return fmt.Errorf("please specify the environment variable: REGION") + } + if regionName == "" { + return fmt.Errorf("please specify the environment variable: REGION_NAME") + } + if clusterID == "" { + return fmt.Errorf("please specify the environment variable: CLUSTER_ID") + } + cloudConfig.SecretID = secretID + cloudConfig.SecretKey = secretKey + cloudConfig.Region = region + cloudConfig.RegionName = regionName + cloudConfig.ClusterID = clusterID + + klog.V(4).Infof("tencentcloud config %+v", cloudConfig) + + return nil +} + +// CreateTencentcloudManager constructs tencentcloudManager object. +func CreateTencentcloudManager(configReader io.Reader, discoveryOpts cloudprovider.NodeGroupDiscoveryOptions, regional bool) (TencentcloudManager, error) { + err := readCloudConfig(configReader) + if err != nil { + return nil, err + } + + credential := common.NewCredential(cloudConfig.SecretID, cloudConfig.SecretKey) + cvmClient, err := cvm.NewClient(credential, cloudConfig.RegionName, newCVMClientProfile()) + if err != nil { + return nil, err + } + vpcClient, err := vpc.NewClient(credential, cloudConfig.RegionName, newVPCClientProfile()) + if err != nil { + return nil, err + } + asClient, err := as.NewClient(credential, cloudConfig.RegionName, newASClientProfile()) + if err != nil { + return nil, err + } + tkeClient, err := tke.NewClient(credential, cloudConfig.RegionName, newTKEClientProfile()) + if err != nil { + return nil, err + } + + var service CloudService + if cloudConfig.DryRun { + service = NewCloudMockService(cvmClient, vpcClient, asClient, tkeClient) + } else { + service = NewCloudService(cvmClient, vpcClient, asClient, tkeClient) + } + + manager := &tencentcloudManagerImpl{ + cache: NewTencentcloudCache(service), + cloudService: service, + regional: regional, + interrupt: make(chan struct{}), + explicitlyConfigured: make(map[TcRef]bool), + } + + if err := manager.fetchExplicitAsgs(discoveryOpts.NodeGroupSpecs); err != nil { + return nil, fmt.Errorf("failed to fetch ASGs: %v", err) + } + + go wait.Until(func() { + if err := manager.cache.RegenerateInstancesCache(); err != nil { + klog.Errorf("Error while regenerating Mig cache: %v", err) + } + }, time.Hour, manager.interrupt) + + return manager, nil +} + +// Fetch explicitly configured ASGs. These ASGs should never be unregistered +// during refreshes, even if they no longer exist in Tencentcloud. +func (m *tencentcloudManagerImpl) fetchExplicitAsgs(specs []string) error { + changed := false + for _, spec := range specs { + asg, err := m.buildAsgFromFlag(spec) + if err != nil { + return err + } + if m.registerAsg(asg) { + changed = true + } + m.explicitlyConfigured[asg.TencentcloudRef()] = true + } + + if changed { + err := m.cache.RegenerateAutoScalingGroupCache() + if err != nil { + return err + } + err = m.cache.RegenerateInstancesCache() + if err != nil { + return err + } + for _, asg := range m.cache.GetAsgs() { + // Try to build a node from template to validate that this group + // can be scaled up from 0 nodes. + // We may never need to do it, so just log error if it fails. + if _, err := m.GetAsgTemplateNode(asg); err != nil { + klog.Errorf("Can't build node from template for %s, won't be able to scale from 0: %v", asg.TencentcloudRef().String(), err) + } + } + } + + return nil +} + +// GetResourceLimiter() (*cloudprovider.ResourceLimiter, error) +func (m *tencentcloudManagerImpl) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error) { + return m.cache.GetResourceLimiter() +} + +// registerAsg registers asg in TencentcloudManager. Returns true if the node group didn't exist before or its config has changed. +func (m *tencentcloudManagerImpl) registerAsg(asg Asg) bool { + return m.cache.RegisterAsg(asg) +} + +func (m *tencentcloudManagerImpl) buildAsgFromFlag(flag string) (Asg, error) { + s, err := dynamic.SpecFromString(flag, scaleToZeroSupported) + if err != nil { + return nil, fmt.Errorf("failed to parse node group spec: %v", err) + } + return m.buildAsgFromSpec(s) +} + +func (m *tencentcloudManagerImpl) buildAsgFromSpec(s *dynamic.NodeGroupSpec) (Asg, error) { + return &tcAsg{ + tencentcloudManager: m, + minSize: s.MinSize, + maxSize: s.MaxSize, + tencentcloudRef: TcRef{ + ID: s.Name, + }, + }, nil +} + +// Refresh triggers refresh of cached resources. +func (m *tencentcloudManagerImpl) Refresh() error { + m.cache.InvalidateAllAsgTargetSizes() + if m.lastRefresh.Add(refreshInterval).After(time.Now()) { + return nil + } + return m.forceRefresh() +} + +func (m *tencentcloudManagerImpl) forceRefresh() error { + // TODO refresh + + m.lastRefresh = time.Now() + klog.V(2).Infof("Refreshed Tencentcloud resources, next refresh after %v", m.lastRefresh.Add(refreshInterval)) + return nil +} + +// GetAsgs returns list of registered ASGs. +func (m *tencentcloudManagerImpl) GetAsgs() []Asg { + return m.cache.GetAsgs() +} + +// RegisterAsg registers asg in Tencentcloud Manager. +func (m *tencentcloudManagerImpl) RegisterAsg(asg Asg) { + m.cache.RegisterAsg(asg) +} + +// GetAsgForInstance returns asg of the given Instance +func (m *tencentcloudManagerImpl) GetAsgForInstance(instance TcRef) (Asg, error) { + return m.cache.FindForInstance(instance) +} + +// GetAsgSize gets ASG size. +func (m *tencentcloudManagerImpl) GetAsgSize(asg Asg) (int64, error) { + + targetSize, found := m.cache.GetAsgTargetSize(asg.TencentcloudRef()) + if found { + return targetSize, nil + } + + group, err := m.cloudService.GetAutoScalingGroup(asg.TencentcloudRef()) + if err != nil { + return -1, err + } + if group.DesiredCapacity == nil { + return -1, fmt.Errorf("%s invalid desired capacity", asg.Id()) + } + + m.cache.SetAsgTargetSize(asg.TencentcloudRef(), *group.DesiredCapacity) + return *group.DesiredCapacity, nil +} + +// SetAsgSize sets ASG size. +func (m *tencentcloudManagerImpl) SetAsgSize(asg Asg, size int64) error { + klog.V(0).Infof("Setting asg %s size to %d", asg.Id(), size) + err := m.cloudService.ResizeAsg(asg.TencentcloudRef(), uint64(size)) + if err != nil { + return err + } + m.cache.SetAsgTargetSize(asg.TencentcloudRef(), size) + return nil +} + +// Cleanup ... +func (m *tencentcloudManagerImpl) Cleanup() error { + return nil +} + +// DeleteInstances deletes the given instances. All instances must be controlled by the same ASG. +func (m *tencentcloudManagerImpl) DeleteInstances(instances []TcRef) error { + if len(instances) == 0 { + return nil + } + commonAsg, err := m.cache.FindForInstance(instances[0]) + if err != nil { + return err + } + toDeleteInstances := make([]string, 0) + for _, instance := range instances { + asg, err := m.cache.FindForInstance(instance) + if err != nil { + return err + } + if asg != commonAsg { + return fmt.Errorf("can not delete instances which don't belong to the same ASG") + } + toDeleteInstances = append(toDeleteInstances, instance.ID) + } + + m.cache.InvalidateAsgTargetSize(commonAsg.TencentcloudRef()) + m.cache.cloudService.DeleteInstances(commonAsg, toDeleteInstances) + + return nil +} + +// GetAsgNodes returns Asg nodes. +func (m *tencentcloudManagerImpl) GetAsgNodes(asg Asg) ([]cloudprovider.Instance, error) { + result := make([]cloudprovider.Instance, 0) + instances, err := m.cloudService.GetAutoScalingInstances(asg.TencentcloudRef()) + if err != nil { + return result, err + } + for _, instance := range instances { + if instance == nil || instance.LifeCycleState == nil || instance.InstanceId == nil { + continue + } + if *instance.LifeCycleState == "Removing" { + continue + } + instanceRef, err := m.cloudService.GetTencentcloudInstanceRef(instance) + if err != nil { + klog.Warning("failed to get tencentcloud instance ref:", err) + } else if instanceRef.Zone == "" { + klog.V(4).Infof("Skipping %s, that is scheduling by AS", *instance.InstanceId) + } else { + result = append(result, cloudprovider.Instance{Id: instanceRef.ToProviderID()}) + } + } + return result, nil +} + +// InstanceTemplate represents CVM template +type InstanceTemplate struct { + InstanceType string + Region string + Zone string + Cpu int64 + Mem int64 + Gpu int64 + // gpu虚拟化资源 + VCudaCore int64 + VCudaMem int64 + // vpc-cni的集群eni-ip资源 + TKERouteENIIP int64 + TKEDirectENI int64 + + Label map[string]string + Taints []*tke.Taint +} + +// NetworkExtendedResources represents network extended resources +type NetworkExtendedResources struct { + TKERouteENIIP int64 + TKEDirectENI int64 +} + +var networkExtendedResourcesMap = make(map[string]*NetworkExtendedResources) + +// GetAsgInstanceTemplate returns instance template for Asg with given ref +func (m *tencentcloudManagerImpl) GetAsgInstanceTemplate(asgRef TcRef) (*InstanceTemplate, error) { + m.mutex.Lock() + defer m.mutex.Unlock() + + instanceTemplate, found := m.cache.GetAsgInstanceTemplate(asgRef) + if found { + return instanceTemplate, nil + } + + getNetworkExtendedResources := func(instanceType string) (*NetworkExtendedResources, error) { + if resources, exist := networkExtendedResourcesMap[instanceType]; exist { + return resources, nil + } + + pli, err := m.cloudService.DescribeVpcCniPodLimits(instanceType) + if err != nil { + return nil, err + } + resources := &NetworkExtendedResources{} + if pli != nil { + if pli.PodLimits == nil || + pli.PodLimits.TKERouteENINonStaticIP == nil || + pli.PodLimits.TKEDirectENI == nil { + return nil, fmt.Errorf("get wrong eni limits(nil)") + } + resources.TKEDirectENI = *pli.PodLimits.TKEDirectENI + resources.TKERouteENIIP = *pli.PodLimits.TKERouteENINonStaticIP + } + + klog.Infof("%v", resources) + networkExtendedResourcesMap[instanceType] = resources + + return resources, nil + } + instanceInfo, err := m.cloudService.GetInstanceInfoByType(m.cache.GetInstanceType(asgRef)) + if err != nil { + return nil, err + } + npInfo, err := m.cloudService.GetNodePoolInfo(cloudConfig.ClusterID, asgRef.ID) + if err != nil { + return nil, err + } + + labels := make(map[string]string) + for _, label := range npInfo.Labels { + if label.Name != nil && label.Value != nil { + labels[*label.Name] = *label.Value + } + } + labels[LabelAutoScalingGroupID] = asgRef.ID + + asg, err := m.cloudService.GetAutoScalingGroup(asgRef) + if err != nil { + return nil, err + } + if len(asg.SubnetIdSet) < 1 || asg.SubnetIdSet[0] == nil { + return nil, fmt.Errorf("Failed to get asg zone") + } + zone, err := m.cloudService.GetZoneBySubnetID(*asg.SubnetIdSet[0]) + if err != nil { + return nil, err + } + zoneInfo, err := m.cloudService.GetZoneInfo(zone) + if err != nil { + return nil, err + } + + // eni + networkExtendedResources, err := getNetworkExtendedResources(instanceInfo.InstanceType) + if err != nil { + return nil, err + } + + gpuMult, ok := GPUMemoryMap[instanceInfo.InstanceFamily] + if !ok { + gpuMult = 24 + } + vcudaMem := instanceInfo.GPU * gpuMult * 4 + + instanceTemplate = &InstanceTemplate{ + InstanceType: instanceInfo.InstanceType, + Region: cloudConfig.Region, + Zone: *zoneInfo.ZoneId, + Cpu: instanceInfo.CPU, + Mem: instanceInfo.Memory, + Gpu: instanceInfo.GPU, + VCudaCore: instanceInfo.GPU * 100, + VCudaMem: vcudaMem, + TKEDirectENI: networkExtendedResources.TKEDirectENI, + TKERouteENIIP: networkExtendedResources.TKERouteENIIP, + Label: labels, + Taints: npInfo.Taints, + } + + m.cache.SetAsgInstanceTemplate(asgRef, instanceTemplate) + return instanceTemplate, nil +} + +func (m *tencentcloudManagerImpl) GetAsgTemplateNode(asg Asg) (*apiv1.Node, error) { + + template, err := m.GetAsgInstanceTemplate(asg.TencentcloudRef()) + if err != nil { + return nil, err + } + + node := apiv1.Node{} + nodeName := fmt.Sprintf("%s-%d", asg.TencentcloudRef().ID, rand.Int63()) + + node.ObjectMeta = metav1.ObjectMeta{ + Name: nodeName, + SelfLink: fmt.Sprintf("/api/v1/nodes/%s", nodeName), + Labels: map[string]string{}, + } + + node.Status = apiv1.NodeStatus{ + Capacity: apiv1.ResourceList{}, + } + + node.Status.Capacity[apiv1.ResourcePods] = *resource.NewQuantity(110, resource.DecimalSI) + node.Status.Capacity[apiv1.ResourceCPU] = *resource.NewQuantity(template.Cpu, resource.DecimalSI) + node.Status.Capacity[apiv1.ResourceMemory] = *resource.NewQuantity(template.Mem*1024*1024*1024, resource.DecimalSI) + if template.TKERouteENIIP > 0 { + node.Status.Capacity[TKERouteENIIP] = *resource.NewQuantity(template.TKERouteENIIP, resource.DecimalSI) + } + if template.TKEDirectENI > 0 { + node.Status.Capacity[TKEDirectENI] = *resource.NewQuantity(template.TKEDirectENI, resource.DecimalSI) + } + if template.Gpu > 0 { + node.Status.Capacity[gpu.ResourceNvidiaGPU] = *resource.NewQuantity(template.Gpu, resource.DecimalSI) + node.Status.Capacity[VCudaCore] = *resource.NewQuantity(template.VCudaCore, resource.DecimalSI) + node.Status.Capacity[VCudaMemory] = *resource.NewQuantity(template.VCudaMem, resource.DecimalSI) + + klog.Infof("Capacity resource set gpu %s(%d)", gpu.ResourceNvidiaGPU, template.Gpu) + } + + // TODO: use proper allocatable!! + node.Status.Allocatable = node.Status.Capacity + + node.Labels = cloudprovider.JoinStringMaps(node.Labels, template.Label) + + // GenericLabels + node.Labels = cloudprovider.JoinStringMaps(node.Labels, buildGenericLabels(template, nodeName)) + + node.Spec.Taints = extractTaintsFromAsg(template.Taints) + + node.Status.Conditions = cloudprovider.BuildReadyConditions() + + return &node, nil +} + +func buildGenericLabels(template *InstanceTemplate, nodeName string) map[string]string { + result := make(map[string]string) + // TODO: extract it somehow + result[apiv1.LabelArchStable] = cloudprovider.DefaultArch + result[apiv1.LabelOSStable] = cloudprovider.DefaultOS + + result[apiv1.LabelInstanceType] = template.InstanceType + + result[apiv1.LabelZoneRegion] = template.Region + result[apiv1.LabelZoneFailureDomain] = template.Zone + result[apiv1.LabelHostname] = nodeName + return result +} + +func extractTaintsFromAsg(npTaints []*tke.Taint) []apiv1.Taint { + taints := make([]apiv1.Taint, 0) + + for _, npTaint := range npTaints { + if npTaint != nil && npTaint.Key != nil && npTaint.Value != nil && npTaint.Effect != nil { + taints = append(taints, apiv1.Taint{ + Key: *npTaint.Key, + Value: *npTaint.Value, + Effect: apiv1.TaintEffect(*npTaint.Effect), + }) + } + } + return taints +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_mock_service.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_mock_service.go new file mode 100644 index 0000000000000000000000000000000000000000..8528f779965c4bc9e068022b9de0e1b92c8026d8 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_mock_service.go @@ -0,0 +1,49 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 tencentcloud + +import ( + as "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419" + cvm "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" + tke "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525" + vpc "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312" + "k8s.io/klog/v2" +) + +// MockCloudService mock cloud service +type MockCloudService struct { + CloudService +} + +// NewCloudMockService creates an instance of caching MockCloudService +func NewCloudMockService(cvmClient *cvm.Client, vpcClient *vpc.Client, asClient *as.Client, tkeClient *tke.Client) CloudService { + return &MockCloudService{ + CloudService: NewCloudService(cvmClient, vpcClient, asClient, tkeClient), + } +} + +// DeleteInstances remove instances of specified ASG. +func (mcs *MockCloudService) DeleteInstances(asg Asg, instances []string) error { + klog.Infof("Delete Instances %v from %s", instances, asg.TencentcloudRef().String()) + return nil +} + +// ResizeAsg set the target size of ASG. +func (mcs *MockCloudService) ResizeAsg(ref TcRef, size uint64) error { + klog.Infof("Resize %s to %d", ref.String(), size) + return nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_profiles.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_profiles.go new file mode 100644 index 0000000000000000000000000000000000000000..a0d3368c6ce224e5ea0ff765a6498dc6a1614e68 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_profiles.go @@ -0,0 +1,68 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 tencentcloud + +import "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" + +// Tencent Cloud Service Http Endpoint +const ( + ASHttpEndpoint = "as.tencentcloudapi.com" + VPCHttpEndpoint = "vpc.tencentcloudapi.com" + CVMHttpEndpoint = "cvm.tencentcloudapi.com" + TKEHttpEndpoint = "tke.tencentcloudapi.com" + + TestASHttpEndpoint = "as.test.tencentcloudapi.com" + TestVPCHttpEndpoint = "vpc.test.tencentcloudapi.com" + TestCVMHttpEndpoint = "cvm.test.tencentcloudapi.com" + TestTKEHttpEndpoint = "tke.test.tencentcloudapi.com" +) + +func newASClientProfile() *profile.ClientProfile { + cpf := profile.NewClientProfile() + cpf.HttpProfile.Endpoint = ASHttpEndpoint + if cloudConfig.IsTest { + cpf.HttpProfile.Endpoint = TestASHttpEndpoint + } + return cpf +} + +func newVPCClientProfile() *profile.ClientProfile { + cpf := profile.NewClientProfile() + cpf.HttpProfile.Endpoint = VPCHttpEndpoint + if cloudConfig.IsTest { + cpf.HttpProfile.Endpoint = TestVPCHttpEndpoint + } + return cpf +} + +func newCVMClientProfile() *profile.ClientProfile { + cpf := profile.NewClientProfile() + cpf.HttpProfile.Endpoint = CVMHttpEndpoint + if cloudConfig.IsTest { + cpf.HttpProfile.Endpoint = TestCVMHttpEndpoint + } + return cpf +} + +func newTKEClientProfile() *profile.ClientProfile { + cpf := profile.NewClientProfile() + cpf.HttpProfile.Endpoint = TKEHttpEndpoint + if cloudConfig.IsTest { + cpf.HttpProfile.Endpoint = TestTKEHttpEndpoint + } + return cpf +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_service.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_service.go new file mode 100644 index 0000000000000000000000000000000000000000..312cbc4defe47fc297d5431eb8a809f6a22b9299 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud_service.go @@ -0,0 +1,773 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 tencentcloud + +import ( + "fmt" + "time" + + "k8s.io/klog/v2" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/metrics" + as "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + cvm "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" + tke "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525" + vpc "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312" +) + +const deleteInstanceModeTerminate = "terminate" + +// CloudService is used for communicating with Tencentcloud API. +type CloudService interface { + // FetchAsgInstances returns instances of the specified ASG. + FetchAsgInstances(TcRef) ([]cloudprovider.Instance, error) + // DeleteInstances remove instances of specified ASG. + DeleteInstances(Asg, []string) error + // GetAsgRefByInstanceRef returns asgRef according to instanceRef + GetAsgRefByInstanceRef(TcRef) (TcRef, error) + // GetAutoScalingGroups queries and returns a set of ASG. + GetAutoScalingGroups([]string) ([]as.AutoScalingGroup, error) + // GetAutoscalingConfigs queries and returns a set of ASG launchconfiguration. + GetAutoscalingConfigs([]string) ([]as.LaunchConfiguration, error) + // GetAutoScalingGroups queries and returns a set of ASG. + GetAutoScalingGroup(TcRef) (as.AutoScalingGroup, error) + // ResizeAsg set the target size of ASG. + ResizeAsg(TcRef, uint64) error + // GetAutoScalingInstances returns instances of specific ASG. + GetAutoScalingInstances(TcRef) ([]*as.Instance, error) + // GetTencentcloudInstanceRef returns a Tencentcloud ref. + GetTencentcloudInstanceRef(*as.Instance) (TcRef, error) + // DescribeVpcCniPodLimits list network limits + DescribeVpcCniPodLimits(string) (*tke.PodLimitsInstance, error) + // GetInstanceInfoByType queries the number of CPU, memory, and GPU resources of the model configured for generating template + GetInstanceInfoByType(string) (*InstanceInfo, error) + // GetNodePoolInfo returns nodepool information from TKE. + GetNodePoolInfo(string, string) (*NodePoolInfo, error) + // GetZoneBySubnetID return zone by subnetID. + GetZoneBySubnetID(string) (string, error) + // GetZoneInfo invokes cvm.DescribeZones to query zone information. + GetZoneInfo(string) (*cvm.ZoneInfo, error) +} + +// CloudServiceImpl provides several utility methods over the auto-scaling cloudService provided by Tencentcloud SDK +type CloudServiceImpl struct { + asClient *as.Client + cvmClient *cvm.Client + tkeClient *tke.Client + vpcClient *vpc.Client +} + +const ( + maxRecordsReturnedByAPI = 100 +) + +// CVM stop mode +const ( + StoppedModeStopCharging = "STOP_CHARGING" + StoppedModeKeepCharging = "KEEP_CHARGING" +) + +// AS scaling mode +const ( + ScalingModeClassic = "CLASSIC_SCALING" + ScalingModeWakeUpStopped = "WAKE_UP_STOPPED_SCALING" +) + +var zoneInfos = make(map[string]*cvm.ZoneInfo) + +// SubnetInfo represents subnet's detail +type SubnetInfo struct { + SubnetID string + Zone string + ZoneID int +} + +// NewCloudService creates an instance of caching CloudServiceImpl +func NewCloudService(cvmClient *cvm.Client, vpcClient *vpc.Client, asClient *as.Client, tkeClient *tke.Client) CloudService { + return &CloudServiceImpl{ + cvmClient: cvmClient, + vpcClient: vpcClient, + asClient: asClient, + tkeClient: tkeClient, + } +} + +// FetchAsgInstances returns instances of the specified ASG. +func (ts *CloudServiceImpl) FetchAsgInstances(asgRef TcRef) ([]cloudprovider.Instance, error) { + tencentcloudInstances, err := ts.GetAutoScalingInstances(asgRef) + if err != nil { + klog.V(4).Infof("Failed ASG info request for %s %s: %v", asgRef.Zone, asgRef.ID, err) + return nil, err + } + infos := []cloudprovider.Instance{} + for _, instance := range tencentcloudInstances { + ref, err := ts.GetTencentcloudInstanceRef(instance) + if err != nil { + return nil, err + } + infos = append(infos, cloudprovider.Instance{ + Id: ref.ToProviderID(), + }) + } + return infos, nil +} + +// DeleteInstances remove instances of specified ASG. +// NOTICE: 一般情况下都是移除一个节点,只有在创建失败时才有批量移除,暂未分页处理 +// 如果是关机模式的伸缩组进行关机操作,其它进行移除操作 +// 目前执行移除操作走 TKE 接口,需要 cluster 属性,开源时切换为 as 接口 +func (ts *CloudServiceImpl) DeleteInstances(asg Asg, instances []string) error { + // TODO 处理缩容保护 + + if asg.GetScalingType() == ScalingModeWakeUpStopped { + return ts.stopInstances(asg, instances) + } + + if ts.tkeClient == nil { + return fmt.Errorf("tkeClient is not initialized") + } + req := tke.NewDeleteClusterInstancesRequest() + req.InstanceIds = common.StringPtrs(instances) + req.ClusterId = &cloudConfig.ClusterID + req.InstanceDeleteMode = common.StringPtr(deleteInstanceModeTerminate) + + _, err := ts.tkeClient.DeleteClusterInstances(req) + if err != nil { + if e, ok := err.(*errors.TencentCloudSDKError); ok { + metrics.RegisterCloudAPIInvokedError("tke", "DeleteClusterInstances", e.Code) + } + } + + return err +} + +// GetAutoscalingConfigs queries and returns a set of ASG launchconfiguration. +func (ts *CloudServiceImpl) GetAutoscalingConfigs(ascs []string) ([]as.LaunchConfiguration, error) { + if ts.asClient == nil { + return nil, fmt.Errorf("asClient is not initialized") + } + + if len(ascs) > maxRecordsReturnedByAPI { + klog.Warning("The number of Launch Configuration IDs exceeds 100: ", len(ascs)) + } + + // 查询AS,启动配置对应机型 + req := as.NewDescribeLaunchConfigurationsRequest() + req.LaunchConfigurationIds = common.StringPtrs(ascs) + req.Limit = common.Uint64Ptr(maxRecordsReturnedByAPI) + resp, err := ts.asClient.DescribeLaunchConfigurations(req) + metrics.RegisterCloudAPIInvoked("as", "DescribeLaunchConfigurations", err) + if err != nil { + return nil, err + } + + if resp == nil || resp.Response == nil || + resp.Response.LaunchConfigurationSet == nil { + return nil, fmt.Errorf("DescribeLaunchConfigurations returned a invalid response") + } + + res := make([]as.LaunchConfiguration, 0) + for _, lc := range resp.Response.LaunchConfigurationSet { + if lc != nil { + res = append(res, *lc) + } + } + + if len(res) != len(ascs) { + return nil, fmt.Errorf("DescribeLaunchConfigurations need: %d, real: %d", len(ascs), len(res)) + } + + return res, nil +} + +// InstanceInfo represents CVM's detail +type InstanceInfo struct { + CPU int64 + Memory int64 + GPU int64 + InstanceFamily string + InstanceType string +} + +// GetInstanceInfoByType queries the number of CPU, memory, and GPU resources of the model configured for generating template +func (ts *CloudServiceImpl) GetInstanceInfoByType(instanceType string) (*InstanceInfo, error) { + if ts.cvmClient == nil { + return nil, fmt.Errorf("cvmClient is not initialized") + } + + // DescribeZoneInstanceConfigInfos + instanceTypeRequest := cvm.NewDescribeInstanceTypeConfigsRequest() + instanceTypeRequest.Filters = []*cvm.Filter{ + { + Name: common.StringPtr("instance-type"), + Values: []*string{&instanceType}, + }, + } + + resp, err := ts.cvmClient.DescribeInstanceTypeConfigs(instanceTypeRequest) + metrics.RegisterCloudAPIInvoked("cvm", "DescribeInstanceTypeConfigs", err) + if err != nil { + return nil, err + } + + if resp == nil || + resp.Response == nil || + resp.Response.InstanceTypeConfigSet == nil || + len(resp.Response.InstanceTypeConfigSet) < 1 || + resp.Response.InstanceTypeConfigSet[0].CPU == nil || + resp.Response.InstanceTypeConfigSet[0].Memory == nil || + resp.Response.InstanceTypeConfigSet[0].GPU == nil || + resp.Response.InstanceTypeConfigSet[0].InstanceFamily == nil || + resp.Response.InstanceTypeConfigSet[0].InstanceType == nil || + resp.Response.InstanceTypeConfigSet[0].Zone == nil { + return nil, fmt.Errorf("DescribeInstanceTypeConfigs returned a invalid response") + } + + return &InstanceInfo{ + *resp.Response.InstanceTypeConfigSet[0].CPU, + *resp.Response.InstanceTypeConfigSet[0].Memory, + *resp.Response.InstanceTypeConfigSet[0].GPU, + *resp.Response.InstanceTypeConfigSet[0].InstanceFamily, + *resp.Response.InstanceTypeConfigSet[0].InstanceType, + }, nil +} + +// GetAutoScalingGroups queries and returns a set of ASG. +func (ts *CloudServiceImpl) GetAutoScalingGroups(asgIds []string) ([]as.AutoScalingGroup, error) { + if ts.asClient == nil { + return nil, fmt.Errorf("asClient is not initialized") + } + + if len(asgIds) > maxRecordsReturnedByAPI { + klog.Warning("The number of ASG IDs exceeds 100: ", len(asgIds)) + } + + req := as.NewDescribeAutoScalingGroupsRequest() + req.AutoScalingGroupIds = common.StringPtrs(asgIds) + req.Limit = common.Uint64Ptr(maxRecordsReturnedByAPI) + + response, err := ts.asClient.DescribeAutoScalingGroups(req) + metrics.RegisterCloudAPIInvoked("as", "DescribeAutoScalingGroups", err) + if err != nil { + return nil, err + } + + if response == nil || response.Response == nil || response.Response.AutoScalingGroupSet == nil { + return nil, fmt.Errorf("DescribeAutoScalingGroups returned a invalid response") + } + + asgs := make([]as.AutoScalingGroup, 0) + for _, asg := range response.Response.AutoScalingGroupSet { + if asg != nil { + asgs = append(asgs, *asg) + } + } + + return asgs, nil +} + +// GetAutoScalingGroup returns the specific ASG. +func (ts *CloudServiceImpl) GetAutoScalingGroup(asgRef TcRef) (as.AutoScalingGroup, error) { + if ts.asClient == nil { + return as.AutoScalingGroup{}, fmt.Errorf("asClient is not initialized") + } + + req := as.NewDescribeAutoScalingGroupsRequest() + req.AutoScalingGroupIds = []*string{&asgRef.ID} + resp, err := ts.asClient.DescribeAutoScalingGroups(req) + metrics.RegisterCloudAPIInvoked("as", "DescribeAutoScalingGroups", err) + if err != nil { + return as.AutoScalingGroup{}, err + } + + if resp == nil || resp.Response == nil || resp.Response.AutoScalingGroupSet == nil || + len(resp.Response.AutoScalingGroupSet) != 1 || resp.Response.AutoScalingGroupSet[0] == nil { + return as.AutoScalingGroup{}, fmt.Errorf("DescribeAutoScalingGroups returned a invalid response") + } + + return *resp.Response.AutoScalingGroupSet[0], nil +} + +// GetAutoScalingInstances returns instances of specific ASG. +func (ts *CloudServiceImpl) GetAutoScalingInstances(asgRef TcRef) ([]*as.Instance, error) { + if ts.asClient == nil { + return nil, fmt.Errorf("asClient is not initialized") + } + + req := as.NewDescribeAutoScalingInstancesRequest() + filter := as.Filter{ + Name: common.StringPtr("auto-scaling-group-id"), + Values: common.StringPtrs([]string{asgRef.ID}), + } + req.Filters = []*as.Filter{&filter} + req.Limit = common.Int64Ptr(maxRecordsReturnedByAPI) + req.Offset = common.Int64Ptr(0) + resp, err := ts.asClient.DescribeAutoScalingInstances(req) + metrics.RegisterCloudAPIInvoked("as", "DescribeAutoScalingInstances", err) + if err != nil { + return nil, err + } + res := resp.Response.AutoScalingInstanceSet + totalCount := uint64(0) + if resp.Response.TotalCount != nil { + totalCount = *resp.Response.TotalCount + } + for uint64(len(res)) < totalCount { + req.Offset = common.Int64Ptr(int64(len(res))) + resp, err = ts.asClient.DescribeAutoScalingInstances(req) + metrics.RegisterCloudAPIInvoked("as", "DescribeAutoScalingInstances", err) + if err != nil { + return nil, err + } + if resp.Response == nil || resp.Response.AutoScalingInstanceSet == nil { + return res, fmt.Errorf("query auto-scaling instances returned incorrect results") + } + if resp.Response.TotalCount != nil { + if totalCount != *resp.Response.TotalCount { + klog.Warningf("%s instance totalCount changed: %d->%d, reset request", totalCount, *resp.Response.TotalCount) + totalCount = *resp.Response.TotalCount + res = []*as.Instance{} + } + } + res = append(res, resp.Response.AutoScalingInstanceSet...) + } + return res, nil +} + +// GetAsgRefByInstanceRef returns asgRef according to instanceRef +func (ts *CloudServiceImpl) GetAsgRefByInstanceRef(instanceRef TcRef) (TcRef, error) { + if ts.asClient == nil { + return TcRef{}, fmt.Errorf("asClient is not initialized") + } + + req := as.NewDescribeAutoScalingInstancesRequest() + req.InstanceIds = common.StringPtrs([]string{instanceRef.ID}) + resp, err := ts.asClient.DescribeAutoScalingInstances(req) + metrics.RegisterCloudAPIInvoked("as", "DescribeAutoScalingInstances", err) + if err != nil { + return TcRef{}, err + } + + if resp == nil || resp.Response == nil || + resp.Response.AutoScalingInstanceSet == nil || + resp.Response.TotalCount == nil || + *resp.Response.TotalCount != 1 || + len(resp.Response.AutoScalingInstanceSet) != 1 { + if *resp.Response.TotalCount == 0 || len(resp.Response.AutoScalingInstanceSet) == 0 { + return TcRef{}, nil + } else if resp.Response.AutoScalingInstanceSet[0] == nil || + resp.Response.AutoScalingInstanceSet[0].AutoScalingGroupId == nil { + return TcRef{}, fmt.Errorf("DescribeAutoScalingInstances response is invalid by instance %v: %#v", instanceRef, resp) + } + } + + return TcRef{ + ID: *resp.Response.AutoScalingInstanceSet[0].AutoScalingGroupId, + }, nil +} + +// ResizeAsg set the target size of ASG. +func (ts *CloudServiceImpl) ResizeAsg(ref TcRef, size uint64) error { + if ts.asClient == nil { + return fmt.Errorf("asClient is not initialized") + } + req := as.NewModifyAutoScalingGroupRequest() + req.AutoScalingGroupId = common.StringPtr(ref.ID) + req.DesiredCapacity = common.Uint64Ptr(size) + resp, err := ts.asClient.ModifyAutoScalingGroup(req) + metrics.RegisterCloudAPIInvoked("as", "ModifyAutoScalingGroup", err) + if err != nil { + return err + } + if resp == nil || resp.Response == nil || + resp.Response.RequestId == nil { + return fmt.Errorf("ModifyAutoScalingGroup returned a invalid response") + } + + klog.V(4).Infof("ResizeAsg size %d, requestID: %s", size, *resp.Response.RequestId) + + return nil +} + +// GetZoneBySubnetID 查询子网的所属可用区 +func (ts *CloudServiceImpl) GetZoneBySubnetID(subnetID string) (string, error) { + if ts.vpcClient == nil { + return "", fmt.Errorf("vpcClient is not initialized") + } + + if ts.cvmClient == nil { + return "", fmt.Errorf("cvmClient is not initialized") + } + req := vpc.NewDescribeSubnetsRequest() + req.SubnetIds = []*string{common.StringPtr(subnetID)} + resp, err := ts.vpcClient.DescribeSubnets(req) + if err != nil { + return "", err + } else if resp.Response == nil || len(resp.Response.SubnetSet) < 1 || + resp.Response.SubnetSet[0] == nil || resp.Response.SubnetSet[0].Zone == nil { + return "", fmt.Errorf("Failed to invoke DescribeSubnets from vpc, subnetId %v, err: response subenet is nil", subnetID) + } + zone := *resp.Response.SubnetSet[0].Zone + return zone, nil +} + +// GetZoneInfo invokes cvm.DescribeZones to query zone information. +// zoneInfo will be cache. +func (ts *CloudServiceImpl) GetZoneInfo(zone string) (*cvm.ZoneInfo, error) { + if zone == "" { + return nil, fmt.Errorf("Param is invalid: zone is empty") + } + if zoneInfo, exist := zoneInfos[zone]; exist { + return zoneInfo, nil + } + req := cvm.NewDescribeZonesRequest() + resp, err := ts.cvmClient.DescribeZones(req) + metrics.RegisterCloudAPIInvoked("cvm", "DescribeZones", err) + if err != nil { + return nil, err + } else if resp.Response == nil || resp.Response.TotalCount == nil || *resp.Response.TotalCount < 1 { + return nil, fmt.Errorf("DescribeZones returns a invalid response") + } + for _, it := range resp.Response.ZoneSet { + if it != nil && it.Zone != nil && *it.Zone == zone { + zoneInfos[zone] = it + return it, nil + } + } + return nil, fmt.Errorf("Failed to get zoneInfo: %s is not exist", zone) +} + +// GetTencentcloudInstanceRef returns a Tencentcloud ref. +func (ts *CloudServiceImpl) GetTencentcloudInstanceRef(instance *as.Instance) (TcRef, error) { + if instance == nil { + return TcRef{}, fmt.Errorf("instance is nil") + } + + zoneID := "" + if instance.Zone != nil && *instance.Zone != "" { + zoneInfo, err := ts.GetZoneInfo(*instance.Zone) + if err != nil { + return TcRef{}, err + } + zoneID = *zoneInfo.ZoneId + } + + return TcRef{ + ID: *instance.InstanceId, + Zone: zoneID, + }, nil +} + +// NodePoolInfo represents the information nodePool or clusterAsg from dashboard +type NodePoolInfo struct { + Labels []*tke.Label + Taints []*tke.Taint +} + +// GetNodePoolInfo returns nodepool information from TKE. +func (ts *CloudServiceImpl) GetNodePoolInfo(clusterID string, asgID string) (*NodePoolInfo, error) { + if ts.tkeClient == nil { + return nil, fmt.Errorf("tkeClient is not initialized") + } + // From NodePool + npReq := tke.NewDescribeClusterNodePoolsRequest() + npReq.ClusterId = common.StringPtr(clusterID) + npResp, err := ts.tkeClient.DescribeClusterNodePools(npReq) + if e, ok := err.(*errors.TencentCloudSDKError); ok { + metrics.RegisterCloudAPIInvokedError("tke", "DescribeClusterNodePools", e.Code) + return nil, e + } + if npResp == nil || npResp.Response == nil || npResp.Response.RequestId == nil { + return nil, errors.NewTencentCloudSDKError("DASHBOARD_ERROR", "empty response", "-") + } + var targetNodePool *tke.NodePool + for _, np := range npResp.Response.NodePoolSet { + if np.AutoscalingGroupId != nil && *np.AutoscalingGroupId == asgID { + targetNodePool = np + break + } + } + if targetNodePool != nil { + return &NodePoolInfo{ + Labels: targetNodePool.Labels, + Taints: targetNodePool.Taints, + }, nil + } + + // Compatible with DEPRECATED autoScalingGroups + asgReq := tke.NewDescribeClusterAsGroupsRequest() + asgReq.AutoScalingGroupIds = []*string{common.StringPtr(asgID)} + asgReq.ClusterId = common.StringPtr(clusterID) + asgResp, err := ts.tkeClient.DescribeClusterAsGroups(asgReq) + if err != nil { + if e, ok := err.(*errors.TencentCloudSDKError); ok { + metrics.RegisterCloudAPIInvokedError("tke", "DescribeClusterAsGroups", e.Code) + } + return nil, err + } + if asgResp == nil || asgResp.Response == nil { + return nil, errors.NewTencentCloudSDKError("DASHBOARD_ERROR", "empty response", "-") + } + asgCount := len(asgResp.Response.ClusterAsGroupSet) + if asgCount != 1 { + return nil, errors.NewTencentCloudSDKError("UNEXPECTED_ERROR", + fmt.Sprintf("%s get %d autoScalingGroup", asgID, asgCount), *asgResp.Response.RequestId) + } + asg := asgResp.Response.ClusterAsGroupSet[0] + if asg == nil { + return nil, errors.NewTencentCloudSDKError("UNEXPECTED_ERROR", "asg is nil", *asgResp.Response.RequestId) + } + + return &NodePoolInfo{ + Labels: asg.Labels, + }, nil +} + +// DescribeVpcCniPodLimits list network limits +func (ts *CloudServiceImpl) DescribeVpcCniPodLimits(instanceType string) (*tke.PodLimitsInstance, error) { + if ts.tkeClient == nil { + return nil, fmt.Errorf("tkeClient is not initialized") + } + req := tke.NewDescribeVpcCniPodLimitsRequest() + req.InstanceType = common.StringPtr(instanceType) + resp, err := ts.tkeClient.DescribeVpcCniPodLimits(req) + if err != nil { + if e, ok := err.(*errors.TencentCloudSDKError); ok { + metrics.RegisterCloudAPIInvokedError("tke", "DescribeVpcCniPodLimits", e.Code) + } + return nil, err + } + if resp == nil || resp.Response == nil || resp.Response.RequestId == nil { + return nil, errors.NewTencentCloudSDKError("DASHBOARD_ERROR", "empty response", "-") + } + if len(resp.Response.PodLimitsInstanceSet) == 0 { + return nil, nil + } + + // PodLimitsInstanceSet 分可用区返回,会存在多组值,不过内容都一样,取第一个 + return resp.Response.PodLimitsInstanceSet[0], nil +} + +func (ts *CloudServiceImpl) stopAutoScalingInstancesWithRetry(req *as.StopAutoScalingInstancesRequest) error { + var err error + scalingActivityID := "" + for i := 0; i < retryCountStop; i++ { + if i > 0 { + time.Sleep(intervalTimeStop) + } + var resp = &as.StopAutoScalingInstancesResponse{} + resp, err = ts.asClient.StopAutoScalingInstances(req) + metrics.RegisterCloudAPIInvoked("as", "StopAutoScalingInstances", err) + if err != nil { + if asErr, ok := err.(*errors.TencentCloudSDKError); ok { + // 仍然有不支持的 + if asErr.Code == "ResourceUnavailable.StoppedInstanceWithInconsistentChargingMode" { + continue + } + } + // 如果错误不是因为机型的原因,就重试 + klog.Warningf("StopAutoScalingInstances failed %v, %d retry", err.Error(), i) + } else { + if resp.Response.ActivityId != nil { + scalingActivityID = *resp.Response.ActivityId + } + break + } + } + + if err != nil { + return err + } + + // check activity + err = ts.ensureAutoScalingActivityDone(scalingActivityID) + if err != nil { + return err + } + + return nil +} + +// removeInstances invoke as.RemoveInstances +// api document: https://cloud.tencent.com/document/api/377/20431 +func (ts *CloudServiceImpl) removeInstances(asg Asg, instances []string) error { + if ts.asClient == nil { + return fmt.Errorf("asClient is not initialized") + } + + req := as.NewRemoveInstancesRequest() + req.AutoScalingGroupId = common.StringPtr(asg.Id()) + req.InstanceIds = common.StringPtrs(instances) + + resp, err := ts.asClient.RemoveInstances(req) + metrics.RegisterCloudAPIInvoked("as", "RemoveInstances", err) + if err != nil { + return err + } + if resp == nil || resp.Response == nil || + resp.Response.ActivityId == nil || + resp.Response.RequestId == nil { + return fmt.Errorf("RemoveInstances returned a invalid response") + } + klog.V(4).Infof("Remove instances %v, asaID: %s, requestID: %s", instances, *resp.Response.ActivityId, *resp.Response.RequestId) + + return nil +} + +// stopInstances 关闭instanceList中符合关机不收费的机型的机器,如果不支持的机器,就进行关机收费操作 +// TODO 注意:该方法仅供上层调用,instanceList的长度需要上层控制,长度最大限制:100 +func (ts *CloudServiceImpl) stopInstances(asg Asg, instances []string) error { + if ts.asClient == nil { + return fmt.Errorf("asClient is not initialized") + } + req := as.NewStopAutoScalingInstancesRequest() + req.AutoScalingGroupId = common.StringPtr(asg.Id()) + req.InstanceIds = common.StringPtrs(instances) + req.StoppedMode = common.StringPtr(StoppedModeStopCharging) + + // 没有dry run,所以先试跑一次,如果超过了,就直接超过了, + keepChargingIns := make([]string, 0) + stopChargingIns := make([]string, 0) + var errOut error + scalingActivityID := "" + for i := 0; i < retryCountStop; i++ { + // 从第二次开始,等待5s钟(一般autoscaling移出节点的时间为3s) + if i > 0 { + time.Sleep(intervalTimeStop) + } + resp, err := ts.asClient.StopAutoScalingInstances(req) + metrics.RegisterCloudAPIInvoked("as", "StopAutoScalingInstances", err) + if e, ok := err.(*errors.TencentCloudSDKError); ok { + metrics.RegisterCloudAPIInvokedError("as", "StopAutoScalingInstances", e.Code) + } + if err == nil { + // 一次成功 + klog.Info("StopAutoScalingInstances succeed") + klog.V(4).Infof("res:%#v", resp.Response) + if resp.Response.ActivityId != nil { + scalingActivityID = *resp.Response.ActivityId + } + break + } else if asErr, ok := err.(*errors.TencentCloudSDKError); ok && + (asErr.Code == "ResourceUnavailable.StoppedInstanceWithInconsistentChargingMode" || + asErr.Code == "ResourceUnavailable.InstanceNotSupportStopCharging") { // TODO 这里拿code和msg返回做判断,有点危险 + stopChargingIns, keepChargingIns = getInstanceIdsFromMessage(instances, asErr.Message) + break + } else { + errOut = err + klog.Warningf("Failed to StopAutoScalingInstances res:%#v", err) + } + } + + // 如果是一次就过了,说明instance是全部可以关机不收费的,直接结束 + if errOut == nil && scalingActivityID != "" { + // check activity + err := ts.ensureAutoScalingActivityDone(scalingActivityID) + if err != nil { + return err + } + return nil + } else if errOut != nil { + // 如果一直在报其他的错误,就返回错误 + return errOut + } + // 如果有不支持关机不收费的话,就分别执行两次。 + + // 支持关机不收费的实例,进行`StopCharging`操作 + if len(stopChargingIns) != 0 { + req.InstanceIds = common.StringPtrs(stopChargingIns) + req.StoppedMode = common.StringPtr(StoppedModeStopCharging) + err := ts.stopAutoScalingInstancesWithRetry(req) + if err != nil { + errOut = err + } + } + + if len(keepChargingIns) != 0 { + // 不支持关机不收费的实例,进行`KeepCharging`操作 + req.InstanceIds = common.StringPtrs(keepChargingIns) + req.StoppedMode = common.StringPtr(StoppedModeKeepCharging) + err := ts.stopAutoScalingInstancesWithRetry(req) + if err != nil { + errOut = err + } + } + if errOut != nil { + return errOut + } + return nil +} + +func (ts *CloudServiceImpl) ensureAutoScalingActivityDone(scalingActivityID string) error { + if scalingActivityID == "" { + return fmt.Errorf("ActivityId is nil") + } + + checker := func(r interface{}, e error) bool { + if e != nil { + return false + } + resp, ok := r.(*as.DescribeAutoScalingActivitiesResponse) + if !ok || resp.Response == nil || len(resp.Response.ActivitySet) != 1 { + return false + } + if resp.Response.ActivitySet[0].StatusCode != nil { + if *resp.Response.ActivitySet[0].StatusCode == "INIT" || *resp.Response.ActivitySet[0].StatusCode == "RUNNING" { + return false + } + return true + } + return true + } + do := func() (interface{}, error) { + if ts.asClient == nil { + return nil, fmt.Errorf("asClient is not initialized") + } + req := as.NewDescribeAutoScalingActivitiesRequest() + req.ActivityIds = common.StringPtrs([]string{scalingActivityID}) + + resp, err := ts.asClient.DescribeAutoScalingActivities(req) + metrics.RegisterCloudAPIInvoked("as", "DescribeAutoScalingActivities", err) + if err != nil { + return nil, err + } + return resp, nil + } + + ret, isTimeout, err := retryDo(do, checker, 1200, 2) + if err != nil { + return fmt.Errorf("EnsureAutoScalingActivityDone scalingActivityId:%s failed:%v", scalingActivityID, err) + } + + if isTimeout { + return fmt.Errorf("EnsureAutoScalingActivityDone scalingActivityId:%s timeout", scalingActivityID) + } + resp, ok := ret.(*as.DescribeAutoScalingActivitiesResponse) + if !ok || resp.Response == nil || len(resp.Response.ActivitySet) != 1 { + return fmt.Errorf("EnsureAutoScalingActivityDone scalingActivityId:%s failed", scalingActivityID) + } + if resp.Response.ActivitySet[0].StatusCode != nil && *resp.Response.ActivitySet[0].StatusCode != "SUCCESSFUL" { + if resp.Response.ActivitySet[0].StatusMessageSimplified == nil { + resp.Response.ActivitySet[0].StatusMessageSimplified = common.StringPtr("no message") + } + return fmt.Errorf("AutoScalingActivity scalingActivityId:%s %s %s", scalingActivityID, *resp.Response.ActivitySet[0].StatusCode, *resp.Response.ActivitySet[0].StatusMessageSimplified) + } + return nil +} diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/utils.go b/cluster-autoscaler/cloudprovider/tencentcloud/utils.go new file mode 100644 index 0000000000000000000000000000000000000000..068cc13d0db2bbef3206130dd1351c1e2b578c07 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/tencentcloud/utils.go @@ -0,0 +1,62 @@ +/* +Copyright 2016 The Kubernetes Authors. + +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 tencentcloud + +import ( + "regexp" + "time" +) + +func getInstanceIdsFromMessage(instances []string, msg string) ([]string, []string) { + errInstance := make([]string, 0) + // 为了防止修改instanceIds中的值 + regx := regexp.MustCompile(`ins-([0-9]|[a-z])*`) + res := regx.FindAll([]byte(msg), -1) + for _, r := range res { + errInstance = append(errInstance, string(r)) + } + for _, errIns := range errInstance { + for i, okIns := range instances { + if errIns == okIns { + instances = append(instances[:i], instances[i+1:]...) + break + } + } + } + return instances, errInstance +} + +func retryDo(op func() (interface{}, error), checker func(interface{}, error) bool, timeout uint64, interval uint64) (ret interface{}, isTimeout bool, err error) { + isTimeout = false + var tm <-chan time.Time = time.After(time.Duration(timeout) * time.Second) + + times := 0 + for { + times = times + 1 + select { + case <-tm: + isTimeout = true + return + default: + } + ret, err = op() + if checker(ret, err) { + return + } + time.Sleep(time.Duration(interval) * time.Second) + } +} diff --git a/hack/verify-golint.sh b/hack/verify-golint.sh index 8ac285d8ab6082e3f74c2225988a51f0b46bf553..7496893fcdae5fe743c4c72fbdd2cf25902a9020 100755 --- a/hack/verify-golint.sh +++ b/hack/verify-golint.sh @@ -37,6 +37,7 @@ excluded_packages=( 'cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go' 'cluster-autoscaler/cloudprovider/hetzner/hcloud-go' 'cluster-autoscaler/expander/grpcplugin/protos' + 'cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go' ) FIND_PACKAGES='go list ./... '