diff --git a/.changelog/3538.txt b/.changelog/3538.txt new file mode 100644 index 0000000000..58596c036d --- /dev/null +++ b/.changelog/3538.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_teo_l7_acc_rule_v2: support `origin_pull_protocol_parameters` fields +``` diff --git a/go.mod b/go.mod index 8591299bc9..9a419e929f 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1107 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.1033 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.1148 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.35 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.36 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1206 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.1161 @@ -90,7 +90,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdcpg v1.0.533 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.0.955 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.1.27 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.1.36 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.1.0 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857 diff --git a/go.sum b/go.sum index d5e51b0454..50f42ddcd8 100644 --- a/go.sum +++ b/go.sum @@ -941,21 +941,22 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.5/go.mod h1 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.7/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.13/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.14/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.27/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.30 h1:zUdoyFU3E5IuCMsH6joN+8mMNEh+C/x+BBxN5j59JPg= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.30/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.31 h1:PKa4c2BLYbW5LUOWGNXt20+rV9L8JnLqBXZjnOXsHKQ= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.31/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.27 h1:FG3AiNSNW5tG+mtTSE+dBc5ZhHwlYUW0Z6oSkfAWV0A= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.27/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.22 h1:1unTmvNXynDN0mOZSWh9tL5Wp9Rb5paMGwFvua+HHoI= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.22/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.23 h1:YZOxepoaH/yNaD1sYpCXR6PuFd22hbKdlXAGXWre8aM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.23/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.25 h1:bTN1RYwKti9GX4qdI/yd+ybh0QY/BkoGSG+wgArS0L8= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.25/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.27 h1:FG3AiNSNW5tG+mtTSE+dBc5ZhHwlYUW0Z6oSkfAWV0A= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.27/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.30 h1:zUdoyFU3E5IuCMsH6joN+8mMNEh+C/x+BBxN5j59JPg= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.30/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.31 h1:PKa4c2BLYbW5LUOWGNXt20+rV9L8JnLqBXZjnOXsHKQ= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.31/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.35 h1:gcnqnP30UeTFn1Jm1yMiAOlX7x1r12KAQ3cNIQTg/Gc= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.35/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.36 h1:9zBwuj7prOhpObcw8idPnTn78TbNeK2RfAYoUaB6O/o= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.36/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= @@ -1067,6 +1068,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578 h1:vBpQhUr github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578/go.mod h1:UlojGQh/9wb7/uXPNi7PvMral1CNAskVDNgqJEV83l0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.1.27 h1:vcQitUadhSZi40x1cscUvNHId4Un2xnQFIE2IxvZU70= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.1.27/go.mod h1:2+6+xYfcJa8mO8tMljGjGCvhluPGjhRhlIv1jZK6y6c= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.1.36 h1:BTtKtN6YumpmOinUGQQI0o51VHucvszxbV7NRzeNUFs= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.1.36/go.mod h1:eGP3bdq20leDIC2Wrv+EpDDNRxHnGI16jPr6uRZvwDE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/thpc v1.0.998 h1:f4/n0dVKQTD06xJ84B5asHViNJHrZmGojdAWEPIsITM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/thpc v1.0.998/go.mod h1:fyi/HUwCwVe2NCCCjz8k/C5GwPu3QazCZO+OBJ3MhLk= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.1.14 h1:Us7MGqMmPdyAQL5jSQPuS4t3Yq5rbVdLP+/rtgEJnRs= diff --git a/tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_extension.go b/tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_extension.go index 5b2384279c..5d7ce448e0 100644 --- a/tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_extension.go +++ b/tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_extension.go @@ -566,6 +566,21 @@ func TencentTeoL7RuleBranchBasicInfo(depth int) map[string]*schema.Schema { }, }, }, + "origin_pull_protocol_parameters": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Description: "Back-to-origin HTTPS configuration parameter. This parameter is required when the Name value is `OriginPullProtocol`.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "protocol": { + Type: schema.TypeString, + Optional: true, + Description: "Back-to-origin protocol configuration. Possible values are: `http`: use HTTP protocol for back-to-origin; `https`: use HTTPS protocol for back-to-origin; `follow`: follow the protocol.", + }, + }, + }, + }, "compression_parameters": { Type: schema.TypeList, Optional: true, @@ -1396,6 +1411,13 @@ func resourceTencentCloudTeoL7AccRuleGetBranchs(rulesMap map[string]interface{}) } ruleEngineAction.ForceRedirectHTTPSParameters = &forceRedirectHTTPSParameters } + if originPullProtocolParametersMap, ok := helper.ConvertInterfacesHeadToMap(actionsMap["origin_pull_protocol_parameters"]); ok { + originPullProtocolParameters := teov20220901.OriginPullProtocolParameters{} + if v, ok := originPullProtocolParametersMap["protocol"].(string); ok && v != "" { + originPullProtocolParameters.Protocol = helper.String(v) + } + ruleEngineAction.OriginPullProtocolParameters = &originPullProtocolParameters + } if compressionParametersMap, ok := helper.ConvertInterfacesHeadToMap(actionsMap["compression_parameters"]); ok { compressionParameters := teov20220901.CompressionParameters{} if v, ok := compressionParametersMap["switch"].(string); ok && v != "" { @@ -2088,6 +2110,16 @@ func resourceTencentCloudTeoL7AccRuleSetBranchs(ruleBranches []*teo.RuleBranch) actionsMap["force_redirect_https_parameters"] = []interface{}{forceRedirectHTTPSParametersMap} } + originPullProtocolParametersMap := map[string]interface{}{} + + if actions.OriginPullProtocolParameters != nil { + if actions.OriginPullProtocolParameters.Protocol != nil { + originPullProtocolParametersMap["protocol"] = actions.OriginPullProtocolParameters.Protocol + } + + actionsMap["origin_pull_protocol_parameters"] = []interface{}{originPullProtocolParametersMap} + } + compressionParametersMap := map[string]interface{}{} if actions.CompressionParameters != nil { diff --git a/tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_v2_test.go b/tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_v2_test.go index a3e5988e5e..5105b77d20 100644 --- a/tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_v2_test.go +++ b/tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_v2_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudTeoL7AccRuleV2Resource_basic(t *testing.T) { Config: testAccTeoL7V2AccRule, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "id"), - resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "zone_id", "zone-39quuimqg8r6"), + resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "zone_id", "zone-3fkff38fyw8s"), resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "description.#", "1"), resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "rule_name", "网站加速1"), resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "status", "enable"), @@ -63,9 +63,11 @@ func TestAccTencentCloudTeoL7AccRuleV2Resource_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "description.0", "2"), resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "rule_name", "网站加速2"), - resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "branches.0.actions.#", "1"), + resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "branches.0.actions.#", "2"), resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "branches.0.sub_rules.#", "1"), - resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "branches.0.sub_rules.0.description.0", "01-1"), + resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "branches.0.actions.1.name", "OriginPullProtocol"), + resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "branches.0.actions.1.origin_pull_protocol_parameters.#", "1"), + resource.TestCheckResourceAttr("tencentcloud_teo_l7_acc_rule_v2.teo_l7_acc_rule_v2", "branches.0.actions.1.origin_pull_protocol_parameters.0.protocol", "https"), ), }, { @@ -79,7 +81,7 @@ func TestAccTencentCloudTeoL7AccRuleV2Resource_basic(t *testing.T) { const testAccTeoL7V2AccRule = ` resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" { - zone_id = "zone-39quuimqg8r6" + zone_id = "zone-3fkff38fyw8s" description = ["1"] rule_name = "网站加速1" status = "enable" @@ -142,7 +144,7 @@ resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" { const testAccTeoL7V2AccRuleUpdate = ` resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" { - zone_id = "zone-39quuimqg8r6" + zone_id = "zone-3fkff38fyw8s" description = ["2"] rule_name = "网站加速2" status = "enable" @@ -158,6 +160,12 @@ resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" { } } } + actions { + name = "OriginPullProtocol" + origin_pull_protocol_parameters { + protocol = "https" + } + } sub_rules { description = ["01-1"] 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 44211e6b93..a95a7a13e9 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 @@ -265,7 +265,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.1.35" + params["RequestClient"] = "SDK_GO_1.1.36" if requestClient != "" { params["RequestClient"] += ": " + requestClient } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go index 0f564298fb..416b5cb4ec 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go @@ -279,6 +279,64 @@ func (c *Client) CheckCnameStatusWithContext(ctx context.Context, request *Check return } +func NewConfirmMultiPathGatewayOriginACLRequest() (request *ConfirmMultiPathGatewayOriginACLRequest) { + request = &ConfirmMultiPathGatewayOriginACLRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("teo", APIVersion, "ConfirmMultiPathGatewayOriginACL") + + + return +} + +func NewConfirmMultiPathGatewayOriginACLResponse() (response *ConfirmMultiPathGatewayOriginACLResponse) { + response = &ConfirmMultiPathGatewayOriginACLResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ConfirmMultiPathGatewayOriginACL +// 本接口用于多通道安全加速网关回源 IP 网段发生变更时,确认已将最新回源 IP 网段更新至源站防火墙。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown" +func (c *Client) ConfirmMultiPathGatewayOriginACL(request *ConfirmMultiPathGatewayOriginACLRequest) (response *ConfirmMultiPathGatewayOriginACLResponse, err error) { + return c.ConfirmMultiPathGatewayOriginACLWithContext(context.Background(), request) +} + +// ConfirmMultiPathGatewayOriginACL +// 本接口用于多通道安全加速网关回源 IP 网段发生变更时,确认已将最新回源 IP 网段更新至源站防火墙。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown" +func (c *Client) ConfirmMultiPathGatewayOriginACLWithContext(ctx context.Context, request *ConfirmMultiPathGatewayOriginACLRequest) (response *ConfirmMultiPathGatewayOriginACLResponse, err error) { + if request == nil { + request = NewConfirmMultiPathGatewayOriginACLRequest() + } + c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "ConfirmMultiPathGatewayOriginACL") + + if c.GetCredential() == nil { + return nil, errors.New("ConfirmMultiPathGatewayOriginACL require credential") + } + + request.SetContext(ctx) + + response = NewConfirmMultiPathGatewayOriginACLResponse() + err = c.Send(request, response) + return +} + func NewConfirmOriginACLUpdateRequest() (request *ConfirmOriginACLUpdateRequest) { request = &ConfirmOriginACLUpdateRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -7331,6 +7389,64 @@ func (c *Client) DescribeMultiPathGatewayLineWithContext(ctx context.Context, re return } +func NewDescribeMultiPathGatewayOriginACLRequest() (request *DescribeMultiPathGatewayOriginACLRequest) { + request = &DescribeMultiPathGatewayOriginACLRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("teo", APIVersion, "DescribeMultiPathGatewayOriginACL") + + + return +} + +func NewDescribeMultiPathGatewayOriginACLResponse() (response *DescribeMultiPathGatewayOriginACLResponse) { + response = &DescribeMultiPathGatewayOriginACLResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeMultiPathGatewayOriginACL +// 本接口用于查询多通道安全加速网关实例与回源 IP 网段的绑定关系,以及回源 IP 网段详情。若 MultiPathGatewayNextOriginACL 字段有返回值,则需要将最新的回源 IP 网段同步到源站防火墙配置中。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown" +func (c *Client) DescribeMultiPathGatewayOriginACL(request *DescribeMultiPathGatewayOriginACLRequest) (response *DescribeMultiPathGatewayOriginACLResponse, err error) { + return c.DescribeMultiPathGatewayOriginACLWithContext(context.Background(), request) +} + +// DescribeMultiPathGatewayOriginACL +// 本接口用于查询多通道安全加速网关实例与回源 IP 网段的绑定关系,以及回源 IP 网段详情。若 MultiPathGatewayNextOriginACL 字段有返回值,则需要将最新的回源 IP 网段同步到源站防火墙配置中。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized" +// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission" +// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown" +func (c *Client) DescribeMultiPathGatewayOriginACLWithContext(ctx context.Context, request *DescribeMultiPathGatewayOriginACLRequest) (response *DescribeMultiPathGatewayOriginACLResponse, err error) { + if request == nil { + request = NewDescribeMultiPathGatewayOriginACLRequest() + } + c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "DescribeMultiPathGatewayOriginACL") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeMultiPathGatewayOriginACL require credential") + } + + request.SetContext(ctx) + + response = NewDescribeMultiPathGatewayOriginACLResponse() + err = c.Send(request, response) + return +} + func NewDescribeMultiPathGatewayRegionsRequest() (request *DescribeMultiPathGatewayRegionsRequest) { request = &DescribeMultiPathGatewayRegionsRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -12057,6 +12173,64 @@ func (c *Client) ModifyMultiPathGatewaySecretKeyWithContext(ctx context.Context, return } +func NewModifyMultiPathGatewayStatusRequest() (request *ModifyMultiPathGatewayStatusRequest) { + request = &ModifyMultiPathGatewayStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("teo", APIVersion, "ModifyMultiPathGatewayStatus") + + + return +} + +func NewModifyMultiPathGatewayStatusResponse() (response *ModifyMultiPathGatewayStatusResponse) { + response = &ModifyMultiPathGatewayStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyMultiPathGatewayStatus +// 更新多通道安全网关状态。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ModifyMultiPathGatewayStatus(request *ModifyMultiPathGatewayStatusRequest) (response *ModifyMultiPathGatewayStatusResponse, err error) { + return c.ModifyMultiPathGatewayStatusWithContext(context.Background(), request) +} + +// ModifyMultiPathGatewayStatus +// 更新多通道安全网关状态。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ModifyMultiPathGatewayStatusWithContext(ctx context.Context, request *ModifyMultiPathGatewayStatusRequest) (response *ModifyMultiPathGatewayStatusResponse, err error) { + if request == nil { + request = NewModifyMultiPathGatewayStatusRequest() + } + c.InitBaseRequest(&request.BaseRequest, "teo", APIVersion, "ModifyMultiPathGatewayStatus") + + if c.GetCredential() == nil { + return nil, errors.New("ModifyMultiPathGatewayStatus require credential") + } + + request.SetContext(ctx) + + response = NewModifyMultiPathGatewayStatusResponse() + err = c.Send(request, response) + return +} + func NewModifyOriginACLRequest() (request *ModifyOriginACLRequest) { request = &ModifyOriginACLRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go index b93aae6525..a6ebca1118 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go @@ -1677,6 +1677,74 @@ type ConfigGroupVersionInfo struct { CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` } +// Predefined struct for user +type ConfirmMultiPathGatewayOriginACLRequestParams struct { + // 站点 ID。 + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` + + // 网关 ID。 + GatewayId *string `json:"GatewayId,omitnil,omitempty" name:"GatewayId"` + + // 回源 IP 版本号。 + OriginACLVersion *int64 `json:"OriginACLVersion,omitnil,omitempty" name:"OriginACLVersion"` +} + +type ConfirmMultiPathGatewayOriginACLRequest struct { + *tchttp.BaseRequest + + // 站点 ID。 + ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"` + + // 网关 ID。 + GatewayId *string `json:"GatewayId,omitnil,omitempty" name:"GatewayId"` + + // 回源 IP 版本号。 + OriginACLVersion *int64 `json:"OriginACLVersion,omitnil,omitempty" name:"OriginACLVersion"` +} + +func (r *ConfirmMultiPathGatewayOriginACLRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ConfirmMultiPathGatewayOriginACLRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ZoneId") + delete(f, "GatewayId") + delete(f, "OriginACLVersion") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ConfirmMultiPathGatewayOriginACLRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ConfirmMultiPathGatewayOriginACLResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ConfirmMultiPathGatewayOriginACLResponse struct { + *tchttp.BaseResponse + Response *ConfirmMultiPathGatewayOriginACLResponseParams `json:"Response"` +} + +func (r *ConfirmMultiPathGatewayOriginACLResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ConfirmMultiPathGatewayOriginACLResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type ConfirmOriginACLUpdateRequestParams struct { // 站点 ID。 @@ -1731,6 +1799,14 @@ func (r *ConfirmOriginACLUpdateResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type ContentCompressionParameters struct { + // 内容压缩配置开关,取值有: + //