diff --git a/.changelog/3021.txt b/.changelog/3021.txt
new file mode 100644
index 0000000000..4d9eda0c82
--- /dev/null
+++ b/.changelog/3021.txt
@@ -0,0 +1,19 @@
+```release-note:new-resource
+tencentcloud_elastic_public_ipv6
+```
+
+```release-note:new-resource
+tencentcloud_classic_elastic_public_ipv6
+```
+
+```release-note:new-resource
+tencentcloud_elastic_public_ipv6_attachment
+```
+
+```release-note:new-data-source
+tencentcloud_classic_elastic_public_ipv6s
+```
+
+```release-note:new-data-source
+tencentcloud_elastic_public_ipv6s
+```
\ No newline at end of file
diff --git a/go.mod b/go.mod
index d9de0717f6..012256169f 100644
--- a/go.mod
+++ b/go.mod
@@ -46,7 +46,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1034
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.1033
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.1046
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1058
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1060
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1014
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.1058
@@ -96,7 +96,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.860
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1045
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1060
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199
diff --git a/go.sum b/go.sum
index 494eeb1885..a73ebf1f04 100644
--- a/go.sum
+++ b/go.sum
@@ -936,8 +936,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1052 h1:RCs
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1052/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1056 h1:bOSZ7cOXvBe8MCBqDBTtpyKIqx9q6woxqIPK5M9FhNY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1056/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1058 h1:VVv5rEFtGbxEB23V3gJO5pFHEXGlOh9duEWEtNm+w6c=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1058/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1060 h1:0FEYKm73CROpZGfRWqyyhNkk5ndBUDqNNb5SP0BL5jg=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1060/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993 h1:WlPgXldQCxt7qi5Xrc6j6zTrsXWzN5BcOGs7Irq7fwQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993/go.mod h1:Z9U8zNtyuyKhjS0698wqsrG/kLx1TQ5CEixXBwVe7xY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860 h1:F3esKBIT3HW9+7Gt8cVgf8X06VdGIczpgLBUECzSEzU=
@@ -1056,6 +1056,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.860 h1:vW2NgAH
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.860/go.mod h1:uCkDh/AW/tb8JGq5b2kqLjqZuhCFR+6oTsq1SrrvT44=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1045 h1:7+rfyxftJ/C85yMQfs7ALj0RHkSlyboMj6gqCVKYa58=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1045/go.mod h1:yn4I7fSwpiM6ltjqksS1JtZZAHkZ35ywN+kLm6AJPzc=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1060 h1:hPEbNpABdOT1YA2B8aibfSQfxd91Ux2Xz8J7GqNHswE=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1060/go.mod h1:owVatMEAkXaooNfoH99tMFY+AAiSnsf9m+Rb/HY+oc0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037 h1:sgHOHqVFcO266dnoh0KJ0CoxrRglRZYKW78iBh41Giw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037/go.mod h1:QM5m6aZ65kaxaES0D44BNKmemn+9WBf5vr3HDDPrh8U=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792 h1:NLgKNOIHWa38AmW7dyfI9Jlcp2Kr9VRD94f48pPNmxM=
diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go
index d95d96d992..737ee0ee08 100644
--- a/tencentcloud/provider.go
+++ b/tencentcloud/provider.go
@@ -791,6 +791,8 @@ func Provider() *schema.Provider {
"tencentcloud_address_template_groups": vpc.DataSourceTencentCloudAddressTemplateGroups(),
"tencentcloud_protocol_templates": vpc.DataSourceTencentCloudProtocolTemplates(),
"tencentcloud_protocol_template_groups": vpc.DataSourceTencentCloudProtocolTemplateGroups(),
+ "tencentcloud_classic_elastic_public_ipv6s": vpc.DataSourceTencentCloudClassicElasticPublicIpv6s(),
+ "tencentcloud_elastic_public_ipv6s": vpc.DataSourceTencentCloudElasticPublicIpv6s(),
"tencentcloud_kms_keys": kms.DataSourceTencentCloudKmsKeys(),
"tencentcloud_kms_public_key": kms.DataSourceTencentCloudKmsPublicKey(),
"tencentcloud_kms_get_parameters_for_import": kms.DataSourceTencentCloudKmsGetParametersForImport(),
@@ -2170,6 +2172,9 @@ func Provider() *schema.Provider {
"tencentcloud_vpc_peer_connect_accept_operation": vpc.ResourceTencentCloudVpcPeerConnectAcceptOperation(),
"tencentcloud_vpc_peer_connect_reject_operation": vpc.ResourceTencentCloudVpcPeerConnectRejectOperation(),
"tencentcloud_reserve_ip_address": vpc.ResourceTencentCloudReserveIpAddress(),
+ "tencentcloud_elastic_public_ipv6": vpc.ResourceTencentCloudElasticPublicIpv6(),
+ "tencentcloud_classic_elastic_public_ipv6": vpc.ResourceTencentCloudClassicElasticPublicIpv6(),
+ "tencentcloud_elastic_public_ipv6_attachment": vpc.ResourceTencentCloudElasticPublicIpv6Attachment(),
"tencentcloud_csip_risk_center": csip.ResourceTencentCloudCsipRiskCenter(),
"tencentcloud_organization_org_share_unit_member": tco.ResourceTencentCloudOrganizationOrgShareUnitMember(),
"tencentcloud_organization_org_share_unit": tco.ResourceTencentCloudOrganizationOrgShareUnit(),
diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md
index c0f16723a8..109f49a3d0 100644
--- a/tencentcloud/provider.md
+++ b/tencentcloud/provider.md
@@ -1231,6 +1231,8 @@ Virtual Private Cloud(VPC)
tencentcloud_nat_dc_route
tencentcloud_vpc_bandwidth_package_quota
tencentcloud_vpc_bandwidth_package_bill_usage
+ tencentcloud_classic_elastic_public_ipv6s
+ tencentcloud_elastic_public_ipv6s
Resource
tencentcloud_eni
@@ -1279,6 +1281,9 @@ Virtual Private Cloud(VPC)
tencentcloud_vpc_bandwidth_package_attachment
tencentcloud_ipv6_address_bandwidth
tencentcloud_reserve_ip_address
+ tencentcloud_elastic_public_ipv6
+ tencentcloud_classic_elastic_public_ipv6
+ tencentcloud_elastic_public_ipv6_attachment
Private Link(PLS)
Resource
diff --git a/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s.go b/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s.go
new file mode 100644
index 0000000000..3e2c9fb704
--- /dev/null
+++ b/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s.go
@@ -0,0 +1,444 @@
+package vpc
+
+import (
+ "context"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312"
+
+ tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
+)
+
+func DataSourceTencentCloudClassicElasticPublicIpv6s() *schema.Resource {
+ return &schema.Resource{
+ Read: dataSourceTencentCloudClassicElasticPublicIpv6sRead,
+ Schema: map[string]*schema.Schema{
+ "ip6_address_ids": {
+ Type: schema.TypeSet,
+ Optional: true,
+ Description: "List of unique IDs that identify IPV6. The IPV6 unique ID is shaped like `eip-11112222`. Parameters do not support specifying both `Ip6AddressIds` and `Filters`.",
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ },
+
+ "filters": {
+ Type: schema.TypeList,
+ Optional: true,
+ Description: "The upper limit for `Filters per request is 10, and the upper limit for`Filter.Values` is 100. Parameters do not support specifying both AddressIds and Filters. The detailed filtering conditions are as follows:\n - address-ip: filter according to IPV6 IP address.\n - network-interface-id: filter according to the unique ID of the Elastic Network Interface.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "name": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Property name. If there are multiple Filters, the relationship between Filters is a logical AND relationship.",
+ },
+ "values": {
+ Type: schema.TypeSet,
+ Required: true,
+ Description: "Attribute value. If there are multiple Values in the same Filter, the relationship between Values under the same Filter is a logical OR relationship. When the value type is a Boolean type, the value can be directly taken to the string TRUE or FALSE.",
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ },
+ },
+ },
+ },
+
+ "address_set": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "List of IPV6 details.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "address_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The ID of EIP is the unique identifier of EIP.",
+ },
+ "address_name": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "`EIP` name.",
+ },
+ "address_status": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "`EIP` status, including `CREATING`(Creating),`BINDING`(Binding),`BIND`(Unbinding),`UNBIND`(Unbinding),`OFFLINING`(Releasing),`BIND_ENI`(Binding Suspend Elastic Network Interface).",
+ },
+ "address_ip": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "External network IP address.",
+ },
+ "instance_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The bound resource instance `ID`. It may be a `CVM`,`NAT`.",
+ },
+ "created_time": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Creation time. It is expressed in accordance with the ISO8601 standard and uses UTC time. The format is: `Y-MM-DDThh:mm:ssZ`.",
+ },
+ "network_interface_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The bound Elastic Network Interface ID.",
+ },
+ "private_address_ip": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Binding resources intranet IP.",
+ },
+ "is_arrears": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Resource isolation status. true means eip is in isolation, false means resource is in non-isolation state.",
+ },
+ "is_blocked": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Resource blocking status. true means eip is blocked, false means eip is not blocked.",
+ },
+ "is_eip_direct_connection": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether eip supports pass-through mode. true means eip supports pass-through mode, false means resources do not support pass-through mode.",
+ },
+ "address_type": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "EIP resource types, including CalcIP, WanIP, EIP, AnycastEIP, and high-defense EIP. Among them: `CalcIP` means device IP,`WanIP` means ordinary public network IP,`EIP` means elastic public network IP,`AnycastEIP` means accelerated EIP, and `AntiDDoSEIP` means highly resistant EIP.",
+ },
+ "cascade_release": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether eip is automatically released after unbinding. true means that eip will be automatically released after unbinding, false means that eip will not be automatically released after unbinding.",
+ },
+ "eip_alg_type": {
+ Type: schema.TypeList,
+ Required: true,
+ MaxItems: 1,
+ Description: "The type of protocol opened by EIP ALG.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "ftp": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether the Ftp protocol Alg function is enabled.",
+ },
+ "sip": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether the Sip protocol Alg function is enabled.",
+ },
+ },
+ },
+ },
+ "internet_service_provider": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Operator information of elastic public network IP. Current possible return values include `CMCC`,`CTCC`,`CUCC`,`BGP`.",
+ },
+ "local_bgp": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether local bandwidth EIP.",
+ },
+ "bandwidth": {
+ Type: schema.TypeInt,
+ Required: true,
+ Description: "The bandwidth value of the elastic public network IP. Note that the elastic public IP of traditional account types has no bandwidth attribute and the value is null.",
+ },
+ "internet_charge_type": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Network charging model for elastic public network IP. Note that the elastic public IP of traditional account types does not have a network charging mode attribute and the value is blank. Note: This field may return null, indicating that a valid value cannot be obtained. Includes:\n - BANDWIDTH_PREPAID_BY_MONTH: represents prepaid monthly bandwidth;\n - TRAFFIC_POSTPAID_BY_HOUR: represents postpayment per hour of traffic;\n - BANDWIDTH_POSTPAID_BY_HOUR: represents pay-per-hour bandwidth;\n - BANDWIDTH_PACKAGE: represents a shared bandwidth package.",
+ },
+ "tag_set": {
+ Type: schema.TypeList,
+ Required: true,
+ Description: "List of tags associated with elastic public IP.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "key": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Tag key.",
+ },
+ "value": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Tag value.",
+ },
+ },
+ },
+ },
+ "deadline_date": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Expiration time.",
+ },
+ "instance_type": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The instance type of the EIP binding.",
+ },
+ "egress": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Static single-wire IP network exit.",
+ },
+ "anti_ddos_package_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "High-defense package ID. When the EIP type is high-defense EIP, it returns the high-defense package ID to which the EIP is bound.",
+ },
+ "renew_flag": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Whether the current EIP is automatically renewed, this field will be displayed only for EIP prepaid by monthly bandwidth. Examples of specific values are as follows:\n - NOTIFY_AND_MANUAL_RENEW: Normal renewal\n - NOTIFY_AND_AUTO_RENEW: Automatic renewal\n - DISABLE_NOTIFY_AND_MANUAL_RENEW: No renewal after expiration.",
+ },
+ "bandwidth_package_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The bandwidth package ID associated with the current public IP. If the public IP does not use bandwidth packages for charging, the return will be blank.",
+ },
+ "un_vpc_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Unique ID of the vpc to which traditional Elastic IPv6 belongs.",
+ },
+ "dedicated_cluster_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "CDC unique ID.",
+ },
+ },
+ },
+ },
+
+ "result_output_file": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Used to save results.",
+ },
+ },
+ }
+}
+
+func dataSourceTencentCloudClassicElasticPublicIpv6sRead(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("data_source.tencentcloud_classic_elastic_public_ipv6s.read")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(nil)
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ service := VpcService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()}
+
+ paramMap := make(map[string]interface{})
+ if v, ok := d.GetOk("ip6_address_ids"); ok {
+ ip6AddressIdsList := []*string{}
+ ip6AddressIdsSet := v.(*schema.Set).List()
+ for i := range ip6AddressIdsSet {
+ ip6AddressIds := ip6AddressIdsSet[i].(string)
+ ip6AddressIdsList = append(ip6AddressIdsList, helper.String(ip6AddressIds))
+ }
+ paramMap["Ip6AddressIds"] = ip6AddressIdsList
+ }
+
+ if v, ok := d.GetOk("filters"); ok {
+ filtersSet := v.([]interface{})
+ tmpSet := make([]*vpc.Filter, 0, len(filtersSet))
+ for _, item := range filtersSet {
+ filtersMap := item.(map[string]interface{})
+ filter := vpc.Filter{}
+ if v, ok := filtersMap["name"]; ok {
+ filter.Name = helper.String(v.(string))
+ }
+ if v, ok := filtersMap["values"]; ok {
+ valuesSet := v.(*schema.Set).List()
+ for i := range valuesSet {
+ values := valuesSet[i].(string)
+ filter.Values = append(filter.Values, helper.String(values))
+ }
+ }
+ tmpSet = append(tmpSet, &filter)
+ }
+ paramMap["Filters"] = tmpSet
+ }
+
+ var respData []*vpc.Address
+ err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
+ result, e := service.DescribeClassicElasticPublicIpv6sByFilter(ctx, paramMap)
+ if e != nil {
+ return tccommon.RetryError(e)
+ }
+ respData = result
+ return nil
+ })
+ if err != nil {
+ return err
+ }
+
+ var ids []string
+ addressSetList := make([]map[string]interface{}, 0, len(respData))
+ if respData != nil {
+ for _, addressSet := range respData {
+ addressSetMap := map[string]interface{}{}
+
+ var addressId string
+ if addressSet.AddressId != nil {
+ addressSetMap["address_id"] = addressSet.AddressId
+ addressId = *addressSet.AddressId
+ }
+
+ if addressSet.AddressName != nil {
+ addressSetMap["address_name"] = addressSet.AddressName
+ }
+
+ if addressSet.AddressStatus != nil {
+ addressSetMap["address_status"] = addressSet.AddressStatus
+ }
+
+ if addressSet.AddressIp != nil {
+ addressSetMap["address_ip"] = addressSet.AddressIp
+ }
+
+ if addressSet.InstanceId != nil {
+ addressSetMap["instance_id"] = addressSet.InstanceId
+ }
+
+ if addressSet.CreatedTime != nil {
+ addressSetMap["created_time"] = addressSet.CreatedTime
+ }
+
+ if addressSet.NetworkInterfaceId != nil {
+ addressSetMap["network_interface_id"] = addressSet.NetworkInterfaceId
+ }
+
+ if addressSet.PrivateAddressIp != nil {
+ addressSetMap["private_address_ip"] = addressSet.PrivateAddressIp
+ }
+
+ if addressSet.IsArrears != nil {
+ addressSetMap["is_arrears"] = addressSet.IsArrears
+ }
+
+ if addressSet.IsBlocked != nil {
+ addressSetMap["is_blocked"] = addressSet.IsBlocked
+ }
+
+ if addressSet.IsEipDirectConnection != nil {
+ addressSetMap["is_eip_direct_connection"] = addressSet.IsEipDirectConnection
+ }
+
+ if addressSet.AddressType != nil {
+ addressSetMap["address_type"] = addressSet.AddressType
+ }
+
+ if addressSet.CascadeRelease != nil {
+ addressSetMap["cascade_release"] = addressSet.CascadeRelease
+ }
+
+ eipAlgTypeMap := map[string]interface{}{}
+
+ if addressSet.EipAlgType != nil {
+ if addressSet.EipAlgType.Ftp != nil {
+ eipAlgTypeMap["ftp"] = addressSet.EipAlgType.Ftp
+ }
+
+ if addressSet.EipAlgType.Sip != nil {
+ eipAlgTypeMap["sip"] = addressSet.EipAlgType.Sip
+ }
+
+ addressSetMap["eip_alg_type"] = []interface{}{eipAlgTypeMap}
+ }
+
+ if addressSet.InternetServiceProvider != nil {
+ addressSetMap["internet_service_provider"] = addressSet.InternetServiceProvider
+ }
+
+ if addressSet.LocalBgp != nil {
+ addressSetMap["local_bgp"] = addressSet.LocalBgp
+ }
+
+ if addressSet.Bandwidth != nil {
+ addressSetMap["bandwidth"] = addressSet.Bandwidth
+ }
+
+ if addressSet.InternetChargeType != nil {
+ addressSetMap["internet_charge_type"] = addressSet.InternetChargeType
+ }
+
+ tagSetList := make([]map[string]interface{}, 0, len(addressSet.TagSet))
+ if addressSet.TagSet != nil {
+ for _, tagSet := range addressSet.TagSet {
+ tagSetMap := map[string]interface{}{}
+
+ if tagSet.Key != nil {
+ tagSetMap["key"] = tagSet.Key
+ }
+
+ if tagSet.Value != nil {
+ tagSetMap["value"] = tagSet.Value
+ }
+
+ tagSetList = append(tagSetList, tagSetMap)
+ }
+
+ addressSetMap["tag_set"] = tagSetList
+ }
+ if addressSet.DeadlineDate != nil {
+ addressSetMap["deadline_date"] = addressSet.DeadlineDate
+ }
+
+ if addressSet.InstanceType != nil {
+ addressSetMap["instance_type"] = addressSet.InstanceType
+ }
+
+ if addressSet.Egress != nil {
+ addressSetMap["egress"] = addressSet.Egress
+ }
+
+ if addressSet.AntiDDoSPackageId != nil {
+ addressSetMap["anti_ddos_package_id"] = addressSet.AntiDDoSPackageId
+ }
+
+ if addressSet.RenewFlag != nil {
+ addressSetMap["renew_flag"] = addressSet.RenewFlag
+ }
+
+ if addressSet.BandwidthPackageId != nil {
+ addressSetMap["bandwidth_package_id"] = addressSet.BandwidthPackageId
+ }
+
+ if addressSet.UnVpcId != nil {
+ addressSetMap["un_vpc_id"] = addressSet.UnVpcId
+ }
+
+ if addressSet.DedicatedClusterId != nil {
+ addressSetMap["dedicated_cluster_id"] = addressSet.DedicatedClusterId
+ }
+
+ ids = append(ids, addressId)
+ addressSetList = append(addressSetList, addressSetMap)
+ }
+
+ _ = d.Set("address_set", addressSetList)
+ }
+
+ d.SetId(helper.DataResourceIdsHash(ids))
+
+ output, ok := d.GetOk("result_output_file")
+ if ok && output.(string) != "" {
+ if e := tccommon.WriteToFile(output.(string), addressSetList); e != nil {
+ return e
+ }
+ }
+
+ return nil
+}
diff --git a/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s.md b/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s.md
new file mode 100644
index 0000000000..aa97b1d7b3
--- /dev/null
+++ b/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s.md
@@ -0,0 +1,9 @@
+Use this data source to query detailed information of vpc classic_elastic_public_ipv6s
+
+Example Usage
+
+```hcl
+data "tencentcloud_classic_elastic_public_ipv6s" "classic_elastic_public_ipv6s" {
+ ip6_address_ids = ["xxxxxx"]
+}
+```
diff --git a/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s_test.go b/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s_test.go
new file mode 100644
index 0000000000..583c12ddb7
--- /dev/null
+++ b/tencentcloud/services/vpc/data_source_tc_classic_elastic_public_ipv6s_test.go
@@ -0,0 +1,33 @@
+package vpc_test
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+
+ tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
+)
+
+func TestAccTencentCloudClassicElasticPublicIpv6sDataSource_basic(t *testing.T) {
+ t.Parallel()
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() {
+ tcacctest.AccPreCheck(t)
+ },
+ Providers: tcacctest.AccProviders,
+ Steps: []resource.TestStep{{
+ Config: testAccClassicElasticPublicIpv6sDataSource,
+ Check: resource.ComposeTestCheckFunc(
+ tcacctest.AccCheckTencentCloudDataSourceID("data.tencentcloud_classic_elastic_public_ipv6s.classic_elastic_public_ipv6s"),
+ resource.TestCheckResourceAttr("data.tencentcloud_classic_elastic_public_ipv6s.classic_elastic_public_ipv6s", "address_set.#", "1"),
+ ),
+ }},
+ })
+}
+
+const testAccClassicElasticPublicIpv6sDataSource = testAccClassicElasticPublicIpv6 + `
+
+data "tencentcloud_classic_elastic_public_ipv6s" "classic_elastic_public_ipv6s" {
+ ip6_address_ids = [tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6.id]
+}
+`
diff --git a/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s.go b/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s.go
new file mode 100644
index 0000000000..e88b22d1fa
--- /dev/null
+++ b/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s.go
@@ -0,0 +1,454 @@
+package vpc
+
+import (
+ "context"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312"
+
+ tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
+)
+
+func DataSourceTencentCloudElasticPublicIpv6s() *schema.Resource {
+ return &schema.Resource{
+ Read: dataSourceTencentCloudElasticPublicIpv6sRead,
+ Schema: map[string]*schema.Schema{
+ "ipv6_address_ids": {
+ Type: schema.TypeSet,
+ Optional: true,
+ Description: "Unique ID column that identifies IPv6.\n\t- Traditional Elastic IPv6 unique ID is like: `eip-11112222`\n\t- Elastic IPv6 unique ID is like: `eipv6 -11112222`\nNote: Parameters do not support specifying both IPv6AddressIds and Filters.",
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ },
+
+ "filters": {
+ Type: schema.TypeList,
+ Optional: true,
+ Description: "The detailed filter conditions are as follows:\n\t- address-id-String-required: no-(filter condition) filter by the unique ID of the elastic public network IPv6.\n\t- public-ipv6-address-String-required: no-(filter condition) filter by the IP address of the public network IPv6.\n\t- charge-type-String-required: no-(filter condition) filter by billing type.\n\t- private-ipv6-address-String-required: no-(filter condition) filter by bound private network IPv6 address.\n\t- egress-String-required: no-(filter condition) filter by exit.\n\t- address-type-String-required: no-(filter condition) filter by IPv6 type.\n\t- address-isp-String-required: no-(filter condition) filter by operator type.\n The status includes: 'CREATING','BINDING','BIND','UNBINDING','UNBIND','OFFLINING','BIND_ENI','PRIVATE'.\n\t- address-name-String-required: no-(filter condition) filter by EIP name. Blur filtering is not supported.\n\t- tag-key-String-required: no-(filter condition) filter by label key.\n\t- tag-value-String-required: no-(filter condition) filter by tag value.\n\t- tag:tag-key-String-required: no-(filter condition) filter by label key value pair. Tag-key is replaced with a specific label key.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "name": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Property name. If there are multiple Filters, the relationship between Filters is a logical AND (AND) relationship.",
+ },
+ "values": {
+ Type: schema.TypeSet,
+ Required: true,
+ Description: "Attribute value. If there are multiple Values in the same Filter, the relationship between Values under the same Filter is a logical OR relationship. When the value type is a Boolean type, the value can be directly taken to the string TRUE or FALSE.",
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ },
+ },
+ },
+ },
+
+ "traditional": {
+ Type: schema.TypeBool,
+ Optional: true,
+ Description: "Whether to query traditional IPv6 address information.",
+ },
+
+ "address_set": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "List of IPv6 details.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "address_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The ID of EIP is the unique identifier of EIP.",
+ },
+ "address_name": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "EIP name.",
+ },
+ "address_status": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "EIP status, including CREATING(Creating),BINDING(Binding),BIND(Binding),UNBINDING(Unbinding),UNBIND(Unbinding),OFFLINING(Releasing),BIND_ENI(Binding Suspend Elastic Network Interface).",
+ },
+ "address_ip": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "External network IP address.",
+ },
+ "instance_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The bound resource instance `ID`. It may be a `CVM`,`NAT`.",
+ },
+ "created_time": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Creation time. It is expressed in accordance with the ISO8601 standard and uses UTC time. The format is: `Y-MM-DDThh:mm:ssZ`.",
+ },
+ "network_interface_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The bound Elastic Network Interface ID.",
+ },
+ "private_address_ip": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Binding resources intranet IP.",
+ },
+ "is_arrears": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Resource isolation status. true means eip is in isolation, false means resource is in non-isolation state.",
+ },
+ "is_blocked": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Resource blocking status. true means eip is blocked, false means eip is not blocked.",
+ },
+ "is_eip_direct_connection": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether eip supports pass-through mode. true means eip supports pass-through mode, false means resources do not support pass-through mode.",
+ },
+ "address_type": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "EIP resource types, including CalcIP, WanIP, EIP, AnycastEIP, and high-defense EIP. Among them: `CalcIP` means device IP,`WanIP` means ordinary public network IP,`EIP` means elastic public network IP,`AnycastEIP` means accelerated EIP, and `AntiDDoSEIP` means highly resistant EIP.",
+ },
+ "cascade_release": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether eip is automatically released after unbinding. true means that eip will be automatically released after unbinding, false means that eip will not be automatically released after unbinding.",
+ },
+ "eip_alg_type": {
+ Type: schema.TypeList,
+ Required: true,
+ MaxItems: 1,
+ Description: "The type of protocol opened by EIP ALG.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "ftp": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether the Ftp protocol Alg function is enabled.",
+ },
+ "sip": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether the Sip protocol Alg function is enabled.",
+ },
+ },
+ },
+ },
+ "internet_service_provider": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Operator information of elastic public network IP. Current possible return values include `CMCC`,`CTCC`,`CUCC`,`BGP`.",
+ },
+ "local_bgp": {
+ Type: schema.TypeBool,
+ Required: true,
+ Description: "Whether local bandwidth EIP.",
+ },
+ "bandwidth": {
+ Type: schema.TypeInt,
+ Required: true,
+ Description: "The bandwidth value of the elastic public network IP. Note that the elastic public IP of traditional account types has no bandwidth attribute and the value is null.",
+ },
+ "internet_charge_type": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Network charging model for elastic public network IP. Note that the elastic public IP of traditional account types does not have a network charging mode attribute and the value is blank. Note: This field may return null, indicating that a valid value cannot be obtained. Includes: \nBANDWIDTH_PREPAID_BY_MONTH: indicates a prepaid monthly bandwidth. \nTRAFFIC_POSTPAID_BY_HOUR: means post-payment per hour. BANDWIDTH_POSTPAID_BY_HOUR: means postpayment per hour of bandwidth.\nBANDWIDTH_PACKAGE: indicates a shared Bandwidth Package.",
+ },
+ "tag_set": {
+ Type: schema.TypeList,
+ Required: true,
+ Description: "List of tags associated with elastic public IP.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "key": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Tag key",
+ },
+ "value": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Tag value",
+ },
+ },
+ },
+ },
+ "deadline_date": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Expiration time.",
+ },
+ "instance_type": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The instance type of the EIP binding.",
+ },
+ "egress": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Static single-wire IP network exit.",
+ },
+ "anti_ddos_package_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "High-defense package ID. When the EIP type is high-defense EIP, it returns the high-defense package ID to which the EIP is bound.",
+ },
+ "renew_flag": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Whether the current EIP is automatically renewed, this field will be displayed only for EIP prepaid by monthly bandwidth. Examples of specific values are as follows:\n\t- NOTIFY_AND_MANUAL_RENEW: Normal renewal\n\t- NOTIFY_AND_AUTO_RENEW: Automatic renewal\n\t- DISABLE_NOTIFY_AND_MANUAL_RENEW: No renewal after expiration.",
+ },
+ "bandwidth_package_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "The bandwidth package ID associated with the current public IP. If the public IP does not use bandwidth packages for charging, the return will be blank.",
+ },
+ "un_vpc_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Unique ID of the vpc to which traditional Elastic IPv6 belongs.",
+ },
+ "dedicated_cluster_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "CDC unique ID.",
+ },
+ },
+ },
+ },
+
+ "result_output_file": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Used to save results.",
+ },
+ },
+ }
+}
+
+func dataSourceTencentCloudElasticPublicIpv6sRead(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("data_source.tencentcloud_elastic_public_ipv6s.read")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(nil)
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ service := VpcService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()}
+
+ paramMap := make(map[string]interface{})
+ if v, ok := d.GetOk("ipv6_address_ids"); ok {
+ iPv6AddressIdsList := []*string{}
+ iPv6AddressIdsSet := v.(*schema.Set).List()
+ for i := range iPv6AddressIdsSet {
+ iPv6AddressIds := iPv6AddressIdsSet[i].(string)
+ iPv6AddressIdsList = append(iPv6AddressIdsList, helper.String(iPv6AddressIds))
+ }
+ paramMap["IPv6AddressIds"] = iPv6AddressIdsList
+ }
+
+ if v, ok := d.GetOk("filters"); ok {
+ filtersSet := v.([]interface{})
+ tmpSet := make([]*vpc.Filter, 0, len(filtersSet))
+ for _, item := range filtersSet {
+ filtersMap := item.(map[string]interface{})
+ filter := vpc.Filter{}
+ if v, ok := filtersMap["name"]; ok {
+ filter.Name = helper.String(v.(string))
+ }
+ if v, ok := filtersMap["values"]; ok {
+ valuesSet := v.(*schema.Set).List()
+ for i := range valuesSet {
+ values := valuesSet[i].(string)
+ filter.Values = append(filter.Values, helper.String(values))
+ }
+ }
+ tmpSet = append(tmpSet, &filter)
+ }
+ paramMap["Filters"] = tmpSet
+ }
+
+ if v, ok := d.GetOkExists("traditional"); ok {
+ paramMap["Traditional"] = helper.Bool(v.(bool))
+ }
+
+ var respData []*vpc.Address
+ err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
+ result, e := service.DescribeElasticPublicIpv6sByFilter(ctx, paramMap)
+ if e != nil {
+ return tccommon.RetryError(e)
+ }
+ respData = result
+ return nil
+ })
+ if err != nil {
+ return err
+ }
+
+ var ids []string
+ addressSetList := make([]map[string]interface{}, 0, len(respData))
+ if respData != nil {
+ for _, addressSet := range respData {
+ addressSetMap := map[string]interface{}{}
+
+ var addressId string
+ if addressSet.AddressId != nil {
+ addressSetMap["address_id"] = addressSet.AddressId
+ addressId = *addressSet.AddressId
+ }
+
+ if addressSet.AddressName != nil {
+ addressSetMap["address_name"] = addressSet.AddressName
+ }
+
+ if addressSet.AddressStatus != nil {
+ addressSetMap["address_status"] = addressSet.AddressStatus
+ }
+
+ if addressSet.AddressIp != nil {
+ addressSetMap["address_ip"] = addressSet.AddressIp
+ }
+
+ if addressSet.InstanceId != nil {
+ addressSetMap["instance_id"] = addressSet.InstanceId
+ }
+
+ if addressSet.CreatedTime != nil {
+ addressSetMap["created_time"] = addressSet.CreatedTime
+ }
+
+ if addressSet.NetworkInterfaceId != nil {
+ addressSetMap["network_interface_id"] = addressSet.NetworkInterfaceId
+ }
+
+ if addressSet.PrivateAddressIp != nil {
+ addressSetMap["private_address_ip"] = addressSet.PrivateAddressIp
+ }
+
+ if addressSet.IsArrears != nil {
+ addressSetMap["is_arrears"] = addressSet.IsArrears
+ }
+
+ if addressSet.IsBlocked != nil {
+ addressSetMap["is_blocked"] = addressSet.IsBlocked
+ }
+
+ if addressSet.IsEipDirectConnection != nil {
+ addressSetMap["is_eip_direct_connection"] = addressSet.IsEipDirectConnection
+ }
+
+ if addressSet.AddressType != nil {
+ addressSetMap["address_type"] = addressSet.AddressType
+ }
+
+ if addressSet.CascadeRelease != nil {
+ addressSetMap["cascade_release"] = addressSet.CascadeRelease
+ }
+
+ eipAlgTypeMap := map[string]interface{}{}
+
+ if addressSet.EipAlgType != nil {
+ if addressSet.EipAlgType.Ftp != nil {
+ eipAlgTypeMap["ftp"] = addressSet.EipAlgType.Ftp
+ }
+
+ if addressSet.EipAlgType.Sip != nil {
+ eipAlgTypeMap["sip"] = addressSet.EipAlgType.Sip
+ }
+
+ addressSetMap["eip_alg_type"] = []interface{}{eipAlgTypeMap}
+ }
+
+ if addressSet.InternetServiceProvider != nil {
+ addressSetMap["internet_service_provider"] = addressSet.InternetServiceProvider
+ }
+
+ if addressSet.LocalBgp != nil {
+ addressSetMap["local_bgp"] = addressSet.LocalBgp
+ }
+
+ if addressSet.Bandwidth != nil {
+ addressSetMap["bandwidth"] = addressSet.Bandwidth
+ }
+
+ if addressSet.InternetChargeType != nil {
+ addressSetMap["internet_charge_type"] = addressSet.InternetChargeType
+ }
+
+ tagSetList := make([]map[string]interface{}, 0, len(addressSet.TagSet))
+ if addressSet.TagSet != nil {
+ for _, tagSet := range addressSet.TagSet {
+ tagSetMap := map[string]interface{}{}
+
+ if tagSet.Key != nil {
+ tagSetMap["key"] = tagSet.Key
+ }
+
+ if tagSet.Value != nil {
+ tagSetMap["value"] = tagSet.Value
+ }
+
+ tagSetList = append(tagSetList, tagSetMap)
+ }
+
+ addressSetMap["tag_set"] = tagSetList
+ }
+ if addressSet.DeadlineDate != nil {
+ addressSetMap["deadline_date"] = addressSet.DeadlineDate
+ }
+
+ if addressSet.InstanceType != nil {
+ addressSetMap["instance_type"] = addressSet.InstanceType
+ }
+
+ if addressSet.Egress != nil {
+ addressSetMap["egress"] = addressSet.Egress
+ }
+
+ if addressSet.AntiDDoSPackageId != nil {
+ addressSetMap["anti_ddos_package_id"] = addressSet.AntiDDoSPackageId
+ }
+
+ if addressSet.RenewFlag != nil {
+ addressSetMap["renew_flag"] = addressSet.RenewFlag
+ }
+
+ if addressSet.BandwidthPackageId != nil {
+ addressSetMap["bandwidth_package_id"] = addressSet.BandwidthPackageId
+ }
+
+ if addressSet.UnVpcId != nil {
+ addressSetMap["un_vpc_id"] = addressSet.UnVpcId
+ }
+
+ if addressSet.DedicatedClusterId != nil {
+ addressSetMap["dedicated_cluster_id"] = addressSet.DedicatedClusterId
+ }
+
+ ids = append(ids, addressId)
+ addressSetList = append(addressSetList, addressSetMap)
+ }
+
+ _ = d.Set("address_set", addressSetList)
+ }
+
+ d.SetId(helper.DataResourceIdsHash(ids))
+
+ output, ok := d.GetOk("result_output_file")
+ if ok && output.(string) != "" {
+ if e := tccommon.WriteToFile(output.(string), addressSetList); e != nil {
+ return e
+ }
+ }
+
+ return nil
+}
diff --git a/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s.md b/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s.md
new file mode 100644
index 0000000000..b105c92d1b
--- /dev/null
+++ b/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s.md
@@ -0,0 +1,9 @@
+Use this data source to query detailed information of vpc elastic_public_ipv6s
+
+Example Usage
+
+```hcl
+data "tencentcloud_elastic_public_ipv6s" "elastic_public_ipv6s" {
+ ipv6_address_ids = ["xxxxxx"]
+}
+```
diff --git a/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s_test.go b/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s_test.go
new file mode 100644
index 0000000000..ed40168424
--- /dev/null
+++ b/tencentcloud/services/vpc/data_source_tc_elastic_public_ipv6s_test.go
@@ -0,0 +1,35 @@
+package vpc_test
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+
+ tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
+)
+
+func TestAccTencentCloudElasticPublicIpv6sDataSource_basic(t *testing.T) {
+ t.Parallel()
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() {
+ tcacctest.AccPreCheck(t)
+ },
+ Providers: tcacctest.AccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccElasticPublicIpv6sDataSource,
+ Check: resource.ComposeTestCheckFunc(
+ tcacctest.AccCheckTencentCloudDataSourceID("data.tencentcloud_elastic_public_ipv6s.elastic_public_ipv6s"),
+ resource.TestCheckResourceAttr("data.tencentcloud_elastic_public_ipv6s.elastic_public_ipv6s", "address_set.#", "1"),
+ ),
+ },
+ },
+ })
+}
+
+const testAccElasticPublicIpv6sDataSource = testAccElasticPublicIpv6 + `
+
+data "tencentcloud_elastic_public_ipv6s" "elastic_public_ipv6s" {
+ ipv6_address_ids = [tencentcloud_elastic_public_ipv6.elastic_public_ipv6.id]
+}
+`
diff --git a/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6.go b/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6.go
new file mode 100644
index 0000000000..583c504566
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6.go
@@ -0,0 +1,343 @@
+package vpc
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "time"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312"
+
+ tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
+ svctag "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tag"
+)
+
+func ResourceTencentCloudClassicElasticPublicIpv6() *schema.Resource {
+ return &schema.Resource{
+ Create: resourceTencentCloudClassicElasticPublicIpv6Create,
+ Read: resourceTencentCloudClassicElasticPublicIpv6Read,
+ Update: resourceTencentCloudClassicElasticPublicIpv6Update,
+ Delete: resourceTencentCloudClassicElasticPublicIpv6Delete,
+ Importer: &schema.ResourceImporter{
+ State: schema.ImportStatePassthrough,
+ },
+ Schema: map[string]*schema.Schema{
+ "ip6_address": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "IPV6 addresses that require public network access.",
+ },
+
+ "internet_max_bandwidth_out": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Computed: true,
+ Description: "Bandwidth in Mbps. Default is 1Mbps.",
+ },
+
+ "internet_charge_type": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Network billing model. IPV6 currently supports `TRAFFIC_POSTPAID_BY_HOUR` and `BANDWIDTH_PACKAGE`. The default network charging mode is `TRAFFIC_POSTPAID_BY_HOUR`.",
+ },
+
+ "bandwidth_package_id": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Bandwidth package id, move the account up, and you need to pass in the ipv6 address to apply for bandwidth package charging mode.",
+ },
+
+ "tags": {
+ Type: schema.TypeMap,
+ Optional: true,
+ Computed: true,
+ Description: "Tags.",
+ },
+ },
+ }
+}
+
+func resourceTencentCloudClassicElasticPublicIpv6Create(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_classic_elastic_public_ipv6.create")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ var (
+ ipId string
+ )
+ var (
+ request = vpc.NewAllocateIp6AddressesBandwidthRequest()
+ response = vpc.NewAllocateIp6AddressesBandwidthResponse()
+ )
+
+ if v, ok := d.GetOk("ip6_address"); ok {
+ request.Ip6Addresses = []*string{helper.String(v.(string))}
+ }
+
+ if v, ok := d.GetOkExists("internet_max_bandwidth_out"); ok {
+ request.InternetMaxBandwidthOut = helper.IntInt64(v.(int))
+ }
+
+ if v, ok := d.GetOk("internet_charge_type"); ok {
+ request.InternetChargeType = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("bandwidth_package_id"); ok {
+ request.BandwidthPackageId = helper.String(v.(string))
+ }
+
+ if v := helper.GetTags(d, "tags"); len(v) > 0 {
+ for tagKey, tagValue := range v {
+ tag := vpc.Tag{
+ Key: helper.String(tagKey),
+ Value: helper.String(tagValue),
+ }
+ request.Tags = append(request.Tags, &tag)
+ }
+ }
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().AllocateIp6AddressesBandwidthWithContext(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())
+ }
+ response = result
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s create classic elastic public ipv6 failed, reason:%+v", logId, err)
+ return err
+ }
+
+ if len(response.Response.AddressSet) < 1 {
+ return fmt.Errorf("resource `tencentcloud_classic_elastic_public_ipv6` create failed.")
+ }
+
+ ipId = *response.Response.AddressSet[0]
+ taskId := *response.Response.TaskId
+
+ if _, err := (&resource.StateChangeConf{
+ Delay: 10 * time.Second,
+ MinTimeout: 3 * time.Second,
+ Pending: []string{},
+ Refresh: resourceClassicElasticPublicIpv6CreateStateRefreshFunc_0_0(ctx, taskId),
+ Target: []string{"SUCCESS"},
+ Timeout: 600 * time.Second,
+ }).WaitForStateContext(ctx); err != nil {
+ return err
+ }
+ d.SetId(ipId)
+
+ return resourceTencentCloudClassicElasticPublicIpv6Read(d, meta)
+}
+
+func resourceTencentCloudClassicElasticPublicIpv6Read(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_classic_elastic_public_ipv6.read")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ service := VpcService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()}
+
+ ipId := d.Id()
+
+ respData, err := service.DescribeClassicElasticPublicIpv6ById(ctx, ipId)
+ if err != nil {
+ return err
+ }
+
+ if respData == nil {
+ d.SetId("")
+ log.Printf("[WARN]%s resource `classic_elastic_public_ipv6` [%s] not found, please check if it has been deleted.\n", logId, d.Id())
+ return nil
+ }
+
+ if len(respData.AddressSet) > 0 {
+ address := respData.AddressSet[0]
+ _ = d.Set("ip6_address", address.AddressIp)
+ _ = d.Set("internet_max_bandwidth_out", address.Bandwidth)
+ _ = d.Set("internet_charge_type", address.InternetChargeType)
+ _ = d.Set("bandwidth_package_id", address.BandwidthPackageId)
+ }
+
+ tcClient := meta.(tccommon.ProviderMeta).GetAPIV3Conn()
+ tagService := svctag.NewTagService(tcClient)
+ region := tcClient.Region
+ tags, err := tagService.DescribeResourceTags(ctx, "vpc", "eip", region, ipId)
+ if err != nil {
+ log.Printf("[CRITAL]%s describe eipv6 tags failed: %+v", logId, err)
+ return err
+ }
+ _ = d.Set("tags", tags)
+ return nil
+}
+
+func resourceTencentCloudClassicElasticPublicIpv6Update(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_classic_elastic_public_ipv6.update")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ immutableArgs := []string{"ip6_address", "internet_charge_type", "bandwidth_package_id"}
+ for _, v := range immutableArgs {
+ if d.HasChange(v) {
+ return fmt.Errorf("argument `%s` cannot be changed", v)
+ }
+ }
+ ipId := d.Id()
+
+ needChange := false
+ mutableArgs := []string{"internet_max_bandwidth_out"}
+ for _, v := range mutableArgs {
+ if d.HasChange(v) {
+ needChange = true
+ break
+ }
+ }
+
+ if needChange {
+ request := vpc.NewModifyIp6AddressesBandwidthRequest()
+
+ if v, ok := d.GetOkExists("internet_max_bandwidth_out"); ok {
+ request.InternetMaxBandwidthOut = helper.IntInt64(v.(int))
+ }
+
+ request.Ip6AddressIds = []*string{helper.String(ipId)}
+
+ var taskId *string
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().ModifyIp6AddressesBandwidthWithContext(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())
+ }
+ taskId = result.Response.TaskId
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s update classic elastic public ipv6 failed, reason:%+v", logId, err)
+ return err
+ }
+ if taskId == nil {
+ return fmt.Errorf("taskId is nil")
+ }
+ if _, err := (&resource.StateChangeConf{
+ Delay: 10 * time.Second,
+ MinTimeout: 3 * time.Second,
+ Pending: []string{},
+ Refresh: resourceElasticPublicIpv6CreateStateRefreshFunc_0_0(ctx, *taskId),
+ Target: []string{"SUCCESS"},
+ Timeout: 600 * time.Second,
+ }).WaitForStateContext(ctx); err != nil {
+ return err
+ }
+ }
+
+ if d.HasChange("tags") {
+ oldTags, newTags := d.GetChange("tags")
+ replaceTags, deleteTags := svctag.DiffTags(oldTags.(map[string]interface{}), newTags.(map[string]interface{}))
+ tcClient := meta.(tccommon.ProviderMeta).GetAPIV3Conn()
+ tagService := svctag.NewTagService(tcClient)
+ region := tcClient.Region
+ resourceName := tccommon.BuildTagResourceName("vpc", "eip", region, ipId)
+ if err := tagService.ModifyTags(ctx, resourceName, replaceTags, deleteTags); err != nil {
+ log.Printf("[CRITAL]%s update eipv6 tags failed: %+v", logId, err)
+ return err
+ }
+
+ }
+
+ return resourceTencentCloudClassicElasticPublicIpv6Read(d, meta)
+}
+
+func resourceTencentCloudClassicElasticPublicIpv6Delete(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_classic_elastic_public_ipv6.delete")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ ipId := d.Id()
+
+ var (
+ request = vpc.NewReleaseIp6AddressesBandwidthRequest()
+ taskId *string
+ )
+
+ request.Ip6AddressIds = []*string{helper.String(ipId)}
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().ReleaseIp6AddressesBandwidthWithContext(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())
+ }
+ taskId = result.Response.TaskId
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s delete classic elastic public ipv6 failed, reason:%+v", logId, err)
+ return err
+ }
+
+ if taskId == nil {
+ return fmt.Errorf("taskId is nil")
+ }
+ if _, err := (&resource.StateChangeConf{
+ Delay: 10 * time.Second,
+ MinTimeout: 3 * time.Second,
+ Pending: []string{},
+ Refresh: resourceElasticPublicIpv6CreateStateRefreshFunc_0_0(ctx, *taskId),
+ Target: []string{"SUCCESS"},
+ Timeout: 600 * time.Second,
+ }).WaitForStateContext(ctx); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func resourceClassicElasticPublicIpv6CreateStateRefreshFunc_0_0(ctx context.Context, taskId string) resource.StateRefreshFunc {
+ var req *vpc.DescribeTaskResultRequest
+ return func() (interface{}, string, error) {
+ meta := tccommon.ProviderMetaFromContext(ctx)
+ if meta == nil {
+ return nil, "", fmt.Errorf("resource data can not be nil")
+ }
+ if req == nil {
+ d := tccommon.ResourceDataFromContext(ctx)
+ if d == nil {
+ return nil, "", fmt.Errorf("resource data can not be nil")
+ }
+ _ = d
+ req = vpc.NewDescribeTaskResultRequest()
+ req.TaskId = helper.StrToUint64Point(taskId)
+
+ }
+ resp, err := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().DescribeTaskResultWithContext(ctx, req)
+ if err != nil {
+ return nil, "", err
+ }
+ if resp == nil || resp.Response == nil {
+ return nil, "", nil
+ }
+ state := fmt.Sprintf("%v", *resp.Response.Result)
+ return resp.Response, state, nil
+ }
+}
diff --git a/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6.md b/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6.md
new file mode 100644
index 0000000000..54da5f96aa
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6.md
@@ -0,0 +1,21 @@
+Provides a resource to create a vpc classic_elastic_public_ipv6
+
+Example Usage
+
+```hcl
+resource "tencentcloud_classic_elastic_public_ipv6" "classic_elastic_public_ipv6" {
+ ip6_address = "xxxxxx"
+ internet_max_bandwidth_out = 2
+ tags = {
+ "testkey" = "testvalue"
+ }
+}
+```
+
+Import
+
+vpc classic_elastic_public_ipv6 can be imported using the id, e.g.
+
+```
+terraform import tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6 classic_elastic_public_ipv6_id
+```
diff --git a/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6_test.go b/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6_test.go
new file mode 100644
index 0000000000..84cda2acfb
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_classic_elastic_public_ipv6_test.go
@@ -0,0 +1,65 @@
+package vpc_test
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+
+ tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
+)
+
+func TestAccTencentCloudClassicElasticPublicIpv6Resource_basic(t *testing.T) {
+ t.Parallel()
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() {
+ tcacctest.AccPreCheck(t)
+ },
+ Providers: tcacctest.AccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccClassicElasticPublicIpv6,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6", "id"),
+ resource.TestCheckResourceAttr("tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6", "internet_max_bandwidth_out", "1"),
+ resource.TestCheckResourceAttr("tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6", "internet_charge_type", "TRAFFIC_POSTPAID_BY_HOUR"),
+ resource.TestCheckResourceAttr("tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6", "tags.test1key", "test1value"),
+ ),
+ },
+ {
+ Config: testAccClassicElasticPublicIpv6Update,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6", "id"),
+ resource.TestCheckResourceAttr("tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6", "internet_max_bandwidth_out", "2"),
+ resource.TestCheckResourceAttr("tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6", "internet_charge_type", "TRAFFIC_POSTPAID_BY_HOUR"),
+ resource.TestCheckResourceAttr("tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6", "tags.test2key", "test2value"),
+ ),
+ },
+ {
+ ResourceName: "tencentcloud_classic_elastic_public_ipv6.classic_elastic_public_ipv6",
+ ImportState: true,
+ ImportStateVerify: false,
+ },
+ },
+ })
+}
+
+const testAccClassicElasticPublicIpv6 = `
+
+resource "tencentcloud_classic_elastic_public_ipv6" "classic_elastic_public_ipv6" {
+ ip6_address = "2402:4e00:101d:8300:0:9dbc:f45a:2c4f"
+ tags = {
+ "test1key" = "test1value"
+ }
+}
+`
+
+const testAccClassicElasticPublicIpv6Update = `
+
+resource "tencentcloud_classic_elastic_public_ipv6" "classic_elastic_public_ipv6" {
+ ip6_address = "2402:4e00:101d:8300:0:9dbc:f45a:2c4f"
+ internet_max_bandwidth_out = 2
+ tags = {
+ "test2key" = "test2value"
+ }
+}
+`
diff --git a/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6.go b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6.go
new file mode 100644
index 0000000000..8e240c30c1
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6.go
@@ -0,0 +1,389 @@
+package vpc
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "time"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312"
+
+ tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
+ svctag "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tag"
+)
+
+func ResourceTencentCloudElasticPublicIpv6() *schema.Resource {
+ return &schema.Resource{
+ Create: resourceTencentCloudElasticPublicIpv6Create,
+ Read: resourceTencentCloudElasticPublicIpv6Read,
+ Update: resourceTencentCloudElasticPublicIpv6Update,
+ Delete: resourceTencentCloudElasticPublicIpv6Delete,
+ Importer: &schema.ResourceImporter{
+ State: schema.ImportStatePassthrough,
+ },
+ Schema: map[string]*schema.Schema{
+ "address_name": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "EIP name, used to customize the personalized name of the EIP when applying for EIP. Default value: unnamed.",
+ },
+
+ "address_type": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Elastic IPv6 type, optional values:\n\t- EIPv6: Ordinary IPv6\n\t- HighQualityEIPv6: Premium IPv6\nNote: You need to contact the product to open a premium IPv6 white list, and only some regions support premium IPv6\nDefault value: EIPv6.",
+ },
+
+ "internet_charge_type": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Elastic IPv6 charging method, optional values:\n\t- BANDWIDTH_PACKAGE: Payment for Shared Bandwidth Package\n\t- TRAFFIC_POSTPAID_BY_HOUR: Traffic is paid by the hour\nDefault value: TRAFFIC_POSTPAID_BY_HOUR.",
+ },
+
+ "internet_service_provider": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Elastic IPv6 line type, default value: BGP.\nFor users who have activated a static single-line IP whitelist, selectable values:\n\t- CMCC: China Mobile\n\t- CTCC: China Telecom\n\t- CUCC: China Unicom\nNote: Static single-wire IP is only supported in some regions.",
+ },
+
+ "internet_max_bandwidth_out": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Computed: true,
+ Description: "Elastic IPv6 bandwidth limit in Mbps.\nThe range of selectable values depends on the EIP billing method:\n\t- BANDWIDTH_PACKAGE: 1 Mbps to 2000 Mbps\n\t- TRAFFIC_POSTPAID_BY_HOUR: 1 Mbps to 100 Mbps\nDefault value: 1 Mbps.",
+ },
+
+ "bandwidth_package_id": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Bandwidth packet unique ID parameter. If this parameter is set and the InternetChargeType is BANDWIDTH_PACKAGE, it means that the EIP created is added to the BGP bandwidth packet and the bandwidth packet is charged.",
+ },
+
+ "tags": {
+ Type: schema.TypeMap,
+ Optional: true,
+ Description: "Tags.",
+ },
+
+ "egress": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Elastic IPv6 network exit, optional values:\n\t- CENTER_EGRESS_1: Center Exit 1\n\t- CENTER_EGRESS_2: Center Exit 2\n\t- CENTER_EGRESS_3: Center Exit 3\nNote: Network exports corresponding to different operators or resource types need to contact the product for clarification\nDefault value: CENTER_EGRESS_1.",
+ },
+
+ "address_ip": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "External network IP address.",
+ },
+ },
+ }
+}
+
+func resourceTencentCloudElasticPublicIpv6Create(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_elastic_public_ipv6.create")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ var (
+ ipId string
+ taskId string
+ )
+ var (
+ request = vpc.NewAllocateIPv6AddressesRequest()
+ response = vpc.NewAllocateIPv6AddressesResponse()
+ )
+
+ if v, ok := d.GetOk("address_name"); ok {
+ request.AddressName = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("address_type"); ok {
+ request.AddressType = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("internet_charge_type"); ok {
+ request.InternetChargeType = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("internet_service_provider"); ok {
+ request.InternetServiceProvider = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOkExists("internet_max_bandwidth_out"); ok {
+ request.InternetMaxBandwidthOut = helper.IntInt64(v.(int))
+ }
+
+ if v, ok := d.GetOk("bandwidth_package_id"); ok {
+ request.BandwidthPackageId = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("egress"); ok {
+ request.Egress = helper.String(v.(string))
+ }
+
+ if v := helper.GetTags(d, "tags"); len(v) > 0 {
+ for tagKey, tagValue := range v {
+ tag := vpc.Tag{
+ Key: helper.String(tagKey),
+ Value: helper.String(tagValue),
+ }
+ request.Tags = append(request.Tags, &tag)
+ }
+ }
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().AllocateIPv6AddressesWithContext(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())
+ }
+ response = result
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s create elastic public ipv6 failed, reason:%+v", logId, err)
+ return err
+ }
+
+ if len(response.Response.AddressSet) < 1 {
+ return fmt.Errorf("resource `tencentcloud_elastic_public_ipv6` create failed.")
+ }
+
+ ipId = *response.Response.AddressSet[0]
+ taskId = *response.Response.TaskId
+
+ if _, err := (&resource.StateChangeConf{
+ Delay: 10 * time.Second,
+ MinTimeout: 3 * time.Second,
+ Pending: []string{},
+ Refresh: resourceElasticPublicIpv6CreateStateRefreshFunc_0_0(ctx, taskId),
+ Target: []string{"SUCCESS"},
+ Timeout: 600 * time.Second,
+ }).WaitForStateContext(ctx); err != nil {
+ return err
+ }
+ d.SetId(ipId)
+
+ return resourceTencentCloudElasticPublicIpv6Read(d, meta)
+}
+
+func resourceTencentCloudElasticPublicIpv6Read(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_elastic_public_ipv6.read")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ service := VpcService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()}
+
+ ipId := d.Id()
+
+ respData, err := service.DescribeElasticPublicIpv6ById(ctx, ipId)
+ if err != nil {
+ return err
+ }
+
+ if respData == nil {
+ d.SetId("")
+ log.Printf("[WARN]%s resource `elastic_public_ipv6` [%s] not found, please check if it has been deleted.\n", logId, d.Id())
+ return nil
+ }
+ if len(respData.AddressSet) > 0 {
+ address := respData.AddressSet[0]
+ _ = d.Set("address_name", address.AddressName)
+ _ = d.Set("address_type", address.AddressType)
+ _ = d.Set("internet_charge_type", address.InternetChargeType)
+ _ = d.Set("internet_service_provider", address.InternetServiceProvider)
+ _ = d.Set("internet_max_bandwidth_out", address.Bandwidth)
+ _ = d.Set("bandwidth_package_id", address.BandwidthPackageId)
+ _ = d.Set("egress", address.Egress)
+ _ = d.Set("address_ip", address.AddressIp)
+ }
+ tcClient := meta.(tccommon.ProviderMeta).GetAPIV3Conn()
+ tagService := svctag.NewTagService(tcClient)
+ region := tcClient.Region
+ tags, err := tagService.DescribeResourceTags(ctx, "vpc", "eipv6", region, ipId)
+ if err != nil {
+ log.Printf("[CRITAL]%s describe eipv6 tags failed: %+v", logId, err)
+ return err
+ }
+ _ = d.Set("tags", tags)
+ return nil
+}
+
+func resourceTencentCloudElasticPublicIpv6Update(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_elastic_public_ipv6.update")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ immutableArgs := []string{"address_type", "internet_charge_type", "internet_service_provider", "bandwidth_package_id", "egress"}
+ for _, v := range immutableArgs {
+ if d.HasChange(v) {
+ return fmt.Errorf("argument `%s` cannot be changed", v)
+ }
+ }
+ ipId := d.Id()
+
+ needChange := false
+ mutableArgs := []string{"address_name"}
+ for _, v := range mutableArgs {
+ if d.HasChange(v) {
+ needChange = true
+ break
+ }
+ }
+
+ if needChange {
+ request := vpc.NewModifyIPv6AddressesAttributesRequest()
+ request.IPv6AddressIds = []*string{helper.String(ipId)}
+
+ if v, ok := d.GetOk("address_name"); ok {
+ request.IPv6AddressName = helper.String(v.(string))
+ }
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().ModifyIPv6AddressesAttributesWithContext(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 err != nil {
+ log.Printf("[CRITAL]%s update elastic public ipv6 failed, reason:%+v", logId, err)
+ return err
+ }
+ }
+
+ needChange1 := false
+ mutableArgs1 := []string{"internet_max_bandwidth_out"}
+ for _, v := range mutableArgs1 {
+ if d.HasChange(v) {
+ needChange1 = true
+ break
+ }
+ }
+
+ if needChange1 {
+ request1 := vpc.NewModifyIPv6AddressesBandwidthRequest()
+ request1.IPv6AddressIds = []*string{helper.String(ipId)}
+
+ if v, ok := d.GetOkExists("internet_max_bandwidth_out"); ok {
+ request1.InternetMaxBandwidthOut = helper.IntInt64(v.(int))
+ }
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().ModifyIPv6AddressesBandwidthWithContext(ctx, request1)
+ if e != nil {
+ return tccommon.RetryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request1.GetAction(), request1.ToJsonString(), result.ToJsonString())
+ }
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s update elastic public ipv6 failed, reason:%+v", logId, err)
+ return err
+ }
+ }
+
+ if d.HasChange("tags") {
+ oldTags, newTags := d.GetChange("tags")
+ replaceTags, deleteTags := svctag.DiffTags(oldTags.(map[string]interface{}), newTags.(map[string]interface{}))
+ tcClient := meta.(tccommon.ProviderMeta).GetAPIV3Conn()
+ tagService := svctag.NewTagService(tcClient)
+ region := tcClient.Region
+ resourceName := tccommon.BuildTagResourceName("vpc", "eipv6", region, ipId)
+ if err := tagService.ModifyTags(ctx, resourceName, replaceTags, deleteTags); err != nil {
+ log.Printf("[CRITAL]%s update eipv6 tags failed: %+v", logId, err)
+ return err
+ }
+
+ }
+
+ return resourceTencentCloudElasticPublicIpv6Read(d, meta)
+}
+
+func resourceTencentCloudElasticPublicIpv6Delete(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_elastic_public_ipv6.delete")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ ipId := d.Id()
+
+ var (
+ request = vpc.NewReleaseIPv6AddressesRequest()
+ response = vpc.NewReleaseIPv6AddressesResponse()
+ )
+
+ request.IPv6AddressIds = []*string{helper.String(ipId)}
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().ReleaseIPv6AddressesWithContext(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())
+ }
+ response = result
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s delete elastic public ipv6 failed, reason:%+v", logId, err)
+ return err
+ }
+
+ _ = response
+ return nil
+}
+
+func resourceElasticPublicIpv6CreateStateRefreshFunc_0_0(ctx context.Context, taskId string) resource.StateRefreshFunc {
+ var req *vpc.DescribeTaskResultRequest
+ return func() (interface{}, string, error) {
+ meta := tccommon.ProviderMetaFromContext(ctx)
+ if meta == nil {
+ return nil, "", fmt.Errorf("resource data can not be nil")
+ }
+ if req == nil {
+ d := tccommon.ResourceDataFromContext(ctx)
+ if d == nil {
+ return nil, "", fmt.Errorf("resource data can not be nil")
+ }
+ _ = d
+ req = vpc.NewDescribeTaskResultRequest()
+ req.TaskId = helper.StrToUint64Point(taskId)
+
+ }
+ resp, err := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().DescribeTaskResultWithContext(ctx, req)
+ if err != nil {
+ return nil, "", err
+ }
+ if resp == nil || resp.Response == nil {
+ return nil, "", nil
+ }
+ state := fmt.Sprintf("%v", *resp.Response.Result)
+ return resp.Response, state, nil
+ }
+}
diff --git a/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6.md b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6.md
new file mode 100644
index 0000000000..15761c33a9
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6.md
@@ -0,0 +1,21 @@
+Provides a resource to create a vpc elastic_public_ipv6
+
+Example Usage
+
+```hcl
+resource "tencentcloud_elastic_public_ipv6" "elastic_public_ipv6" {
+ address_name = "test"
+ internet_max_bandwidth_out = 1
+ tags = {
+ "test1key" = "test1value"
+ }
+}
+```
+
+Import
+
+vpc elastic_public_ipv6 can be imported using the id, e.g.
+
+```
+terraform import tencentcloud_elastic_public_ipv6.elastic_public_ipv6 elastic_public_ipv6_id
+```
diff --git a/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment.go b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment.go
new file mode 100644
index 0000000000..b681f9ac62
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment.go
@@ -0,0 +1,182 @@
+package vpc
+
+import (
+ "context"
+ "log"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+ vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312"
+
+ tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
+)
+
+func ResourceTencentCloudElasticPublicIpv6Attachment() *schema.Resource {
+ return &schema.Resource{
+ Create: resourceTencentCloudElasticPublicIpv6AttachmentCreate,
+ Read: resourceTencentCloudElasticPublicIpv6AttachmentRead,
+ Delete: resourceTencentCloudElasticPublicIpv6AttachmentDelete,
+ Update: resourceTencentCloudElasticPublicIpv6AttachmentUpdate,
+ Importer: &schema.ResourceImporter{
+ State: schema.ImportStatePassthrough,
+ },
+ Schema: map[string]*schema.Schema{
+ "ipv6_address_id": {
+ Type: schema.TypeString,
+ Required: true,
+ ForceNew: true,
+ Description: "Elastic IPv6 unique ID, EIPv6 unique ID is like eipv6-11112222.",
+ },
+
+ "network_interface_id": {
+ Type: schema.TypeString,
+ Optional: true,
+ ForceNew: true,
+ Description: "Elastic Network Interface ID to bind. Elastic Network Interface ID is like eni-11112222. NetworkInterfaceId and InstanceId cannot be specified simultaneously. The Elastic Network Interface ID can be queried by logging in to the console, or obtained through the networkInterfaceId in the return value of the DescribeNetworkInterfaces interface.",
+ },
+
+ "private_ipv6_address": {
+ Type: schema.TypeString,
+ Optional: true,
+ ForceNew: true,
+ Description: "The intranet IPv6 to bind. If NetworkInterfaceId is specified, PrivateIPv6Address must also be specified, which means that the EIP is bound to the specified private network IP of the specified Elastic Network Interface. Also ensure that the specified PrivateIPv6Address is an intranet IPv6 on the specified NetworkInterfaceId. The intranet IPv6 of the specified Elastic Network Interface can be queried by logging in to the console, or obtained through the Ipv6AddressSet.Address in the return value of the DescribeNetworkInterfaces interface.",
+ },
+
+ "keep_bind_with_eni": {
+ Type: schema.TypeBool,
+ Optional: true,
+ Description: "Whether to keep the Elastic Network Interface bound when unbinding.",
+ },
+ },
+ }
+}
+
+func resourceTencentCloudElasticPublicIpv6AttachmentCreate(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_elastic_public_ipv6_attachment.create")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ var (
+ ipId string
+ )
+ var (
+ request = vpc.NewAssociateIPv6AddressRequest()
+ response = vpc.NewAssociateIPv6AddressResponse()
+ )
+
+ if v, ok := d.GetOk("ipv6_address_id"); ok {
+ ipId = v.(string)
+ request.IPv6AddressId = helper.String(ipId)
+ }
+
+ if v, ok := d.GetOk("network_interface_id"); ok {
+ request.NetworkInterfaceId = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("private_ipv6_address"); ok {
+ request.PrivateIPv6Address = helper.String(v.(string))
+ }
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().AssociateIPv6AddressWithContext(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())
+ }
+ response = result
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s create elastic public ipv6 attachment failed, reason:%+v", logId, err)
+ return err
+ }
+
+ _ = response
+
+ d.SetId(ipId)
+
+ return resourceTencentCloudElasticPublicIpv6AttachmentRead(d, meta)
+}
+
+func resourceTencentCloudElasticPublicIpv6AttachmentRead(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_elastic_public_ipv6_attachment.read")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ service := VpcService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()}
+
+ ipId := d.Id()
+
+ respData, err := service.DescribeElasticPublicIpv6AttachmentById(ctx, ipId)
+ if err != nil {
+ return err
+ }
+
+ if respData == nil {
+ d.SetId("")
+ log.Printf("[WARN]%s resource `elastic_public_ipv6_attachment` [%s] not found, please check if it has been deleted.\n", logId, d.Id())
+ return nil
+ }
+
+ if len(respData.AddressSet) > 0 {
+ address := respData.AddressSet[0]
+ _ = d.Set("ipv6_address_id", address.AddressId)
+ _ = d.Set("network_interface_id", address.NetworkInterfaceId)
+ _ = d.Set("private_ipv6_address", address.PrivateAddressIp)
+ }
+ return nil
+}
+
+func resourceTencentCloudElasticPublicIpv6AttachmentDelete(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_elastic_public_ipv6_attachment.delete")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ logId := tccommon.GetLogId(tccommon.ContextNil)
+ ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)
+
+ ipId := d.Id()
+
+ var (
+ request = vpc.NewDisassociateIPv6AddressRequest()
+ response = vpc.NewDisassociateIPv6AddressResponse()
+ )
+
+ request.IPv6AddressId = helper.String(ipId)
+
+ if v, ok := d.GetOkExists("keep_bind_with_eni"); ok {
+ request.KeepBindWithEni = helper.Bool(v.(bool))
+ }
+
+ err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseVpcClient().DisassociateIPv6AddressWithContext(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())
+ }
+ response = result
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s delete elastic public ipv6 attachment failed, reason:%+v", logId, err)
+ return err
+ }
+
+ _ = response
+ return nil
+}
+
+func resourceTencentCloudElasticPublicIpv6AttachmentUpdate(d *schema.ResourceData, meta interface{}) error {
+ defer tccommon.LogElapsed("resource.tencentcloud_elastic_public_ipv6_attachment.update")()
+ defer tccommon.InconsistentCheck(d, meta)()
+
+ return nil
+}
diff --git a/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment.md b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment.md
new file mode 100644
index 0000000000..1cdc84bf60
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment.md
@@ -0,0 +1,19 @@
+Provides a resource to create a vpc elastic_public_ipv6_attachment
+
+Example Usage
+
+```hcl
+resource "tencentcloud_elastic_public_ipv6_attachment" "elastic_public_ipv6_attachment" {
+ ipv6_address_id = "eipv6-xxxxxx"
+ network_interface_id = "eni-xxxxxx"
+ private_ipv6_address = "xxxxxx"
+}
+```
+
+Import
+
+vpc elastic_public_ipv6_attachment can be imported using the id, e.g.
+
+```
+terraform import tencentcloud_elastic_public_ipv6_attachment.elastic_public_ipv6_attachment elastic_public_ipv6_attachment_id
+```
diff --git a/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment_test.go b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment_test.go
new file mode 100644
index 0000000000..777c9770b0
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_attachment_test.go
@@ -0,0 +1,48 @@
+package vpc_test
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+
+ tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
+)
+
+func TestAccTencentCloudElasticPublicIpv6AttachmentResource_basic(t *testing.T) {
+ t.Parallel()
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() {
+ tcacctest.AccPreCheck(t)
+ },
+ Providers: tcacctest.AccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccElasticPublicIpv6Attachment,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("tencentcloud_elastic_public_ipv6_attachment.elastic_public_ipv6_attachment", "id"),
+ resource.TestCheckResourceAttrSet("tencentcloud_elastic_public_ipv6_attachment.elastic_public_ipv6_attachment", "ipv6_address_id"),
+ resource.TestCheckResourceAttr("tencentcloud_elastic_public_ipv6_attachment.elastic_public_ipv6_attachment", "network_interface_id", "eni-k6pjc7nr"),
+ resource.TestCheckResourceAttr("tencentcloud_elastic_public_ipv6_attachment.elastic_public_ipv6_attachment", "private_ipv6_address", "fd76:3600:700:1900:0:9dbc:f353:871"),
+ ),
+ },
+ {
+ ResourceName: "tencentcloud_elastic_public_ipv6_attachment.elastic_public_ipv6_attachment",
+ ImportState: true,
+ ImportStateVerify: true,
+ ImportStateVerifyIgnore: []string{"keep_bind_with_eni"},
+ },
+ },
+ })
+}
+
+const testAccElasticPublicIpv6Attachment = `
+resource "tencentcloud_elastic_public_ipv6" "elastic_public_ipv6" {
+ address_name = "test"
+ internet_max_bandwidth_out = 1
+}
+resource "tencentcloud_elastic_public_ipv6_attachment" "elastic_public_ipv6_attachment" {
+ ipv6_address_id = tencentcloud_elastic_public_ipv6.elastic_public_ipv6.id
+ network_interface_id = "eni-k6pjc7nr"
+ private_ipv6_address = "fd76:3600:700:1900:0:9dbc:f353:871"
+}
+`
diff --git a/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_test.go b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_test.go
new file mode 100644
index 0000000000..f78b05f4c4
--- /dev/null
+++ b/tencentcloud/services/vpc/resource_tc_elastic_public_ipv6_test.go
@@ -0,0 +1,64 @@
+package vpc_test
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+
+ tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
+)
+
+func TestAccTencentCloudElasticPublicIpv6Resource_basic(t *testing.T) {
+ t.Parallel()
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() {
+ tcacctest.AccPreCheck(t)
+ },
+ Providers: tcacctest.AccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccElasticPublicIpv6,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("tencentcloud_elastic_public_ipv6.elastic_public_ipv6", "id"),
+ resource.TestCheckResourceAttr("tencentcloud_elastic_public_ipv6.elastic_public_ipv6", "address_name", "test"),
+ resource.TestCheckResourceAttr("tencentcloud_elastic_public_ipv6.elastic_public_ipv6", "internet_max_bandwidth_out", "1"),
+ resource.TestCheckResourceAttr("tencentcloud_elastic_public_ipv6.elastic_public_ipv6", "tags.test1key", "test1value"),
+ ),
+ },
+ {
+ Config: testAccElasticPublicIpv6Update,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("tencentcloud_elastic_public_ipv6.elastic_public_ipv6", "id"),
+ resource.TestCheckResourceAttr("tencentcloud_elastic_public_ipv6.elastic_public_ipv6", "address_name", "test-update"),
+ resource.TestCheckResourceAttr("tencentcloud_elastic_public_ipv6.elastic_public_ipv6", "internet_max_bandwidth_out", "2"),
+ resource.TestCheckResourceAttr("tencentcloud_elastic_public_ipv6.elastic_public_ipv6", "tags.test2key", "test2value"),
+ ),
+ },
+ {
+ ResourceName: "tencentcloud_elastic_public_ipv6.elastic_public_ipv6",
+ ImportState: true,
+ ImportStateVerify: true,
+ },
+ },
+ })
+}
+
+const testAccElasticPublicIpv6 = `
+resource "tencentcloud_elastic_public_ipv6" "elastic_public_ipv6" {
+ address_name = "test"
+ internet_max_bandwidth_out = 1
+ tags = {
+ "test1key" = "test1value"
+ }
+}
+`
+
+const testAccElasticPublicIpv6Update = `
+resource "tencentcloud_elastic_public_ipv6" "elastic_public_ipv6" {
+ address_name = "test-update"
+ internet_max_bandwidth_out = 2
+ tags = {
+ "test2key" = "test2value"
+ }
+}
+`
diff --git a/tencentcloud/services/vpc/service_tencentcloud_vpc.go b/tencentcloud/services/vpc/service_tencentcloud_vpc.go
index cfc1045ae7..c978f652be 100644
--- a/tencentcloud/services/vpc/service_tencentcloud_vpc.go
+++ b/tencentcloud/services/vpc/service_tencentcloud_vpc.go
@@ -8147,3 +8147,182 @@ func (me *VpcService) DescribeReserveIpAddressesById(ctx context.Context, reserv
ret = response.Response
return
}
+
+func (me *VpcService) DescribeElasticPublicIpv6ById(ctx context.Context, ipId string) (ret *vpc.DescribeIPv6AddressesResponseParams, errRet error) {
+ logId := tccommon.GetLogId(ctx)
+
+ request := vpc.NewDescribeIPv6AddressesRequest()
+
+ 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())
+ }
+ }()
+
+ ratelimit.Check(request.GetAction())
+
+ response, err := me.client.UseVpcClient().DescribeIPv6Addresses(request)
+ if err != nil {
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ ret = response.Response
+ return
+}
+
+func (me *VpcService) DescribeClassicElasticPublicIpv6ById(ctx context.Context, ipId string) (ret *vpc.DescribeIp6AddressesResponseParams, errRet error) {
+ logId := tccommon.GetLogId(ctx)
+
+ request := vpc.NewDescribeIp6AddressesRequest()
+ request.Ip6AddressIds = []*string{&ipId}
+
+ 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())
+ }
+ }()
+
+ ratelimit.Check(request.GetAction())
+
+ response, err := me.client.UseVpcClient().DescribeIp6Addresses(request)
+ if err != nil {
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ ret = response.Response
+ return
+}
+
+func (me *VpcService) DescribeElasticPublicIpv6AttachmentById(ctx context.Context, ipId string) (ret *vpc.DescribeIPv6AddressesResponseParams, errRet error) {
+ logId := tccommon.GetLogId(ctx)
+
+ request := vpc.NewDescribeIPv6AddressesRequest()
+ request.IPv6AddressIds = []*string{&ipId}
+
+ 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())
+ }
+ }()
+
+ ratelimit.Check(request.GetAction())
+
+ response, err := me.client.UseVpcClient().DescribeIPv6Addresses(request)
+ if err != nil {
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ ret = response.Response
+ return
+}
+
+func (me *VpcService) DescribeClassicElasticPublicIpv6sByFilter(ctx context.Context, param map[string]interface{}) (ret []*vpc.Address, errRet error) {
+ var (
+ logId = tccommon.GetLogId(ctx)
+ request = vpc.NewDescribeIp6AddressesRequest()
+ )
+
+ 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())
+ }
+ }()
+
+ for k, v := range param {
+ if k == "Ip6AddressIds" {
+ request.Ip6AddressIds = v.([]*string)
+ }
+ if k == "Filters" {
+ request.Filters = v.([]*vpc.Filter)
+ }
+ }
+
+ ratelimit.Check(request.GetAction())
+
+ var (
+ offset int64 = 0
+ limit int64 = 100
+ )
+ for {
+ request.Offset = &offset
+ request.Limit = &limit
+ response, err := me.client.UseVpcClient().DescribeIp6Addresses(request)
+ if err != nil {
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.AddressSet) < 1 {
+ break
+ }
+ ret = append(ret, response.Response.AddressSet...)
+ if len(response.Response.AddressSet) < int(limit) {
+ break
+ }
+
+ offset += limit
+ }
+
+ return
+}
+
+func (me *VpcService) DescribeElasticPublicIpv6sByFilter(ctx context.Context, param map[string]interface{}) (ret []*vpc.Address, errRet error) {
+ var (
+ logId = tccommon.GetLogId(ctx)
+ request = vpc.NewDescribeIPv6AddressesRequest()
+ )
+
+ 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())
+ }
+ }()
+
+ for k, v := range param {
+ if k == "IPv6AddressIds" {
+ request.IPv6AddressIds = v.([]*string)
+ }
+ if k == "Filters" {
+ request.Filters = v.([]*vpc.Filter)
+ }
+ if k == "Traditional" {
+ request.Traditional = v.(*bool)
+ }
+ }
+
+ ratelimit.Check(request.GetAction())
+
+ var (
+ offset int64 = 0
+ limit int64 = 100
+ )
+ for {
+ request.Offset = &offset
+ request.Limit = &limit
+ response, err := me.client.UseVpcClient().DescribeIPv6Addresses(request)
+ if err != nil {
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.AddressSet) < 1 {
+ break
+ }
+ ret = append(ret, response.Response.AddressSet...)
+ if len(response.Response.AddressSet) < int(limit) {
+ break
+ }
+
+ offset += limit
+ }
+
+ return
+}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go
index 6217ee77f1..2fc015850f 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go
@@ -3,6 +3,7 @@ package common
import (
"context"
"io"
+
//"log"
"math/rand"
"net/url"
@@ -265,7 +266,7 @@ func CompleteCommonParams(request Request, region string, requestClient string)
params["Action"] = request.GetAction()
params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10)
params["Nonce"] = strconv.Itoa(rand.Int())
- params["RequestClient"] = "SDK_GO_1.0.1058"
+ params["RequestClient"] = "SDK_GO_1.0.1060"
if requestClient != "" {
params["RequestClient"] += ": " + requestClient
}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go
index c1253b4c4c..089b067b3c 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/client.go
@@ -606,6 +606,87 @@ func (c *Client) AllocateAddressesWithContext(ctx context.Context, request *Allo
return
}
+func NewAllocateIPv6AddressesRequest() (request *AllocateIPv6AddressesRequest) {
+ request = &AllocateIPv6AddressesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("vpc", APIVersion, "AllocateIPv6Addresses")
+
+
+ return
+}
+
+func NewAllocateIPv6AddressesResponse() (response *AllocateIPv6AddressesResponse) {
+ response = &AllocateIPv6AddressesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// AllocateIPv6Addresses
+// 本接口(AllocateIPv6Addresses)用于申请一个或多个弹性公网IPv6(简称EIPv6)实例。
+//
+//
+//
+// - EIPv6 是您在腾讯云某个地域可以独立申请和持有的,固定不变的公网 IPv6 地址,提供与弹性公网 IPv4 一致的产品体验。
+//
+// - 通过弹性公网 IPv6,您可以快速将 EIPv6 实例绑定到云资源的内网 IPv6 地址上,实现为云资源快速开通 IPv6 公网带宽。
+//
+// - 您还可以按需将 EIPv6 实例绑定到其他云资源上,从而屏蔽实例故障。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BANDWIDTHOUTOFRANGE = "InvalidParameterValue.BandwidthOutOfRange"
+// INVALIDPARAMETERVALUE_BANDWIDTHTOOSMALL = "InvalidParameterValue.BandwidthTooSmall"
+// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination"
+// INVALIDPARAMETERVALUE_UNAVAILABLEZONE = "InvalidParameterValue.UnavailableZone"
+// LIMITEXCEEDED_BANDWIDTHPACKAGERESOURCEQUOTA = "LimitExceeded.BandwidthPackageResourceQuota"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNSUPPORTEDOPERATION_ACCOUNTNOTSUPPORTED = "UnsupportedOperation.AccountNotSupported"
+func (c *Client) AllocateIPv6Addresses(request *AllocateIPv6AddressesRequest) (response *AllocateIPv6AddressesResponse, err error) {
+ return c.AllocateIPv6AddressesWithContext(context.Background(), request)
+}
+
+// AllocateIPv6Addresses
+// 本接口(AllocateIPv6Addresses)用于申请一个或多个弹性公网IPv6(简称EIPv6)实例。
+//
+//
+//
+// - EIPv6 是您在腾讯云某个地域可以独立申请和持有的,固定不变的公网 IPv6 地址,提供与弹性公网 IPv4 一致的产品体验。
+//
+// - 通过弹性公网 IPv6,您可以快速将 EIPv6 实例绑定到云资源的内网 IPv6 地址上,实现为云资源快速开通 IPv6 公网带宽。
+//
+// - 您还可以按需将 EIPv6 实例绑定到其他云资源上,从而屏蔽实例故障。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_BANDWIDTHOUTOFRANGE = "InvalidParameterValue.BandwidthOutOfRange"
+// INVALIDPARAMETERVALUE_BANDWIDTHTOOSMALL = "InvalidParameterValue.BandwidthTooSmall"
+// INVALIDPARAMETERVALUE_COMBINATION = "InvalidParameterValue.Combination"
+// INVALIDPARAMETERVALUE_UNAVAILABLEZONE = "InvalidParameterValue.UnavailableZone"
+// LIMITEXCEEDED_BANDWIDTHPACKAGERESOURCEQUOTA = "LimitExceeded.BandwidthPackageResourceQuota"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNSUPPORTEDOPERATION_ACCOUNTNOTSUPPORTED = "UnsupportedOperation.AccountNotSupported"
+func (c *Client) AllocateIPv6AddressesWithContext(ctx context.Context, request *AllocateIPv6AddressesRequest) (response *AllocateIPv6AddressesResponse, err error) {
+ if request == nil {
+ request = NewAllocateIPv6AddressesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("AllocateIPv6Addresses require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewAllocateIPv6AddressesResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewAllocateIp6AddressesBandwidthRequest() (request *AllocateIp6AddressesBandwidthRequest) {
request = &AllocateIp6AddressesBandwidthRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -626,7 +707,13 @@ func NewAllocateIp6AddressesBandwidthResponse() (response *AllocateIp6AddressesB
}
// AllocateIp6AddressesBandwidth
-// 该接口用于给IPv6地址初次分配公网带宽
+// 本接口(AllocateIp6AddressesBandwidth)用于为传统弹性公网 IPv6 实例开通 IPv6 公网带宽。
+//
+//
+//
+// - 传统弹性公网 IPv6 实例默认仅具备 IPv6 内网通信能力,需为 IPv6 地址分配公网带宽后,才具备 IPv6 公网通信能力。
+//
+// - 支持为一个或多个传统弹性公网 IPv6 实例开通公网带宽。
//
// 可能返回的错误码:
// FAILEDOPERATION_BALANCEINSUFFICIENT = "FailedOperation.BalanceInsufficient"
@@ -651,7 +738,13 @@ func (c *Client) AllocateIp6AddressesBandwidth(request *AllocateIp6AddressesBand
}
// AllocateIp6AddressesBandwidth
-// 该接口用于给IPv6地址初次分配公网带宽
+// 本接口(AllocateIp6AddressesBandwidth)用于为传统弹性公网 IPv6 实例开通 IPv6 公网带宽。
+//
+//
+//
+// - 传统弹性公网 IPv6 实例默认仅具备 IPv6 内网通信能力,需为 IPv6 地址分配公网带宽后,才具备 IPv6 公网通信能力。
+//
+// - 支持为一个或多个传统弹性公网 IPv6 实例开通公网带宽。
//
// 可能返回的错误码:
// FAILEDOPERATION_BALANCEINSUFFICIENT = "FailedOperation.BalanceInsufficient"
@@ -1310,6 +1403,91 @@ func (c *Client) AssociateDirectConnectGatewayNatGatewayWithContext(ctx context.
return
}
+func NewAssociateIPv6AddressRequest() (request *AssociateIPv6AddressRequest) {
+ request = &AssociateIPv6AddressRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("vpc", APIVersion, "AssociateIPv6Address")
+
+
+ return
+}
+
+func NewAssociateIPv6AddressResponse() (response *AssociateIPv6AddressResponse) {
+ response = &AssociateIPv6AddressResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// AssociateIPv6Address
+// 本接口(AssociateIPv6Address)用于将弹性公网IPv6(简称EIPv6)实例绑定到 CVM 或弹性网卡配置的内网 IPv6 地址上。
+//
+//
+//
+// - 将 EIPv6 绑定到 CVM 上,其本质是将 EIPv6 绑定到 CVM 弹性网卡所配置的内网 IPv6 地址上。
+//
+// - 将 EIPv6 绑定到指定网卡的内网 IPv6 时,需确保该内网 IPv6 地址为未绑定状态,才能执行绑定操作。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// INVALIDPARAMETERVALUE_ADDRESSNOTAPPLICABLE = "InvalidParameterValue.AddressNotApplicable"
+// INVALIDPARAMETERVALUE_MISSINGASSOCIATEENTITY = "InvalidParameterValue.MissingAssociateEntity"
+// INVALIDPARAMETERVALUE_NETWORKINTERFACEINSTANCENOTSUPPORT = "InvalidParameterValue.NetworkInterfaceInstanceNotSupport"
+// INVALIDPARAMETERVALUE_NETWORKINTERFACENOTFOUND = "InvalidParameterValue.NetworkInterfaceNotFound"
+// INVALIDPRIVATEIPADDRESS_ALREADYBINDEIP = "InvalidPrivateIpAddress.AlreadyBindEip"
+// MISSINGPARAMETER = "MissingParameter"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) AssociateIPv6Address(request *AssociateIPv6AddressRequest) (response *AssociateIPv6AddressResponse, err error) {
+ return c.AssociateIPv6AddressWithContext(context.Background(), request)
+}
+
+// AssociateIPv6Address
+// 本接口(AssociateIPv6Address)用于将弹性公网IPv6(简称EIPv6)实例绑定到 CVM 或弹性网卡配置的内网 IPv6 地址上。
+//
+//
+//
+// - 将 EIPv6 绑定到 CVM 上,其本质是将 EIPv6 绑定到 CVM 弹性网卡所配置的内网 IPv6 地址上。
+//
+// - 将 EIPv6 绑定到指定网卡的内网 IPv6 时,需确保该内网 IPv6 地址为未绑定状态,才能执行绑定操作。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETERCONFLICT = "InvalidParameterConflict"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// INVALIDPARAMETERVALUE_ADDRESSNOTAPPLICABLE = "InvalidParameterValue.AddressNotApplicable"
+// INVALIDPARAMETERVALUE_MISSINGASSOCIATEENTITY = "InvalidParameterValue.MissingAssociateEntity"
+// INVALIDPARAMETERVALUE_NETWORKINTERFACEINSTANCENOTSUPPORT = "InvalidParameterValue.NetworkInterfaceInstanceNotSupport"
+// INVALIDPARAMETERVALUE_NETWORKINTERFACENOTFOUND = "InvalidParameterValue.NetworkInterfaceNotFound"
+// INVALIDPRIVATEIPADDRESS_ALREADYBINDEIP = "InvalidPrivateIpAddress.AlreadyBindEip"
+// MISSINGPARAMETER = "MissingParameter"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) AssociateIPv6AddressWithContext(ctx context.Context, request *AssociateIPv6AddressRequest) (response *AssociateIPv6AddressResponse, err error) {
+ if request == nil {
+ request = NewAssociateIPv6AddressRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("AssociateIPv6Address require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewAssociateIPv6AddressResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewAssociateInstancesToCcnRouteTableRequest() (request *AssociateInstancesToCcnRouteTableRequest) {
request = &AssociateInstancesToCcnRouteTableRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -6975,6 +7153,7 @@ func NewCreateVpnGatewaySslClientResponse() (response *CreateVpnGatewaySslClient
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
// LIMITEXCEEDED = "LimitExceeded"
+// LIMITEXCEEDED_SSLVPNCLIENTLIMITEXCEEDED = "LimitExceeded.SslVpnClientLimitExceeded"
// RESOURCENOTFOUND = "ResourceNotFound"
// UNSUPPORTEDOPERATION = "UnsupportedOperation"
// UNSUPPORTEDOPERATION_RECORDEXISTS = "UnsupportedOperation.RecordExists"
@@ -6989,6 +7168,7 @@ func (c *Client) CreateVpnGatewaySslClient(request *CreateVpnGatewaySslClientReq
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
// INVALIDPARAMETERVALUE_TOOLONG = "InvalidParameterValue.TooLong"
// LIMITEXCEEDED = "LimitExceeded"
+// LIMITEXCEEDED_SSLVPNCLIENTLIMITEXCEEDED = "LimitExceeded.SslVpnClientLimitExceeded"
// RESOURCENOTFOUND = "ResourceNotFound"
// UNSUPPORTEDOPERATION = "UnsupportedOperation"
// UNSUPPORTEDOPERATION_RECORDEXISTS = "UnsupportedOperation.RecordExists"
@@ -12324,6 +12504,79 @@ func (c *Client) DescribeHighPriorityRoutesWithContext(ctx context.Context, requ
return
}
+func NewDescribeIPv6AddressesRequest() (request *DescribeIPv6AddressesRequest) {
+ request = &DescribeIPv6AddressesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("vpc", APIVersion, "DescribeIPv6Addresses")
+
+
+ return
+}
+
+func NewDescribeIPv6AddressesResponse() (response *DescribeIPv6AddressesResponse) {
+ response = &DescribeIPv6AddressesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeIPv6Addresses
+// 本接口(DescribeIPv6Addresses)用于查询一个或多个弹性公网 IPv6(简称 EIPv6)实例的详细信息。
+//
+//
+//
+// - 支持查询您在指定地域的弹性公网 IPv6 和传统弹性公网 IPv6 实例信息
+//
+// - 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的 EIPv6。
+//
+// 可能返回的错误码:
+// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist"
+// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed"
+func (c *Client) DescribeIPv6Addresses(request *DescribeIPv6AddressesRequest) (response *DescribeIPv6AddressesResponse, err error) {
+ return c.DescribeIPv6AddressesWithContext(context.Background(), request)
+}
+
+// DescribeIPv6Addresses
+// 本接口(DescribeIPv6Addresses)用于查询一个或多个弹性公网 IPv6(简称 EIPv6)实例的详细信息。
+//
+//
+//
+// - 支持查询您在指定地域的弹性公网 IPv6 和传统弹性公网 IPv6 实例信息
+//
+// - 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的 EIPv6。
+//
+// 可能返回的错误码:
+// INVALIDADDRESSID_NOTFOUND = "InvalidAddressId.NotFound"
+// INVALIDPARAMETER = "InvalidParameter"
+// INVALIDPARAMETER_COEXIST = "InvalidParameter.Coexist"
+// INVALIDPARAMETER_INVALIDFILTER = "InvalidParameter.InvalidFilter"
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
+// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed"
+func (c *Client) DescribeIPv6AddressesWithContext(ctx context.Context, request *DescribeIPv6AddressesRequest) (response *DescribeIPv6AddressesResponse, err error) {
+ if request == nil {
+ request = NewDescribeIPv6AddressesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeIPv6Addresses require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeIPv6AddressesResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDescribeIp6AddressesRequest() (request *DescribeIp6AddressesRequest) {
request = &DescribeIp6AddressesRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -12344,7 +12597,7 @@ func NewDescribeIp6AddressesResponse() (response *DescribeIp6AddressesResponse)
}
// DescribeIp6Addresses
-// 该接口用于查询IPV6地址信息
+// 本接口(DescribeIp6Addresses)用于查询一个或多个传统弹性公网 IPv6 实例的详细信息。
//
// 可能返回的错误码:
// INTERNALSERVERERROR = "InternalServerError"
@@ -12362,7 +12615,7 @@ func (c *Client) DescribeIp6Addresses(request *DescribeIp6AddressesRequest) (res
}
// DescribeIp6Addresses
-// 该接口用于查询IPV6地址信息
+// 本接口(DescribeIp6Addresses)用于查询一个或多个传统弹性公网 IPv6 实例的详细信息。
//
// 可能返回的错误码:
// INTERNALSERVERERROR = "InternalServerError"
@@ -15218,6 +15471,55 @@ func (c *Client) DescribeTrafficPackagesWithContext(ctx context.Context, request
return
}
+func NewDescribeTrafficQosPolicyRequest() (request *DescribeTrafficQosPolicyRequest) {
+ request = &DescribeTrafficQosPolicyRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("vpc", APIVersion, "DescribeTrafficQosPolicy")
+
+
+ return
+}
+
+func NewDescribeTrafficQosPolicyResponse() (response *DescribeTrafficQosPolicyResponse) {
+ response = &DescribeTrafficQosPolicyResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DescribeTrafficQosPolicy
+// 查询流量调度规则
+//
+// 可能返回的错误码:
+// RESOURCENOTFOUND = "ResourceNotFound"
+func (c *Client) DescribeTrafficQosPolicy(request *DescribeTrafficQosPolicyRequest) (response *DescribeTrafficQosPolicyResponse, err error) {
+ return c.DescribeTrafficQosPolicyWithContext(context.Background(), request)
+}
+
+// DescribeTrafficQosPolicy
+// 查询流量调度规则
+//
+// 可能返回的错误码:
+// RESOURCENOTFOUND = "ResourceNotFound"
+func (c *Client) DescribeTrafficQosPolicyWithContext(ctx context.Context, request *DescribeTrafficQosPolicyRequest) (response *DescribeTrafficQosPolicyResponse, err error) {
+ if request == nil {
+ request = NewDescribeTrafficQosPolicyRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeTrafficQosPolicy require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeTrafficQosPolicyResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDescribeUsedIpAddressRequest() (request *DescribeUsedIpAddressRequest) {
request = &DescribeUsedIpAddressRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -17261,6 +17563,75 @@ func (c *Client) DisassociateDirectConnectGatewayNatGatewayWithContext(ctx conte
return
}
+func NewDisassociateIPv6AddressRequest() (request *DisassociateIPv6AddressRequest) {
+ request = &DisassociateIPv6AddressRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("vpc", APIVersion, "DisassociateIPv6Address")
+
+
+ return
+}
+
+func NewDisassociateIPv6AddressResponse() (response *DisassociateIPv6AddressResponse) {
+ response = &DisassociateIPv6AddressResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// DisassociateIPv6Address
+// 本接口(DisassociateIPv6Address)用于解绑弹性公网 IPv6(简称EIPv6)实例。
+//
+//
+//
+// - 支持对 CVM、弹性网卡绑定的 EIPv6 实例进行解绑操作。
+//
+// - 只有状态为 BIND 和 BIND_ENI 的 EIPv6 实例才能进行解绑操作。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION_ADDRESSENIINFONOTFOUND = "FailedOperation.AddressEniInfoNotFound"
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) DisassociateIPv6Address(request *DisassociateIPv6AddressRequest) (response *DisassociateIPv6AddressResponse, err error) {
+ return c.DisassociateIPv6AddressWithContext(context.Background(), request)
+}
+
+// DisassociateIPv6Address
+// 本接口(DisassociateIPv6Address)用于解绑弹性公网 IPv6(简称EIPv6)实例。
+//
+//
+//
+// - 支持对 CVM、弹性网卡绑定的 EIPv6 实例进行解绑操作。
+//
+// - 只有状态为 BIND 和 BIND_ENI 的 EIPv6 实例才能进行解绑操作。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION_ADDRESSENIINFONOTFOUND = "FailedOperation.AddressEniInfoNotFound"
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) DisassociateIPv6AddressWithContext(ctx context.Context, request *DisassociateIPv6AddressRequest) (response *DisassociateIPv6AddressResponse, err error) {
+ if request == nil {
+ request = NewDisassociateIPv6AddressRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DisassociateIPv6Address require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDisassociateIPv6AddressResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDisassociateNatGatewayAddressRequest() (request *DisassociateNatGatewayAddressRequest) {
request = &DisassociateNatGatewayAddressRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -18537,8 +18908,6 @@ func NewLockCcnsResponse() (response *LockCcnsResponse) {
//
// 如有需要, 可以封禁任意限速实例, 可接入到内部运营系统
//
-//
-//
// 可能返回的错误码:
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed"
@@ -18559,8 +18928,6 @@ func (c *Client) LockCcns(request *LockCcnsRequest) (response *LockCcnsResponse,
//
// 如有需要, 可以封禁任意限速实例, 可接入到内部运营系统
//
-//
-//
// 可能返回的错误码:
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed"
@@ -20236,6 +20603,128 @@ func (c *Client) ModifyHighPriorityRouteTableAttributeWithContext(ctx context.Co
return
}
+func NewModifyIPv6AddressesAttributesRequest() (request *ModifyIPv6AddressesAttributesRequest) {
+ request = &ModifyIPv6AddressesAttributesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("vpc", APIVersion, "ModifyIPv6AddressesAttributes")
+
+
+ return
+}
+
+func NewModifyIPv6AddressesAttributesResponse() (response *ModifyIPv6AddressesAttributesResponse) {
+ response = &ModifyIPv6AddressesAttributesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyIPv6AddressesAttributes
+// 本接口(ModifyIPv6AddressesAttributes)用于修改弹性公网 IPv6(简称EIPv6)实例名称。
+//
+//
+//
+// - 支持对弹性公网 IPv6 和传统弹性公网 IPv6 实例名称进行修改。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// MISSINGPARAMETER_MULTIMISSINGPARAMETER = "MissingParameter.MultiMissingParameter"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) ModifyIPv6AddressesAttributes(request *ModifyIPv6AddressesAttributesRequest) (response *ModifyIPv6AddressesAttributesResponse, err error) {
+ return c.ModifyIPv6AddressesAttributesWithContext(context.Background(), request)
+}
+
+// ModifyIPv6AddressesAttributes
+// 本接口(ModifyIPv6AddressesAttributes)用于修改弹性公网 IPv6(简称EIPv6)实例名称。
+//
+//
+//
+// - 支持对弹性公网 IPv6 和传统弹性公网 IPv6 实例名称进行修改。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERVALUE = "InvalidParameterValue"
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// MISSINGPARAMETER_MULTIMISSINGPARAMETER = "MissingParameter.MultiMissingParameter"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) ModifyIPv6AddressesAttributesWithContext(ctx context.Context, request *ModifyIPv6AddressesAttributesRequest) (response *ModifyIPv6AddressesAttributesResponse, err error) {
+ if request == nil {
+ request = NewModifyIPv6AddressesAttributesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyIPv6AddressesAttributes require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyIPv6AddressesAttributesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyIPv6AddressesBandwidthRequest() (request *ModifyIPv6AddressesBandwidthRequest) {
+ request = &ModifyIPv6AddressesBandwidthRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("vpc", APIVersion, "ModifyIPv6AddressesBandwidth")
+
+
+ return
+}
+
+func NewModifyIPv6AddressesBandwidthResponse() (response *ModifyIPv6AddressesBandwidthResponse) {
+ response = &ModifyIPv6AddressesBandwidthResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ModifyIPv6AddressesBandwidth
+// 本接口(ModifyIPv6AddressesBandwidth)用于调整弹性公网 IPv6(简称EIPv6)实例的带宽上限。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) ModifyIPv6AddressesBandwidth(request *ModifyIPv6AddressesBandwidthRequest) (response *ModifyIPv6AddressesBandwidthResponse, err error) {
+ return c.ModifyIPv6AddressesBandwidthWithContext(context.Background(), request)
+}
+
+// ModifyIPv6AddressesBandwidth
+// 本接口(ModifyIPv6AddressesBandwidth)用于调整弹性公网 IPv6(简称EIPv6)实例的带宽上限。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) ModifyIPv6AddressesBandwidthWithContext(ctx context.Context, request *ModifyIPv6AddressesBandwidthRequest) (response *ModifyIPv6AddressesBandwidthResponse, err error) {
+ if request == nil {
+ request = NewModifyIPv6AddressesBandwidthRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyIPv6AddressesBandwidth require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyIPv6AddressesBandwidthResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewModifyIp6AddressesBandwidthRequest() (request *ModifyIp6AddressesBandwidthRequest) {
request = &ModifyIp6AddressesBandwidthRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -20256,7 +20745,13 @@ func NewModifyIp6AddressesBandwidthResponse() (response *ModifyIp6AddressesBandw
}
// ModifyIp6AddressesBandwidth
-// 该接口用于修改IPV6地址访问internet的带宽
+// 本接口(ModifyIp6AddressesBandwidth)用于调整传统弹性公网 IPv6 实例的带宽上限。
+//
+//
+//
+// - 仅支持对传统弹性公网 IPv6 实例的带宽上限进行调整。
+//
+// - 如需调整弹性公网 IPv6 实例的带宽上限,请使用 ModifyIPv6AddressesBandwidth 接口。
//
// 可能返回的错误码:
// INTERNALSERVERERROR = "InternalServerError"
@@ -20281,7 +20776,13 @@ func (c *Client) ModifyIp6AddressesBandwidth(request *ModifyIp6AddressesBandwidt
}
// ModifyIp6AddressesBandwidth
-// 该接口用于修改IPV6地址访问internet的带宽
+// 本接口(ModifyIp6AddressesBandwidth)用于调整传统弹性公网 IPv6 实例的带宽上限。
+//
+//
+//
+// - 仅支持对传统弹性公网 IPv6 实例的带宽上限进行调整。
+//
+// - 如需调整弹性公网 IPv6 实例的带宽上限,请使用 ModifyIPv6AddressesBandwidth 接口。
//
// 可能返回的错误码:
// INTERNALSERVERERROR = "InternalServerError"
@@ -23109,6 +23610,73 @@ func (c *Client) ReleaseAddressesWithContext(ctx context.Context, request *Relea
return
}
+func NewReleaseIPv6AddressesRequest() (request *ReleaseIPv6AddressesRequest) {
+ request = &ReleaseIPv6AddressesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("vpc", APIVersion, "ReleaseIPv6Addresses")
+
+
+ return
+}
+
+func NewReleaseIPv6AddressesResponse() (response *ReleaseIPv6AddressesResponse) {
+ response = &ReleaseIPv6AddressesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+
+}
+
+// ReleaseIPv6Addresses
+// 本接口(ReleaseIPv6Addresses)用于释放一个或多个弹性公网IPv6(简称EIPv6)实例。
+//
+//
+//
+// - 支持对已申请到的弹性公网 IPv6 实例进行释放操作,如需再次使用,请重新申请。
+//
+// - 只有状态为 UNBIND 的 EIPv6 实例才能进行释放操作。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) ReleaseIPv6Addresses(request *ReleaseIPv6AddressesRequest) (response *ReleaseIPv6AddressesResponse, err error) {
+ return c.ReleaseIPv6AddressesWithContext(context.Background(), request)
+}
+
+// ReleaseIPv6Addresses
+// 本接口(ReleaseIPv6Addresses)用于释放一个或多个弹性公网IPv6(简称EIPv6)实例。
+//
+//
+//
+// - 支持对已申请到的弹性公网 IPv6 实例进行释放操作,如需再次使用,请重新申请。
+//
+// - 只有状态为 UNBIND 的 EIPv6 实例才能进行释放操作。
+//
+// 可能返回的错误码:
+// INVALIDPARAMETERVALUE_ADDRESSIDMALFORMED = "InvalidParameterValue.AddressIdMalformed"
+// INVALIDPARAMETERVALUE_ADDRESSIPNOTFOUND = "InvalidParameterValue.AddressIpNotFound"
+// OPERATIONDENIED_ADDRESSINARREARS = "OperationDenied.AddressInArrears"
+// UNSUPPORTEDOPERATION_ADDRESSSTATUSNOTPERMIT = "UnsupportedOperation.AddressStatusNotPermit"
+func (c *Client) ReleaseIPv6AddressesWithContext(ctx context.Context, request *ReleaseIPv6AddressesRequest) (response *ReleaseIPv6AddressesResponse, err error) {
+ if request == nil {
+ request = NewReleaseIPv6AddressesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ReleaseIPv6Addresses require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewReleaseIPv6AddressesResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewReleaseIp6AddressesBandwidthRequest() (request *ReleaseIp6AddressesBandwidthRequest) {
request = &ReleaseIp6AddressesBandwidthRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -23129,7 +23697,13 @@ func NewReleaseIp6AddressesBandwidthResponse() (response *ReleaseIp6AddressesBan
}
// ReleaseIp6AddressesBandwidth
-// 该接口用于给弹性公网IPv6地址释放带宽。
+// 本接口(ReleaseIp6AddressesBandwidth)用于为传统弹性公网 IPv6 实例关闭 IPv6 公网带宽。
+//
+//
+//
+// - 传统弹性公网 IPv6 实例关闭公网带宽后,仍具备 IPv6 内网通信能力。
+//
+// - 如需再次开通 IPv6 公网带宽,请使用 AllocateIp6AddressesBandwidth 接口进行开通。
//
// 可能返回的错误码:
// FAILEDOPERATION_TASKFAILED = "FailedOperation.TaskFailed"
@@ -23148,7 +23722,13 @@ func (c *Client) ReleaseIp6AddressesBandwidth(request *ReleaseIp6AddressesBandwi
}
// ReleaseIp6AddressesBandwidth
-// 该接口用于给弹性公网IPv6地址释放带宽。
+// 本接口(ReleaseIp6AddressesBandwidth)用于为传统弹性公网 IPv6 实例关闭 IPv6 公网带宽。
+//
+//
+//
+// - 传统弹性公网 IPv6 实例关闭公网带宽后,仍具备 IPv6 内网通信能力。
+//
+// - 如需再次开通 IPv6 公网带宽,请使用 AllocateIp6AddressesBandwidth 接口进行开通。
//
// 可能返回的错误码:
// FAILEDOPERATION_TASKFAILED = "FailedOperation.TaskFailed"
@@ -24376,9 +24956,7 @@ func NewResetRoutesResponse() (response *ResetRoutesResponse) {
}
// ResetRoutes
-// 本接口(ResetRoutes)用于对某个路由表名称和所有路由策略(Route)进行重新设置。
-//
-// 注意: 调用本接口是先删除当前路由表中所有路由策略, 再保存新提交的路由策略内容, 会引起网络中断。
+// 本接口(ResetRoutes)用于对某个路由表名称和所有路由策略(Route)进行重新设置。
注意: 调用本接口时先删除当前路由表中所有路由策略, 再保存新提交的路由策略内容, 会引起网络中断。
//
// 可能返回的错误码:
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
@@ -24398,9 +24976,7 @@ func (c *Client) ResetRoutes(request *ResetRoutesRequest) (response *ResetRoutes
}
// ResetRoutes
-// 本接口(ResetRoutes)用于对某个路由表名称和所有路由策略(Route)进行重新设置。
-//
-// 注意: 调用本接口是先删除当前路由表中所有路由策略, 再保存新提交的路由策略内容, 会引起网络中断。
+// 本接口(ResetRoutes)用于对某个路由表名称和所有路由策略(Route)进行重新设置。
注意: 调用本接口时先删除当前路由表中所有路由策略, 再保存新提交的路由策略内容, 会引起网络中断。
//
// 可能返回的错误码:
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
@@ -25201,8 +25777,6 @@ func NewUnlockCcnsResponse() (response *UnlockCcnsResponse) {
//
// 如有需要, 可以封禁任意限速实例, 可接入到内部运营系统
//
-//
-//
// 可能返回的错误码:
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed"
@@ -25223,8 +25797,6 @@ func (c *Client) UnlockCcns(request *UnlockCcnsRequest) (response *UnlockCcnsRes
//
// 如有需要, 可以封禁任意限速实例, 可接入到内部运营系统
//
-//
-//
// 可能返回的错误码:
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
// INVALIDPARAMETERVALUE_MALFORMED = "InvalidParameterValue.Malformed"
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/errors.go
index debcab4085..98eea10a20 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/errors.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/errors.go
@@ -344,6 +344,9 @@ const (
// 网络接口ID不正确。
INVALIDPARAMETERVALUE_NETWORKINTERFACEIDMALFORMED = "InvalidParameterValue.NetworkInterfaceIdMalformed"
+ // 网卡所绑定实例不支持绑定弹性公网IPv6
+ INVALIDPARAMETERVALUE_NETWORKINTERFACEINSTANCENOTSUPPORT = "InvalidParameterValue.NetworkInterfaceInstanceNotSupport"
+
// 未找到网络接口ID,或私有IP地址未在网络接口配置。
INVALIDPARAMETERVALUE_NETWORKINTERFACENOTFOUND = "InvalidParameterValue.NetworkInterfaceNotFound"
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go
index 0882d87e5e..f33351a1c3 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312/models.go
@@ -839,6 +839,186 @@ func (r *AllocateAddressesResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+// Predefined struct for user
+type AllocateIPv6AddressesRequestParams struct {
+ // EIP名称,用于申请EIP时用户自定义该EIP的个性化名称,默认值:未命名。
+ AddressName *string `json:"AddressName,omitnil,omitempty" name:"AddressName"`
+
+ // 弹性公网IPv6类型,可选值:
+ //
+ // - EIPv6:普通IPv6
+ // - HighQualityEIPv6:精品IPv6
+ // 注意:需联系产品开通精品IPv6白名单,且仅部分地域支持精品IPv6
+ //
+ // 默认值:EIPv6。
+ AddressType *string `json:"AddressType,omitnil,omitempty" name:"AddressType"`
+
+ // 申请的弹性公网IPv6数量,默认值:1。
+ AddressCount *int64 `json:"AddressCount,omitnil,omitempty" name:"AddressCount"`
+
+ // 弹性公网IPv6计费方式,可选值:
+ //
+ // - BANDWIDTH_PACKAGE:[共享带宽包](https://cloud.tencent.com/document/product/684/15255)付费
+ // - TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费
+ //
+ // 默认值:TRAFFIC_POSTPAID_BY_HOUR。
+ InternetChargeType *string `json:"InternetChargeType,omitnil,omitempty" name:"InternetChargeType"`
+
+ // 弹性公网IPv6线路类型,默认值:BGP。
+ //
+ // 已开通静态单线IP白名单的用户,可选值:
+ // - CMCC:中国移动
+ // - CTCC:中国电信
+ // - CUCC:中国联通
+ // 注意:仅部分地域支持静态单线IP。
+ InternetServiceProvider *string `json:"InternetServiceProvider,omitnil,omitempty" name:"InternetServiceProvider"`
+
+ // 弹性公网IPv6带宽上限,单位:Mbps。
+ //
+ // 可选值范围取决于EIP计费方式:
+ //
+ // - BANDWIDTH_PACKAGE:1 Mbps 至 2000 Mbps
+ // - TRAFFIC_POSTPAID_BY_HOUR:1 Mbps 至 100 Mbps
+ //
+ // 默认值:1 Mbps。
+ InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitnil,omitempty" name:"InternetMaxBandwidthOut"`
+
+ // 带宽包唯一ID参数。
+ // 设定该参数且InternetChargeType为BANDWIDTH_PACKAGE,则表示创建的EIP加入该BGP带宽包并采用带宽包计费。
+ BandwidthPackageId *string `json:"BandwidthPackageId,omitnil,omitempty" name:"BandwidthPackageId"`
+
+ // 需要关联的标签列表。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
+
+ // 弹性公网IPv6网络出口,可选值:
+ //
+ // - CENTER_EGRESS_1:中心出口一
+ // - CENTER_EGRESS_2:中心出口二
+ // - CENTER_EGRESS_3:中心出口三
+ // 注意:不同运营商或资源类型对应的网络出口需要联系产品开白
+ //
+ // 默认值:CENTER_EGRESS_1。
+ Egress *string `json:"Egress,omitnil,omitempty" name:"Egress"`
+}
+
+type AllocateIPv6AddressesRequest struct {
+ *tchttp.BaseRequest
+
+ // EIP名称,用于申请EIP时用户自定义该EIP的个性化名称,默认值:未命名。
+ AddressName *string `json:"AddressName,omitnil,omitempty" name:"AddressName"`
+
+ // 弹性公网IPv6类型,可选值:
+ //
+ // - EIPv6:普通IPv6
+ // - HighQualityEIPv6:精品IPv6
+ // 注意:需联系产品开通精品IPv6白名单,且仅部分地域支持精品IPv6
+ //
+ // 默认值:EIPv6。
+ AddressType *string `json:"AddressType,omitnil,omitempty" name:"AddressType"`
+
+ // 申请的弹性公网IPv6数量,默认值:1。
+ AddressCount *int64 `json:"AddressCount,omitnil,omitempty" name:"AddressCount"`
+
+ // 弹性公网IPv6计费方式,可选值:
+ //
+ // - BANDWIDTH_PACKAGE:[共享带宽包](https://cloud.tencent.com/document/product/684/15255)付费
+ // - TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费
+ //
+ // 默认值:TRAFFIC_POSTPAID_BY_HOUR。
+ InternetChargeType *string `json:"InternetChargeType,omitnil,omitempty" name:"InternetChargeType"`
+
+ // 弹性公网IPv6线路类型,默认值:BGP。
+ //
+ // 已开通静态单线IP白名单的用户,可选值:
+ // - CMCC:中国移动
+ // - CTCC:中国电信
+ // - CUCC:中国联通
+ // 注意:仅部分地域支持静态单线IP。
+ InternetServiceProvider *string `json:"InternetServiceProvider,omitnil,omitempty" name:"InternetServiceProvider"`
+
+ // 弹性公网IPv6带宽上限,单位:Mbps。
+ //
+ // 可选值范围取决于EIP计费方式:
+ //
+ // - BANDWIDTH_PACKAGE:1 Mbps 至 2000 Mbps
+ // - TRAFFIC_POSTPAID_BY_HOUR:1 Mbps 至 100 Mbps
+ //
+ // 默认值:1 Mbps。
+ InternetMaxBandwidthOut *int64 `json:"InternetMaxBandwidthOut,omitnil,omitempty" name:"InternetMaxBandwidthOut"`
+
+ // 带宽包唯一ID参数。
+ // 设定该参数且InternetChargeType为BANDWIDTH_PACKAGE,则表示创建的EIP加入该BGP带宽包并采用带宽包计费。
+ BandwidthPackageId *string `json:"BandwidthPackageId,omitnil,omitempty" name:"BandwidthPackageId"`
+
+ // 需要关联的标签列表。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
+
+ // 弹性公网IPv6网络出口,可选值:
+ //
+ // - CENTER_EGRESS_1:中心出口一
+ // - CENTER_EGRESS_2:中心出口二
+ // - CENTER_EGRESS_3:中心出口三
+ // 注意:不同运营商或资源类型对应的网络出口需要联系产品开白
+ //
+ // 默认值:CENTER_EGRESS_1。
+ Egress *string `json:"Egress,omitnil,omitempty" name:"Egress"`
+}
+
+func (r *AllocateIPv6AddressesRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *AllocateIPv6AddressesRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "AddressName")
+ delete(f, "AddressType")
+ delete(f, "AddressCount")
+ delete(f, "InternetChargeType")
+ delete(f, "InternetServiceProvider")
+ delete(f, "InternetMaxBandwidthOut")
+ delete(f, "BandwidthPackageId")
+ delete(f, "Tags")
+ delete(f, "Egress")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AllocateIPv6AddressesRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type AllocateIPv6AddressesResponseParams struct {
+ // 申请到的弹性公网 IPv6 地址的唯一 ID 列表。
+ AddressSet []*string `json:"AddressSet,omitnil,omitempty" name:"AddressSet"`
+
+ // 异步任务TaskId,可以使用[DescribeTaskResult](https://cloud.tencent.com/document/api/215/36271)接口查询任务状态。
+ TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
+
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type AllocateIPv6AddressesResponse struct {
+ *tchttp.BaseResponse
+ Response *AllocateIPv6AddressesResponseParams `json:"Response"`
+}
+
+func (r *AllocateIPv6AddressesResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *AllocateIPv6AddressesResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
// Predefined struct for user
type AllocateIp6AddressesBandwidthRequestParams struct {
// 需要开通公网访问能力的IPV6地址
@@ -852,6 +1032,9 @@ type AllocateIp6AddressesBandwidthRequestParams struct {
// 带宽包id,上移账号,申请带宽包计费模式的ipv6地址需要传入.
BandwidthPackageId *string `json:"BandwidthPackageId,omitnil,omitempty" name:"BandwidthPackageId"`
+
+ // 需要关联的标签列表。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
type AllocateIp6AddressesBandwidthRequest struct {
@@ -868,6 +1051,9 @@ type AllocateIp6AddressesBandwidthRequest struct {
// 带宽包id,上移账号,申请带宽包计费模式的ipv6地址需要传入.
BandwidthPackageId *string `json:"BandwidthPackageId,omitnil,omitempty" name:"BandwidthPackageId"`
+
+ // 需要关联的标签列表。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
func (r *AllocateIp6AddressesBandwidthRequest) ToJsonString() string {
@@ -886,6 +1072,7 @@ func (r *AllocateIp6AddressesBandwidthRequest) FromJsonString(s string) error {
delete(f, "InternetMaxBandwidthOut")
delete(f, "InternetChargeType")
delete(f, "BandwidthPackageId")
+ delete(f, "Tags")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AllocateIp6AddressesBandwidthRequest has unknown keys!", "")
}
@@ -1447,6 +1634,74 @@ func (r *AssociateDirectConnectGatewayNatGatewayResponse) FromJsonString(s strin
return json.Unmarshal([]byte(s), &r)
}
+// Predefined struct for user
+type AssociateIPv6AddressRequestParams struct {
+ // 弹性公网IPv6唯一ID,EIPv6 唯一 ID 形如:eipv6-11112222。
+ IPv6AddressId *string `json:"IPv6AddressId,omitnil,omitempty" name:"IPv6AddressId"`
+
+ // 要绑定的弹性网卡 ID。 弹性网卡 ID 形如:eni-11112222。NetworkInterfaceId 与 InstanceId 不可同时指定。弹性网卡 ID 可通过登录控制台查询,也可通过DescribeNetworkInterfaces接口返回值中的networkInterfaceId获取。
+ NetworkInterfaceId *string `json:"NetworkInterfaceId,omitnil,omitempty" name:"NetworkInterfaceId"`
+
+ // 要绑定的内网 IPv6。如果指定了 NetworkInterfaceId 则也必须指定 PrivateIPv6Address ,表示将 EIP 绑定到指定弹性网卡的指定内网 IP 上。同时要确保指定的 PrivateIPv6Address 是指定的 NetworkInterfaceId 上的一个内网 IPv6。指定弹性网卡的内网 IPv6 可通过登录控制台查询,也可通过DescribeNetworkInterfaces接口返回值中的Ipv6AddressSet.Address获取。
+ PrivateIPv6Address *string `json:"PrivateIPv6Address,omitnil,omitempty" name:"PrivateIPv6Address"`
+}
+
+type AssociateIPv6AddressRequest struct {
+ *tchttp.BaseRequest
+
+ // 弹性公网IPv6唯一ID,EIPv6 唯一 ID 形如:eipv6-11112222。
+ IPv6AddressId *string `json:"IPv6AddressId,omitnil,omitempty" name:"IPv6AddressId"`
+
+ // 要绑定的弹性网卡 ID。 弹性网卡 ID 形如:eni-11112222。NetworkInterfaceId 与 InstanceId 不可同时指定。弹性网卡 ID 可通过登录控制台查询,也可通过DescribeNetworkInterfaces接口返回值中的networkInterfaceId获取。
+ NetworkInterfaceId *string `json:"NetworkInterfaceId,omitnil,omitempty" name:"NetworkInterfaceId"`
+
+ // 要绑定的内网 IPv6。如果指定了 NetworkInterfaceId 则也必须指定 PrivateIPv6Address ,表示将 EIP 绑定到指定弹性网卡的指定内网 IP 上。同时要确保指定的 PrivateIPv6Address 是指定的 NetworkInterfaceId 上的一个内网 IPv6。指定弹性网卡的内网 IPv6 可通过登录控制台查询,也可通过DescribeNetworkInterfaces接口返回值中的Ipv6AddressSet.Address获取。
+ PrivateIPv6Address *string `json:"PrivateIPv6Address,omitnil,omitempty" name:"PrivateIPv6Address"`
+}
+
+func (r *AssociateIPv6AddressRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *AssociateIPv6AddressRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "IPv6AddressId")
+ delete(f, "NetworkInterfaceId")
+ delete(f, "PrivateIPv6Address")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AssociateIPv6AddressRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type AssociateIPv6AddressResponseParams struct {
+ // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
+}
+
+type AssociateIPv6AddressResponse struct {
+ *tchttp.BaseResponse
+ Response *AssociateIPv6AddressResponseParams `json:"Response"`
+}
+
+func (r *AssociateIPv6AddressResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *AssociateIPv6AddressResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
// Predefined struct for user
type AssociateInstancesToCcnRouteTableRequestParams struct {
// 云联网ID。
@@ -2295,11 +2550,9 @@ type CcnAttachedInstance struct {
Description *string `json:"Description,omitnil,omitempty" name:"Description"`
// 路由表ID
- // 注意:此字段可能返回 null,表示取不到有效值。
RouteTableId *string `json:"RouteTableId,omitnil,omitempty" name:"RouteTableId"`
// 路由表名称
- // 注意:此字段可能返回 null,表示取不到有效值。
RouteTableName *string `json:"RouteTableName,omitnil,omitempty" name:"RouteTableName"`
}
@@ -2617,11 +2870,9 @@ type CcnRouteTableInputPolicy struct {
Description *string `json:"Description,omitnil,omitempty" name:"Description"`
// as-path操作
- // 注意:此字段可能返回 null,表示取不到有效值。
OperateAsPath *string `json:"OperateAsPath,omitnil,omitempty" name:"OperateAsPath"`
// as-path操作模式
- // 注意:此字段可能返回 null,表示取不到有效值。
AsPathOperateMode *string `json:"AsPathOperateMode,omitnil,omitempty" name:"AsPathOperateMode"`
}
@@ -3115,6 +3366,9 @@ type CreateAddressTemplateGroupRequestParams struct {
// IP地址模板实例ID,例如:ipm-mdunqeb6。
AddressTemplateIds []*string `json:"AddressTemplateIds,omitnil,omitempty" name:"AddressTemplateIds"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
type CreateAddressTemplateGroupRequest struct {
@@ -3125,6 +3379,9 @@ type CreateAddressTemplateGroupRequest struct {
// IP地址模板实例ID,例如:ipm-mdunqeb6。
AddressTemplateIds []*string `json:"AddressTemplateIds,omitnil,omitempty" name:"AddressTemplateIds"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
func (r *CreateAddressTemplateGroupRequest) ToJsonString() string {
@@ -3141,6 +3398,7 @@ func (r *CreateAddressTemplateGroupRequest) FromJsonString(s string) error {
}
delete(f, "AddressTemplateGroupName")
delete(f, "AddressTemplateIds")
+ delete(f, "Tags")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAddressTemplateGroupRequest has unknown keys!", "")
}
@@ -3182,6 +3440,9 @@ type CreateAddressTemplateRequestParams struct {
// 地址信息,支持携带备注,支持 IP、CIDR、IP 范围。Addresses与AddressesExtra必填其一。
AddressesExtra []*AddressInfo `json:"AddressesExtra,omitnil,omitempty" name:"AddressesExtra"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
type CreateAddressTemplateRequest struct {
@@ -3195,6 +3456,9 @@ type CreateAddressTemplateRequest struct {
// 地址信息,支持携带备注,支持 IP、CIDR、IP 范围。Addresses与AddressesExtra必填其一。
AddressesExtra []*AddressInfo `json:"AddressesExtra,omitnil,omitempty" name:"AddressesExtra"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
func (r *CreateAddressTemplateRequest) ToJsonString() string {
@@ -3212,6 +3476,7 @@ func (r *CreateAddressTemplateRequest) FromJsonString(s string) error {
delete(f, "AddressTemplateName")
delete(f, "Addresses")
delete(f, "AddressesExtra")
+ delete(f, "Tags")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAddressTemplateRequest has unknown keys!", "")
}
@@ -4433,6 +4698,12 @@ type CreateHaVipRequestParams struct {
// 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
+
+ // HaVip绑定的子机或网卡。最多支持10个实例。
+ HaVipAssociationSet []*HaVipAssociation `json:"HaVipAssociationSet,omitnil,omitempty" name:"HaVipAssociationSet"`
+
+ // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
+ ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"`
}
type CreateHaVipRequest struct {
@@ -4458,6 +4729,12 @@ type CreateHaVipRequest struct {
// 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
+
+ // HaVip绑定的子机或网卡。最多支持10个实例。
+ HaVipAssociationSet []*HaVipAssociation `json:"HaVipAssociationSet,omitnil,omitempty" name:"HaVipAssociationSet"`
+
+ // 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
+ ClientToken *string `json:"ClientToken,omitnil,omitempty" name:"ClientToken"`
}
func (r *CreateHaVipRequest) ToJsonString() string {
@@ -4479,6 +4756,8 @@ func (r *CreateHaVipRequest) FromJsonString(s string) error {
delete(f, "NetworkInterfaceId")
delete(f, "CheckAssociate")
delete(f, "Tags")
+ delete(f, "HaVipAssociationSet")
+ delete(f, "ClientToken")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateHaVipRequest has unknown keys!", "")
}
@@ -6316,6 +6595,9 @@ type CreateServiceTemplateGroupRequestParams struct {
// 协议端口模板实例ID,例如:ppm-4dw6agho。
ServiceTemplateIds []*string `json:"ServiceTemplateIds,omitnil,omitempty" name:"ServiceTemplateIds"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
type CreateServiceTemplateGroupRequest struct {
@@ -6326,6 +6608,9 @@ type CreateServiceTemplateGroupRequest struct {
// 协议端口模板实例ID,例如:ppm-4dw6agho。
ServiceTemplateIds []*string `json:"ServiceTemplateIds,omitnil,omitempty" name:"ServiceTemplateIds"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
func (r *CreateServiceTemplateGroupRequest) ToJsonString() string {
@@ -6342,6 +6627,7 @@ func (r *CreateServiceTemplateGroupRequest) FromJsonString(s string) error {
}
delete(f, "ServiceTemplateGroupName")
delete(f, "ServiceTemplateIds")
+ delete(f, "Tags")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateServiceTemplateGroupRequest has unknown keys!", "")
}
@@ -6383,6 +6669,9 @@ type CreateServiceTemplateRequestParams struct {
// 支持添加备注,单个端口、多个端口、连续端口及所有端口,协议支持:TCP、UDP、ICMP、GRE 协议。Services与ServicesExtra必填其一。
ServicesExtra []*ServicesInfo `json:"ServicesExtra,omitnil,omitempty" name:"ServicesExtra"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
type CreateServiceTemplateRequest struct {
@@ -6396,6 +6685,9 @@ type CreateServiceTemplateRequest struct {
// 支持添加备注,单个端口、多个端口、连续端口及所有端口,协议支持:TCP、UDP、ICMP、GRE 协议。Services与ServicesExtra必填其一。
ServicesExtra []*ServicesInfo `json:"ServicesExtra,omitnil,omitempty" name:"ServicesExtra"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
func (r *CreateServiceTemplateRequest) ToJsonString() string {
@@ -6413,6 +6705,7 @@ func (r *CreateServiceTemplateRequest) FromJsonString(s string) error {
delete(f, "ServiceTemplateName")
delete(f, "Services")
delete(f, "ServicesExtra")
+ delete(f, "Tags")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateServiceTemplateRequest has unknown keys!", "")
}
@@ -6448,6 +6741,9 @@ func (r *CreateServiceTemplateResponse) FromJsonString(s string) error {
type CreateSnapshotPoliciesRequestParams struct {
// 快照策略详情。
SnapshotPolicies []*SnapshotPolicy `json:"SnapshotPolicies,omitnil,omitempty" name:"SnapshotPolicies"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
type CreateSnapshotPoliciesRequest struct {
@@ -6455,6 +6751,9 @@ type CreateSnapshotPoliciesRequest struct {
// 快照策略详情。
SnapshotPolicies []*SnapshotPolicy `json:"SnapshotPolicies,omitnil,omitempty" name:"SnapshotPolicies"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
func (r *CreateSnapshotPoliciesRequest) ToJsonString() string {
@@ -6470,6 +6769,7 @@ func (r *CreateSnapshotPoliciesRequest) FromJsonString(s string) error {
return err
}
delete(f, "SnapshotPolicies")
+ delete(f, "Tags")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSnapshotPoliciesRequest has unknown keys!", "")
}
@@ -6881,6 +7181,9 @@ type CreateVpcEndPointServiceRequestParams struct {
// 挂载的PAAS服务类型,CLB,CDB,CRS,不填默认挂载为CLB。
ServiceType *string `json:"ServiceType,omitnil,omitempty" name:"ServiceType"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
type CreateVpcEndPointServiceRequest struct {
@@ -6903,6 +7206,9 @@ type CreateVpcEndPointServiceRequest struct {
// 挂载的PAAS服务类型,CLB,CDB,CRS,不填默认挂载为CLB。
ServiceType *string `json:"ServiceType,omitnil,omitempty" name:"ServiceType"`
+
+ // 指定绑定的标签列表,例如:[{"Key": "city", "Value": "shanghai"}]。
+ Tags []*Tag `json:"Tags,omitnil,omitempty" name:"Tags"`
}
func (r *CreateVpcEndPointServiceRequest) ToJsonString() string {
@@ -6923,6 +7229,7 @@ func (r *CreateVpcEndPointServiceRequest) FromJsonString(s string) error {
delete(f, "ServiceInstanceId")
delete(f, "IsPassService")
delete(f, "ServiceType")
+ delete(f, "Tags")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateVpcEndPointServiceRequest has unknown keys!", "")
}
@@ -14055,94 +14362,222 @@ func (r *DescribeHighPriorityRoutesResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type DescribeIp6AddressesRequestParams struct {
- // 标识 IPV6 的唯一 ID 列表。IPV6 唯一 ID 形如:`eip-11112222`。参数不支持同时指定`Ip6AddressIds`和`Filters`。
- Ip6AddressIds []*string `json:"Ip6AddressIds,omitnil,omitempty" name:"Ip6AddressIds"`
+type DescribeIPv6AddressesRequestParams struct {
+ // 标识 IPv6 的唯一 ID 列。
+ //
+ // - 传统弹性公网 IPv6 唯一 ID 形如:`eip-11112222`
+ // - 弹性公网 IPv6 唯一 ID 形如:`eipv6-11112222`
+ //
+ // 注意:参数不支持同时指定`IPv6AddressIds`和`Filters`。
+ IPv6AddressIds []*string `json:"IPv6AddressIds,omitnil,omitempty" name:"IPv6AddressIds"`
- // 每次请求的`Filters`的上限为10,`Filter.Values`的上限为100。参数不支持同时指定`AddressIds`和`Filters`。详细的过滤条件如下:
- //