Skip to content

Commit 253e8f7

Browse files
publish jdcloud-sdk-go version 0.10.47
1 parent e78c4c2 commit 253e8f7

4 files changed

Lines changed: 256 additions & 2 deletions

File tree

services/cdn/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# 更新历史 #
2-
API版本:0.10.46
2+
API版本:0.10.47
33

44

55

66

77
| 发布时间 | 版本号 | 更新 | 说明 |
88
| ---------- | ------ | ---------------------------------------------------------- | ---- |
9+
| 2024-05-09 | 0.10.47 |新增回源IP类型查询及配置接口|
910
| 2023-05-06 | 0.10.46 |新增generateDomainTxt接口解决原有接口java sdk格式兼容问题,domainTxtGenerate仅对内使用|
1011
| 2023-04-06 | 0.10.45 |domainTxtGenerate、domainTxtValidate txt生成及校验接口对外开放|
1112
| 2023-02-22 | 0.10.44 |增加域名海外CF状态信息|
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// Copyright 2018 JDCLOUD.COM
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// NOTE: This class is auto generated by the jdcloud code generator program.
16+
17+
package apis
18+
19+
import (
20+
"github.com/jdcloud-api/jdcloud-sdk-go/core"
21+
)
22+
23+
type ConfigBackSourceIpVersionRequest struct {
24+
25+
core.JDCloudRequest
26+
27+
/* 用户域名 */
28+
Domain string `json:"domain"`
29+
30+
/* 回源IP类型,取值ipv4/ipv6/ipv46。ipv4:回源IP为ipv4;ipv6:ipv6优先;ipv46:ipv4/ipv6负载均衡 (Optional) */
31+
BackSourceIpVersion *string `json:"backSourceIpVersion"`
32+
}
33+
34+
/*
35+
* param domain: 用户域名 (Required)
36+
*
37+
* @Deprecated, not compatible when mandatory parameters changed
38+
*/
39+
func NewConfigBackSourceIpVersionRequest(
40+
domain string,
41+
) *ConfigBackSourceIpVersionRequest {
42+
43+
return &ConfigBackSourceIpVersionRequest{
44+
JDCloudRequest: core.JDCloudRequest{
45+
URL: "/domain/{domain}/configBackSourceIpVersion",
46+
Method: "POST",
47+
Header: nil,
48+
Version: "v1",
49+
},
50+
Domain: domain,
51+
}
52+
}
53+
54+
/*
55+
* param domain: 用户域名 (Required)
56+
* param backSourceIpVersion: 回源IP类型,取值ipv4/ipv6/ipv46。ipv4:回源IP为ipv4;ipv6:ipv6优先;ipv46:ipv4/ipv6负载均衡 (Optional)
57+
*/
58+
func NewConfigBackSourceIpVersionRequestWithAllParams(
59+
domain string,
60+
backSourceIpVersion *string,
61+
) *ConfigBackSourceIpVersionRequest {
62+
63+
return &ConfigBackSourceIpVersionRequest{
64+
JDCloudRequest: core.JDCloudRequest{
65+
URL: "/domain/{domain}/configBackSourceIpVersion",
66+
Method: "POST",
67+
Header: nil,
68+
Version: "v1",
69+
},
70+
Domain: domain,
71+
BackSourceIpVersion: backSourceIpVersion,
72+
}
73+
}
74+
75+
/* This constructor has better compatible ability when API parameters changed */
76+
func NewConfigBackSourceIpVersionRequestWithoutParam() *ConfigBackSourceIpVersionRequest {
77+
78+
return &ConfigBackSourceIpVersionRequest{
79+
JDCloudRequest: core.JDCloudRequest{
80+
URL: "/domain/{domain}/configBackSourceIpVersion",
81+
Method: "POST",
82+
Header: nil,
83+
Version: "v1",
84+
},
85+
}
86+
}
87+
88+
/* param domain: 用户域名(Required) */
89+
func (r *ConfigBackSourceIpVersionRequest) SetDomain(domain string) {
90+
r.Domain = domain
91+
}
92+
/* param backSourceIpVersion: 回源IP类型,取值ipv4/ipv6/ipv46。ipv4:回源IP为ipv4;ipv6:ipv6优先;ipv46:ipv4/ipv6负载均衡(Optional) */
93+
func (r *ConfigBackSourceIpVersionRequest) SetBackSourceIpVersion(backSourceIpVersion string) {
94+
r.BackSourceIpVersion = &backSourceIpVersion
95+
}
96+
97+
98+
// GetRegionId returns path parameter 'regionId' if exist,
99+
// otherwise return empty string
100+
func (r ConfigBackSourceIpVersionRequest) GetRegionId() string {
101+
return ""
102+
}
103+
104+
type ConfigBackSourceIpVersionResponse struct {
105+
RequestID string `json:"requestId"`
106+
Error core.ErrorResponse `json:"error"`
107+
Result ConfigBackSourceIpVersionResult `json:"result"`
108+
}
109+
110+
type ConfigBackSourceIpVersionResult struct {
111+
}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
// Copyright 2018 JDCLOUD.COM
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// NOTE: This class is auto generated by the jdcloud code generator program.
16+
17+
package apis
18+
19+
import (
20+
"github.com/jdcloud-api/jdcloud-sdk-go/core"
21+
)
22+
23+
type QueryBackSourceIpVersionRequest struct {
24+
25+
core.JDCloudRequest
26+
27+
/* 用户域名 */
28+
Domain string `json:"domain"`
29+
}
30+
31+
/*
32+
* param domain: 用户域名 (Required)
33+
*
34+
* @Deprecated, not compatible when mandatory parameters changed
35+
*/
36+
func NewQueryBackSourceIpVersionRequest(
37+
domain string,
38+
) *QueryBackSourceIpVersionRequest {
39+
40+
return &QueryBackSourceIpVersionRequest{
41+
JDCloudRequest: core.JDCloudRequest{
42+
URL: "/domain/{domain}/queryBackSourceIpVersion",
43+
Method: "GET",
44+
Header: nil,
45+
Version: "v1",
46+
},
47+
Domain: domain,
48+
}
49+
}
50+
51+
/*
52+
* param domain: 用户域名 (Required)
53+
*/
54+
func NewQueryBackSourceIpVersionRequestWithAllParams(
55+
domain string,
56+
) *QueryBackSourceIpVersionRequest {
57+
58+
return &QueryBackSourceIpVersionRequest{
59+
JDCloudRequest: core.JDCloudRequest{
60+
URL: "/domain/{domain}/queryBackSourceIpVersion",
61+
Method: "GET",
62+
Header: nil,
63+
Version: "v1",
64+
},
65+
Domain: domain,
66+
}
67+
}
68+
69+
/* This constructor has better compatible ability when API parameters changed */
70+
func NewQueryBackSourceIpVersionRequestWithoutParam() *QueryBackSourceIpVersionRequest {
71+
72+
return &QueryBackSourceIpVersionRequest{
73+
JDCloudRequest: core.JDCloudRequest{
74+
URL: "/domain/{domain}/queryBackSourceIpVersion",
75+
Method: "GET",
76+
Header: nil,
77+
Version: "v1",
78+
},
79+
}
80+
}
81+
82+
/* param domain: 用户域名(Required) */
83+
func (r *QueryBackSourceIpVersionRequest) SetDomain(domain string) {
84+
r.Domain = domain
85+
}
86+
87+
88+
// GetRegionId returns path parameter 'regionId' if exist,
89+
// otherwise return empty string
90+
func (r QueryBackSourceIpVersionRequest) GetRegionId() string {
91+
return ""
92+
}
93+
94+
type QueryBackSourceIpVersionResponse struct {
95+
RequestID string `json:"requestId"`
96+
Error core.ErrorResponse `json:"error"`
97+
Result QueryBackSourceIpVersionResult `json:"result"`
98+
}
99+
100+
type QueryBackSourceIpVersionResult struct {
101+
BackSourceIpVersion string `json:"backSourceIpVersion"`
102+
}

services/cdn/client/CdnClient.go

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewCdnClient(credential *core.Credential) *CdnClient {
4040
Credential: *credential,
4141
Config: *config,
4242
ServiceName: "cdn",
43-
Revision: "0.10.46",
43+
Revision: "0.10.47",
4444
Logger: core.NewDefaultLogger(core.LogInfo),
4545
}}
4646
}
@@ -3637,6 +3637,26 @@ func (c *CdnClient) QueryDefaultHttpHeaderKey(request *cdn.QueryDefaultHttpHeade
36373637
return jdResp, err
36383638
}
36393639

3640+
/* 查询回源IP类型 */
3641+
func (c *CdnClient) QueryBackSourceIpVersion(request *cdn.QueryBackSourceIpVersionRequest) (*cdn.QueryBackSourceIpVersionResponse, error) {
3642+
if request == nil {
3643+
return nil, errors.New("Request object is nil. ")
3644+
}
3645+
resp, err := c.Send(request, c.ServiceName)
3646+
if err != nil {
3647+
return nil, err
3648+
}
3649+
3650+
jdResp := &cdn.QueryBackSourceIpVersionResponse{}
3651+
err = json.Unmarshal(resp, jdResp)
3652+
if err != nil {
3653+
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
3654+
return nil, err
3655+
}
3656+
3657+
return jdResp, err
3658+
}
3659+
36403660
/* 回源鉴权设置 */
36413661
func (c *CdnClient) SetSourceAuthConfig(request *cdn.SetSourceAuthConfigRequest) (*cdn.SetSourceAuthConfigResponse, error) {
36423662
if request == nil {
@@ -3797,6 +3817,26 @@ func (c *CdnClient) QueryDomainsNotInGroup(request *cdn.QueryDomainsNotInGroupRe
37973817
return jdResp, err
37983818
}
37993819

3820+
/* 设置回源IP类型 */
3821+
func (c *CdnClient) ConfigBackSourceIpVersion(request *cdn.ConfigBackSourceIpVersionRequest) (*cdn.ConfigBackSourceIpVersionResponse, error) {
3822+
if request == nil {
3823+
return nil, errors.New("Request object is nil. ")
3824+
}
3825+
resp, err := c.Send(request, c.ServiceName)
3826+
if err != nil {
3827+
return nil, err
3828+
}
3829+
3830+
jdResp := &cdn.ConfigBackSourceIpVersionResponse{}
3831+
err = json.Unmarshal(resp, jdResp)
3832+
if err != nil {
3833+
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
3834+
return nil, err
3835+
}
3836+
3837+
return jdResp, err
3838+
}
3839+
38003840
/* 查看证书详情 */
38013841
func (c *CdnClient) GetSslCertDetail(request *cdn.GetSslCertDetailRequest) (*cdn.GetSslCertDetailResponse, error) {
38023842
if request == nil {

0 commit comments

Comments
 (0)