Skip to content

Commit 6700ab3

Browse files
Merge pull request #176 from jdcloud-apigateway/master
publish jdcloud-sdk-go version 0.6.0
2 parents e5a1bdc + 7440e11 commit 6700ab3

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

services/ag/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# 更新历史 #
2-
API版本:0.5.0
2+
API版本:0.6.0
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2022-07-15|0.6.0|功能完善|修复自定义配置类型模版必传的问题|
67
|2022-07-08|0.5.0|功能完善|新增自定义配置类型|
78
|2019-05-29|0.4.0|功能完善|修正必传的参数为未设置为必传的问题|
89
|2019-05-28|0.3.0|功能完善|创建ag的资源类型修改为vm|

services/ag/apis/CreateAg.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ type CreateAgRequest struct {
3636
/* 高可用组资源类型,支持vm (Optional) */
3737
AgType *string `json:"agType"`
3838

39-
/* 实例模板的ID */
40-
InstanceTemplateId string `json:"instanceTemplateId"`
39+
/* 实例模板的ID (Optional) */
40+
InstanceTemplateId *string `json:"instanceTemplateId"`
4141

4242
/* 描述,长度不超过 256 字符 (Optional) */
4343
Description *string `json:"description"`
@@ -50,15 +50,13 @@ type CreateAgRequest struct {
5050
* param regionId: 地域 (Required)
5151
* param azs: 支持的可用区,最少一个 (Required)
5252
* param agName: 高可用组名称,只支持中文、数字、大小写字母、英文下划线 “_” 及中划线 “-”,且不能超过 32 字符 (Required)
53-
* param instanceTemplateId: 实例模板的ID (Required)
5453
*
5554
* @Deprecated, not compatible when mandatory parameters changed
5655
*/
5756
func NewCreateAgRequest(
5857
regionId string,
5958
azs []string,
6059
agName string,
61-
instanceTemplateId string,
6260
) *CreateAgRequest {
6361

6462
return &CreateAgRequest{
@@ -71,7 +69,6 @@ func NewCreateAgRequest(
7169
RegionId: regionId,
7270
Azs: azs,
7371
AgName: agName,
74-
InstanceTemplateId: instanceTemplateId,
7572
}
7673
}
7774

@@ -80,7 +77,7 @@ func NewCreateAgRequest(
8077
* param azs: 支持的可用区,最少一个 (Required)
8178
* param agName: 高可用组名称,只支持中文、数字、大小写字母、英文下划线 “_” 及中划线 “-”,且不能超过 32 字符 (Required)
8279
* param agType: 高可用组资源类型,支持vm (Optional)
83-
* param instanceTemplateId: 实例模板的ID (Required)
80+
* param instanceTemplateId: 实例模板的ID (Optional)
8481
* param description: 描述,长度不超过 256 字符 (Optional)
8582
* param configurationType: 高可用组配置类型,支持strict(关联模板型)、loose(自定义配置型) (Optional)
8683
*/
@@ -89,7 +86,7 @@ func NewCreateAgRequestWithAllParams(
8986
azs []string,
9087
agName string,
9188
agType *string,
92-
instanceTemplateId string,
89+
instanceTemplateId *string,
9390
description *string,
9491
configurationType *string,
9592
) *CreateAgRequest {
@@ -144,9 +141,9 @@ func (r *CreateAgRequest) SetAgType(agType string) {
144141
r.AgType = &agType
145142
}
146143

147-
/* param instanceTemplateId: 实例模板的ID(Required) */
144+
/* param instanceTemplateId: 实例模板的ID(Optional) */
148145
func (r *CreateAgRequest) SetInstanceTemplateId(instanceTemplateId string) {
149-
r.InstanceTemplateId = instanceTemplateId
146+
r.InstanceTemplateId = &instanceTemplateId
150147
}
151148

152149
/* param description: 描述,长度不超过 256 字符(Optional) */

services/ag/client/AgClient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewAgClient(credential *core.Credential) *AgClient {
4040
Credential: *credential,
4141
Config: *config,
4242
ServiceName: "ag",
43-
Revision: "0.5.0",
43+
Revision: "0.6.0",
4444
Logger: core.NewDefaultLogger(core.LogInfo),
4545
}}
4646
}

0 commit comments

Comments
 (0)