Skip to content

Commit

Permalink
Add mongodb services and update features in bcc, cdn, localDns
Browse files Browse the repository at this point in the history
  • Loading branch information
duanliguo committed Apr 23, 2024
1 parent 6a22118 commit 7d148c3
Show file tree
Hide file tree
Showing 25 changed files with 3,783 additions and 106 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,4 @@ SNIC服务网卡 | SNIC | github.com/baidubce/bce-sdk-go/services/endpoint
VPN网关 | VPN | github.com/baidubce/bce-sdk-go/services/vpn | [VPN.md](./doc/VPN.md)
多模态媒资检索 | MMS | github.com/baidubce/bce-sdk-go/services/mms | [MMS.md](./doc/MMS.md)
数据库专属集群 | DDC | github.com/baidubce/bce-sdk-go/services/ddc | [DDC.md](./doc/DDC.md)
资源管理 | RES_MANAGER | github.com/baidubce/bce-sdk-go/services/resmanager | [RES_MANAGER.md](./doc/RES_MANAGER.md)
2 changes: 1 addition & 1 deletion bce/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

// Constants and default values for the package bce
const (
SDK_VERSION = "0.9.176"
SDK_VERSION = "0.9.177"
URI_PREFIX = "/" // now support uri without prefix "v1" so just set root path
DEFAULT_DOMAIN = "baidubce.com"
DEFAULT_PROTOCOL = "http"
Expand Down
83 changes: 83 additions & 0 deletions doc/BCC.md
Original file line number Diff line number Diff line change
Expand Up @@ -3540,7 +3540,90 @@ if res, err := bccClient.GetStockWithSpec(args); err != nil {
fmt.Println("GetStockWithSpec failed: ", err)
} else {
fmt.Println("GetStockWithSpec success: ", res)
```
### 对预留实例券发起转移
对预留实例券发起转移(仅支持0预付的预留实例券)
```go
args := &api.TransferReservedInstanceRequest{
ReservedInstanceIds: []string{
// 预留实例券id
"r-3p89YnJf",
},
RecipientAccountId: "",
}
result, err := BCC_CLIENT.TransferReservedInstanceOrder(args)
ExpectEqual(t.Errorf, err, nil)
fmt.Println(result)
```
### 撤销预留实例券转移
撤销预留实例券转移
```go
args := &api.TransferReservedInstanceOperateRequest{
TransferRecordIds: []string{
// 预留实例券转移记录id
"t-tgQYk4Rx",
},
}
err := BCC_CLIENT.RevokeTransferReservedInstanceOrder(args)
ExpectEqual(t.Errorf, err, nil)
```
### 拒绝预留实例券转移
拒绝预留实例券转移
```go
args := &api.TransferReservedInstanceOperateRequest{
TransferRecordIds: []string{
// 预留实例券转移记录id
"t-tgQYk4Rx",
},
}
err := BCC_CLIENT.RefuseTransferReservedInstanceOrder(args)
ExpectEqual(t.Errorf, err, nil)
```
### 接受预留实例券转移
接受预留实例券转移
```go
args := &api.AcceptTransferReservedInstanceRequest{
// 预留实例券转移记录id
TransferRecordId: "t-uNwDdZO9",
}
err := BCC_CLIENT.AcceptTransferReservedInstanceOrder(args)
ExpectEqual(t.Errorf, err, nil)
```
### 预留实例券转入列表
预留实例券转入列表
```go
args := &api.DescribeTransferReservedInstancesRequest{
ReservedInstanceIds: []string{
"r-I8rLAfcM",
},
TransferRecordIds: []string{
"t-FoM4l1xI",
},
Spec: "bcc.g3.c1m1",
Status: "timeout",
}
result, err := BCC_CLIENT.TransferInReservedInstanceOrders(args)
ExpectEqual(t.Errorf, err, nil)
fmt.Println(result)
```
### 预留实例券转出列表
预留实例券转出列表
```go
args := &api.DescribeTransferReservedInstancesRequest{
ReservedInstanceIds: []string{
"r-ObFTPNIp",
},
TransferRecordIds: []string{
"t-PKnSYeWh",
},
Spec: "bcc.ic4.c2m2",
Status: "fail",
}
result, err := BCC_CLIENT.TransferOutReservedInstanceOrders(args)
ExpectEqual(t.Errorf, err, nil)
fmt.Println(result)
```
### 查询实例套餐库存
Expand Down
Loading

0 comments on commit 7d148c3

Please sign in to comment.