diff --git a/.changelog/3583.txt b/.changelog/3583.txt new file mode 100644 index 0000000000..769b5ab3b8 --- /dev/null +++ b/.changelog/3583.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +tencentcloud_private_dns_inbound_endpoint +``` \ No newline at end of file diff --git a/go.mod b/go.mod index e7f9bb4591..72bb40d0de 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.853 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.1156 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.1038 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.1.42 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.1008 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/rum v1.0.744 diff --git a/go.sum b/go.sum index fb734fdeff..df8336e108 100644 --- a/go.sum +++ b/go.sum @@ -1045,6 +1045,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.1156 h1:z github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.1156/go.mod h1:B1+7f2z0qF8G2EjFzPXtqHK3tPbzqb2y725eW1wIkaM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.1038 h1:4rzyVxkDB27v73jDXPr5eGAwjN859R7SsqniCt+46XE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.1038/go.mod h1:TAHhxxDVV36Pe4P4Gel3dgX4kHUfQO7f27GzRf8DAro= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.1.42 h1:iTpAHqJrenwbFF1kE4DqYeuOMcm50L0YEoVTOQ3n/Ck= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.1.42/go.mod h1:nhF6hHhT7CJZC03MMwL1/QYDI/0q9rAcW/4tf0nhfFc= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762 h1:rZDKucVVtTnmnbZFDyh6t47dHswkb2oSuOxOHTTkygA= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762/go.mod h1:QB/XcdVZ8mhRgk90XuXd+2Smfo8emTo0wHIUsygEaKs= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.1008 h1:Mo0njOK81dsBe6FBOieaGeHAVpo/PsYzDTeHovc57bA= diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 93f69699fa..d1096ee99c 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -1895,6 +1895,7 @@ func Provider() *schema.Provider { "tencentcloud_private_dns_forward_rule": privatedns.ResourceTencentCloudPrivateDnsForwardRule(), "tencentcloud_private_dns_end_point": privatedns.ResourceTencentCloudPrivateDnsEndPoint(), "tencentcloud_private_dns_extend_end_point": privatedns.ResourceTencentCloudPrivateDnsExtendEndPoint(), + "tencentcloud_private_dns_inbound_endpoint": privatedns.ResourceTencentCloudPrivateDnsInboundEndpoint(), "tencentcloud_cls_logset": cls.ResourceTencentCloudClsLogset(), "tencentcloud_cls_topic": cls.ResourceTencentCloudClsTopic(), "tencentcloud_cls_config": cls.ResourceTencentCloudClsConfig(), diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md index c26b0b41fa..afcce670bb 100644 --- a/tencentcloud/provider.md +++ b/tencentcloud/provider.md @@ -1401,6 +1401,7 @@ tencentcloud_subscribe_private_zone_service tencentcloud_private_dns_forward_rule tencentcloud_private_dns_end_point tencentcloud_private_dns_extend_end_point +tencentcloud_private_dns_inbound_endpoint Data Source tencentcloud_private_dns_records diff --git a/tencentcloud/services/privatedns/data_source_tc_private_dns_end_points.go b/tencentcloud/services/privatedns/data_source_tc_private_dns_end_points.go index c8891ddd1d..512f00d3d4 100644 --- a/tencentcloud/services/privatedns/data_source_tc_private_dns_end_points.go +++ b/tencentcloud/services/privatedns/data_source_tc_private_dns_end_points.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - privatednsv20201028 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028" + privatednsIntlv20201028 "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/privatedns/v20201028" tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" @@ -117,10 +117,10 @@ func dataSourceTencentCloudPrivateDnsEndPointsRead(d *schema.ResourceData, meta paramMap := make(map[string]interface{}) if v, ok := d.GetOk("filters"); ok { filtersSet := v.([]interface{}) - tmpSet := make([]*privatednsv20201028.Filter, 0, len(filtersSet)) + tmpSet := make([]*privatednsIntlv20201028.Filter, 0, len(filtersSet)) for _, item := range filtersSet { filtersMap := item.(map[string]interface{}) - filter := privatednsv20201028.Filter{} + filter := privatednsIntlv20201028.Filter{} if v, ok := filtersMap["name"]; ok { filter.Name = helper.String(v.(string)) } @@ -139,7 +139,7 @@ func dataSourceTencentCloudPrivateDnsEndPointsRead(d *schema.ResourceData, meta paramMap["Filters"] = tmpSet } - var respData []*privatednsv20201028.EndPointInfo + var respData []*privatednsIntlv20201028.EndPointInfo err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { result, e := service.DescribePrivateDnsEndPointsByFilter(ctx, paramMap) if e != nil { diff --git a/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint.go b/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint.go new file mode 100644 index 0000000000..b898cba480 --- /dev/null +++ b/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint.go @@ -0,0 +1,257 @@ +package privatedns + +import ( + "context" + "fmt" + "log" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + privatednsv20201028 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028" + + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func ResourceTencentCloudPrivateDnsInboundEndpoint() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudPrivateDnsInboundEndpointCreate, + Read: resourceTencentCloudPrivateDnsInboundEndpointRead, + Update: resourceTencentCloudPrivateDnsInboundEndpointUpdate, + Delete: resourceTencentCloudPrivateDnsInboundEndpointDelete, + Schema: map[string]*schema.Schema{ + "endpoint_name": { + Type: schema.TypeString, + Required: true, + Description: "Name.", + }, + + "endpoint_region": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Region.", + }, + + "endpoint_vpc": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "VPC ID.", + }, + + "subnet_ip": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + Description: "Subnet information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "subnet_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Subnet ID.", + }, + "subnet_vip": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + Description: "IP address.", + }, + }, + }, + }, + }, + } +} + +func resourceTencentCloudPrivateDnsInboundEndpointCreate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_private_dns_inbound_endpoint.create")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + request = privatednsv20201028.NewCreateInboundEndpointRequest() + response = privatednsv20201028.NewCreateInboundEndpointResponse() + endpointId string + ) + + if v, ok := d.GetOk("endpoint_name"); ok { + request.EndpointName = helper.String(v.(string)) + } + + if v, ok := d.GetOk("endpoint_region"); ok { + request.EndpointRegion = helper.String(v.(string)) + } + + if v, ok := d.GetOk("endpoint_vpc"); ok { + request.EndpointVpc = helper.String(v.(string)) + } + + if v, ok := d.GetOk("subnet_ip"); ok { + for _, item := range v.([]interface{}) { + subnetIpMap := item.(map[string]interface{}) + subnetIpInfo := privatednsv20201028.SubnetIpInfo{} + if v, ok := subnetIpMap["subnet_id"].(string); ok && v != "" { + subnetIpInfo.SubnetId = helper.String(v) + } + + if v, ok := subnetIpMap["subnet_vip"].(string); ok && v != "" { + subnetIpInfo.SubnetVip = helper.String(v) + } + + request.SubnetIp = append(request.SubnetIp, &subnetIpInfo) + } + } + + reqErr := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UsePrivatednsV20201028Client().CreateInboundEndpointWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + if result == nil || result.Response == nil { + return resource.NonRetryableError(fmt.Errorf("Create private dns inbound endpoint failed, Response is nil.")) + } + + response = result + return nil + }) + + if reqErr != nil { + log.Printf("[CRITAL]%s create private dns inbound endpoint failed, reason:%+v", logId, reqErr) + return reqErr + } + + if response.Response.EndpointId == nil { + return fmt.Errorf("EndpointId is nil.") + } + + endpointId = *response.Response.EndpointId + d.SetId(endpointId) + return resourceTencentCloudPrivateDnsInboundEndpointRead(d, meta) +} + +func resourceTencentCloudPrivateDnsInboundEndpointRead(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_private_dns_inbound_endpoint.read")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + service = PrivatednsService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + endpointId = d.Id() + ) + + respData, err := service.DescribePrivateDnsInboundEndpointById(ctx, endpointId) + if err != nil { + return err + } + + if respData == nil { + log.Printf("[WARN]%s resource `tencentcloud_private_dns_inbound_endpoint` [%s] not found, please check if it has been deleted.\n", logId, d.Id()) + d.SetId("") + return nil + } + + if respData.EndPointName != nil { + _ = d.Set("endpoint_name", respData.EndPointName) + } + + if respData.UniqVpcId != nil { + _ = d.Set("endpoint_vpc", respData.UniqVpcId) + } + + if respData.EndPointService != nil { + tmpList := make([]map[string]interface{}, 0, len(respData.EndPointService)) + for _, item := range respData.EndPointService { + dMap := make(map[string]interface{}, 0) + if item.UniqSubnetId != nil { + dMap["subnet_id"] = item.UniqSubnetId + } + + if item.EndPointVip != nil { + dMap["subnet_vip"] = item.EndPointVip + } + + tmpList = append(tmpList, dMap) + } + + _ = d.Set("subnet_ip", tmpList) + } + + return nil +} + +func resourceTencentCloudPrivateDnsInboundEndpointUpdate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_private_dns_inbound_endpoint.update")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + endpointId = d.Id() + ) + + if d.HasChange("endpoint_name") { + request := privatednsv20201028.NewModifyInboundEndpointRequest() + if v, ok := d.GetOk("endpoint_name"); ok { + request.EndpointName = helper.String(v.(string)) + } + + request.EndpointId = &endpointId + reqErr := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UsePrivatednsV20201028Client().ModifyInboundEndpointWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + return nil + }) + + if reqErr != nil { + log.Printf("[CRITAL]%s update private dns inbound endpoint failed, reason:%+v", logId, reqErr) + return reqErr + } + } + + return resourceTencentCloudPrivateDnsInboundEndpointRead(d, meta) +} + +func resourceTencentCloudPrivateDnsInboundEndpointDelete(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_private_dns_inbound_endpoint.delete")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + request = privatednsv20201028.NewDeleteInboundEndpointRequest() + endpointId = d.Id() + ) + + request.EndpointId = &endpointId + reqErr := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UsePrivatednsV20201028Client().DeleteInboundEndpointWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + return nil + }) + + if reqErr != nil { + log.Printf("[CRITAL]%s delete private dns inbound endpoint failed, reason:%+v", logId, reqErr) + return reqErr + } + + return nil +} diff --git a/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint.md b/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint.md new file mode 100644 index 0000000000..1554c7c3b6 --- /dev/null +++ b/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint.md @@ -0,0 +1,24 @@ +Provides a resource to create a Private Dns inbound endpoint + +Example Usage + +```hcl +resource "tencentcloud_private_dns_inbound_endpoint" "example" { + endpoint_name = "tf-example" + endpoint_region = "ap-guangzhou" + endpoint_vpc = "vpc-i5yyodl9" + subnet_ip { + subnet_id = "subnet-hhi88a58" + subnet_vip = "10.0.30.2" + } + + subnet_ip { + subnet_id = "subnet-5rrirqyc" + subnet_vip = "10.0.0.11" + } + + subnet_ip { + subnet_id = "subnet-60ut6n10" + } +} +``` diff --git a/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint_test.go b/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint_test.go new file mode 100644 index 0000000000..8aeeefec18 --- /dev/null +++ b/tencentcloud/services/privatedns/resource_tc_private_dns_inbound_endpoint_test.go @@ -0,0 +1,71 @@ +package privatedns_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + + tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest" +) + +func TestAccTencentCloudPrivateDnsInboundEndpointResource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + tcacctest.AccPreCheck(t) + }, + Providers: tcacctest.AccProviders, + Steps: []resource.TestStep{ + { + Config: testAccPrivateDnsInboundEndpoint, + Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_private_dns_inbound_endpoint.example", "id")), + }, + { + Config: testAccPrivateDnsInboundEndpointUpdate, + Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_private_dns_inbound_endpoint.example", "id")), + }, + }, + }) +} + +const testAccPrivateDnsInboundEndpoint = ` +resource "tencentcloud_private_dns_inbound_endpoint" "example" { + endpoint_name = "tf-example" + endpoint_region = "ap-guangzhou" + endpoint_vpc = "vpc-i5yyodl9" + subnet_ip { + subnet_id = "subnet-hhi88a58" + subnet_vip = "10.0.30.2" + } + + subnet_ip { + subnet_id = "subnet-5rrirqyc" + subnet_vip = "10.0.0.11" + } + + subnet_ip { + subnet_id = "subnet-60ut6n10" + } +} +` + +const testAccPrivateDnsInboundEndpointUpdate = ` +resource "tencentcloud_private_dns_inbound_endpoint" "example" { + endpoint_name = "tf-example-update" + endpoint_region = "ap-guangzhou" + endpoint_vpc = "vpc-i5yyodl9" + subnet_ip { + subnet_id = "subnet-hhi88a58" + subnet_vip = "10.0.30.2" + } + + subnet_ip { + subnet_id = "subnet-5rrirqyc" + subnet_vip = "10.0.0.11" + } + + subnet_ip { + subnet_id = "subnet-60ut6n10" + } +} +` diff --git a/tencentcloud/services/privatedns/service_tencentcloud_private_dns.go b/tencentcloud/services/privatedns/service_tencentcloud_private_dns.go index 1ce822a05f..c160c726a5 100644 --- a/tencentcloud/services/privatedns/service_tencentcloud_private_dns.go +++ b/tencentcloud/services/privatedns/service_tencentcloud_private_dns.go @@ -445,10 +445,10 @@ func (me *PrivatednsService) DescribePrivateDnsForwardRulesByFilter(ctx context. return } -func (me *PrivatednsService) DescribePrivateDnsEndPointsByFilter(ctx context.Context, param map[string]interface{}) (ret []*privatedns.EndPointInfo, errRet error) { +func (me *PrivatednsService) DescribePrivateDnsEndPointsByFilter(ctx context.Context, param map[string]interface{}) (ret []*privatednsIntlv20201028.EndPointInfo, errRet error) { var ( logId = tccommon.GetLogId(ctx) - request = privatedns.NewDescribeEndPointListRequest() + request = privatednsIntlv20201028.NewDescribeEndPointListRequest() ) defer func() { @@ -459,7 +459,7 @@ func (me *PrivatednsService) DescribePrivateDnsEndPointsByFilter(ctx context.Con for k, v := range param { if k == "Filters" { - request.Filters = v.([]*privatedns.Filter) + request.Filters = v.([]*privatednsIntlv20201028.Filter) } } @@ -472,7 +472,7 @@ func (me *PrivatednsService) DescribePrivateDnsEndPointsByFilter(ctx context.Con for { request.Offset = &offset request.Limit = &limit - response, err := me.client.UsePrivatednsV20201028Client().DescribeEndPointList(request) + response, err := me.client.UsePrivatednsIntlV20201028Client().DescribeEndPointList(request) if err != nil { errRet = err return @@ -541,3 +541,47 @@ func (me *PrivateDnsService) DescribePrivateDnsRecordById(ctx context.Context, z recordInfo = response.Response.RecordInfo return } + +func (me *PrivatednsService) DescribePrivateDnsInboundEndpointById(ctx context.Context, endpointId string) (ret *privatedns.InboundEndpointSet, errRet error) { + logId := tccommon.GetLogId(ctx) + + request := privatedns.NewDescribeInboundEndpointListRequest() + response := privatedns.NewDescribeInboundEndpointListResponse() + request.Filters = []*privatedns.Filter{ + { + Name: common.StringPtr("EndPointId"), + Values: common.StringPtrs([]string{endpointId}), + }, + } + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + ratelimit.Check(request.GetAction()) + result, e := me.client.UsePrivatednsV20201028Client().DescribeInboundEndpointList(request) + if e != nil { + return tccommon.RetryError(e, PRIVATEDNS_CUSTOM_RETRY_SDK_ERROR...) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + if result == nil || result.Response == nil || result.Response.InboundEndpointSet == nil || len(result.Response.InboundEndpointSet) == 0 { + return resource.NonRetryableError(fmt.Errorf("Describe inbound endpoint list failed, Response is nil.")) + } + + response = result + return nil + }) + + if err != nil { + errRet = err + return + } + + ret = response.Response.InboundEndpointSet[0] + return +} 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 index 0f3b3f930d..ee9b957572 100644 --- 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// Copyright (c) 2017-2025 Tencent. 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. @@ -142,6 +142,7 @@ func (c *Client) AddSpecifyPrivateZoneVpcWithContext(ctx context.Context, reques if request == nil { request = NewAddSpecifyPrivateZoneVpcRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "AddSpecifyPrivateZoneVpc") if c.GetCredential() == nil { return nil, errors.New("AddSpecifyPrivateZoneVpc require credential") @@ -154,26 +155,26 @@ func (c *Client) AddSpecifyPrivateZoneVpcWithContext(ctx context.Context, reques return } -func NewCreateEndPointRequest() (request *CreateEndPointRequest) { - request = &CreateEndPointRequest{ +func NewCreateExtendEndpointRequest() (request *CreateExtendEndpointRequest) { + request = &CreateExtendEndpointRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("privatedns", APIVersion, "CreateEndPoint") + request.Init().WithApiInfo("privatedns", APIVersion, "CreateExtendEndpoint") return } -func NewCreateEndPointResponse() (response *CreateEndPointResponse) { - response = &CreateEndPointResponse{ +func NewCreateExtendEndpointResponse() (response *CreateExtendEndpointResponse) { + response = &CreateExtendEndpointResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// CreateEndPoint +// CreateExtendEndpoint // 创建终端节点 // // 可能返回的错误码: @@ -197,11 +198,11 @@ func NewCreateEndPointResponse() (response *CreateEndPointResponse) { // UNAUTHORIZEDOPERATION_ROLEUNAUTHORIZED = "UnauthorizedOperation.RoleUnAuthorized" // UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" // UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) CreateEndPoint(request *CreateEndPointRequest) (response *CreateEndPointResponse, err error) { - return c.CreateEndPointWithContext(context.Background(), request) +func (c *Client) CreateExtendEndpoint(request *CreateExtendEndpointRequest) (response *CreateExtendEndpointResponse, err error) { + return c.CreateExtendEndpointWithContext(context.Background(), request) } -// CreateEndPoint +// CreateExtendEndpoint // 创建终端节点 // // 可能返回的错误码: @@ -225,184 +226,169 @@ func (c *Client) CreateEndPoint(request *CreateEndPointRequest) (response *Creat // UNAUTHORIZEDOPERATION_ROLEUNAUTHORIZED = "UnauthorizedOperation.RoleUnAuthorized" // UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" // UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) CreateEndPointWithContext(ctx context.Context, request *CreateEndPointRequest) (response *CreateEndPointResponse, err error) { +func (c *Client) CreateExtendEndpointWithContext(ctx context.Context, request *CreateExtendEndpointRequest) (response *CreateExtendEndpointResponse, err error) { if request == nil { - request = NewCreateEndPointRequest() + request = NewCreateExtendEndpointRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "CreateExtendEndpoint") if c.GetCredential() == nil { - return nil, errors.New("CreateEndPoint require credential") + return nil, errors.New("CreateExtendEndpoint require credential") } request.SetContext(ctx) - response = NewCreateEndPointResponse() + response = NewCreateExtendEndpointResponse() err = c.Send(request, response) return } -func NewCreateEndPointAndEndPointServiceRequest() (request *CreateEndPointAndEndPointServiceRequest) { - request = &CreateEndPointAndEndPointServiceRequest{ +func NewCreateForwardRuleRequest() (request *CreateForwardRuleRequest) { + request = &CreateForwardRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("privatedns", APIVersion, "CreateEndPointAndEndPointService") + request.Init().WithApiInfo("privatedns", APIVersion, "CreateForwardRule") return } -func NewCreateEndPointAndEndPointServiceResponse() (response *CreateEndPointAndEndPointServiceResponse) { - response = &CreateEndPointAndEndPointServiceResponse{ +func NewCreateForwardRuleResponse() (response *CreateForwardRuleResponse) { + response = &CreateForwardRuleResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// CreateEndPointAndEndPointService -// 同时创建终端节点和终端节点服务 +// CreateForwardRule +// 创建自定义转发规则 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" // FAILEDOPERATION = "FailedOperation" -// FAILEDOPERATION_CREATEVPCENDPOINTERROR = "FailedOperation.CreateVpcEndPointError" -// FAILEDOPERATION_CREATEVPCENDPOINTFAILED = "FailedOperation.CreateVpcEndPointFailed" -// FAILEDOPERATION_ENDPOINTSERVICECREATEFAILED = "FailedOperation.EndPointServiceCreateFailed" -// FAILEDOPERATION_ENDPOINTSERVICEDELETEFAILED = "FailedOperation.EndPointServiceDeleteFailed" -// FAILEDOPERATION_ENDPOINTSERVICEWHITELISTFAILED = "FailedOperation.EndPointServiceWhiteListFailed" -// FAILEDOPERATION_GETTMPCREDFAILED = "FailedOperation.GetTmpCredFailed" // INTERNALERROR = "InternalError" // INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" // INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ENDPOINTSERVICENOTEXIST = "InvalidParameter.EndPointServiceNotExist" -// INVALIDPARAMETERVALUE_UINNOTINWHITELIST = "InvalidParameterValue.UinNotInWhiteList" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCEINSUFFICIENT = "ResourceInsufficient" -// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCEUNAVAILABLE_SERVICEWHITELISTNOTADDED = "ResourceUnavailable.ServiceWhiteListNotAdded" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// INVALIDPARAMETER_ENDPOINTNOTEXISTS = "InvalidParameter.EndPointNotExists" +// INVALIDPARAMETER_FORWARDRULEZONEREPEATBIND = "InvalidParameter.ForwardRuleZoneRepeatBind" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" // UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) CreateEndPointAndEndPointService(request *CreateEndPointAndEndPointServiceRequest) (response *CreateEndPointAndEndPointServiceResponse, err error) { - return c.CreateEndPointAndEndPointServiceWithContext(context.Background(), request) +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_FREQUENCYLIMIT = "UnsupportedOperation.FrequencyLimit" +func (c *Client) CreateForwardRule(request *CreateForwardRuleRequest) (response *CreateForwardRuleResponse, err error) { + return c.CreateForwardRuleWithContext(context.Background(), request) } -// CreateEndPointAndEndPointService -// 同时创建终端节点和终端节点服务 +// CreateForwardRule +// 创建自定义转发规则 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" +// DRYRUNOPERATION = "DryRunOperation" // FAILEDOPERATION = "FailedOperation" -// FAILEDOPERATION_CREATEVPCENDPOINTERROR = "FailedOperation.CreateVpcEndPointError" -// FAILEDOPERATION_CREATEVPCENDPOINTFAILED = "FailedOperation.CreateVpcEndPointFailed" -// FAILEDOPERATION_ENDPOINTSERVICECREATEFAILED = "FailedOperation.EndPointServiceCreateFailed" -// FAILEDOPERATION_ENDPOINTSERVICEDELETEFAILED = "FailedOperation.EndPointServiceDeleteFailed" -// FAILEDOPERATION_ENDPOINTSERVICEWHITELISTFAILED = "FailedOperation.EndPointServiceWhiteListFailed" -// FAILEDOPERATION_GETTMPCREDFAILED = "FailedOperation.GetTmpCredFailed" // INTERNALERROR = "InternalError" // INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" // INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ENDPOINTSERVICENOTEXIST = "InvalidParameter.EndPointServiceNotExist" -// INVALIDPARAMETERVALUE_UINNOTINWHITELIST = "InvalidParameterValue.UinNotInWhiteList" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCEINSUFFICIENT = "ResourceInsufficient" -// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCEUNAVAILABLE_SERVICEWHITELISTNOTADDED = "ResourceUnavailable.ServiceWhiteListNotAdded" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// INVALIDPARAMETER_ENDPOINTNOTEXISTS = "InvalidParameter.EndPointNotExists" +// INVALIDPARAMETER_FORWARDRULEZONEREPEATBIND = "InvalidParameter.ForwardRuleZoneRepeatBind" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" // UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) CreateEndPointAndEndPointServiceWithContext(ctx context.Context, request *CreateEndPointAndEndPointServiceRequest) (response *CreateEndPointAndEndPointServiceResponse, err error) { +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_FREQUENCYLIMIT = "UnsupportedOperation.FrequencyLimit" +func (c *Client) CreateForwardRuleWithContext(ctx context.Context, request *CreateForwardRuleRequest) (response *CreateForwardRuleResponse, err error) { if request == nil { - request = NewCreateEndPointAndEndPointServiceRequest() + request = NewCreateForwardRuleRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "CreateForwardRule") if c.GetCredential() == nil { - return nil, errors.New("CreateEndPointAndEndPointService require credential") + return nil, errors.New("CreateForwardRule require credential") } request.SetContext(ctx) - response = NewCreateEndPointAndEndPointServiceResponse() + response = NewCreateForwardRuleResponse() err = c.Send(request, response) return } -func NewCreateForwardRuleRequest() (request *CreateForwardRuleRequest) { - request = &CreateForwardRuleRequest{ +func NewCreateInboundEndpointRequest() (request *CreateInboundEndpointRequest) { + request = &CreateInboundEndpointRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("privatedns", APIVersion, "CreateForwardRule") + request.Init().WithApiInfo("privatedns", APIVersion, "CreateInboundEndpoint") return } -func NewCreateForwardRuleResponse() (response *CreateForwardRuleResponse) { - response = &CreateForwardRuleResponse{ +func NewCreateInboundEndpointResponse() (response *CreateInboundEndpointResponse) { + response = &CreateInboundEndpointResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// CreateForwardRule -// 创建自定义转发规则 +// CreateInboundEndpoint +// 删除入站终端节点 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" -// DRYRUNOPERATION = "DryRunOperation" // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_INBOUNDOVERLIMIT = "FailedOperation.InboundOverLimit" // INTERNALERROR = "InternalError" // INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" // INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ENDPOINTNOTEXISTS = "InvalidParameter.EndPointNotExists" -// INVALIDPARAMETER_FORWARDRULEZONEREPEATBIND = "InvalidParameter.ForwardRuleZoneRepeatBind" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" // INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -// UNSUPPORTEDOPERATION_FREQUENCYLIMIT = "UnsupportedOperation.FrequencyLimit" -func (c *Client) CreateForwardRule(request *CreateForwardRuleRequest) (response *CreateForwardRuleResponse, err error) { - return c.CreateForwardRuleWithContext(context.Background(), request) +func (c *Client) CreateInboundEndpoint(request *CreateInboundEndpointRequest) (response *CreateInboundEndpointResponse, err error) { + return c.CreateInboundEndpointWithContext(context.Background(), request) } -// CreateForwardRule -// 创建自定义转发规则 +// CreateInboundEndpoint +// 删除入站终端节点 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" -// DRYRUNOPERATION = "DryRunOperation" // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_INBOUNDOVERLIMIT = "FailedOperation.InboundOverLimit" // INTERNALERROR = "InternalError" // INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" // INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ENDPOINTNOTEXISTS = "InvalidParameter.EndPointNotExists" -// INVALIDPARAMETER_FORWARDRULEZONEREPEATBIND = "InvalidParameter.ForwardRuleZoneRepeatBind" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" // INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -// UNSUPPORTEDOPERATION_FREQUENCYLIMIT = "UnsupportedOperation.FrequencyLimit" -func (c *Client) CreateForwardRuleWithContext(ctx context.Context, request *CreateForwardRuleRequest) (response *CreateForwardRuleResponse, err error) { +func (c *Client) CreateInboundEndpointWithContext(ctx context.Context, request *CreateInboundEndpointRequest) (response *CreateInboundEndpointResponse, err error) { if request == nil { - request = NewCreateForwardRuleRequest() + request = NewCreateInboundEndpointRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "CreateInboundEndpoint") if c.GetCredential() == nil { - return nil, errors.New("CreateForwardRule require credential") + return nil, errors.New("CreateInboundEndpoint require credential") } request.SetContext(ctx) - response = NewCreateForwardRuleResponse() + response = NewCreateInboundEndpointResponse() err = c.Send(request, response) return } @@ -427,7 +413,7 @@ func NewCreatePrivateDNSAccountResponse() (response *CreatePrivateDNSAccountResp } // CreatePrivateDNSAccount -// 创建私有域解析账号 +// 跨账号关联VPC时绑定其他账号 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" @@ -458,7 +444,7 @@ func (c *Client) CreatePrivateDNSAccount(request *CreatePrivateDNSAccountRequest } // CreatePrivateDNSAccount -// 创建私有域解析账号 +// 跨账号关联VPC时绑定其他账号 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" @@ -488,6 +474,7 @@ func (c *Client) CreatePrivateDNSAccountWithContext(ctx context.Context, request if request == nil { request = NewCreatePrivateDNSAccountRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "CreatePrivateDNSAccount") if c.GetCredential() == nil { return nil, errors.New("CreatePrivateDNSAccount require credential") @@ -611,6 +598,7 @@ func (c *Client) CreatePrivateZoneWithContext(ctx context.Context, request *Crea if request == nil { request = NewCreatePrivateZoneRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "CreatePrivateZone") if c.GetCredential() == nil { return nil, errors.New("CreatePrivateZone require credential") @@ -666,7 +654,7 @@ func NewCreatePrivateZoneRecordResponse() (response *CreatePrivateZoneRecordResp // INVALIDPARAMETER_RECORDCOUNTEXCEED = "InvalidParameter.RecordCountExceed" // INVALIDPARAMETER_RECORDEXIST = "InvalidParameter.RecordExist" // INVALIDPARAMETER_RECORDMXCOUNTEXCEED = "InvalidParameter.RecordMXCountExceed" -// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRolllimitCountExceed" +// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRollLimitCountExceed" // INVALIDPARAMETER_RECORDTXTCOUNTEXCEED = "InvalidParameter.RecordTXTCountExceed" // INVALIDPARAMETER_RECORDUNSUPPORTWEIGHT = "InvalidParameter.RecordUnsupportWeight" // INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" @@ -717,7 +705,7 @@ func (c *Client) CreatePrivateZoneRecord(request *CreatePrivateZoneRecordRequest // INVALIDPARAMETER_RECORDCOUNTEXCEED = "InvalidParameter.RecordCountExceed" // INVALIDPARAMETER_RECORDEXIST = "InvalidParameter.RecordExist" // INVALIDPARAMETER_RECORDMXCOUNTEXCEED = "InvalidParameter.RecordMXCountExceed" -// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRolllimitCountExceed" +// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRollLimitCountExceed" // INVALIDPARAMETER_RECORDTXTCOUNTEXCEED = "InvalidParameter.RecordTXTCountExceed" // INVALIDPARAMETER_RECORDUNSUPPORTWEIGHT = "InvalidParameter.RecordUnsupportWeight" // INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" @@ -744,6 +732,7 @@ func (c *Client) CreatePrivateZoneRecordWithContext(ctx context.Context, request if request == nil { request = NewCreatePrivateZoneRecordRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "CreatePrivateZoneRecord") if c.GetCredential() == nil { return nil, errors.New("CreatePrivateZoneRecord require credential") @@ -819,6 +808,7 @@ func (c *Client) DeleteEndPointWithContext(ctx context.Context, request *DeleteE if request == nil { request = NewDeleteEndPointRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DeleteEndPoint") if c.GetCredential() == nil { return nil, errors.New("DeleteEndPoint require credential") @@ -898,6 +888,7 @@ func (c *Client) DeleteForwardRuleWithContext(ctx context.Context, request *Dele if request == nil { request = NewDeleteForwardRuleRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DeleteForwardRule") if c.GetCredential() == nil { return nil, errors.New("DeleteForwardRule require credential") @@ -910,6 +901,80 @@ func (c *Client) DeleteForwardRuleWithContext(ctx context.Context, request *Dele return } +func NewDeleteInboundEndpointRequest() (request *DeleteInboundEndpointRequest) { + request = &DeleteInboundEndpointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("privatedns", APIVersion, "DeleteInboundEndpoint") + + + return +} + +func NewDeleteInboundEndpointResponse() (response *DeleteInboundEndpointResponse) { + response = &DeleteInboundEndpointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteInboundEndpoint +// 删除入站终端节点 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteInboundEndpoint(request *DeleteInboundEndpointRequest) (response *DeleteInboundEndpointResponse, err error) { + return c.DeleteInboundEndpointWithContext(context.Background(), request) +} + +// DeleteInboundEndpoint +// 删除入站终端节点 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteInboundEndpointWithContext(ctx context.Context, request *DeleteInboundEndpointRequest) (response *DeleteInboundEndpointResponse, err error) { + if request == nil { + request = NewDeleteInboundEndpointRequest() + } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DeleteInboundEndpoint") + + if c.GetCredential() == nil { + return nil, errors.New("DeleteInboundEndpoint require credential") + } + + request.SetContext(ctx) + + response = NewDeleteInboundEndpointResponse() + err = c.Send(request, response) + return +} + func NewDeletePrivateDNSAccountRequest() (request *DeletePrivateDNSAccountRequest) { request = &DeletePrivateDNSAccountRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -989,6 +1054,7 @@ func (c *Client) DeletePrivateDNSAccountWithContext(ctx context.Context, request if request == nil { request = NewDeletePrivateDNSAccountRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DeletePrivateDNSAccount") if c.GetCredential() == nil { return nil, errors.New("DeletePrivateDNSAccount require credential") @@ -1086,6 +1152,7 @@ func (c *Client) DeletePrivateZoneWithContext(ctx context.Context, request *Dele if request == nil { request = NewDeletePrivateZoneRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DeletePrivateZone") if c.GetCredential() == nil { return nil, errors.New("DeletePrivateZone require credential") @@ -1185,6 +1252,7 @@ func (c *Client) DeletePrivateZoneRecordWithContext(ctx context.Context, request if request == nil { request = NewDeletePrivateZoneRecordRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DeletePrivateZoneRecord") if c.GetCredential() == nil { return nil, errors.New("DeletePrivateZoneRecord require credential") @@ -1294,6 +1362,7 @@ func (c *Client) DeleteSpecifyPrivateZoneVpcWithContext(ctx context.Context, req if request == nil { request = NewDeleteSpecifyPrivateZoneVpcRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DeleteSpecifyPrivateZoneVpc") if c.GetCredential() == nil { return nil, errors.New("DeleteSpecifyPrivateZoneVpc require credential") @@ -1385,6 +1454,7 @@ func (c *Client) DescribeAccountVpcListWithContext(ctx context.Context, request if request == nil { request = NewDescribeAccountVpcListRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeAccountVpcList") if c.GetCredential() == nil { return nil, errors.New("DescribeAccountVpcList require credential") @@ -1468,6 +1538,7 @@ func (c *Client) DescribeAuditLogWithContext(ctx context.Context, request *Descr if request == nil { request = NewDescribeAuditLogRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeAuditLog") if c.GetCredential() == nil { return nil, errors.New("DescribeAuditLog require credential") @@ -1557,6 +1628,7 @@ func (c *Client) DescribeDashboardWithContext(ctx context.Context, request *Desc if request == nil { request = NewDescribeDashboardRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeDashboard") if c.GetCredential() == nil { return nil, errors.New("DescribeDashboard require credential") @@ -1569,26 +1641,26 @@ func (c *Client) DescribeDashboardWithContext(ctx context.Context, request *Desc return } -func NewDescribeEndPointListRequest() (request *DescribeEndPointListRequest) { - request = &DescribeEndPointListRequest{ +func NewDescribeExtendEndpointListRequest() (request *DescribeExtendEndpointListRequest) { + request = &DescribeExtendEndpointListRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("privatedns", APIVersion, "DescribeEndPointList") + request.Init().WithApiInfo("privatedns", APIVersion, "DescribeExtendEndpointList") return } -func NewDescribeEndPointListResponse() (response *DescribeEndPointListResponse) { - response = &DescribeEndPointListResponse{ +func NewDescribeExtendEndpointListResponse() (response *DescribeExtendEndpointListResponse) { + response = &DescribeExtendEndpointListResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeEndPointList +// DescribeExtendEndpointList // 获取终端节点列表 // // 可能返回的错误码: @@ -1611,11 +1683,11 @@ func NewDescribeEndPointListResponse() (response *DescribeEndPointListResponse) // UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeEndPointList(request *DescribeEndPointListRequest) (response *DescribeEndPointListResponse, err error) { - return c.DescribeEndPointListWithContext(context.Background(), request) +func (c *Client) DescribeExtendEndpointList(request *DescribeExtendEndpointListRequest) (response *DescribeExtendEndpointListResponse, err error) { + return c.DescribeExtendEndpointListWithContext(context.Background(), request) } -// DescribeEndPointList +// DescribeExtendEndpointList // 获取终端节点列表 // // 可能返回的错误码: @@ -1638,171 +1710,114 @@ func (c *Client) DescribeEndPointList(request *DescribeEndPointListRequest) (res // UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeEndPointListWithContext(ctx context.Context, request *DescribeEndPointListRequest) (response *DescribeEndPointListResponse, err error) { +func (c *Client) DescribeExtendEndpointListWithContext(ctx context.Context, request *DescribeExtendEndpointListRequest) (response *DescribeExtendEndpointListResponse, err error) { if request == nil { - request = NewDescribeEndPointListRequest() + request = NewDescribeExtendEndpointListRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeExtendEndpointList") if c.GetCredential() == nil { - return nil, errors.New("DescribeEndPointList require credential") + return nil, errors.New("DescribeExtendEndpointList require credential") } request.SetContext(ctx) - response = NewDescribeEndPointListResponse() + response = NewDescribeExtendEndpointListResponse() err = c.Send(request, response) return } -func NewDescribeEndPointRegionRequest() (request *DescribeEndPointRegionRequest) { - request = &DescribeEndPointRegionRequest{ +func NewDescribeForwardRuleListRequest() (request *DescribeForwardRuleListRequest) { + request = &DescribeForwardRuleListRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("privatedns", APIVersion, "DescribeEndPointRegion") + request.Init().WithApiInfo("privatedns", APIVersion, "DescribeForwardRuleList") return } -func NewDescribeEndPointRegionResponse() (response *DescribeEndPointRegionResponse) { - response = &DescribeEndPointRegionResponse{ +func NewDescribeForwardRuleListResponse() (response *DescribeForwardRuleListResponse) { + response = &DescribeForwardRuleListResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeEndPointRegion -// 查询终端节点已经启用了的地域 +// DescribeForwardRuleList +// 查询转发规则列表 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" // INTERNALERROR = "InternalError" // INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // MISSINGPARAMETER = "MissingParameter" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" // RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" -// UNSUPPORTEDOPERATION_FREQUENCYLIMIT = "UnsupportedOperation.FrequencyLimit" -func (c *Client) DescribeEndPointRegion(request *DescribeEndPointRegionRequest) (response *DescribeEndPointRegionResponse, err error) { - return c.DescribeEndPointRegionWithContext(context.Background(), request) +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DescribeForwardRuleList(request *DescribeForwardRuleListRequest) (response *DescribeForwardRuleListResponse, err error) { + return c.DescribeForwardRuleListWithContext(context.Background(), request) } -// DescribeEndPointRegion -// 查询终端节点已经启用了的地域 +// DescribeForwardRuleList +// 查询转发规则列表 // // 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" // FAILEDOPERATION = "FailedOperation" // INTERNALERROR = "InternalError" // INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETERVALUE = "InvalidParameterValue" // MISSINGPARAMETER = "MissingParameter" +// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" // RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" -// UNSUPPORTEDOPERATION_FREQUENCYLIMIT = "UnsupportedOperation.FrequencyLimit" -func (c *Client) DescribeEndPointRegionWithContext(ctx context.Context, request *DescribeEndPointRegionRequest) (response *DescribeEndPointRegionResponse, err error) { - if request == nil { - request = NewDescribeEndPointRegionRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeEndPointRegion require credential") - } - - request.SetContext(ctx) - - response = NewDescribeEndPointRegionResponse() - err = c.Send(request, response) - return -} - -func NewDescribeForwardRuleRequest() (request *DescribeForwardRuleRequest) { - request = &DescribeForwardRuleRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - - request.Init().WithApiInfo("privatedns", APIVersion, "DescribeForwardRule") - - - return -} - -func NewDescribeForwardRuleResponse() (response *DescribeForwardRuleResponse) { - response = &DescribeForwardRuleResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return - -} - -// DescribeForwardRule -// 查询转发规则 -// -// 可能返回的错误码: -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ENDPOINTBINDFORWARDRULE = "InvalidParameter.EndPointBindForwardRule" -// INVALIDPARAMETER_FORWARDRULENOTEXIST = "InvalidParameter.ForwardRuleNotExist" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" -// MISSINGPARAMETER = "MissingParameter" -// UNSUPPORTEDOPERATION_FREQUENCYLIMIT = "UnsupportedOperation.FrequencyLimit" -func (c *Client) DescribeForwardRule(request *DescribeForwardRuleRequest) (response *DescribeForwardRuleResponse, err error) { - return c.DescribeForwardRuleWithContext(context.Background(), request) -} - -// DescribeForwardRule -// 查询转发规则 -// -// 可能返回的错误码: -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ENDPOINTBINDFORWARDRULE = "InvalidParameter.EndPointBindForwardRule" -// INVALIDPARAMETER_FORWARDRULENOTEXIST = "InvalidParameter.ForwardRuleNotExist" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" -// MISSINGPARAMETER = "MissingParameter" -// UNSUPPORTEDOPERATION_FREQUENCYLIMIT = "UnsupportedOperation.FrequencyLimit" -func (c *Client) DescribeForwardRuleWithContext(ctx context.Context, request *DescribeForwardRuleRequest) (response *DescribeForwardRuleResponse, err error) { +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DescribeForwardRuleListWithContext(ctx context.Context, request *DescribeForwardRuleListRequest) (response *DescribeForwardRuleListResponse, err error) { if request == nil { - request = NewDescribeForwardRuleRequest() + request = NewDescribeForwardRuleListRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeForwardRuleList") if c.GetCredential() == nil { - return nil, errors.New("DescribeForwardRule require credential") + return nil, errors.New("DescribeForwardRuleList require credential") } request.SetContext(ctx) - response = NewDescribeForwardRuleResponse() + response = NewDescribeForwardRuleListResponse() err = c.Send(request, response) return } -func NewDescribeForwardRuleListRequest() (request *DescribeForwardRuleListRequest) { - request = &DescribeForwardRuleListRequest{ +func NewDescribeInboundEndpointListRequest() (request *DescribeInboundEndpointListRequest) { + request = &DescribeInboundEndpointListRequest{ BaseRequest: &tchttp.BaseRequest{}, } - request.Init().WithApiInfo("privatedns", APIVersion, "DescribeForwardRuleList") + request.Init().WithApiInfo("privatedns", APIVersion, "DescribeInboundEndpointList") return } -func NewDescribeForwardRuleListResponse() (response *DescribeForwardRuleListResponse) { - response = &DescribeForwardRuleListResponse{ +func NewDescribeInboundEndpointListResponse() (response *DescribeInboundEndpointListResponse) { + response = &DescribeInboundEndpointListResponse{ BaseResponse: &tchttp.BaseResponse{}, } return } -// DescribeForwardRuleList -// 查询转发规则列表 +// DescribeInboundEndpointList +// 获取入站终端节点列表 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" @@ -1810,18 +1825,20 @@ func NewDescribeForwardRuleListResponse() (response *DescribeForwardRuleListResp // INTERNALERROR = "InternalError" // INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" // INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" // MISSINGPARAMETER = "MissingParameter" -// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" // RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" // UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) DescribeForwardRuleList(request *DescribeForwardRuleListRequest) (response *DescribeForwardRuleListResponse, err error) { - return c.DescribeForwardRuleListWithContext(context.Background(), request) +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeInboundEndpointList(request *DescribeInboundEndpointListRequest) (response *DescribeInboundEndpointListResponse, err error) { + return c.DescribeInboundEndpointListWithContext(context.Background(), request) } -// DescribeForwardRuleList -// 查询转发规则列表 +// DescribeInboundEndpointList +// 获取入站终端节点列表 // // 可能返回的错误码: // AUTHFAILURE = "AuthFailure" @@ -1829,24 +1846,27 @@ func (c *Client) DescribeForwardRuleList(request *DescribeForwardRuleListRequest // INTERNALERROR = "InternalError" // INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" // INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" // MISSINGPARAMETER = "MissingParameter" -// REQUESTLIMITEXCEEDED = "RequestLimitExceeded" // RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" // UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) DescribeForwardRuleListWithContext(ctx context.Context, request *DescribeForwardRuleListRequest) (response *DescribeForwardRuleListResponse, err error) { +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeInboundEndpointListWithContext(ctx context.Context, request *DescribeInboundEndpointListRequest) (response *DescribeInboundEndpointListResponse, err error) { if request == nil { - request = NewDescribeForwardRuleListRequest() + request = NewDescribeInboundEndpointListRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeInboundEndpointList") if c.GetCredential() == nil { - return nil, errors.New("DescribeForwardRuleList require credential") + return nil, errors.New("DescribeInboundEndpointList require credential") } request.SetContext(ctx) - response = NewDescribeForwardRuleListResponse() + response = NewDescribeInboundEndpointListResponse() err = c.Send(request, response) return } @@ -1926,6 +1946,7 @@ func (c *Client) DescribePrivateDNSAccountListWithContext(ctx context.Context, r if request == nil { request = NewDescribePrivateDNSAccountListRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribePrivateDNSAccountList") if c.GetCredential() == nil { return nil, errors.New("DescribePrivateDNSAccountList require credential") @@ -2017,6 +2038,7 @@ func (c *Client) DescribePrivateZoneWithContext(ctx context.Context, request *De if request == nil { request = NewDescribePrivateZoneRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribePrivateZone") if c.GetCredential() == nil { return nil, errors.New("DescribePrivateZone require credential") @@ -2104,6 +2126,7 @@ func (c *Client) DescribePrivateZoneListWithContext(ctx context.Context, request if request == nil { request = NewDescribePrivateZoneListRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribePrivateZoneList") if c.GetCredential() == nil { return nil, errors.New("DescribePrivateZoneList require credential") @@ -2175,6 +2198,7 @@ func (c *Client) DescribePrivateZoneRecordListWithContext(ctx context.Context, r if request == nil { request = NewDescribePrivateZoneRecordListRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribePrivateZoneRecordList") if c.GetCredential() == nil { return nil, errors.New("DescribePrivateZoneRecordList require credential") @@ -2260,6 +2284,7 @@ func (c *Client) DescribePrivateZoneServiceWithContext(ctx context.Context, requ if request == nil { request = NewDescribePrivateZoneServiceRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribePrivateZoneService") if c.GetCredential() == nil { return nil, errors.New("DescribePrivateZoneService require credential") @@ -2321,6 +2346,7 @@ func (c *Client) DescribeQuotaUsageWithContext(ctx context.Context, request *Des if request == nil { request = NewDescribeQuotaUsageRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeQuotaUsage") if c.GetCredential() == nil { return nil, errors.New("DescribeQuotaUsage require credential") @@ -2333,6 +2359,80 @@ func (c *Client) DescribeQuotaUsageWithContext(ctx context.Context, request *Des return } +func NewDescribeRecordRequest() (request *DescribeRecordRequest) { + request = &DescribeRecordRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("privatedns", APIVersion, "DescribeRecord") + + + return +} + +func NewDescribeRecordResponse() (response *DescribeRecordResponse) { + response = &DescribeRecordResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeRecord +// 获取私有域记录 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeRecord(request *DescribeRecordRequest) (response *DescribeRecordResponse, err error) { + return c.DescribeRecordWithContext(context.Background(), request) +} + +// DescribeRecord +// 获取私有域记录 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeRecordWithContext(ctx context.Context, request *DescribeRecordRequest) (response *DescribeRecordResponse, err error) { + if request == nil { + request = NewDescribeRecordRequest() + } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeRecord") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeRecord require credential") + } + + request.SetContext(ctx) + + response = NewDescribeRecordResponse() + err = c.Send(request, response) + return +} + func NewDescribeRequestDataRequest() (request *DescribeRequestDataRequest) { request = &DescribeRequestDataRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2374,6 +2474,7 @@ func (c *Client) DescribeRequestDataWithContext(ctx context.Context, request *De if request == nil { request = NewDescribeRequestDataRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "DescribeRequestData") if c.GetCredential() == nil { return nil, errors.New("DescribeRequestData require credential") @@ -2455,6 +2556,7 @@ func (c *Client) ModifyForwardRuleWithContext(ctx context.Context, request *Modi if request == nil { request = NewModifyForwardRuleRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "ModifyForwardRule") if c.GetCredential() == nil { return nil, errors.New("ModifyForwardRule require credential") @@ -2467,6 +2569,80 @@ func (c *Client) ModifyForwardRuleWithContext(ctx context.Context, request *Modi return } +func NewModifyInboundEndpointRequest() (request *ModifyInboundEndpointRequest) { + request = &ModifyInboundEndpointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("privatedns", APIVersion, "ModifyInboundEndpoint") + + + return +} + +func NewModifyInboundEndpointResponse() (response *ModifyInboundEndpointResponse) { + response = &ModifyInboundEndpointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyInboundEndpoint +// 删除入站终端节点 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyInboundEndpoint(request *ModifyInboundEndpointRequest) (response *ModifyInboundEndpointResponse, err error) { + return c.ModifyInboundEndpointWithContext(context.Background(), request) +} + +// ModifyInboundEndpoint +// 删除入站终端节点 +// +// 可能返回的错误码: +// AUTHFAILURE = "AuthFailure" +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFIENDERROR = "InternalError.UndefiendError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" +// INVALIDPARAMETER_ZONENOTEXISTS = "InvalidParameter.ZoneNotExists" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SERVICENOTSUBSCRIBED = "ResourceNotFound.ServiceNotSubscribed" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNT = "UnauthorizedOperation.UnauthorizedAccount" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyInboundEndpointWithContext(ctx context.Context, request *ModifyInboundEndpointRequest) (response *ModifyInboundEndpointResponse, err error) { + if request == nil { + request = NewModifyInboundEndpointRequest() + } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "ModifyInboundEndpoint") + + if c.GetCredential() == nil { + return nil, errors.New("ModifyInboundEndpoint require credential") + } + + request.SetContext(ctx) + + response = NewModifyInboundEndpointResponse() + err = c.Send(request, response) + return +} + func NewModifyPrivateZoneRequest() (request *ModifyPrivateZoneRequest) { request = &ModifyPrivateZoneRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2556,6 +2732,7 @@ func (c *Client) ModifyPrivateZoneWithContext(ctx context.Context, request *Modi if request == nil { request = NewModifyPrivateZoneRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "ModifyPrivateZone") if c.GetCredential() == nil { return nil, errors.New("ModifyPrivateZone require credential") @@ -2613,7 +2790,7 @@ func NewModifyPrivateZoneRecordResponse() (response *ModifyPrivateZoneRecordResp // INVALIDPARAMETER_RECORDLEVELEXCEED = "InvalidParameter.RecordLevelExceed" // INVALIDPARAMETER_RECORDMXCOUNTEXCEED = "InvalidParameter.RecordMXCountExceed" // INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" -// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRolllimitCountExceed" +// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRollLimitCountExceed" // INVALIDPARAMETER_RECORDTXTCOUNTEXCEED = "InvalidParameter.RecordTXTCountExceed" // INVALIDPARAMETER_RECORDUNSUPPORTWEIGHT = "InvalidParameter.RecordUnsupportWeight" // INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" @@ -2667,7 +2844,7 @@ func (c *Client) ModifyPrivateZoneRecord(request *ModifyPrivateZoneRecordRequest // INVALIDPARAMETER_RECORDLEVELEXCEED = "InvalidParameter.RecordLevelExceed" // INVALIDPARAMETER_RECORDMXCOUNTEXCEED = "InvalidParameter.RecordMXCountExceed" // INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" -// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRolllimitCountExceed" +// INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRollLimitCountExceed" // INVALIDPARAMETER_RECORDTXTCOUNTEXCEED = "InvalidParameter.RecordTXTCountExceed" // INVALIDPARAMETER_RECORDUNSUPPORTWEIGHT = "InvalidParameter.RecordUnsupportWeight" // INVALIDPARAMETER_VPCBINDEDMAINDOMAIN = "InvalidParameter.VpcBindedMainDomain" @@ -2695,6 +2872,7 @@ func (c *Client) ModifyPrivateZoneRecordWithContext(ctx context.Context, request if request == nil { request = NewModifyPrivateZoneRecordRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "ModifyPrivateZoneRecord") if c.GetCredential() == nil { return nil, errors.New("ModifyPrivateZoneRecord require credential") @@ -2804,6 +2982,7 @@ func (c *Client) ModifyPrivateZoneVpcWithContext(ctx context.Context, request *M if request == nil { request = NewModifyPrivateZoneVpcRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "ModifyPrivateZoneVpc") if c.GetCredential() == nil { return nil, errors.New("ModifyPrivateZoneVpc require credential") @@ -2871,6 +3050,7 @@ func (c *Client) ModifyRecordsStatusWithContext(ctx context.Context, request *Mo if request == nil { request = NewModifyRecordsStatusRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "ModifyRecordsStatus") if c.GetCredential() == nil { return nil, errors.New("ModifyRecordsStatus require credential") @@ -2982,6 +3162,7 @@ func (c *Client) QueryAsyncBindVpcStatusWithContext(ctx context.Context, request if request == nil { request = NewQueryAsyncBindVpcStatusRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "QueryAsyncBindVpcStatus") if c.GetCredential() == nil { return nil, errors.New("QueryAsyncBindVpcStatus require credential") @@ -3069,6 +3250,7 @@ func (c *Client) SubscribePrivateZoneServiceWithContext(ctx context.Context, req if request == nil { request = NewSubscribePrivateZoneServiceRequest() } + c.InitBaseRequest(&request.BaseRequest, "privatedns", APIVersion, "SubscribePrivateZoneService") if c.GetCredential() == nil { return nil, errors.New("SubscribePrivateZoneService require credential") 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 index 040e70e5a7..e5264b1720 100644 --- 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// Copyright (c) 2017-2025 Tencent. 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. @@ -59,18 +59,12 @@ const ( // 解析域删除失败。 FAILEDOPERATION_DELETEZONEFAILED = "FailedOperation.DeleteZoneFailed" - // 终端节点服务创建失败 - FAILEDOPERATION_ENDPOINTSERVICECREATEFAILED = "FailedOperation.EndPointServiceCreateFailed" - - // 终端节点服务删除失败 - FAILEDOPERATION_ENDPOINTSERVICEDELETEFAILED = "FailedOperation.EndPointServiceDeleteFailed" - - // 终端节点服务白名单操作失败。 - FAILEDOPERATION_ENDPOINTSERVICEWHITELISTFAILED = "FailedOperation.EndPointServiceWhiteListFailed" - // 获取临时凭证失败 FAILEDOPERATION_GETTMPCREDFAILED = "FailedOperation.GetTmpCredFailed" + // 您的账号在同一区域内创建终端节点数量已达上限。 + FAILEDOPERATION_INBOUNDOVERLIMIT = "FailedOperation.InboundOverLimit" + // 记录修改失败。 FAILEDOPERATION_MODIFYRECORDFAILED = "FailedOperation.ModifyRecordFailed" @@ -161,8 +155,8 @@ const ( // 记录不存在。 INVALIDPARAMETER_RECORDNOTEXIST = "InvalidParameter.RecordNotExist" - // 记录负载均衡数量超过限制。 - INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRolllimitCountExceed" + // 记录负载均衡数量超过限制 + INVALIDPARAMETER_RECORDROLLLIMITCOUNTEXCEED = "InvalidParameter.RecordRollLimitCountExceed" // TXT记录负载均衡数量超过10。 INVALIDPARAMETER_RECORDTXTCOUNTEXCEED = "InvalidParameter.RecordTXTCountExceed" 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 index 4c7e450f14..bcbf40b20a 100644 --- 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// Copyright (c) 2017-2025 Tencent. 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. @@ -21,24 +21,21 @@ import ( ) type AccountVpcInfo struct { - // VpcId: vpc-xadsafsdasd + // VpcId UniqVpcId *string `json:"UniqVpcId,omitnil,omitempty" name:"UniqVpcId"` - // Vpc所属地区: ap-guangzhou, ap-shanghai - // 注意:此字段可能返回 null,表示取不到有效值。 + // Vpc所属地区 Region *string `json:"Region,omitnil,omitempty" name:"Region"` - // Vpc所属账号: 123456789 - // 注意:此字段可能返回 null,表示取不到有效值。 + // Vpc所属账号 Uin *string `json:"Uin,omitnil,omitempty" name:"Uin"` - // vpc资源名称:testname - // 注意:此字段可能返回 null,表示取不到有效值。 + // vpc资源名称 VpcName *string `json:"VpcName,omitnil,omitempty" name:"VpcName"` } type AccountVpcInfoOut struct { - // VpcId: vpc-xadsafsdasd + // VpcId VpcId *string `json:"VpcId,omitnil,omitempty" name:"VpcId"` // Vpc所属地区: ap-guangzhou, ap-shanghai @@ -127,7 +124,6 @@ type AddSpecifyPrivateZoneVpcResponseParams struct { AccountVpcSet []*AccountVpcInfo `json:"AccountVpcSet,omitnil,omitempty" name:"AccountVpcSet"` // 唯一id - // 注意:此字段可能返回 null,表示取不到有效值。 UniqId *string `json:"UniqId,omitnil,omitempty" name:"UniqId"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 @@ -176,294 +172,230 @@ type AuditLogInfo struct { } // Predefined struct for user -type CreateEndPointAndEndPointServiceRequestParams struct { - // VPC实例ID - VpcId *string `json:"VpcId,omitnil,omitempty" name:"VpcId"` - - // 是否自动接受 - AutoAcceptFlag *bool `json:"AutoAcceptFlag,omitnil,omitempty" name:"AutoAcceptFlag"` - - // 后端服务ID - ServiceInstanceId *string `json:"ServiceInstanceId,omitnil,omitempty" name:"ServiceInstanceId"` - - // 终端节点名称 - EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` - - // 终端节点地域,必须要和终端节点服务所属地域一致 - EndPointRegion *string `json:"EndPointRegion,omitnil,omitempty" name:"EndPointRegion"` +type CreateExtendEndpointRequestParams struct { - // 终端节点服务名称 - EndPointServiceName *string `json:"EndPointServiceName,omitnil,omitempty" name:"EndPointServiceName"` - - // 挂载的PAAS服务类型,CLB,CDB,CRS - ServiceType *string `json:"ServiceType,omitnil,omitempty" name:"ServiceType"` - - // 终端节点ip数量 - IpNum *int64 `json:"IpNum,omitnil,omitempty" name:"IpNum"` } -type CreateEndPointAndEndPointServiceRequest struct { +type CreateExtendEndpointRequest struct { *tchttp.BaseRequest - // VPC实例ID - VpcId *string `json:"VpcId,omitnil,omitempty" name:"VpcId"` - - // 是否自动接受 - AutoAcceptFlag *bool `json:"AutoAcceptFlag,omitnil,omitempty" name:"AutoAcceptFlag"` - - // 后端服务ID - ServiceInstanceId *string `json:"ServiceInstanceId,omitnil,omitempty" name:"ServiceInstanceId"` - - // 终端节点名称 - EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` - - // 终端节点地域,必须要和终端节点服务所属地域一致 - EndPointRegion *string `json:"EndPointRegion,omitnil,omitempty" name:"EndPointRegion"` - - // 终端节点服务名称 - EndPointServiceName *string `json:"EndPointServiceName,omitnil,omitempty" name:"EndPointServiceName"` - - // 挂载的PAAS服务类型,CLB,CDB,CRS - ServiceType *string `json:"ServiceType,omitnil,omitempty" name:"ServiceType"` - - // 终端节点ip数量 - IpNum *int64 `json:"IpNum,omitnil,omitempty" name:"IpNum"` } -func (r *CreateEndPointAndEndPointServiceRequest) ToJsonString() string { +func (r *CreateExtendEndpointRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *CreateEndPointAndEndPointServiceRequest) FromJsonString(s string) error { +func (r *CreateExtendEndpointRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "VpcId") - delete(f, "AutoAcceptFlag") - delete(f, "ServiceInstanceId") - delete(f, "EndPointName") - delete(f, "EndPointRegion") - delete(f, "EndPointServiceName") - delete(f, "ServiceType") - delete(f, "IpNum") + if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEndPointAndEndPointServiceRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateExtendEndpointRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type CreateEndPointAndEndPointServiceResponseParams struct { +type CreateExtendEndpointResponseParams struct { // 终端节点id - EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` - - // 终端节点名 - EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` - - // 终端节点服务ID - EndPointServiceId *string `json:"EndPointServiceId,omitnil,omitempty" name:"EndPointServiceId"` + EndpointId *string `json:"EndpointId,omitnil,omitempty" name:"EndpointId"` - // 终端节点的IP列表 - EndPointVipSet []*string `json:"EndPointVipSet,omitnil,omitempty" name:"EndPointVipSet"` + // 终端节点名称 + EndpointName *string `json:"EndpointName,omitnil,omitempty" name:"EndpointName"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type CreateEndPointAndEndPointServiceResponse struct { +type CreateExtendEndpointResponse struct { *tchttp.BaseResponse - Response *CreateEndPointAndEndPointServiceResponseParams `json:"Response"` + Response *CreateExtendEndpointResponseParams `json:"Response"` } -func (r *CreateEndPointAndEndPointServiceResponse) ToJsonString() string { +func (r *CreateExtendEndpointResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *CreateEndPointAndEndPointServiceResponse) FromJsonString(s string) error { +func (r *CreateExtendEndpointResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type CreateEndPointRequestParams struct { - // 终端节点名称 - EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` +type CreateForwardRuleRequestParams struct { + // 转发规则名称 + RuleName *string `json:"RuleName,omitnil,omitempty" name:"RuleName"` - // 终端节点服务ID(vpc终端节点服务ID) - EndPointServiceId *string `json:"EndPointServiceId,omitnil,omitempty" name:"EndPointServiceId"` + // 转发规则类型:云上到云下DOWN,云下到云上UP + RuleType *string `json:"RuleType,omitnil,omitempty" name:"RuleType"` - // 终端节点地域,必须要和终端节点服务所属地域一致 - EndPointRegion *string `json:"EndPointRegion,omitnil,omitempty" name:"EndPointRegion"` + // 私有域ID,可在私有域列表页面查看 + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` - // 终端节点ip数量 - IpNum *int64 `json:"IpNum,omitnil,omitempty" name:"IpNum"` + // 终端节点ID + EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` } -type CreateEndPointRequest struct { +type CreateForwardRuleRequest struct { *tchttp.BaseRequest - // 终端节点名称 - EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` + // 转发规则名称 + RuleName *string `json:"RuleName,omitnil,omitempty" name:"RuleName"` - // 终端节点服务ID(vpc终端节点服务ID) - EndPointServiceId *string `json:"EndPointServiceId,omitnil,omitempty" name:"EndPointServiceId"` + // 转发规则类型:云上到云下DOWN,云下到云上UP + RuleType *string `json:"RuleType,omitnil,omitempty" name:"RuleType"` - // 终端节点地域,必须要和终端节点服务所属地域一致 - EndPointRegion *string `json:"EndPointRegion,omitnil,omitempty" name:"EndPointRegion"` + // 私有域ID,可在私有域列表页面查看 + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` - // 终端节点ip数量 - IpNum *int64 `json:"IpNum,omitnil,omitempty" name:"IpNum"` + // 终端节点ID + EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` } -func (r *CreateEndPointRequest) ToJsonString() string { +func (r *CreateForwardRuleRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *CreateEndPointRequest) FromJsonString(s string) error { +func (r *CreateForwardRuleRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "EndPointName") - delete(f, "EndPointServiceId") - delete(f, "EndPointRegion") - delete(f, "IpNum") + delete(f, "RuleName") + delete(f, "RuleType") + delete(f, "ZoneId") + delete(f, "EndPointId") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEndPointRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateForwardRuleRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type CreateEndPointResponseParams struct { - // 终端节点id - EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` +type CreateForwardRuleResponseParams struct { + // 转发规则ID + RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"` - // 终端节点名称 - EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` + // 转发规则名称 + RuleName *string `json:"RuleName,omitnil,omitempty" name:"RuleName"` - // 终端节点服务ID - EndPointServiceId *string `json:"EndPointServiceId,omitnil,omitempty" name:"EndPointServiceId"` + // 转发规则类型 + RuleType *string `json:"RuleType,omitnil,omitempty" name:"RuleType"` - // 终端节点的IP列表 - EndPointVipSet []*string `json:"EndPointVipSet,omitnil,omitempty" name:"EndPointVipSet"` + // 私有域ID + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` + + // 终端节点ID + EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type CreateEndPointResponse struct { +type CreateForwardRuleResponse struct { *tchttp.BaseResponse - Response *CreateEndPointResponseParams `json:"Response"` + Response *CreateForwardRuleResponseParams `json:"Response"` } -func (r *CreateEndPointResponse) ToJsonString() string { +func (r *CreateForwardRuleResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *CreateEndPointResponse) FromJsonString(s string) error { +func (r *CreateForwardRuleResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type CreateForwardRuleRequestParams struct { - // 转发规则名称 - RuleName *string `json:"RuleName,omitnil,omitempty" name:"RuleName"` +type CreateInboundEndpointRequestParams struct { + // 名称 + EndpointName *string `json:"EndpointName,omitnil,omitempty" name:"EndpointName"` - // 转发规则类型:云上到云下DOWN,云下到云上UP - RuleType *string `json:"RuleType,omitnil,omitempty" name:"RuleType"` + // 地域 + EndpointRegion *string `json:"EndpointRegion,omitnil,omitempty" name:"EndpointRegion"` - // 私有域ID,可在私有域列表页面查看 - ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` + // vpcid + EndpointVpc *string `json:"EndpointVpc,omitnil,omitempty" name:"EndpointVpc"` - // 终端节点ID - EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` + // 子网信息 + SubnetIp []*SubnetIpInfo `json:"SubnetIp,omitnil,omitempty" name:"SubnetIp"` } -type CreateForwardRuleRequest struct { +type CreateInboundEndpointRequest struct { *tchttp.BaseRequest - // 转发规则名称 - RuleName *string `json:"RuleName,omitnil,omitempty" name:"RuleName"` + // 名称 + EndpointName *string `json:"EndpointName,omitnil,omitempty" name:"EndpointName"` - // 转发规则类型:云上到云下DOWN,云下到云上UP - RuleType *string `json:"RuleType,omitnil,omitempty" name:"RuleType"` + // 地域 + EndpointRegion *string `json:"EndpointRegion,omitnil,omitempty" name:"EndpointRegion"` - // 私有域ID,可在私有域列表页面查看 - ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` + // vpcid + EndpointVpc *string `json:"EndpointVpc,omitnil,omitempty" name:"EndpointVpc"` - // 终端节点ID - EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` + // 子网信息 + SubnetIp []*SubnetIpInfo `json:"SubnetIp,omitnil,omitempty" name:"SubnetIp"` } -func (r *CreateForwardRuleRequest) ToJsonString() string { +func (r *CreateInboundEndpointRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *CreateForwardRuleRequest) FromJsonString(s string) error { +func (r *CreateInboundEndpointRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "RuleName") - delete(f, "RuleType") - delete(f, "ZoneId") - delete(f, "EndPointId") + delete(f, "EndpointName") + delete(f, "EndpointRegion") + delete(f, "EndpointVpc") + delete(f, "SubnetIp") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateForwardRuleRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateInboundEndpointRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type CreateForwardRuleResponseParams struct { - // 转发规则ID - RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"` - - // 转发规则名称 - RuleName *string `json:"RuleName,omitnil,omitempty" name:"RuleName"` - - // 转发规则类型 - RuleType *string `json:"RuleType,omitnil,omitempty" name:"RuleType"` - - // 私有域ID - ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` - +type CreateInboundEndpointResponseParams struct { // 终端节点ID - EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` + EndpointId *string `json:"EndpointId,omitnil,omitempty" name:"EndpointId"` + + // 名称 + EndpointName *string `json:"EndpointName,omitnil,omitempty" name:"EndpointName"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type CreateForwardRuleResponse struct { +type CreateInboundEndpointResponse struct { *tchttp.BaseResponse - Response *CreateForwardRuleResponseParams `json:"Response"` + Response *CreateInboundEndpointResponseParams `json:"Response"` } -func (r *CreateForwardRuleResponse) ToJsonString() string { +func (r *CreateInboundEndpointResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *CreateForwardRuleResponse) FromJsonString(s string) error { +func (r *CreateInboundEndpointResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } @@ -543,6 +475,9 @@ type CreatePrivateZoneRecordRequestParams struct { // 记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600 TTL *int64 `json:"TTL,omitnil,omitempty" name:"TTL"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` } type CreatePrivateZoneRecordRequest struct { @@ -568,6 +503,9 @@ type CreatePrivateZoneRecordRequest struct { // 记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600 TTL *int64 `json:"TTL,omitnil,omitempty" name:"TTL"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` } func (r *CreatePrivateZoneRecordRequest) ToJsonString() string { @@ -589,6 +527,7 @@ func (r *CreatePrivateZoneRecordRequest) FromJsonString(s string) error { delete(f, "Weight") delete(f, "MX") delete(f, "TTL") + delete(f, "Remark") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrivateZoneRecordRequest has unknown keys!", "") } @@ -638,6 +577,8 @@ type CreatePrivateZoneRequestParams struct { DnsForwardStatus *string `json:"DnsForwardStatus,omitnil,omitempty" name:"DnsForwardStatus"` // 创建私有域的同时,将其关联至VPC + // + // Deprecated: Vpcs is deprecated. Vpcs []*VpcInfo `json:"Vpcs,omitnil,omitempty" name:"Vpcs"` // 创建私有域同时绑定关联账号的VPC @@ -703,7 +644,7 @@ func (r *CreatePrivateZoneRequest) FromJsonString(s string) error { // Predefined struct for user type CreatePrivateZoneResponseParams struct { - // 私有域ID, zone-xxxxxx + // 私有域ID, zone-12sa5ce78 ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` // 私有域名 @@ -845,6 +786,60 @@ func (r *DeleteForwardRuleResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DeleteInboundEndpointRequestParams struct { + // 终端节点ID + EndpointId *string `json:"EndpointId,omitnil,omitempty" name:"EndpointId"` +} + +type DeleteInboundEndpointRequest struct { + *tchttp.BaseRequest + + // 终端节点ID + EndpointId *string `json:"EndpointId,omitnil,omitempty" name:"EndpointId"` +} + +func (r *DeleteInboundEndpointRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteInboundEndpointRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EndpointId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteInboundEndpointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteInboundEndpointResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DeleteInboundEndpointResponse struct { + *tchttp.BaseResponse + Response *DeleteInboundEndpointResponseParams `json:"Response"` +} + +func (r *DeleteInboundEndpointResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteInboundEndpointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DeletePrivateDNSAccountRequestParams struct { // 私有域解析账号 @@ -1093,7 +1088,6 @@ type DeleteSpecifyPrivateZoneVpcResponseParams struct { AccountVpcSet []*AccountVpcInfo `json:"AccountVpcSet,omitnil,omitempty" name:"AccountVpcSet"` // 唯一id - // 注意:此字段可能返回 null,表示取不到有效值。 UniqId *string `json:"UniqId,omitnil,omitempty" name:"UniqId"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 @@ -1346,18 +1340,18 @@ func (r *DescribeDashboardResponse) FromJsonString(s string) error { } // Predefined struct for user -type DescribeEndPointListRequestParams struct { +type DescribeExtendEndpointListRequestParams struct { // 分页偏移量,从0开始 Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"` // 分页限制数目, 最大100,默认20 Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` - // 过滤参数,支持EndPointName,EndPointId,EndPointServiceId,EndPointVip + // 过滤参数,支持EndpointName,EndpointId Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` } -type DescribeEndPointListRequest struct { +type DescribeExtendEndpointListRequest struct { *tchttp.BaseRequest // 分页偏移量,从0开始 @@ -1366,18 +1360,18 @@ type DescribeEndPointListRequest struct { // 分页限制数目, 最大100,默认20 Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"` - // 过滤参数,支持EndPointName,EndPointId,EndPointServiceId,EndPointVip + // 过滤参数,支持EndpointName,EndpointId Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` } -func (r *DescribeEndPointListRequest) ToJsonString() string { +func (r *DescribeExtendEndpointListRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeEndPointListRequest) FromJsonString(s string) error { +func (r *DescribeExtendEndpointListRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err @@ -1386,91 +1380,30 @@ func (r *DescribeEndPointListRequest) FromJsonString(s string) error { delete(f, "Limit") delete(f, "Filters") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEndPointListRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -// Predefined struct for user -type DescribeEndPointListResponseParams struct { - // 终端节点总数 - TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` - - // 终端节点列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - EndPointSet []*EndPointInfo `json:"EndPointSet,omitnil,omitempty" name:"EndPointSet"` - - // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` -} - -type DescribeEndPointListResponse struct { - *tchttp.BaseResponse - Response *DescribeEndPointListResponseParams `json:"Response"` -} - -func (r *DescribeEndPointListResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEndPointListResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -// Predefined struct for user -type DescribeEndPointRegionRequestParams struct { - -} - -type DescribeEndPointRegionRequest struct { - *tchttp.BaseRequest - -} - -func (r *DescribeEndPointRegionRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEndPointRegionRequest) 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", "DescribeEndPointRegionRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeExtendEndpointListRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeEndPointRegionResponseParams struct { - // 地域数组 - RegionSet []*RegionInfo `json:"RegionSet,omitnil,omitempty" name:"RegionSet"` - +type DescribeExtendEndpointListResponseParams struct { // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type DescribeEndPointRegionResponse struct { +type DescribeExtendEndpointListResponse struct { *tchttp.BaseResponse - Response *DescribeEndPointRegionResponseParams `json:"Response"` + Response *DescribeExtendEndpointListResponseParams `json:"Response"` } -func (r *DescribeEndPointRegionResponse) ToJsonString() string { +func (r *DescribeExtendEndpointListResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeEndPointRegionResponse) FromJsonString(s string) error { +func (r *DescribeExtendEndpointListResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } @@ -1549,59 +1482,76 @@ func (r *DescribeForwardRuleListResponse) FromJsonString(s string) error { } // Predefined struct for user -type DescribeForwardRuleRequestParams struct { - // 转发规则ID - RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"` +type DescribeInboundEndpointListRequestParams struct { + // 分页偏移量,从0开始 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 分页限制数目, 最大100,默认20 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 过滤参数,支持EndPointName,EndpointName,EndpointId + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` } -type DescribeForwardRuleRequest struct { +type DescribeInboundEndpointListRequest struct { *tchttp.BaseRequest - // 转发规则ID - RuleId *string `json:"RuleId,omitnil,omitempty" name:"RuleId"` + // 分页偏移量,从0开始 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 分页限制数目, 最大100,默认20 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 过滤参数,支持EndPointName,EndpointName,EndpointId + Filters []*Filter `json:"Filters,omitnil,omitempty" name:"Filters"` } -func (r *DescribeForwardRuleRequest) ToJsonString() string { +func (r *DescribeInboundEndpointListRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeForwardRuleRequest) FromJsonString(s string) error { +func (r *DescribeInboundEndpointListRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "RuleId") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeForwardRuleRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInboundEndpointListRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeForwardRuleResponseParams struct { - // 转发规则详情 - ForwardRule *ForwardRule `json:"ForwardRule,omitnil,omitempty" name:"ForwardRule"` +type DescribeInboundEndpointListResponseParams struct { + // 总数 + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // 终端节点信息 + InboundEndpointSet []*InboundEndpointSet `json:"InboundEndpointSet,omitnil,omitempty" name:"InboundEndpointSet"` // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } -type DescribeForwardRuleResponse struct { +type DescribeInboundEndpointListResponse struct { *tchttp.BaseResponse - Response *DescribeForwardRuleResponseParams `json:"Response"` + Response *DescribeInboundEndpointListResponseParams `json:"Response"` } -func (r *DescribeForwardRuleResponse) ToJsonString() string { +func (r *DescribeInboundEndpointListResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeForwardRuleResponse) FromJsonString(s string) error { +func (r *DescribeInboundEndpointListResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } @@ -1755,7 +1705,7 @@ func (r *DescribePrivateZoneListResponse) FromJsonString(s string) error { // Predefined struct for user type DescribePrivateZoneRecordListRequestParams struct { - // 私有域ID: zone-xxxxxx + // 私有域ID: zone-12c5a6e8 ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` // 过滤参数(支持使用Value、RecordType过滤) @@ -1771,7 +1721,7 @@ type DescribePrivateZoneRecordListRequestParams struct { type DescribePrivateZoneRecordListRequest struct { *tchttp.BaseRequest - // 私有域ID: zone-xxxxxx + // 私有域ID: zone-12c5a6e8 ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` // 过滤参数(支持使用Value、RecordType过滤) @@ -1836,14 +1786,14 @@ func (r *DescribePrivateZoneRecordListResponse) FromJsonString(s string) error { // Predefined struct for user type DescribePrivateZoneRequestParams struct { - // 域名,格式必须是标准的TLD + // 私有域id ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` } type DescribePrivateZoneRequest struct { *tchttp.BaseRequest - // 域名,格式必须是标准的TLD + // 私有域id ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` } @@ -1999,6 +1949,70 @@ func (r *DescribeQuotaUsageResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DescribeRecordRequestParams struct { + // 私有域ID + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` + + // 记录ID + RecordId *string `json:"RecordId,omitnil,omitempty" name:"RecordId"` +} + +type DescribeRecordRequest struct { + *tchttp.BaseRequest + + // 私有域ID + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` + + // 记录ID + RecordId *string `json:"RecordId,omitnil,omitempty" name:"RecordId"` +} + +func (r *DescribeRecordRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRecordRequest) 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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRecordRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeRecordResponseParams struct { + // 记录信息 + RecordInfo *RecordInfo `json:"RecordInfo,omitnil,omitempty" name:"RecordInfo"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeRecordResponse struct { + *tchttp.BaseResponse + Response *DescribeRecordResponseParams `json:"Response"` +} + +func (r *DescribeRecordResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeRecordResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DescribeRequestDataRequestParams struct { // 请求量统计起始时间,格式:2020-11-22 00:00:00 @@ -2009,6 +2023,9 @@ type DescribeRequestDataRequestParams struct { // 请求量统计结束时间,格式:2020-11-22 23:59:59 TimeRangeEnd *string `json:"TimeRangeEnd,omitnil,omitempty" name:"TimeRangeEnd"` + + // 是否导出:true导出,false不导出 + Export *bool `json:"Export,omitnil,omitempty" name:"Export"` } type DescribeRequestDataRequest struct { @@ -2022,6 +2039,9 @@ type DescribeRequestDataRequest struct { // 请求量统计结束时间,格式:2020-11-22 23:59:59 TimeRangeEnd *string `json:"TimeRangeEnd,omitnil,omitempty" name:"TimeRangeEnd"` + + // 是否导出:true导出,false不导出 + Export *bool `json:"Export,omitnil,omitempty" name:"Export"` } func (r *DescribeRequestDataRequest) ToJsonString() string { @@ -2039,6 +2059,7 @@ func (r *DescribeRequestDataRequest) FromJsonString(s string) error { delete(f, "TimeRangeBegin") delete(f, "Filters") delete(f, "TimeRangeEnd") + delete(f, "Export") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRequestDataRequest has unknown keys!", "") } @@ -2053,6 +2074,9 @@ type DescribeRequestDataResponseParams struct { // 请求量单位时间: Day:天,Hour:小时 Interval *string `json:"Interval,omitnil,omitempty" name:"Interval"` + // 导出数据下载地址 + Url *string `json:"Url,omitnil,omitempty" name:"Url"` + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` } @@ -2073,26 +2097,24 @@ func (r *DescribeRequestDataResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } -type EndPointInfo struct { - // 终端节点ID - EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` +type EndPointServiceInfo struct { + // ip + EndPointVip *string `json:"EndPointVip,omitnil,omitempty" name:"EndPointVip"` - // 终端节点名称 - EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` + // 子网id + UniqSubnetId *string `json:"UniqSubnetId,omitnil,omitempty" name:"UniqSubnetId"` - // 终端节点服务ID - EndPointServiceId *string `json:"EndPointServiceId,omitnil,omitempty" name:"EndPointServiceId"` + // 网络侧状态,0 可用,1 待接受,3 拒绝 + EndPointState *uint64 `json:"EndPointState,omitnil,omitempty" name:"EndPointState"` - // 终端节点VIP列表 - EndPointVipSet []*string `json:"EndPointVipSet,omitnil,omitempty" name:"EndPointVipSet"` + // 状态,1表示可用,0表示删除 + EndPointStatus *uint64 `json:"EndPointStatus,omitnil,omitempty" name:"EndPointStatus"` - // ap-guangzhou - // 注意:此字段可能返回 null,表示取不到有效值。 - RegionCode *string `json:"RegionCode,omitnil,omitempty" name:"RegionCode"` + // 备注信息 + EndPointRemark *string `json:"EndPointRemark,omitnil,omitempty" name:"EndPointRemark"` - // 标签键值对集合 - // 注意:此字段可能返回 null,表示取不到有效值。 - Tags []*TagInfo `json:"Tags,omitnil,omitempty" name:"Tags"` + // 网络侧隔离状态,1:已隔离,0:未隔离 + EndPointIsolateFlag *uint64 `json:"EndPointIsolateFlag,omitnil,omitempty" name:"EndPointIsolateFlag"` } type Filter struct { @@ -2143,17 +2165,35 @@ type ForwardRule struct { ForwardAddress []*string `json:"ForwardAddress,omitnil,omitempty" name:"ForwardAddress"` // 私有域绑定的vpc列表 - // 注意:此字段可能返回 null,表示取不到有效值。 VpcSet []*VpcInfo `json:"VpcSet,omitnil,omitempty" name:"VpcSet"` // 绑定的私有域ID ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` // 标签 - // 注意:此字段可能返回 null,表示取不到有效值。 Tags []*TagInfo `json:"Tags,omitnil,omitempty" name:"Tags"` } +type InboundEndpointSet struct { + // 终端节点ID + EndPointId *string `json:"EndPointId,omitnil,omitempty" name:"EndPointId"` + + // 名称 + EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` + + // vpcid + UniqVpcId *string `json:"UniqVpcId,omitnil,omitempty" name:"UniqVpcId"` + + // 创建时间 + CreatedAt *string `json:"CreatedAt,omitnil,omitempty" name:"CreatedAt"` + + // 更新时间 + UpdatedAt *string `json:"UpdatedAt,omitnil,omitempty" name:"UpdatedAt"` + + // 终端节点信息 + EndPointService []*EndPointServiceInfo `json:"EndPointService,omitnil,omitempty" name:"EndPointService"` +} + type MetricData struct { // 资源描述 Resource *string `json:"Resource,omitnil,omitempty" name:"Resource"` @@ -2165,7 +2205,6 @@ type MetricData struct { DataSet []*DatePoint `json:"DataSet,omitnil,omitempty" name:"DataSet"` // 查询范围内的请求总量 - // 注意:此字段可能返回 null,表示取不到有效值。 MetricCount *int64 `json:"MetricCount,omitnil,omitempty" name:"MetricCount"` } @@ -2237,6 +2276,67 @@ func (r *ModifyForwardRuleResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type ModifyInboundEndpointRequestParams struct { + // 终端节点ID + EndpointId *string `json:"EndpointId,omitnil,omitempty" name:"EndpointId"` + + // 终端节点名称 + EndpointName *string `json:"EndpointName,omitnil,omitempty" name:"EndpointName"` +} + +type ModifyInboundEndpointRequest struct { + *tchttp.BaseRequest + + // 终端节点ID + EndpointId *string `json:"EndpointId,omitnil,omitempty" name:"EndpointId"` + + // 终端节点名称 + EndpointName *string `json:"EndpointName,omitnil,omitempty" name:"EndpointName"` +} + +func (r *ModifyInboundEndpointRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInboundEndpointRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EndpointId") + delete(f, "EndpointName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInboundEndpointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInboundEndpointResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyInboundEndpointResponse struct { + *tchttp.BaseResponse + Response *ModifyInboundEndpointResponseParams `json:"Response"` +} + +func (r *ModifyInboundEndpointResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyInboundEndpointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type ModifyPrivateZoneRecordRequestParams struct { // 私有域ID @@ -2262,6 +2362,9 @@ type ModifyPrivateZoneRecordRequestParams struct { // 记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600 TTL *int64 `json:"TTL,omitnil,omitempty" name:"TTL"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` } type ModifyPrivateZoneRecordRequest struct { @@ -2290,6 +2393,9 @@ type ModifyPrivateZoneRecordRequest struct { // 记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600 TTL *int64 `json:"TTL,omitnil,omitempty" name:"TTL"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` } func (r *ModifyPrivateZoneRecordRequest) ToJsonString() string { @@ -2312,6 +2418,7 @@ func (r *ModifyPrivateZoneRecordRequest) FromJsonString(s string) error { delete(f, "Weight") delete(f, "MX") delete(f, "TTL") + delete(f, "Remark") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrivateZoneRecordRequest has unknown keys!", "") } @@ -2463,7 +2570,7 @@ func (r *ModifyPrivateZoneVpcRequest) FromJsonString(s string) error { // Predefined struct for user type ModifyPrivateZoneVpcResponseParams struct { - // 私有域ID, zone-xxxxxx + // 私有域ID, zone-12e45ds6 ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` // 解析域关联的VPC列表 @@ -2600,7 +2707,6 @@ type PrivateZone struct { RecordCount *int64 `json:"RecordCount,omitnil,omitempty" name:"RecordCount"` // 备注 - // 注意:此字段可能返回 null,表示取不到有效值。 Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` // 绑定的Vpc列表 @@ -2617,26 +2723,21 @@ type PrivateZone struct { Tags []*TagInfo `json:"Tags,omitnil,omitempty" name:"Tags"` // 绑定的关联账号的vpc列表 - // 注意:此字段可能返回 null,表示取不到有效值。 AccountVpcSet []*AccountVpcInfoOutput `json:"AccountVpcSet,omitnil,omitempty" name:"AccountVpcSet"` // 是否自定义TLD - // 注意:此字段可能返回 null,表示取不到有效值。 IsCustomTld *bool `json:"IsCustomTld,omitnil,omitempty" name:"IsCustomTld"` // CNAME加速状态:开通:ENABLED, 关闭,DISABLED CnameSpeedupStatus *string `json:"CnameSpeedupStatus,omitnil,omitempty" name:"CnameSpeedupStatus"` // 转发规则名称 - // 注意:此字段可能返回 null,表示取不到有效值。 ForwardRuleName *string `json:"ForwardRuleName,omitnil,omitempty" name:"ForwardRuleName"` // 转发规则类型:云上到云下,DOWN;云下到云上,UP,目前只支持DOWN - // 注意:此字段可能返回 null,表示取不到有效值。 ForwardRuleType *string `json:"ForwardRuleType,omitnil,omitempty" name:"ForwardRuleType"` // 转发的地址 - // 注意:此字段可能返回 null,表示取不到有效值。 ForwardAddress *string `json:"ForwardAddress,omitnil,omitempty" name:"ForwardAddress"` // 终端节点名称 @@ -2644,7 +2745,6 @@ type PrivateZone struct { EndPointName *string `json:"EndPointName,omitnil,omitempty" name:"EndPointName"` // 已删除的vpc - // 注意:此字段可能返回 null,表示取不到有效值。 DeletedVpcSet []*VpcInfo `json:"DeletedVpcSet,omitnil,omitempty" name:"DeletedVpcSet"` } @@ -2668,7 +2768,6 @@ type PrivateZoneRecord struct { TTL *int64 `json:"TTL,omitnil,omitempty" name:"TTL"` // MX优先级:记录类型为MX时必填。取值范围:5,10,15,20,30,40,50 - // 注意:此字段可能返回 null,表示取不到有效值。 MX *int64 `json:"MX,omitnil,omitempty" name:"MX"` // 记录状态:ENABLED @@ -2689,8 +2788,10 @@ type PrivateZoneRecord struct { Extra *string `json:"Extra,omitnil,omitempty" name:"Extra"` // 0暂停,1启用 - // 注意:此字段可能返回 null,表示取不到有效值。 Enabled *uint64 `json:"Enabled,omitnil,omitempty" name:"Enabled"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` } // Predefined struct for user @@ -2755,24 +2856,50 @@ func (r *QueryAsyncBindVpcStatusResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } -type RegionInfo struct { - // 地域编码 - RegionCode *string `json:"RegionCode,omitnil,omitempty" name:"RegionCode"` +type RecordInfo struct { + // 记录id + RecordId *string `json:"RecordId,omitnil,omitempty" name:"RecordId"` - // 地域中文名 - // 注意:此字段可能返回 null,表示取不到有效值。 - CnName *string `json:"CnName,omitnil,omitempty" name:"CnName"` + // 私有域id: zone-xxxxxxxx + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` - // 地域英文名 - EnName *string `json:"EnName,omitnil,omitempty" name:"EnName"` + // 子域名 + SubDomain *string `json:"SubDomain,omitnil,omitempty" name:"SubDomain"` - // 地域ID - // 注意:此字段可能返回 null,表示取不到有效值。 - RegionId *uint64 `json:"RegionId,omitnil,omitempty" name:"RegionId"` + // 记录类型,可选的记录类型为:"A", "AAAA", "CNAME", "MX", "TXT", "PTR" + RecordType *string `json:"RecordType,omitnil,omitempty" name:"RecordType"` - // 可用区数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - AvailableZoneNum *uint64 `json:"AvailableZoneNum,omitnil,omitempty" name:"AvailableZoneNum"` + // 记录值 + RecordValue *string `json:"RecordValue,omitnil,omitempty" name:"RecordValue"` + + // 记录缓存时间,数值越小生效越快,取值1-86400s, 默认 600 + TTL *int64 `json:"TTL,omitnil,omitempty" name:"TTL"` + + // MX优先级:记录类型为MX时必填。取值范围:5,10,15,20,30,40,50 + MX *int64 `json:"MX,omitnil,omitempty" name:"MX"` + + // 记录权重,值为1-100 + Weight *int64 `json:"Weight,omitnil,omitempty" name:"Weight"` + + // 记录创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 记录更新时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` + + // 0暂停,1启用 + Enabled *uint64 `json:"Enabled,omitnil,omitempty" name:"Enabled"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` +} + +type SubnetIpInfo struct { + // 子网ID + SubnetId *string `json:"SubnetId,omitnil,omitempty" name:"SubnetId"` + + // ip + SubnetVip *string `json:"SubnetVip,omitnil,omitempty" name:"SubnetVip"` } // Predefined struct for user @@ -2852,7 +2979,7 @@ type TldQuota struct { } type VpcInfo struct { - // VpcId: vpc-xadsafsdasd + // VpcId UniqVpcId *string `json:"UniqVpcId,omitnil,omitempty" name:"UniqVpcId"` // Vpc所属地区: ap-guangzhou, ap-shanghai diff --git a/vendor/modules.txt b/vendor/modules.txt index cf9b3c5c3e..a932647de7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1268,7 +1268,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.1156 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres/v20170312 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.1038 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.1.42 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns/v20201028 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762 diff --git a/website/docs/r/private_dns_inbound_endpoint.html.markdown b/website/docs/r/private_dns_inbound_endpoint.html.markdown new file mode 100644 index 0000000000..fe1ac56d30 --- /dev/null +++ b/website/docs/r/private_dns_inbound_endpoint.html.markdown @@ -0,0 +1,58 @@ +--- +subcategory: "PrivateDNS" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_private_dns_inbound_endpoint" +sidebar_current: "docs-tencentcloud-resource-private_dns_inbound_endpoint" +description: |- + Provides a resource to create a Private Dns inbound endpoint +--- + +# tencentcloud_private_dns_inbound_endpoint + +Provides a resource to create a Private Dns inbound endpoint + +## Example Usage + +```hcl +resource "tencentcloud_private_dns_inbound_endpoint" "example" { + endpoint_name = "tf-example" + endpoint_region = "ap-guangzhou" + endpoint_vpc = "vpc-i5yyodl9" + subnet_ip { + subnet_id = "subnet-hhi88a58" + subnet_vip = "10.0.30.2" + } + + subnet_ip { + subnet_id = "subnet-5rrirqyc" + subnet_vip = "10.0.0.11" + } + + subnet_ip { + subnet_id = "subnet-60ut6n10" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `endpoint_name` - (Required, String) Name. +* `endpoint_region` - (Required, String, ForceNew) Region. +* `endpoint_vpc` - (Required, String, ForceNew) VPC ID. +* `subnet_ip` - (Required, List, ForceNew) Subnet information. + +The `subnet_ip` object supports the following: + +* `subnet_id` - (Required, String, ForceNew) Subnet ID. +* `subnet_vip` - (Optional, String, ForceNew) IP address. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index 04b0970431..4ba199e313 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -3383,6 +3383,9 @@