From 02de7013a558d12814f04bec26f07448b3e054d9 Mon Sep 17 00:00:00 2001 From: hellertang Date: Mon, 29 Nov 2021 17:20:39 +0800 Subject: [PATCH] support private dns --- go.mod | 1 + go.sum | 2 + tencentcloud/connectivity/client.go | 14 + tencentcloud/extension_privatedns.go | 12 + tencentcloud/provider.go | 5 + tencentcloud/resource_tc_private_dns_zone.go | 380 ++++++ .../tencentcloud/privatedns/LICENSE | 201 +++ .../privatedns/v20201028/client.go | 864 ++++++++++++ .../privatedns/v20201028/errors.go | 184 +++ .../privatedns/v20201028/models.go | 1179 +++++++++++++++++ vendor/modules.txt | 2 + website/docs/r/private_dns_zone.html.markdown | 81 ++ website/tencentcloud.erb | 14 + 13 files changed, 2939 insertions(+) create mode 100644 tencentcloud/extension_privatedns.go create mode 100644 tencentcloud/resource_tc_private_dns_zone.go create mode 100644 vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/LICENSE create mode 100644 vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/client.go create mode 100644 vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/errors.go create mode 100644 vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/models.go create mode 100644 website/docs/r/private_dns_zone.html.markdown diff --git a/go.mod b/go.mod index 0b1950e797..b5f2ebdee1 100644 --- a/go.mod +++ b/go.mod @@ -56,6 +56,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.290 github.com/tencentyun/cos-go-sdk-v5 v0.7.31-0.20210902132439-360bc9b1be6b github.com/yangwenmai/ratelimit v0.0.0-20180104140304-44221c2292e1 github.com/zclconf/go-cty v1.4.2 // indirect diff --git a/go.sum b/go.sum index 7952cd3580..100b2f9a36 100644 --- a/go.sum +++ b/go.sum @@ -498,6 +498,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.291 h1:EIU github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.291/go.mod h1:aMwrB/fRSIS8IFabcF0hfRC89y76DptUknUjAf1jlHE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.199 h1:Opze570l6JbOc+/nYftYmheyCU9omz+emNJpDUBYYFQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.199/go.mod h1:Rh/4NXBd0aqmaRGDYcW4gL2Zi8JShGZiB23zrfVaS90= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.290 h1:osYZxh9ApEc8UpvIMwjAUfdl7ytRcWUpcnnqLIpiJ/U= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.290/go.mod h1:En+pdagcHkAASorHT1l8R6tUtieRNNxaQ7nfyqWPefk= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.199 h1:lXCng7HQqvubF7uwa7x5COsDZlJEjEJ/RBpaeYGc0+I= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.199/go.mod h1:5bwboqeXqVnRvUlKn2G9Y9DbOnWMSVQ0zWhhPZKUVZE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf v1.0.275 h1:hn5RrN/qkcObnyKfJ+raey/riVeRqHJFvY34l2YgELs= diff --git a/tencentcloud/connectivity/client.go b/tencentcloud/connectivity/client.go index 0b1b77d8d4..e3af52e5ee 100644 --- a/tencentcloud/connectivity/client.go +++ b/tencentcloud/connectivity/client.go @@ -39,6 +39,7 @@ import ( mongodb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725" monitor "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor/v20180724" postgre "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312" + privatedns "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028" redis "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis/v20180412" scf "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf/v20180416" sqlserver "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sqlserver/v20180328" @@ -102,6 +103,7 @@ type TencentCloudClient struct { emrConn *emr.Client clsConn *cls.Client dnsPodConn *dnspod.Client + privateDnsConn *privatedns.Client } // NewClientProfile returns a new ClientProfile @@ -663,3 +665,15 @@ func (me *TencentCloudClient) UseDnsPodClient() *dnspod.Client { return me.dnsPodConn } + +// UsePrivateDnsClient return PrivateDns client for service +func (me *TencentCloudClient) UsePrivateDnsClient() *privatedns.Client { + if me.dnsPodConn != nil { + return me.privateDnsConn + } + cpf := me.NewClientProfile(300) + me.privateDnsConn, _ = privatedns.NewClient(me.Credential, me.Region, cpf) + me.privateDnsConn.WithHttpTransport(&LogRoundTripper{}) + + return me.privateDnsConn +} diff --git a/tencentcloud/extension_privatedns.go b/tencentcloud/extension_privatedns.go new file mode 100644 index 0000000000..28128df034 --- /dev/null +++ b/tencentcloud/extension_privatedns.go @@ -0,0 +1,12 @@ +package tencentcloud + +const ( + DNS_FORWARD_STATUS_ENABLE = "ENABLED" + DNS_FORWARD_STATUS_DISABLED = "DISABLED" +) + +var PRIVATE_DNS_FORWARD_STATUS = []string{ + DNS_FORWARD_STATUS_ENABLE, + DNS_FORWARD_STATUS_DISABLED, +} + diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 52b79d4240..57aab0c53c 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -561,6 +561,10 @@ EMR DNSPOD Resource tencentcloud_dnspod_domain_instance + +PRIVATE DNS + Resource + tencentcloud_private_dns_zone */ package tencentcloud @@ -1013,6 +1017,7 @@ func Provider() terraform.ResourceProvider { "tencentcloud_ssm_secret_version": resourceTencentCloudSsmSecretVersion(), "tencentcloud_cdh_instance": resourceTencentCloudCdhInstance(), "tencentcloud_dnspod_domain_instance": resourceTencentCloudDnspodDomainInstance(), + "tencentcloud_private_dns_zone": resourceTencentCloudPrivateDnsZone(), }, ConfigureFunc: providerConfigure, diff --git a/tencentcloud/resource_tc_private_dns_zone.go b/tencentcloud/resource_tc_private_dns_zone.go new file mode 100644 index 0000000000..2fedc01f59 --- /dev/null +++ b/tencentcloud/resource_tc_private_dns_zone.go @@ -0,0 +1,380 @@ +/* +Provide a resource to create a Private Dns Zone. + +Example Usage + +```hcl +resource "tencentcloud_private_dns_zone" "foo" { + domain = "domain.com" + tag_set { + tag_key = "created_by" + tag_value = "tag" + } + vpc_set { + region = "ap-guangzhou" + uniq_vpc_id = "vpc-xxxxx" + } + remark = "test" + dns_forward_status = "DISABLED" + account_vpc_set { + uin = "454xxxxxxx" + region = "ap-guangzhou" + uniq_vpc_id = "vpc-xxxxx" + vpc_name = "test-redis" + } +} +``` + +Import + +Private Dns Zone can be imported, e.g. + +``` +$ terraform import tencentcloud_private_dns_zone.foo zone_id +``` +*/ +package tencentcloud + +import ( + "log" + + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + privatedns "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028" +) + +func resourceTencentCloudPrivateDnsZone() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudDPrivateDnsZoneCreate, + Read: resourceTencentCloudDPrivateDnsZoneRead, + Update: resourceTencentCloudDPrivateDnsZoneUpdate, + Delete: resourceTencentCloudDPrivateDnsZoneDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Required: true, + Description: "Domain name, which must be in the format of standard TLD.", + }, + "tag_set": { + Type: schema.TypeList, + Optional: true, + Description: "Tags the private domain when it is created.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "tag_key": { + Type: schema.TypeString, + Required: true, + Description: "Key of Tag.", + }, + "tag_value": { + Type: schema.TypeString, + Required: true, + Description: "Value of Tag.", + }, + }, + }, + }, + "vpc_set": { + Type: schema.TypeList, + Optional: true, + Description: "Associates the private domain to a VPC when it is created.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "uniq_vpc_id": { + Type: schema.TypeString, + Required: true, + Description: "VPC ID.", + }, + "region": { + Type: schema.TypeString, + Required: true, + Description: "VPC REGION.", + }, + }, + }, + }, + "remark": { + Type: schema.TypeString, + Optional: true, + Description: "Remarks.", + }, + "dns_forward_status": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateAllowedStringValue(PRIVATE_DNS_FORWARD_STATUS), + Description: "Whether to enable subdomain recursive DNS. Valid values: ENABLED, DISABLED. Default value: DISABLED.", + }, + "account_vpc_set": { + Type: schema.TypeList, + Optional: true, + Description: "List of authorized accounts' VPCs to associate with the private domain.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "uin": { + Type: schema.TypeString, + Required: true, + Description: "UIN of the VPC account.", + }, + "uniq_vpc_id": { + Type: schema.TypeString, + Required: true, + Description: "VPC ID.", + }, + "region": { + Type: schema.TypeString, + Required: true, + Description: "Region.", + }, + "vpc_name": { + Type: schema.TypeString, + Required: true, + Description: "VPC NAME.", + }, + }, + }, + }, + }, + } +} + +func resourceTencentCloudDPrivateDnsZoneCreate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_private_dns_zone.create")() + + logId := getLogId(contextNil) + + request := privatedns.NewCreatePrivateZoneRequest() + + domain := d.Get("domain").(string) + request.Domain = &domain + + if v, ok := d.GetOk("tag_set"); ok { + tagSet := make([]*privatedns.TagInfo, 0, 10) + for _, item := range v.([]interface{}) { + m := item.(map[string]interface{}) + tagInfo := privatedns.TagInfo{ + TagKey: helper.String(m["tag_key"].(string)), + TagValue: helper.String(m["tag_value"].(string)), + } + tagSet = append(tagSet, &tagInfo) + } + request.TagSet = tagSet + } + + if v, ok := d.GetOk("vpc_set"); ok { + vpcSet := make([]*privatedns.VpcInfo, 0, 10) + for _, item := range v.([]interface{}) { + m := item.(map[string]interface{}) + vpcInfo := privatedns.VpcInfo{ + UniqVpcId: helper.String(m["uniq_vpc_id"].(string)), + Region: helper.String(m["region"].(string)), + } + vpcSet = append(vpcSet, &vpcInfo) + } + request.VpcSet = vpcSet + } + + if v, ok := d.GetOk("remark"); ok { + remark := v.(string) + request.Remark = helper.String(remark) + } + + if v, ok := d.GetOk("dns_forward_status"); ok { + dnsForwardStatus := v.(string) + request.DnsForwardStatus = helper.String(dnsForwardStatus) + } + + if v, ok := d.GetOk("account_vpc_set"); ok { + accountVpcSet := make([]*privatedns.AccountVpcInfo, 0, 10) + for _, item := range v.([]interface{}) { + m := item.(map[string]interface{}) + accountVpcInfo := privatedns.AccountVpcInfo{ + Uin: helper.String(m["uin"].(string)), + UniqVpcId: helper.String(m["uniq_vpc_id"].(string)), + Region: helper.String(m["region"].(string)), + VpcName: helper.String(m["vpc_name"].(string)), + } + accountVpcSet = append(accountVpcSet, &accountVpcInfo) + } + request.AccountVpcSet = accountVpcSet + } + + result, err := meta.(*TencentCloudClient).apiV3Conn.UsePrivateDnsClient().CreatePrivateZone(request) + + if err != nil { + log.Printf("[CRITAL]%s create PrivateDns failed, reason:%s\n", logId, err.Error()) + return err + } + + var response *privatedns.CreatePrivateZoneResponse + response = result + d.SetId(*response.Response.ZoneId) + + return resourceTencentCloudDPrivateDnsZoneRead(d, meta) +} + +func resourceTencentCloudDPrivateDnsZoneRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_private_dns_zone.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + id := d.Id() + + request := privatedns.NewDescribePrivateZoneRequest() + request.ZoneId = helper.String(id) + + var response *privatedns.DescribePrivateZoneResponse + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := meta.(*TencentCloudClient).apiV3Conn.UsePrivateDnsClient().DescribePrivateZone(request) + if e != nil { + return retryError(e) + } + + response = result + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s read DnsPod Domain failed, reason:%s\n", logId, err.Error()) + return err + } + + info := response.Response.PrivateZone + d.SetId(*info.ZoneId) + + _ = d.Set("domain", info.Domain) + + tagSets := make([]map[string]interface{}, 0, len(info.Tags)) + for _, item := range info.Tags { + tagSets = append(tagSets, map[string]interface{}{ + "tag_key": item.TagKey, + "tag_value": item.TagValue, + }) + } + _ = d.Set("tag_set", tagSets) + + vpcSet := make([]map[string]interface{}, 0, len(info.VpcSet)) + for _, item := range info.VpcSet { + vpcSet = append(vpcSet, map[string]interface{}{ + "uniq_vpc_id": item.UniqVpcId, + "region": item.Region, + }) + } + _ = d.Set("vpc_set", vpcSet) + _ = d.Set("remark", info.Remark) + _ = d.Set("dns_forward_status", info.DnsForwardStatus) + + accountVpcSet := make([]map[string]interface{}, 0, len(info.AccountVpcSet)) + for _, item := range info.AccountVpcSet { + accountVpcSet = append(accountVpcSet, map[string]interface{}{ + "uin": item.Uin, + "uniq_vpc_id": item.UniqVpcId, + "region": item.Region, + }) + } + _ = d.Set("account_vpc_set", accountVpcSet) + return nil +} + +func resourceTencentCloudDPrivateDnsZoneUpdate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_private_dns_zone.update")() + + logId := getLogId(contextNil) + id := d.Id() + + if d.HasChange("remark") || d.HasChange("dns_forward_status") { + request := privatedns.NewModifyPrivateZoneRequest() + request.ZoneId = helper.String(id) + if v, ok := d.GetOk("remark"); ok { + request.Remark = helper.String(v.(string)) + } + if v, ok := d.GetOk("dns_forward_status"); ok { + request.DnsForwardStatus = helper.String(v.(string)) + } + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + _, e := meta.(*TencentCloudClient).apiV3Conn.UsePrivateDnsClient().ModifyPrivateZone(request) + if e != nil { + return retryError(e) + } + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s modify privateDns zone info failed, reason:%s\n", logId, err.Error()) + return err + } + } + + if d.HasChange("vpc_set") || d.HasChange("account_vpc_set") { + request := privatedns.NewModifyPrivateZoneVpcRequest() + request.ZoneId = helper.String(id) + if v, ok := d.GetOk("vpc_set"); ok { + var vpcSets = make([]*privatedns.VpcInfo, 0) + items := v.([]interface{}) + for _, item := range items { + value := item.(map[string]interface{}) + vpcInfo := &privatedns.VpcInfo{ + UniqVpcId: helper.String(value["uniq_vpc_id"].(string)), + Region: helper.String(value["region"].(string)), + } + vpcSets = append(vpcSets, vpcInfo) + } + request.VpcSet = vpcSets + } + + if v, ok := d.GetOk("account_vpc_set"); ok { + var accVpcSets = make([]*privatedns.AccountVpcInfo, 0) + items := v.([]interface{}) + for _, item := range items { + value := item.(map[string]interface{}) + accVpcInfo := &privatedns.AccountVpcInfo{ + UniqVpcId: helper.String(value["uniq_vpc_id"].(string)), + Region: helper.String(value["region"].(string)), + Uin: helper.String(value["uin"].(string)), + VpcName: helper.String(value["vpc_name"].(string)), + } + accVpcSets = append(accVpcSets, accVpcInfo) + } + request.AccountVpcSet = accVpcSets + } + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + _, e := meta.(*TencentCloudClient).apiV3Conn.UsePrivateDnsClient().ModifyPrivateZoneVpc(request) + if e != nil { + return retryError(e) + } + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s modify privateDns zone vpc failed, reason:%s\n", logId, err.Error()) + return err + } + } + return resourceTencentCloudDPrivateDnsZoneRead(d, meta) +} + +func resourceTencentCloudDPrivateDnsZoneDelete(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_private_dns_zone.delete")() + + logId := getLogId(contextNil) + + request := privatedns.NewDeletePrivateZoneRequest() + request.ZoneId = helper.String(d.Id()) + + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + _, e := meta.(*TencentCloudClient).apiV3Conn.UsePrivateDnsClient().DeletePrivateZone(request) + if e != nil { + return retryError(e) + } + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s delete privateDns zone failed, reason:%s\n", logId, err.Error()) + return err + } + return nil +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/LICENSE b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/LICENSE new file mode 100644 index 0000000000..efc75a2253 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2017-2018 Tencent Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/client.go new file mode 100644 index 0000000000..0a48dc5212 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/client.go @@ -0,0 +1,864 @@ +// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20201028 + +import ( + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const APIVersion = "2020-10-28" + +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 NewCreatePrivateZoneRequest() (request *CreatePrivateZoneRequest) { + request = &CreatePrivateZoneRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "CreatePrivateZone") + + return +} + +func NewCreatePrivateZoneResponse() (response *CreatePrivateZoneResponse) { + response = &CreatePrivateZoneResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreatePrivateZone +// 创建私有域 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEZONEFAILED = "FailedOperation.CreateZoneFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ILLEGALCIDR = "InvalidParameter.IllegalCidr" +// INVALIDPARAMETER_ILLEGALDOMAIN = "InvalidParameter.IllegalDomain" +// INVALIDPARAMETER_ILLEGALDOMAINTLD = "InvalidParameter.IllegalDomainTld" +// INVALIDPARAMETER_ILLEGALRECORD = "InvalidParameter.IllegalRecord" +// INVALIDPARAMETER_ILLEGALRECORDVALUE = "InvalidParameter.IllegalRecordValue" +// INVALIDPARAMETER_RECORDLEVELEXCEED = "InvalidParameter.RecordLevelExceed" +// INVALIDPARAMETER_VPCBINDED = "InvalidParameter.VpcBinded" +// INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" +// INVALIDPARAMETER_VPCPTRZONEBINDEXCEED = "InvalidParameter.VpcPtrZoneBindExceed" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_ROLEUNAUTHORIZED = "UnauthorizedOperation.RoleUnAuthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_ACCOUNTNOTBOUND = "UnsupportedOperation.AccountNotBound" +func (c *Client) CreatePrivateZone(request *CreatePrivateZoneRequest) (response *CreatePrivateZoneResponse, err error) { + if request == nil { + request = NewCreatePrivateZoneRequest() + } + response = NewCreatePrivateZoneResponse() + err = c.Send(request, response) + return +} + +func NewCreatePrivateZoneRecordRequest() (request *CreatePrivateZoneRecordRequest) { + request = &CreatePrivateZoneRecordRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "CreatePrivateZoneRecord") + + return +} + +func NewCreatePrivateZoneRecordResponse() (response *CreatePrivateZoneRecordResponse) { + response = &CreatePrivateZoneRecordResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreatePrivateZoneRecord +// 添加私有域解析记录 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATERECORDFAILED = "FailedOperation.CreateRecordFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ILLEGALPTRRECORD = "InvalidParameter.IllegalPTRRecord" +// INVALIDPARAMETER_ILLEGALRECORDVALUE = "InvalidParameter.IllegalRecordValue" +// INVALIDPARAMETER_INVALIDMX = "InvalidParameter.InvalidMX" +// INVALIDPARAMETER_RECORDAAAACOUNTEXCEED = "InvalidParameter.RecordAAAACountExceed" +// INVALIDPARAMETER_RECORDACOUNTEXCEED = "InvalidParameter.RecordACountExceed" +// INVALIDPARAMETER_RECORDCNAMECOUNTEXCEED = "InvalidParameter.RecordCNAMECountExceed" +// INVALIDPARAMETER_RECORDCONFLICT = "InvalidParameter.RecordConflict" +// INVALIDPARAMETER_RECORDCOUNTEXCEED = "InvalidParameter.RecordCountExceed" +// INVALIDPARAMETER_RECORDEXIST = "InvalidParameter.RecordExist" +// INVALIDPARAMETER_RECORDMXCOUNTEXCEED = "InvalidParameter.RecordMXCountExceed" +// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRolllimitCountExceed" +// INVALIDPARAMETER_RECORDTXTCOUNTEXCEED = "InvalidParameter.RecordTXTCountExceed" +// INVALIDPARAMETER_RECORDUNSUPPORTWEIGHT = "InvalidParameter.RecordUnsupportWeight" +// INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreatePrivateZoneRecord(request *CreatePrivateZoneRecordRequest) (response *CreatePrivateZoneRecordResponse, err error) { + if request == nil { + request = NewCreatePrivateZoneRecordRequest() + } + response = NewCreatePrivateZoneRecordResponse() + err = c.Send(request, response) + return +} + +func NewDeletePrivateZoneRequest() (request *DeletePrivateZoneRequest) { + request = &DeletePrivateZoneRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DeletePrivateZone") + + return +} + +func NewDeletePrivateZoneResponse() (response *DeletePrivateZoneResponse) { + response = &DeletePrivateZoneResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeletePrivateZone +// 删除私有域并停止解析 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DELETEZONEFAILED = "FailedOperation.DeleteZoneFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeletePrivateZone(request *DeletePrivateZoneRequest) (response *DeletePrivateZoneResponse, err error) { + if request == nil { + request = NewDeletePrivateZoneRequest() + } + response = NewDeletePrivateZoneResponse() + err = c.Send(request, response) + return +} + +func NewDeletePrivateZoneRecordRequest() (request *DeletePrivateZoneRecordRequest) { + request = &DeletePrivateZoneRecordRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DeletePrivateZoneRecord") + + return +} + +func NewDeletePrivateZoneRecordResponse() (response *DeletePrivateZoneRecordResponse) { + response = &DeletePrivateZoneRecordResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeletePrivateZoneRecord +// 删除私有域解析记录 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DELETELASTBINDVPCRECORDFAILED = "FailedOperation.DeleteLastBindVpcRecordFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeletePrivateZoneRecord(request *DeletePrivateZoneRecordRequest) (response *DeletePrivateZoneRecordResponse, err error) { + if request == nil { + request = NewDeletePrivateZoneRecordRequest() + } + response = NewDeletePrivateZoneRecordResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAuditLogRequest() (request *DescribeAuditLogRequest) { + request = &DescribeAuditLogRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DescribeAuditLog") + + return +} + +func NewDescribeAuditLogResponse() (response *DescribeAuditLogResponse) { + response = &DescribeAuditLogResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAuditLog +// 获取操作日志列表 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeAuditLog(request *DescribeAuditLogRequest) (response *DescribeAuditLogResponse, err error) { + if request == nil { + request = NewDescribeAuditLogRequest() + } + response = NewDescribeAuditLogResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDashboardRequest() (request *DescribeDashboardRequest) { + request = &DescribeDashboardRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DescribeDashboard") + + return +} + +func NewDescribeDashboardResponse() (response *DescribeDashboardResponse) { + response = &DescribeDashboardResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeDashboard +// 获取私有域解析概览 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeDashboard(request *DescribeDashboardRequest) (response *DescribeDashboardResponse, err error) { + if request == nil { + request = NewDescribeDashboardRequest() + } + response = NewDescribeDashboardResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrivateDNSAccountListRequest() (request *DescribePrivateDNSAccountListRequest) { + request = &DescribePrivateDNSAccountListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DescribePrivateDNSAccountList") + + return +} + +func NewDescribePrivateDNSAccountListResponse() (response *DescribePrivateDNSAccountListResponse) { + response = &DescribePrivateDNSAccountListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrivateDNSAccountList +// 获取私有域解析账号列表 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePrivateDNSAccountList(request *DescribePrivateDNSAccountListRequest) (response *DescribePrivateDNSAccountListResponse, err error) { + if request == nil { + request = NewDescribePrivateDNSAccountListRequest() + } + response = NewDescribePrivateDNSAccountListResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrivateZoneRequest() (request *DescribePrivateZoneRequest) { + request = &DescribePrivateZoneRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DescribePrivateZone") + + return +} + +func NewDescribePrivateZoneResponse() (response *DescribePrivateZoneResponse) { + response = &DescribePrivateZoneResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrivateZone +// 获取私有域信息 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePrivateZone(request *DescribePrivateZoneRequest) (response *DescribePrivateZoneResponse, err error) { + if request == nil { + request = NewDescribePrivateZoneRequest() + } + response = NewDescribePrivateZoneResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrivateZoneListRequest() (request *DescribePrivateZoneListRequest) { + request = &DescribePrivateZoneListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DescribePrivateZoneList") + + return +} + +func NewDescribePrivateZoneListResponse() (response *DescribePrivateZoneListResponse) { + response = &DescribePrivateZoneListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrivateZoneList +// 获取私有域列表 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePrivateZoneList(request *DescribePrivateZoneListRequest) (response *DescribePrivateZoneListResponse, err error) { + if request == nil { + request = NewDescribePrivateZoneListRequest() + } + response = NewDescribePrivateZoneListResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrivateZoneRecordListRequest() (request *DescribePrivateZoneRecordListRequest) { + request = &DescribePrivateZoneRecordListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DescribePrivateZoneRecordList") + + return +} + +func NewDescribePrivateZoneRecordListResponse() (response *DescribePrivateZoneRecordListResponse) { + response = &DescribePrivateZoneRecordListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrivateZoneRecordList +// 获取私有域记录列表 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePrivateZoneRecordList(request *DescribePrivateZoneRecordListRequest) (response *DescribePrivateZoneRecordListResponse, err error) { + if request == nil { + request = NewDescribePrivateZoneRecordListRequest() + } + response = NewDescribePrivateZoneRecordListResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrivateZoneServiceRequest() (request *DescribePrivateZoneServiceRequest) { + request = &DescribePrivateZoneServiceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DescribePrivateZoneService") + + return +} + +func NewDescribePrivateZoneServiceResponse() (response *DescribePrivateZoneServiceResponse) { + response = &DescribePrivateZoneServiceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrivateZoneService +// 查询私有域解析开通状态 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribePrivateZoneService(request *DescribePrivateZoneServiceRequest) (response *DescribePrivateZoneServiceResponse, err error) { + if request == nil { + request = NewDescribePrivateZoneServiceRequest() + } + response = NewDescribePrivateZoneServiceResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRequestDataRequest() (request *DescribeRequestDataRequest) { + request = &DescribeRequestDataRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "DescribeRequestData") + + return +} + +func NewDescribeRequestDataResponse() (response *DescribeRequestDataResponse) { + response = &DescribeRequestDataResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRequestData +// 获取私有域解析请求量 +// +// 可能返回的错误码: +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +func (c *Client) DescribeRequestData(request *DescribeRequestDataRequest) (response *DescribeRequestDataResponse, err error) { + if request == nil { + request = NewDescribeRequestDataRequest() + } + response = NewDescribeRequestDataResponse() + err = c.Send(request, response) + return +} + +func NewModifyPrivateZoneRequest() (request *ModifyPrivateZoneRequest) { + request = &ModifyPrivateZoneRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "ModifyPrivateZone") + + return +} + +func NewModifyPrivateZoneResponse() (response *ModifyPrivateZoneResponse) { + response = &ModifyPrivateZoneResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyPrivateZone +// 修改私有域信息 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_MODIFYZONEFAILED = "FailedOperation.ModifyZoneFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyPrivateZone(request *ModifyPrivateZoneRequest) (response *ModifyPrivateZoneResponse, err error) { + if request == nil { + request = NewModifyPrivateZoneRequest() + } + response = NewModifyPrivateZoneResponse() + err = c.Send(request, response) + return +} + +func NewModifyPrivateZoneRecordRequest() (request *ModifyPrivateZoneRecordRequest) { + request = &ModifyPrivateZoneRecordRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "ModifyPrivateZoneRecord") + + return +} + +func NewModifyPrivateZoneRecordResponse() (response *ModifyPrivateZoneRecordResponse) { + response = &ModifyPrivateZoneRecordResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyPrivateZoneRecord +// 修改私有域解析记录 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_MODIFYRECORDFAILED = "FailedOperation.ModifyRecordFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ILLEGALCIDR = "InvalidParameter.IllegalCidr" +// INVALIDPARAMETER_ILLEGALPTRRECORD = "InvalidParameter.IllegalPTRRecord" +// INVALIDPARAMETER_ILLEGALRECORD = "InvalidParameter.IllegalRecord" +// INVALIDPARAMETER_ILLEGALRECORDVALUE = "InvalidParameter.IllegalRecordValue" +// INVALIDPARAMETER_INVALIDMX = "InvalidParameter.InvalidMX" +// INVALIDPARAMETER_RECORDAAAACOUNTEXCEED = "InvalidParameter.RecordAAAACountExceed" +// INVALIDPARAMETER_RECORDACOUNTEXCEED = "InvalidParameter.RecordACountExceed" +// INVALIDPARAMETER_RECORDCNAMECOUNTEXCEED = "InvalidParameter.RecordCNAMECountExceed" +// INVALIDPARAMETER_RECORDCONFLICT = "InvalidParameter.RecordConflict" +// INVALIDPARAMETER_RECORDCOUNTEXCEED = "InvalidParameter.RecordCountExceed" +// INVALIDPARAMETER_RECORDEXIST = "InvalidParameter.RecordExist" +// INVALIDPARAMETER_RECORDLEVELEXCEED = "InvalidParameter.RecordLevelExceed" +// INVALIDPARAMETER_RECORDMXCOUNTEXCEED = "InvalidParameter.RecordMXCountExceed" +// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRolllimitCountExceed" +// INVALIDPARAMETER_RECORDTXTCOUNTEXCEED = "InvalidParameter.RecordTXTCountExceed" +// INVALIDPARAMETER_RECORDUNSUPPORTWEIGHT = "InvalidParameter.RecordUnsupportWeight" +// INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyPrivateZoneRecord(request *ModifyPrivateZoneRecordRequest) (response *ModifyPrivateZoneRecordResponse, err error) { + if request == nil { + request = NewModifyPrivateZoneRecordRequest() + } + response = NewModifyPrivateZoneRecordResponse() + err = c.Send(request, response) + return +} + +func NewModifyPrivateZoneVpcRequest() (request *ModifyPrivateZoneVpcRequest) { + request = &ModifyPrivateZoneVpcRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "ModifyPrivateZoneVpc") + + return +} + +func NewModifyPrivateZoneVpcResponse() (response *ModifyPrivateZoneVpcResponse) { + response = &ModifyPrivateZoneVpcResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyPrivateZoneVpc +// 修改私有域关联的VPC +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// AUTHFAILURE_TOKENFAILURE = "AuthFailure.TokenFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_BINDZONEVPCFAILED = "FailedOperation.BindZoneVpcFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ILLEGALVPCINFO = "InvalidParameter.IllegalVpcInfo" +// INVALIDPARAMETER_VPCBINDED = "InvalidParameter.VpcBinded" +// INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_ROLEUNAUTHORIZED = "UnauthorizedOperation.RoleUnAuthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyPrivateZoneVpc(request *ModifyPrivateZoneVpcRequest) (response *ModifyPrivateZoneVpcResponse, err error) { + if request == nil { + request = NewModifyPrivateZoneVpcRequest() + } + response = NewModifyPrivateZoneVpcResponse() + err = c.Send(request, response) + return +} + +func NewSubscribePrivateZoneServiceRequest() (request *SubscribePrivateZoneServiceRequest) { + request = &SubscribePrivateZoneServiceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("privatedns", APIVersion, "SubscribePrivateZoneService") + + return +} + +func NewSubscribePrivateZoneServiceResponse() (response *SubscribePrivateZoneServiceResponse) { + response = &SubscribePrivateZoneServiceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// SubscribePrivateZoneService +// 开通私有域解析 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) SubscribePrivateZoneService(request *SubscribePrivateZoneServiceRequest) (response *SubscribePrivateZoneServiceResponse, err error) { + if request == nil { + request = NewSubscribePrivateZoneServiceRequest() + } + response = NewSubscribePrivateZoneServiceResponse() + err = c.Send(request, response) + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/errors.go new file mode 100644 index 0000000000..76edf395a7 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/errors.go @@ -0,0 +1,184 @@ +// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20201028 + +const ( + // 此产品的特有错误码 + + // CAM签名/鉴权错误。 + AUTHFAILURE = "AuthFailure" + + // token校验失败。 + AUTHFAILURE_TOKENFAILURE = "AuthFailure.TokenFailure" + + // DryRun 操作,代表请求将会是成功的,只是多传了 DryRun 参数。 + DRYRUNOPERATION = "DryRunOperation" + + // 操作失败。 + FAILEDOPERATION = "FailedOperation" + + // 私有域关联VPC失败。 + FAILEDOPERATION_BINDZONEVPCFAILED = "FailedOperation.BindZoneVpcFailed" + + // 记录创建失败。 + FAILEDOPERATION_CREATERECORDFAILED = "FailedOperation.CreateRecordFailed" + + // 私有域创建失败。 + FAILEDOPERATION_CREATEZONEFAILED = "FailedOperation.CreateZoneFailed" + + // 当前私有域已关联 VPC,如需清空解析记录请先解除 VPC 关联。 + FAILEDOPERATION_DELETELASTBINDVPCRECORDFAILED = "FailedOperation.DeleteLastBindVpcRecordFailed" + + // 解析域删除失败。 + FAILEDOPERATION_DELETEZONEFAILED = "FailedOperation.DeleteZoneFailed" + + // 记录修改失败。 + FAILEDOPERATION_MODIFYRECORDFAILED = "FailedOperation.ModifyRecordFailed" + + // 私有域修改失败。 + FAILEDOPERATION_MODIFYZONEFAILED = "FailedOperation.ModifyZoneFailed" + + // 内部错误。 + INTERNALERROR = "InternalError" + + // 错误未定义。 + INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + + // 非法CIDR。 + INVALIDPARAMETER_ILLEGALCIDR = "InvalidParameter.IllegalCidr" + + // 域名不正确。 + INVALIDPARAMETER_ILLEGALDOMAIN = "InvalidParameter.IllegalDomain" + + // 顶级域名不正确。 + INVALIDPARAMETER_ILLEGALDOMAINTLD = "InvalidParameter.IllegalDomainTld" + + // PTR记录非法。 + INVALIDPARAMETER_ILLEGALPTRRECORD = "InvalidParameter.IllegalPTRRecord" + + // 记录不合法。 + INVALIDPARAMETER_ILLEGALRECORD = "InvalidParameter.IllegalRecord" + + // 无效的记录值。 + INVALIDPARAMETER_ILLEGALRECORDVALUE = "InvalidParameter.IllegalRecordValue" + + // VPC非法。 + INVALIDPARAMETER_ILLEGALVPCINFO = "InvalidParameter.IllegalVpcInfo" + + // MX 必须为5-50之间且为5的倍数。 + INVALIDPARAMETER_INVALIDMX = "InvalidParameter.InvalidMX" + + // AAAA记录负载均衡数量超过50。 + INVALIDPARAMETER_RECORDAAAACOUNTEXCEED = "InvalidParameter.RecordAAAACountExceed" + + // A记录负载均衡数量超过50。 + INVALIDPARAMETER_RECORDACOUNTEXCEED = "InvalidParameter.RecordACountExceed" + + // CNAME记录负载均衡数量超过50。 + INVALIDPARAMETER_RECORDCNAMECOUNTEXCEED = "InvalidParameter.RecordCNAMECountExceed" + + // 记录冲突。 + INVALIDPARAMETER_RECORDCONFLICT = "InvalidParameter.RecordConflict" + + // 记录数量超过限制。 + INVALIDPARAMETER_RECORDCOUNTEXCEED = "InvalidParameter.RecordCountExceed" + + // 记录已经存在。 + INVALIDPARAMETER_RECORDEXIST = "InvalidParameter.RecordExist" + + // 记录层级超过限制。 + INVALIDPARAMETER_RECORDLEVELEXCEED = "InvalidParameter.RecordLevelExceed" + + // MX记录负载均衡数量超过50。 + INVALIDPARAMETER_RECORDMXCOUNTEXCEED = "InvalidParameter.RecordMXCountExceed" + + // 记录不存在。 + INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" + + // 记录负载均衡数量超过限制。 + INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRolllimitCountExceed" + + // TXT记录负载均衡数量超过10。 + INVALIDPARAMETER_RECORDTXTCOUNTEXCEED = "InvalidParameter.RecordTXTCountExceed" + + // 当前记录类型不支持权重。 + INVALIDPARAMETER_RECORDUNSUPPORTWEIGHT = "InvalidParameter.RecordUnsupportWeight" + + // VPC已绑定其它解析域。 + INVALIDPARAMETER_VPCBINDED = "InvalidParameter.VpcBinded" + + // 当前VPC已关联相同主域名。 + INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" + + // VPC关联反解析域超过限制。 + INVALIDPARAMETER_VPCPTRZONEBINDEXCEED = "InvalidParameter.VpcPtrZoneBindExceed" + + // 解析域不存在。 + INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" + + // 参数取值错误。 + INVALIDPARAMETERVALUE = "InvalidParameterValue" + + // 超过配额限制。 + LIMITEXCEEDED = "LimitExceeded" + + // 缺少参数错误。 + MISSINGPARAMETER = "MissingParameter" + + // 操作被拒绝。 + OPERATIONDENIED = "OperationDenied" + + // 请求的次数超过了频率限制。 + REQUESTLIMITEXCEEDED = "RequestLimitExceeded" + + // 资源被占用。 + RESOURCEINUSE = "ResourceInUse" + + // 资源不足。 + RESOURCEINSUFFICIENT = "ResourceInsufficient" + + // 资源不存在。 + RESOURCENOTFOUND = "ResourceNotFound" + + // 私有域解析服务未开通。 + RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" + + // 资源不可用。 + RESOURCEUNAVAILABLE = "ResourceUnavailable" + + // 资源售罄。 + RESOURCESSOLDOUT = "ResourcesSoldOut" + + // 未授权操作。 + UNAUTHORIZEDOPERATION = "UnauthorizedOperation" + + // 角色未授权。 + UNAUTHORIZEDOPERATION_ROLEUNAUTHORIZED = "UnauthorizedOperation.RoleUnAuthorized" + + // 未实名账号。 + UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" + + // 未知参数错误。 + UNKNOWNPARAMETER = "UnknownParameter" + + // 操作不支持。 + UNSUPPORTEDOPERATION = "UnsupportedOperation" + + // 账号未绑定。 + UNSUPPORTEDOPERATION_ACCOUNTNOTBOUND = "UnsupportedOperation.AccountNotBound" +) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/models.go new file mode 100644 index 0000000000..454a94379e --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028/models.go @@ -0,0 +1,1179 @@ +// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20201028 + +import ( + "encoding/json" + tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +type AccountVpcInfo struct { + + // VpcId: vpc-xadsafsdasd + UniqVpcId *string `json:"UniqVpcId,omitempty" name:"UniqVpcId"` + + // Vpc所属地区: ap-guangzhou, ap-shanghai + // 注意:此字段可能返回 null,表示取不到有效值。 + Region *string `json:"Region,omitempty" name:"Region"` + + // Vpc所属账号: 123456789 + // 注意:此字段可能返回 null,表示取不到有效值。 + Uin *string `json:"Uin,omitempty" name:"Uin"` + + // vpc资源名称:testname + // 注意:此字段可能返回 null,表示取不到有效值。 + VpcName *string `json:"VpcName,omitempty" name:"VpcName"` +} + +type AccountVpcInfoOutput struct { + + // 关联账户的uin + Uin *string `json:"Uin,omitempty" name:"Uin"` + + // vpcid + UniqVpcId *string `json:"UniqVpcId,omitempty" name:"UniqVpcId"` + + // 地域 + Region *string `json:"Region,omitempty" name:"Region"` +} + +type AuditLog struct { + + // 日志类型 + Resource *string `json:"Resource,omitempty" name:"Resource"` + + // 日志表名 + Metric *string `json:"Metric,omitempty" name:"Metric"` + + // 日志总数 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 日志列表 + DataSet []*AuditLogInfo `json:"DataSet,omitempty" name:"DataSet"` +} + +type AuditLogInfo struct { + + // 时间 + Date *string `json:"Date,omitempty" name:"Date"` + + // 操作人uin + OperatorUin *string `json:"OperatorUin,omitempty" name:"OperatorUin"` + + // 日志内容 + Content *string `json:"Content,omitempty" name:"Content"` +} + +type CreatePrivateZoneRecordRequest struct { + *tchttp.BaseRequest + + // 私有域ID + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 记录类型,可选的记录类型为:"A", "AAAA", "CNAME", "MX", "TXT", "PTR" + RecordType *string `json:"RecordType,omitempty" name:"RecordType"` + + // 子域名,例如 "www", "m", "@" + SubDomain *string `json:"SubDomain,omitempty" name:"SubDomain"` + + // 记录值,例如 IP:192.168.10.2,CNAME:cname.qcloud.com.,MX:mail.qcloud.com. + RecordValue *string `json:"RecordValue,omitempty" name:"RecordValue"` + + // 记录权重,值为1-100 + Weight *int64 `json:"Weight,omitempty" name:"Weight"` + + // MX优先级:记录类型为MX时必填。取值范围:5,10,15,20,30,40,50 + MX *int64 `json:"MX,omitempty" name:"MX"` + + // 记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600 + TTL *int64 `json:"TTL,omitempty" name:"TTL"` +} + +func (r *CreatePrivateZoneRecordRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrivateZoneRecordRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + delete(f, "RecordType") + delete(f, "SubDomain") + delete(f, "RecordValue") + delete(f, "Weight") + delete(f, "MX") + delete(f, "TTL") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrivateZoneRecordRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrivateZoneRecordResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 记录Id + RecordId *string `json:"RecordId,omitempty" name:"RecordId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreatePrivateZoneRecordResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrivateZoneRecordResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrivateZoneRequest struct { + *tchttp.BaseRequest + + // 域名,格式必须是标准的TLD + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // 创建私有域的同时,为其打上标签 + TagSet []*TagInfo `json:"TagSet,omitempty" name:"TagSet"` + + // 创建私有域的同时,将其关联至VPC + VpcSet []*VpcInfo `json:"VpcSet,omitempty" name:"VpcSet"` + + // 备注 + Remark *string `json:"Remark,omitempty" name:"Remark"` + + // 是否开启子域名递归, ENABLED, DISABLED。默认值为DISABLED + DnsForwardStatus *string `json:"DnsForwardStatus,omitempty" name:"DnsForwardStatus"` + + // 创建私有域的同时,将其关联至VPC + Vpcs []*VpcInfo `json:"Vpcs,omitempty" name:"Vpcs"` + + // 创建私有域同时绑定关联账号的VPC + AccountVpcSet []*AccountVpcInfo `json:"AccountVpcSet,omitempty" name:"AccountVpcSet"` +} + +func (r *CreatePrivateZoneRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrivateZoneRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "TagSet") + delete(f, "VpcSet") + delete(f, "Remark") + delete(f, "DnsForwardStatus") + delete(f, "Vpcs") + delete(f, "AccountVpcSet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrivateZoneRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrivateZoneResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有域ID, zone-xxxxxx + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 私有域名 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreatePrivateZoneResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreatePrivateZoneResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DatePoint struct { + + // 时间 + Date *string `json:"Date,omitempty" name:"Date"` + + // 值 + Value *int64 `json:"Value,omitempty" name:"Value"` +} + +type DeletePrivateZoneRecordRequest struct { + *tchttp.BaseRequest + + // 私有域ID + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 记录ID + RecordId *string `json:"RecordId,omitempty" name:"RecordId"` + + // 记录ID数组,RecordId 优先 + RecordIdSet []*string `json:"RecordIdSet,omitempty" name:"RecordIdSet"` +} + +func (r *DeletePrivateZoneRecordRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrivateZoneRecordRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + delete(f, "RecordId") + delete(f, "RecordIdSet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrivateZoneRecordRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrivateZoneRecordResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeletePrivateZoneRecordResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrivateZoneRecordResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrivateZoneRequest struct { + *tchttp.BaseRequest + + // 私有域ID + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 私有域ID数组,ZoneId 优先 + ZoneIdSet []*string `json:"ZoneIdSet,omitempty" name:"ZoneIdSet"` +} + +func (r *DeletePrivateZoneRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrivateZoneRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + delete(f, "ZoneIdSet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrivateZoneRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrivateZoneResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeletePrivateZoneResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeletePrivateZoneResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAuditLogRequest struct { + *tchttp.BaseRequest + + // 请求量统计起始时间 + TimeRangeBegin *string `json:"TimeRangeBegin,omitempty" name:"TimeRangeBegin"` + + // 筛选参数:ZoneId:私有域ID;Domain:私有域;OperatorUin:操作者账号ID + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 请求量统计结束时间 + TimeRangeEnd *string `json:"TimeRangeEnd,omitempty" name:"TimeRangeEnd"` + + // 分页偏移量,从0开始 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 分页限制数目, 最大100,默认20 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeAuditLogRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAuditLogRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TimeRangeBegin") + delete(f, "Filters") + delete(f, "TimeRangeEnd") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAuditLogRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAuditLogResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 操作日志列表 + Data []*AuditLog `json:"Data,omitempty" name:"Data"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAuditLogResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeAuditLogResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDashboardRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeDashboardRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDashboardRequest) 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", "DescribeDashboardRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeDashboardResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有域解析总数 + ZoneTotal *int64 `json:"ZoneTotal,omitempty" name:"ZoneTotal"` + + // 私有域关联VPC数量 + ZoneVpcCount *int64 `json:"ZoneVpcCount,omitempty" name:"ZoneVpcCount"` + + // 历史请求量总数 + RequestTotalCount *int64 `json:"RequestTotalCount,omitempty" name:"RequestTotalCount"` + + // 流量包用量 + FlowUsage []*FlowUsage `json:"FlowUsage,omitempty" name:"FlowUsage"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeDashboardResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeDashboardResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateDNSAccountListRequest struct { + *tchttp.BaseRequest + + // 分页偏移量,从0开始 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 分页限制数目, 最大100,默认20 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤参数 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribePrivateDNSAccountListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateDNSAccountListRequest) 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", "DescribePrivateDNSAccountListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateDNSAccountListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有域解析账号数量 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 私有域解析账号列表 + AccountSet []*PrivateDNSAccount `json:"AccountSet,omitempty" name:"AccountSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrivateDNSAccountListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateDNSAccountListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateZoneListRequest struct { + *tchttp.BaseRequest + + // 分页偏移量,从0开始 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 分页限制数目, 最大100,默认20 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤参数 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribePrivateZoneListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateZoneListRequest) 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", "DescribePrivateZoneListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateZoneListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有域数量 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 私有域列表 + PrivateZoneSet []*PrivateZone `json:"PrivateZoneSet,omitempty" name:"PrivateZoneSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrivateZoneListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateZoneListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateZoneRecordListRequest struct { + *tchttp.BaseRequest + + // 私有域ID: zone-xxxxxx + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 过滤参数 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 分页偏移量,从0开始 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 分页限制数目, 最大100,默认20 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribePrivateZoneRecordListRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateZoneRecordListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrivateZoneRecordListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateZoneRecordListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 解析记录数量 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 解析记录列表 + RecordSet []*PrivateZoneRecord `json:"RecordSet,omitempty" name:"RecordSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrivateZoneRecordListResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateZoneRecordListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateZoneRequest struct { + *tchttp.BaseRequest + + // 域名,格式必须是标准的TLD + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` +} + +func (r *DescribePrivateZoneRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateZoneRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrivateZoneRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateZoneResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有域详情 + PrivateZone *PrivateZone `json:"PrivateZone,omitempty" name:"PrivateZone"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrivateZoneResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateZoneResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateZoneServiceRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribePrivateZoneServiceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateZoneServiceRequest) 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", "DescribePrivateZoneServiceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrivateZoneServiceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有域解析服务开通状态。ENABLED已开通,DISABLED未开通 + ServiceStatus *string `json:"ServiceStatus,omitempty" name:"ServiceStatus"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrivateZoneServiceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribePrivateZoneServiceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRequestDataRequest struct { + *tchttp.BaseRequest + + // 请求量统计起始时间,格式:2020-11-22 00:00:00 + TimeRangeBegin *string `json:"TimeRangeBegin,omitempty" name:"TimeRangeBegin"` + + // 筛选参数: + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 请求量统计结束时间,格式:2020-11-22 23:59:59 + TimeRangeEnd *string `json:"TimeRangeEnd,omitempty" name:"TimeRangeEnd"` +} + +func (r *DescribeRequestDataRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRequestDataRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TimeRangeBegin") + delete(f, "Filters") + delete(f, "TimeRangeEnd") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRequestDataRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRequestDataResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 请求量统计表 + Data []*MetricData `json:"Data,omitempty" name:"Data"` + + // 请求量单位时间: Day:天,Hour:小时 + Interval *string `json:"Interval,omitempty" name:"Interval"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeRequestDataResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRequestDataResponse) 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 FlowUsage struct { + + // 流量包类型:ZONE 私有域;TRAFFIC 解析流量包 + FlowType *string `json:"FlowType,omitempty" name:"FlowType"` + + // 流量包总额度 + TotalQuantity *int64 `json:"TotalQuantity,omitempty" name:"TotalQuantity"` + + // 流量包可用额度 + AvailableQuantity *int64 `json:"AvailableQuantity,omitempty" name:"AvailableQuantity"` +} + +type MetricData struct { + + // 资源描述 + Resource *string `json:"Resource,omitempty" name:"Resource"` + + // 表名 + Metric *string `json:"Metric,omitempty" name:"Metric"` + + // 表数据 + DataSet []*DatePoint `json:"DataSet,omitempty" name:"DataSet"` +} + +type ModifyPrivateZoneRecordRequest struct { + *tchttp.BaseRequest + + // 私有域ID + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 记录ID + RecordId *string `json:"RecordId,omitempty" name:"RecordId"` + + // 记录类型,可选的记录类型为:"A", "AAAA", "CNAME", "MX", "TXT", "PTR" + RecordType *string `json:"RecordType,omitempty" name:"RecordType"` + + // 子域名,例如 "www", "m", "@" + SubDomain *string `json:"SubDomain,omitempty" name:"SubDomain"` + + // 记录值,例如 IP:192.168.10.2,CNAME:cname.qcloud.com.,MX:mail.qcloud.com. + RecordValue *string `json:"RecordValue,omitempty" name:"RecordValue"` + + // 记录权重,值为1-100 + Weight *int64 `json:"Weight,omitempty" name:"Weight"` + + // MX优先级:记录类型为MX时必填。取值范围:5,10,15,20,30,40,50 + MX *int64 `json:"MX,omitempty" name:"MX"` + + // 记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600 + TTL *int64 `json:"TTL,omitempty" name:"TTL"` +} + +func (r *ModifyPrivateZoneRecordRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrivateZoneRecordRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + delete(f, "RecordId") + delete(f, "RecordType") + delete(f, "SubDomain") + delete(f, "RecordValue") + delete(f, "Weight") + delete(f, "MX") + delete(f, "TTL") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrivateZoneRecordRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrivateZoneRecordResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyPrivateZoneRecordResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrivateZoneRecordResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrivateZoneRequest struct { + *tchttp.BaseRequest + + // 私有域ID + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 备注 + Remark *string `json:"Remark,omitempty" name:"Remark"` + + // 是否开启子域名递归, ENABLED, DISABLED + DnsForwardStatus *string `json:"DnsForwardStatus,omitempty" name:"DnsForwardStatus"` +} + +func (r *ModifyPrivateZoneRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrivateZoneRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + delete(f, "Remark") + delete(f, "DnsForwardStatus") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrivateZoneRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrivateZoneResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyPrivateZoneResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrivateZoneResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrivateZoneVpcRequest struct { + *tchttp.BaseRequest + + // 私有域ID + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 私有域关联的全部VPC列表 + VpcSet []*VpcInfo `json:"VpcSet,omitempty" name:"VpcSet"` + + // 私有域账号关联的全部VPC列表 + AccountVpcSet []*AccountVpcInfo `json:"AccountVpcSet,omitempty" name:"AccountVpcSet"` +} + +func (r *ModifyPrivateZoneVpcRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrivateZoneVpcRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + delete(f, "VpcSet") + delete(f, "AccountVpcSet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrivateZoneVpcRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrivateZoneVpcResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有域ID, zone-xxxxxx + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 解析域关联的VPC列表 + VpcSet []*VpcInfo `json:"VpcSet,omitempty" name:"VpcSet"` + + // 私有域账号关联的全部VPC列表 + AccountVpcSet []*AccountVpcInfoOutput `json:"AccountVpcSet,omitempty" name:"AccountVpcSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyPrivateZoneVpcResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyPrivateZoneVpcResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type PrivateDNSAccount struct { + + // 主账号Uin + Uin *string `json:"Uin,omitempty" name:"Uin"` + + // 主账号名称 + Account *string `json:"Account,omitempty" name:"Account"` + + // 用户昵称 + Nickname *string `json:"Nickname,omitempty" name:"Nickname"` +} + +type PrivateZone struct { + + // 私有域id: zone-xxxxxxxx + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 域名所有者uin + OwnerUin *int64 `json:"OwnerUin,omitempty" name:"OwnerUin"` + + // 私有域名 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // 创建时间 + CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"` + + // 修改时间 + UpdatedOn *string `json:"UpdatedOn,omitempty" name:"UpdatedOn"` + + // 记录数 + RecordCount *int64 `json:"RecordCount,omitempty" name:"RecordCount"` + + // 备注 + // 注意:此字段可能返回 null,表示取不到有效值。 + Remark *string `json:"Remark,omitempty" name:"Remark"` + + // 绑定的Vpc列表 + VpcSet []*VpcInfo `json:"VpcSet,omitempty" name:"VpcSet"` + + // 私有域状态:正常解析:ENABLED, 暂停解析:SUSPEND, 锁定:FROZEN + Status *string `json:"Status,omitempty" name:"Status"` + + // 域名递归解析状态:开通:ENABLED, 关闭,DISABLED + DnsForwardStatus *string `json:"DnsForwardStatus,omitempty" name:"DnsForwardStatus"` + + // 标签键值对集合 + Tags []*TagInfo `json:"Tags,omitempty" name:"Tags"` + + // 绑定的关联账号的vpc列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + AccountVpcSet []*AccountVpcInfoOutput `json:"AccountVpcSet,omitempty" name:"AccountVpcSet"` +} + +type PrivateZoneRecord struct { + + // 记录id + RecordId *string `json:"RecordId,omitempty" name:"RecordId"` + + // 私有域id: zone-xxxxxxxx + ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"` + + // 子域名 + SubDomain *string `json:"SubDomain,omitempty" name:"SubDomain"` + + // 记录类型,可选的记录类型为:"A", "AAAA", "CNAME", "MX", "TXT", "PTR" + RecordType *string `json:"RecordType,omitempty" name:"RecordType"` + + // 记录值 + RecordValue *string `json:"RecordValue,omitempty" name:"RecordValue"` + + // 记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600 + TTL *int64 `json:"TTL,omitempty" name:"TTL"` + + // MX优先级:记录类型为MX时必填。取值范围:5,10,15,20,30,40,50 + // 注意:此字段可能返回 null,表示取不到有效值。 + MX *int64 `json:"MX,omitempty" name:"MX"` + + // 记录状态:ENABLED + Status *string `json:"Status,omitempty" name:"Status"` + + // 记录权重,值为1-100 + // 注意:此字段可能返回 null,表示取不到有效值。 + Weight *int64 `json:"Weight,omitempty" name:"Weight"` + + // 记录创建时间 + CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"` + + // 记录更新时间 + UpdatedOn *string `json:"UpdatedOn,omitempty" name:"UpdatedOn"` + + // 附加信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Extra *string `json:"Extra,omitempty" name:"Extra"` +} + +type SubscribePrivateZoneServiceRequest struct { + *tchttp.BaseRequest +} + +func (r *SubscribePrivateZoneServiceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SubscribePrivateZoneServiceRequest) 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", "SubscribePrivateZoneServiceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type SubscribePrivateZoneServiceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 私有域解析服务开通状态 + ServiceStatus *string `json:"ServiceStatus,omitempty" name:"ServiceStatus"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SubscribePrivateZoneServiceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *SubscribePrivateZoneServiceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type TagInfo struct { + + // 标签键 + TagKey *string `json:"TagKey,omitempty" name:"TagKey"` + + // 标签值 + TagValue *string `json:"TagValue,omitempty" name:"TagValue"` +} + +type VpcInfo struct { + + // VpcId: vpc-xadsafsdasd + UniqVpcId *string `json:"UniqVpcId,omitempty" name:"UniqVpcId"` + + // Vpc所属地区: ap-guangzhou, ap-shanghai + Region *string `json:"Region,omitempty" name:"Region"` +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 0a11e1d220..872a385970 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -583,6 +583,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb/v20190725 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor/v20180724 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.290 +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis/v20180412 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf v1.0.275 diff --git a/website/docs/r/private_dns_zone.html.markdown b/website/docs/r/private_dns_zone.html.markdown new file mode 100644 index 0000000000..a0cb23c264 --- /dev/null +++ b/website/docs/r/private_dns_zone.html.markdown @@ -0,0 +1,81 @@ +--- +subcategory: "PRIVATE DNS" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_private_dns_zone" +sidebar_current: "docs-tencentcloud-resource-private_dns_zone" +description: |- + Provide a resource to create a Private Dns Zone. +--- + +# tencentcloud_private_dns_zone + +Provide a resource to create a Private Dns Zone. + +## Example Usage + +```hcl +resource "tencentcloud_private_dns_zone" "foo" { + domain = "domain.com" + tag_set { + tag_key = "created_by" + tag_value = "tag" + } + vpc_set { + region = "ap-guangzhou" + uniq_vpc_id = "vpc-xxxxx" + } + remark = "test" + dns_forward_status = "DISABLED" + account_vpc_set { + uin = "454xxxxxxx" + region = "ap-guangzhou" + uniq_vpc_id = "vpc-xxxxx" + vpc_name = "test-redis" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `domain` - (Required) Domain name, which must be in the format of standard TLD. +* `account_vpc_set` - (Optional) List of authorized accounts' VPCs to associate with the private domain. +* `dns_forward_status` - (Optional) Whether to enable subdomain recursive DNS. Valid values: ENABLED, DISABLED. Default value: DISABLED. +* `remark` - (Optional) Remarks. +* `tag_set` - (Optional) Tags the private domain when it is created. +* `vpc_set` - (Optional) Associates the private domain to a VPC when it is created. + +The `account_vpc_set` object supports the following: + +* `region` - (Required) Region. +* `uin` - (Required) UIN of the VPC account. +* `uniq_vpc_id` - (Required) VPC ID. +* `vpc_name` - (Required) VPC NAME. + +The `tag_set` object supports the following: + +* `tag_key` - (Required) Key of Tag. +* `tag_value` - (Required) Value of Tag. + +The `vpc_set` object supports the following: + +* `region` - (Required) VPC REGION. +* `uniq_vpc_id` - (Required) VPC ID. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + +## Import + +Private Dns Zone can be imported, e.g. + +``` +$ terraform import tencentcloud_private_dns_zone.foo zone_id +``` + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index c8b4baeff5..e074a2bba1 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -1022,6 +1022,20 @@ +
  • + PRIVATE DNS + +
  • PostgreSQL