Skip to content

Commit 38ae799

Browse files
Merge pull request #183 from jdcloud-apigateway/master
update dms tidb bastion
2 parents 15d8010 + 93432a5 commit 38ae799

149 files changed

Lines changed: 8203 additions & 1114 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

services/bastion/ChangeLog.md

Whitespace-only changes.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
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+
bastion "github.com/jdcloud-api/jdcloud-sdk-go/services/bastion/models"
22+
charge "github.com/jdcloud-api/jdcloud-sdk-go/services/charge/models"
23+
)
24+
25+
type CreateInstanceRequest struct {
26+
27+
core.JDCloudRequest
28+
29+
/* regionId */
30+
RegionId string `json:"regionId"`
31+
32+
/* 实例的相关配置 */
33+
InstanceSpec *bastion.InstanceSpec `json:"instanceSpec"`
34+
35+
/* 计费信息的相关配置 (Optional) */
36+
ChargeSpec *charge.ChargeSpec `json:"chargeSpec"`
37+
}
38+
39+
/*
40+
* param regionId: regionId (Required)
41+
* param instanceSpec: 实例的相关配置 (Required)
42+
*
43+
* @Deprecated, not compatible when mandatory parameters changed
44+
*/
45+
func NewCreateInstanceRequest(
46+
regionId string,
47+
instanceSpec *bastion.InstanceSpec,
48+
) *CreateInstanceRequest {
49+
50+
return &CreateInstanceRequest{
51+
JDCloudRequest: core.JDCloudRequest{
52+
URL: "/regions/{regionId}/instances",
53+
Method: "POST",
54+
Header: nil,
55+
Version: "v1",
56+
},
57+
RegionId: regionId,
58+
InstanceSpec: instanceSpec,
59+
}
60+
}
61+
62+
/*
63+
* param regionId: regionId (Required)
64+
* param instanceSpec: 实例的相关配置 (Required)
65+
* param chargeSpec: 计费信息的相关配置 (Optional)
66+
*/
67+
func NewCreateInstanceRequestWithAllParams(
68+
regionId string,
69+
instanceSpec *bastion.InstanceSpec,
70+
chargeSpec *charge.ChargeSpec,
71+
) *CreateInstanceRequest {
72+
73+
return &CreateInstanceRequest{
74+
JDCloudRequest: core.JDCloudRequest{
75+
URL: "/regions/{regionId}/instances",
76+
Method: "POST",
77+
Header: nil,
78+
Version: "v1",
79+
},
80+
RegionId: regionId,
81+
InstanceSpec: instanceSpec,
82+
ChargeSpec: chargeSpec,
83+
}
84+
}
85+
86+
/* This constructor has better compatible ability when API parameters changed */
87+
func NewCreateInstanceRequestWithoutParam() *CreateInstanceRequest {
88+
89+
return &CreateInstanceRequest{
90+
JDCloudRequest: core.JDCloudRequest{
91+
URL: "/regions/{regionId}/instances",
92+
Method: "POST",
93+
Header: nil,
94+
Version: "v1",
95+
},
96+
}
97+
}
98+
99+
/* param regionId: regionId(Required) */
100+
func (r *CreateInstanceRequest) SetRegionId(regionId string) {
101+
r.RegionId = regionId
102+
}
103+
/* param instanceSpec: 实例的相关配置(Required) */
104+
func (r *CreateInstanceRequest) SetInstanceSpec(instanceSpec *bastion.InstanceSpec) {
105+
r.InstanceSpec = instanceSpec
106+
}
107+
/* param chargeSpec: 计费信息的相关配置(Optional) */
108+
func (r *CreateInstanceRequest) SetChargeSpec(chargeSpec *charge.ChargeSpec) {
109+
r.ChargeSpec = chargeSpec
110+
}
111+
112+
113+
// GetRegionId returns path parameter 'regionId' if exist,
114+
// otherwise return empty string
115+
func (r CreateInstanceRequest) GetRegionId() string {
116+
return r.RegionId
117+
}
118+
119+
type CreateInstanceResponse struct {
120+
RequestID string `json:"requestId"`
121+
Error core.ErrorResponse `json:"error"`
122+
Result CreateInstanceResult `json:"result"`
123+
}
124+
125+
type CreateInstanceResult struct {
126+
BuyId string `json:"buyId"`
127+
SourceIds []bastion.Source `json:"sourceIds"`
128+
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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 DeleteInstanceRequest struct {
24+
25+
core.JDCloudRequest
26+
27+
/* 地域ID */
28+
RegionId string `json:"regionId"`
29+
30+
/* 堡垒机id */
31+
InstanceId string `json:"instanceId"`
32+
}
33+
34+
/*
35+
* param regionId: 地域ID (Required)
36+
* param instanceId: 堡垒机id (Required)
37+
*
38+
* @Deprecated, not compatible when mandatory parameters changed
39+
*/
40+
func NewDeleteInstanceRequest(
41+
regionId string,
42+
instanceId string,
43+
) *DeleteInstanceRequest {
44+
45+
return &DeleteInstanceRequest{
46+
JDCloudRequest: core.JDCloudRequest{
47+
URL: "/regions/{regionId}/instance/{instanceId}",
48+
Method: "DELETE",
49+
Header: nil,
50+
Version: "v1",
51+
},
52+
RegionId: regionId,
53+
InstanceId: instanceId,
54+
}
55+
}
56+
57+
/*
58+
* param regionId: 地域ID (Required)
59+
* param instanceId: 堡垒机id (Required)
60+
*/
61+
func NewDeleteInstanceRequestWithAllParams(
62+
regionId string,
63+
instanceId string,
64+
) *DeleteInstanceRequest {
65+
66+
return &DeleteInstanceRequest{
67+
JDCloudRequest: core.JDCloudRequest{
68+
URL: "/regions/{regionId}/instance/{instanceId}",
69+
Method: "DELETE",
70+
Header: nil,
71+
Version: "v1",
72+
},
73+
RegionId: regionId,
74+
InstanceId: instanceId,
75+
}
76+
}
77+
78+
/* This constructor has better compatible ability when API parameters changed */
79+
func NewDeleteInstanceRequestWithoutParam() *DeleteInstanceRequest {
80+
81+
return &DeleteInstanceRequest{
82+
JDCloudRequest: core.JDCloudRequest{
83+
URL: "/regions/{regionId}/instance/{instanceId}",
84+
Method: "DELETE",
85+
Header: nil,
86+
Version: "v1",
87+
},
88+
}
89+
}
90+
91+
/* param regionId: 地域ID(Required) */
92+
func (r *DeleteInstanceRequest) SetRegionId(regionId string) {
93+
r.RegionId = regionId
94+
}
95+
/* param instanceId: 堡垒机id(Required) */
96+
func (r *DeleteInstanceRequest) SetInstanceId(instanceId string) {
97+
r.InstanceId = instanceId
98+
}
99+
100+
101+
// GetRegionId returns path parameter 'regionId' if exist,
102+
// otherwise return empty string
103+
func (r DeleteInstanceRequest) GetRegionId() string {
104+
return r.RegionId
105+
}
106+
107+
type DeleteInstanceResponse struct {
108+
RequestID string `json:"requestId"`
109+
Error core.ErrorResponse `json:"error"`
110+
Result DeleteInstanceResult `json:"result"`
111+
}
112+
113+
type DeleteInstanceResult struct {
114+
Result bool `json:"result"`
115+
}
Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,83 +18,99 @@ package apis
1818

1919
import (
2020
"github.com/jdcloud-api/jdcloud-sdk-go/core"
21+
bastion "github.com/jdcloud-api/jdcloud-sdk-go/services/bastion/models"
2122
)
2223

23-
type DownloadExportFileRequest struct {
24+
type DescribeBastionRequest struct {
2425

2526
core.JDCloudRequest
2627

27-
/* 文件下载id */
28-
ExportId string `json:"exportId"`
28+
/* 地域ID */
29+
RegionId string `json:"regionId"`
30+
31+
/* 堡垒机id */
32+
Bid string `json:"bid"`
2933
}
3034

3135
/*
32-
* param exportId: 文件下载id (Required)
36+
* param regionId: 地域ID (Required)
37+
* param bid: 堡垒机id (Required)
3338
*
3439
* @Deprecated, not compatible when mandatory parameters changed
3540
*/
36-
func NewDownloadExportFileRequest(
37-
exportId string,
38-
) *DownloadExportFileRequest {
41+
func NewDescribeBastionRequest(
42+
regionId string,
43+
bid string,
44+
) *DescribeBastionRequest {
3945

40-
return &DownloadExportFileRequest{
46+
return &DescribeBastionRequest{
4147
JDCloudRequest: core.JDCloudRequest{
42-
URL: "/console:downloadExportFile",
48+
URL: "/regions/{regionId}/bastion/{bid}",
4349
Method: "GET",
4450
Header: nil,
4551
Version: "v1",
4652
},
47-
ExportId: exportId,
53+
RegionId: regionId,
54+
Bid: bid,
4855
}
4956
}
5057

5158
/*
52-
* param exportId: 文件下载id (Required)
59+
* param regionId: 地域ID (Required)
60+
* param bid: 堡垒机id (Required)
5361
*/
54-
func NewDownloadExportFileRequestWithAllParams(
55-
exportId string,
56-
) *DownloadExportFileRequest {
62+
func NewDescribeBastionRequestWithAllParams(
63+
regionId string,
64+
bid string,
65+
) *DescribeBastionRequest {
5766

58-
return &DownloadExportFileRequest{
67+
return &DescribeBastionRequest{
5968
JDCloudRequest: core.JDCloudRequest{
60-
URL: "/console:downloadExportFile",
69+
URL: "/regions/{regionId}/bastion/{bid}",
6170
Method: "GET",
6271
Header: nil,
6372
Version: "v1",
6473
},
65-
ExportId: exportId,
74+
RegionId: regionId,
75+
Bid: bid,
6676
}
6777
}
6878

6979
/* This constructor has better compatible ability when API parameters changed */
70-
func NewDownloadExportFileRequestWithoutParam() *DownloadExportFileRequest {
80+
func NewDescribeBastionRequestWithoutParam() *DescribeBastionRequest {
7181

72-
return &DownloadExportFileRequest{
82+
return &DescribeBastionRequest{
7383
JDCloudRequest: core.JDCloudRequest{
74-
URL: "/console:downloadExportFile",
84+
URL: "/regions/{regionId}/bastion/{bid}",
7585
Method: "GET",
7686
Header: nil,
7787
Version: "v1",
7888
},
7989
}
8090
}
8191

82-
/* param exportId: 文件下载id(Required) */
83-
func (r *DownloadExportFileRequest) SetExportId(exportId string) {
84-
r.ExportId = exportId
92+
/* param regionId: 地域ID(Required) */
93+
func (r *DescribeBastionRequest) SetRegionId(regionId string) {
94+
r.RegionId = regionId
95+
}
96+
/* param bid: 堡垒机id(Required) */
97+
func (r *DescribeBastionRequest) SetBid(bid string) {
98+
r.Bid = bid
8599
}
86100

101+
87102
// GetRegionId returns path parameter 'regionId' if exist,
88103
// otherwise return empty string
89-
func (r DownloadExportFileRequest) GetRegionId() string {
90-
return ""
104+
func (r DescribeBastionRequest) GetRegionId() string {
105+
return r.RegionId
91106
}
92107

93-
type DownloadExportFileResponse struct {
108+
type DescribeBastionResponse struct {
94109
RequestID string `json:"requestId"`
95110
Error core.ErrorResponse `json:"error"`
96-
Result DownloadExportFileResult `json:"result"`
111+
Result DescribeBastionResult `json:"result"`
97112
}
98113

99-
type DownloadExportFileResult struct {
114+
type DescribeBastionResult struct {
115+
Bastion bastion.Bastion `json:"bastion"`
100116
}

0 commit comments

Comments
 (0)