mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-30 18:23:35 +08:00
Merge pull request #11460 from ioito/feat/qx-jd-cloud-rds
feat(region): support jd cloud rds
This commit is contained in:
@@ -89,7 +89,7 @@ func newClient(options *Options) (*jdcloud.SRegion, error) {
|
||||
if regionId == "" {
|
||||
regionId = jdcloud.JDCLOUD_DEFAULT_REGION
|
||||
}
|
||||
region := jdcloud.NewRegion(regionId, options.AccessKey, options.AccessSecret, nil)
|
||||
region := jdcloud.NewRegion(regionId, options.AccessKey, options.AccessSecret, nil, options.Debug)
|
||||
if region == nil {
|
||||
return nil, fmt.Errorf("no such region %s", regionId)
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ require (
|
||||
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
|
||||
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
yunion.io/x/sqlchemy v0.0.0-20210519174758-cb08030e2008
|
||||
yunion.io/x/sqlchemy v0.0.0-20210619142628-653684d2c4f8
|
||||
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
|
||||
)
|
||||
|
||||
|
||||
@@ -919,7 +919,7 @@ yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c h1:J/joqbA1N2mAlOl0Uqd4LpAq3+
|
||||
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
|
||||
yunion.io/x/sqlchemy v0.0.0-20210519174758-cb08030e2008 h1:h3jv9rx8LhvuuRigVee6vPveMtIybbz66jaMkutCtF4=
|
||||
yunion.io/x/sqlchemy v0.0.0-20210519174758-cb08030e2008/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
|
||||
yunion.io/x/sqlchemy v0.0.0-20210619142628-653684d2c4f8 h1:+kywPlOttXAZvbxsVqR73B5GbSVgG3Xdo4socLWRkcg=
|
||||
yunion.io/x/sqlchemy v0.0.0-20210619142628-653684d2c4f8/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
|
||||
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
|
||||
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package jdcloud
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/asset/apis"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/asset/client"
|
||||
|
||||
"yunion.io/x/pkg/errors"
|
||||
)
|
||||
|
||||
type SBalance struct {
|
||||
apis.DescribeAccountAmountResult
|
||||
}
|
||||
|
||||
func (self *SRegion) DescribeAccountAmount() (*SBalance, error) {
|
||||
req := apis.NewDescribeAccountAmountRequest(self.ID)
|
||||
client := client.NewAssetClient(self.Credential)
|
||||
client.Logger = Logger{}
|
||||
resp, err := client.DescribeAccountAmount(req)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "DescribeAccountAmoun")
|
||||
}
|
||||
return &SBalance{DescribeAccountAmountResult: resp.Result}, nil
|
||||
}
|
||||
@@ -18,6 +18,7 @@ func (r *SRegion) GetMetricsData(req *DescribeMetricDataRequest) (*DescribeMetri
|
||||
req.RegionId = r.GetId()
|
||||
}
|
||||
monitorClient := client.NewMonitorClient(r.Credential)
|
||||
monitorClient.Logger = Logger{}
|
||||
response, err := monitorClient.DescribeMetricData(req.DescribeMetricDataRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -17,6 +17,7 @@ package provider
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
@@ -141,7 +142,7 @@ func (p *SJdcloudProvider) GetIRegions() []cloudprovider.ICloudRegion {
|
||||
if p.iregion != nil {
|
||||
return p.iregion
|
||||
}
|
||||
regions := jdcloud.AllRegions(p.accessKey, p.secret, &p.cfg)
|
||||
regions := jdcloud.AllRegions(p.accessKey, p.secret, &p.cfg, false)
|
||||
iregions := make([]cloudprovider.ICloudRegion, len(regions))
|
||||
for i := range iregions {
|
||||
iregions[i] = ®ions[i]
|
||||
@@ -171,6 +172,21 @@ func (p *SJdcloudProvider) GetIRegionById(id string) (cloudprovider.ICloudRegion
|
||||
}
|
||||
|
||||
func (p *SJdcloudProvider) GetBalance() (float64, string, error) {
|
||||
regions := p.GetIRegions()
|
||||
if len(regions) > 0 {
|
||||
region := regions[0].(*jdcloud.SRegion)
|
||||
balance, err := region.DescribeAccountAmount()
|
||||
if err != nil {
|
||||
return 0.0, api.CLOUD_PROVIDER_HEALTH_NO_PERMISSION, errors.Wrap(err, "DescribeAccountAmount")
|
||||
}
|
||||
amount, _ := strconv.ParseFloat(balance.TotalAmount, 32)
|
||||
if amount < 0 {
|
||||
return amount, api.CLOUD_PROVIDER_HEALTH_ARREARS, nil
|
||||
} else if amount < 50 {
|
||||
return amount, api.CLOUD_PROVIDER_HEALTH_INSUFFICIENT, nil
|
||||
}
|
||||
return amount, api.CLOUD_PROVIDER_HEALTH_NORMAL, nil
|
||||
}
|
||||
return 0.0, api.CLOUD_PROVIDER_HEALTH_NORMAL, cloudprovider.ErrNotSupported
|
||||
}
|
||||
|
||||
@@ -199,6 +215,7 @@ func (p *SJdcloudProvider) GetCapabilities() []string {
|
||||
caps := []string{
|
||||
cloudprovider.CLOUD_CAPABILITY_COMPUTE,
|
||||
cloudprovider.CLOUD_CAPABILITY_NETWORK,
|
||||
cloudprovider.CLOUD_CAPABILITY_RDS,
|
||||
}
|
||||
return caps
|
||||
}
|
||||
|
||||
@@ -0,0 +1,234 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package jdcloud
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
commodels "github.com/jdcloud-api/jdcloud-sdk-go/services/common/models"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/apis"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/client"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/pkg/errors"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
"yunion.io/x/onecloud/pkg/multicloud"
|
||||
)
|
||||
|
||||
type SDBInstance struct {
|
||||
multicloud.SDBInstanceBase
|
||||
multicloud.JdcloudTags
|
||||
region *SRegion
|
||||
|
||||
models.DBInstance
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetName() string {
|
||||
return self.InstanceName
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetInstanceType() string {
|
||||
return self.InstanceClass
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetCategory() string {
|
||||
return self.InstanceType
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetDiskSizeGB() int {
|
||||
return self.InstanceStorageGB
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetEngine() string {
|
||||
return self.Engine
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetEngineVersion() string {
|
||||
return self.EngineVersion
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetGlobalId() string {
|
||||
return self.InstanceId
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetId() string {
|
||||
return self.InstanceId
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetIVpcId() string {
|
||||
return self.VpcId
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetMaintainTime() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetMasterInstanceId() string {
|
||||
return self.SourceInstanceId
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetPort() int {
|
||||
port, _ := strconv.Atoi(self.InstancePort)
|
||||
return int(port)
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetCreatedAt() time.Time {
|
||||
return parseTime(self.CreateTime)
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetExpiredAt() time.Time {
|
||||
return expireAt(&self.Charge)
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetStatus() string {
|
||||
switch self.InstanceStatus {
|
||||
case "BUILDING", "DDLING", "PARAMETERGROUP_MODIFYING", "AUDIT_OPENING", "AUDIT_CLOSING", "SECURITY_OPENING", "SECURITY_CLOSING", "SSL_OPENING", "SSL_CLOSING":
|
||||
return api.DBINSTANCE_DEPLOYING
|
||||
case "RUNNING":
|
||||
return api.DBINSTANCE_RUNNING
|
||||
case "DELETING":
|
||||
return api.DBINSTANCE_DELETING
|
||||
case "FAILOVER", "AZ_MIGRATING":
|
||||
return api.DBINSTANCE_MIGRATING
|
||||
case "RESTORING", "DB_RESTORING":
|
||||
return api.DBINSTANCE_RESTORING
|
||||
case "MODIFYING":
|
||||
return api.DBINSTANCE_CHANGE_CONFIG
|
||||
case "BUILD_READONLY":
|
||||
return api.DBINSTANCE_DEPLOYING
|
||||
case "REBOOTING":
|
||||
return api.DBINSTANCE_REBOOTING
|
||||
case "MAINTENANCE":
|
||||
return api.DBINSTANCE_MAINTENANCE
|
||||
default:
|
||||
return self.InstanceStatus
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetStorageType() string {
|
||||
return self.InstanceStorageType
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetVcpuCount() int {
|
||||
return self.InstanceCPU
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetVmemSizeMB() int {
|
||||
return self.InstanceMemoryMB
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetZone1Id() string {
|
||||
if len(self.AzId) > 0 {
|
||||
return self.AzId[0]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetZone2Id() string {
|
||||
if len(self.AzId) > 1 {
|
||||
return self.AzId[1]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetZone3Id() string {
|
||||
if len(self.AzId) > 2 {
|
||||
return self.AzId[2]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetConnectionStr() string {
|
||||
return self.PublicDomainName
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetInternalConnectionStr() string {
|
||||
return self.InternalDomainName
|
||||
}
|
||||
|
||||
func (self *SRegion) GetIDBInstances() ([]cloudprovider.ICloudDBInstance, error) {
|
||||
rds := []SDBInstance{}
|
||||
n := 1
|
||||
for {
|
||||
part, total, err := self.GetDBInstances(n, 100)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "GetDBInstances")
|
||||
}
|
||||
rds = append(rds, part...)
|
||||
if len(rds) >= total {
|
||||
break
|
||||
}
|
||||
n++
|
||||
}
|
||||
ret := []cloudprovider.ICloudDBInstance{}
|
||||
for i := range rds {
|
||||
ret = append(ret, &rds[i])
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (self *SRegion) GetIDBInstanceById(id string) (cloudprovider.ICloudDBInstance, error) {
|
||||
rds, err := self.GetDBInstance(id)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "GetDBInstance(%s)", id)
|
||||
}
|
||||
return rds, nil
|
||||
}
|
||||
|
||||
func (self *SRegion) GetDBInstance(id string) (*SDBInstance, error) {
|
||||
req := apis.NewDescribeInstanceAttributesRequest(self.ID, id)
|
||||
client := client.NewRdsClient(self.Credential)
|
||||
client.Logger = Logger{}
|
||||
resp, err := client.DescribeInstanceAttributes(req)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "DescribeInstanceAttributes")
|
||||
}
|
||||
if resp.Error.Code == 404 {
|
||||
return nil, errors.Wrapf(cloudprovider.ErrNotFound, jsonutils.Marshal(resp.Error).String())
|
||||
}
|
||||
ret := SDBInstance{
|
||||
region: self,
|
||||
}
|
||||
jsonutils.Update(&ret.DBInstance, resp.Result.DbInstanceAttributes)
|
||||
return &ret, nil
|
||||
}
|
||||
|
||||
func (self *SRegion) GetDBInstances(pageNumber int, pageSize int) ([]SDBInstance, int, error) {
|
||||
req := apis.NewDescribeInstancesRequestWithAllParams(self.ID, &pageNumber, &pageSize, []commodels.Filter{}, []commodels.TagFilter{})
|
||||
client := client.NewRdsClient(self.Credential)
|
||||
client.Logger = Logger{}
|
||||
resp, err := client.DescribeInstances(req)
|
||||
if err != nil {
|
||||
return nil, 0, errors.Wrapf(err, "DescribeInstances")
|
||||
}
|
||||
if resp.Error.Code >= 400 {
|
||||
err = fmt.Errorf(resp.Error.Message)
|
||||
return nil, 0, err
|
||||
}
|
||||
total := resp.Result.TotalCount
|
||||
ret := []SDBInstance{}
|
||||
for i := range resp.Result.DbInstances {
|
||||
ret = append(ret, SDBInstance{
|
||||
region: self,
|
||||
DBInstance: resp.Result.DbInstances[i],
|
||||
})
|
||||
}
|
||||
return ret, total, nil
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package jdcloud
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/apis"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/client"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
|
||||
"yunion.io/x/pkg/errors"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
"yunion.io/x/onecloud/pkg/multicloud"
|
||||
)
|
||||
|
||||
type SDBInstanceAccount struct {
|
||||
multicloud.SDBInstanceAccountBase
|
||||
multicloud.JdcloudTags
|
||||
|
||||
rds *SDBInstance
|
||||
models.Account
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccount) GetGlobalId() string {
|
||||
return self.AccountName
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccount) GetId() string {
|
||||
return self.AccountName
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccount) GetName() string {
|
||||
return self.AccountName
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccount) GetStatus() string {
|
||||
switch self.AccountStatus {
|
||||
case "BUILDING":
|
||||
return api.DBINSTANCE_USER_CREATING
|
||||
case "RUNNING":
|
||||
return api.DBINSTANCE_USER_AVAILABLE
|
||||
case "DELETING":
|
||||
return api.DBINSTANCE_USER_DELETING
|
||||
default:
|
||||
return api.DBINSTANCE_USER_AVAILABLE
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccount) GetIDBInstanceAccountPrivileges() ([]cloudprovider.ICloudDBInstanceAccountPrivilege, error) {
|
||||
ret := []cloudprovider.ICloudDBInstanceAccountPrivilege{}
|
||||
for i := range self.AccountPrivileges {
|
||||
ret = append(ret, &SDBInstanceAccountPrivilege{
|
||||
Account: self.AccountName,
|
||||
AccountPrivilege: self.AccountPrivileges[i],
|
||||
})
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (self *SRegion) GetDBInstanceAccounts(id string, pageNumber, pageSize int) ([]SDBInstanceAccount, int, error) {
|
||||
req := apis.NewDescribeAccountsRequestWithAllParams(self.ID, id, &pageNumber, &pageSize)
|
||||
client := client.NewRdsClient(self.Credential)
|
||||
client.Logger = Logger{}
|
||||
resp, err := client.DescribeAccounts(req)
|
||||
if err != nil {
|
||||
return nil, 0, errors.Wrapf(err, "DescribeAccounts")
|
||||
}
|
||||
if resp.Error.Code >= 400 {
|
||||
err = fmt.Errorf(resp.Error.Message)
|
||||
return nil, 0, err
|
||||
}
|
||||
total := resp.Result.TotalCount
|
||||
ret := []SDBInstanceAccount{}
|
||||
for i := range resp.Result.Accounts {
|
||||
ret = append(ret, SDBInstanceAccount{
|
||||
Account: resp.Result.Accounts[i],
|
||||
})
|
||||
}
|
||||
return ret, total, nil
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetIDBInstanceAccounts() ([]cloudprovider.ICloudDBInstanceAccount, error) {
|
||||
accounts := []SDBInstanceAccount{}
|
||||
n := 1
|
||||
for {
|
||||
part, total, err := self.region.GetDBInstanceAccounts(self.InstanceId, n, 100)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "GetDBInstanceAccounts")
|
||||
}
|
||||
accounts = append(accounts, part...)
|
||||
if len(accounts) >= total {
|
||||
break
|
||||
}
|
||||
n++
|
||||
}
|
||||
ret := []cloudprovider.ICloudDBInstanceAccount{}
|
||||
for i := range accounts {
|
||||
accounts[i].rds = self
|
||||
ret = append(ret, &accounts[i])
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package jdcloud
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/apis"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/client"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
|
||||
"yunion.io/x/pkg/errors"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
"yunion.io/x/onecloud/pkg/multicloud"
|
||||
)
|
||||
|
||||
type SDBInstanceBackup struct {
|
||||
multicloud.SDBInstanceBackupBase
|
||||
multicloud.JdcloudTags
|
||||
|
||||
rds *SDBInstance
|
||||
models.Backup
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetGlobalId() string {
|
||||
return self.BackupId
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetId() string {
|
||||
return self.BackupId
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetName() string {
|
||||
return self.BackupName
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetBackupMethod() cloudprovider.TBackupMethod {
|
||||
return cloudprovider.TBackupMethod(self.BackupMethod)
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetBackupMode() string {
|
||||
switch self.BackupMode {
|
||||
case "auto":
|
||||
return api.BACKUP_MODE_AUTOMATED
|
||||
default:
|
||||
return self.BackupMode
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetBackupSizeMb() int {
|
||||
return int(self.BackupSizeByte / 1024 / 1024)
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetDBInstanceId() string {
|
||||
return self.rds.GetGlobalId()
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetEngine() string {
|
||||
return self.rds.GetEngine()
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetEngineVersion() string {
|
||||
return self.rds.GetEngineVersion()
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetEndTime() time.Time {
|
||||
return parseTime(self.BackupEndTime)
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetStartTime() time.Time {
|
||||
return parseTime(self.BackupStartTime)
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetDBNames() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (self *SDBInstanceBackup) GetStatus() string {
|
||||
switch self.BackupStatus {
|
||||
case "ERROR":
|
||||
return api.DBINSTANCE_BACKUP_CREATE_FAILED
|
||||
case "COMPLETED":
|
||||
return api.DBINSTANCE_BACKUP_READY
|
||||
case "BUILDING":
|
||||
return api.DBINSTANCE_BACKUP_CREATING
|
||||
case "DELETING":
|
||||
return api.DBINSTANCE_BACKUP_DELETING
|
||||
default:
|
||||
return api.DBINSTANCE_BACKUP_READY
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SRegion) GetDBInstanceBackups(id string, pageNumber, pageSize int) ([]SDBInstanceBackup, int, error) {
|
||||
req := apis.NewDescribeBackupsRequest(self.ID, id, pageNumber, pageSize)
|
||||
client := client.NewRdsClient(self.Credential)
|
||||
client.Logger = Logger{}
|
||||
resp, err := client.DescribeBackups(req)
|
||||
if err != nil {
|
||||
return nil, 0, errors.Wrapf(err, "DescribeBackups")
|
||||
}
|
||||
if resp.Error.Code >= 400 {
|
||||
err = fmt.Errorf(resp.Error.Message)
|
||||
return nil, 0, err
|
||||
}
|
||||
total := resp.Result.TotalCount
|
||||
ret := []SDBInstanceBackup{}
|
||||
for i := range resp.Result.Backup {
|
||||
ret = append(ret, SDBInstanceBackup{
|
||||
Backup: resp.Result.Backup[i],
|
||||
})
|
||||
}
|
||||
return ret, total, nil
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetIDBInstanceBackups() ([]cloudprovider.ICloudDBInstanceBackup, error) {
|
||||
backups := []SDBInstanceBackup{}
|
||||
n := 1
|
||||
for {
|
||||
part, total, err := self.region.GetDBInstanceBackups(self.InstanceId, n, 100)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "GetDBInstanceBackups")
|
||||
}
|
||||
backups = append(backups, part...)
|
||||
if len(backups) >= total {
|
||||
break
|
||||
}
|
||||
n++
|
||||
}
|
||||
ret := []cloudprovider.ICloudDBInstanceBackup{}
|
||||
for i := range backups {
|
||||
backups[i].rds = self
|
||||
ret = append(ret, &backups[i])
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package jdcloud
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/apis"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/client"
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
|
||||
"yunion.io/x/pkg/errors"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
"yunion.io/x/onecloud/pkg/multicloud"
|
||||
)
|
||||
|
||||
type SDBInstanceDatabase struct {
|
||||
multicloud.SDBInstanceDatabaseBase
|
||||
multicloud.JdcloudTags
|
||||
|
||||
rds *SDBInstance
|
||||
models.Database
|
||||
}
|
||||
|
||||
func (self *SDBInstanceDatabase) GetCharacterSet() string {
|
||||
return self.CharacterSetName
|
||||
}
|
||||
|
||||
func (self *SDBInstanceDatabase) GetGlobalId() string {
|
||||
return self.DbName
|
||||
}
|
||||
|
||||
func (self *SDBInstanceDatabase) GetId() string {
|
||||
return self.DbName
|
||||
}
|
||||
|
||||
func (self *SDBInstanceDatabase) GetName() string {
|
||||
return self.DbName
|
||||
}
|
||||
|
||||
func (self *SDBInstanceDatabase) GetStatus() string {
|
||||
return api.DBINSTANCE_DATABASE_RUNNING
|
||||
}
|
||||
|
||||
func (self *SRegion) GetDBInstanceDatabases(id string, pageNumber, pageSize int) ([]SDBInstanceDatabase, int, error) {
|
||||
|
||||
req := apis.NewDescribeDatabasesRequestWithAllParams(self.ID, id, nil, &pageNumber, &pageSize)
|
||||
client := client.NewRdsClient(self.Credential)
|
||||
client.Logger = Logger{}
|
||||
resp, err := client.DescribeDatabases(req)
|
||||
if err != nil {
|
||||
return nil, 0, errors.Wrapf(err, "DescribeDatabases")
|
||||
}
|
||||
if resp.Error.Code >= 400 {
|
||||
err = fmt.Errorf(resp.Error.Message)
|
||||
return nil, 0, err
|
||||
}
|
||||
total := resp.Result.TotalCount
|
||||
ret := []SDBInstanceDatabase{}
|
||||
for i := range resp.Result.Databases {
|
||||
ret = append(ret, SDBInstanceDatabase{
|
||||
Database: resp.Result.Databases[i],
|
||||
})
|
||||
}
|
||||
return ret, total, nil
|
||||
}
|
||||
|
||||
func (self *SDBInstance) GetIDBInstanceDatabases() ([]cloudprovider.ICloudDBInstanceDatabase, error) {
|
||||
dbs := []SDBInstanceDatabase{}
|
||||
n := 1
|
||||
for {
|
||||
part, total, err := self.region.GetDBInstanceDatabases(self.InstanceId, n, 100)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "GetDBInstanceDatabases")
|
||||
}
|
||||
dbs = append(dbs, part...)
|
||||
if len(dbs) >= total {
|
||||
break
|
||||
}
|
||||
n++
|
||||
}
|
||||
ret := []cloudprovider.ICloudDBInstanceDatabase{}
|
||||
for i := range dbs {
|
||||
dbs[i].rds = self
|
||||
ret = append(ret, &dbs[i])
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package jdcloud
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type SDBInstanceAccountPrivilege struct {
|
||||
models.AccountPrivilege
|
||||
Account string
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccountPrivilege) GetDBName() string {
|
||||
if self.DbName != nil {
|
||||
return *self.DbName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccountPrivilege) GetGlobalId() string {
|
||||
return fmt.Sprintf("%s-%s-%s", self.GetDBName(), self.Account, self.GetPrivilege())
|
||||
}
|
||||
|
||||
func (self *SDBInstanceAccountPrivilege) GetPrivilege() string {
|
||||
if self.Privilege != nil {
|
||||
return *self.Privilege
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -18,6 +18,9 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"yunion.io/x/log"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
@@ -55,7 +58,7 @@ type SRegion struct {
|
||||
ivpcs []cloudprovider.ICloudVpc
|
||||
}
|
||||
|
||||
func AllRegions(accessKey, secretKey string, config *cloudprovider.ProviderConfig) []SRegion {
|
||||
func AllRegions(accessKey, secretKey string, config *cloudprovider.ProviderConfig, debug bool) []SRegion {
|
||||
regions := make([]SRegion, 0, len(regionList))
|
||||
for id, name := range regionList {
|
||||
regions = append(regions, SRegion{
|
||||
@@ -65,10 +68,15 @@ func AllRegions(accessKey, secretKey string, config *cloudprovider.ProviderConfi
|
||||
cpcfg: *config,
|
||||
})
|
||||
}
|
||||
if debug {
|
||||
log.SetLogLevel(log.Logger(), logrus.DebugLevel)
|
||||
} else {
|
||||
log.SetLogLevel(log.Logger(), logrus.InfoLevel)
|
||||
}
|
||||
return regions
|
||||
}
|
||||
|
||||
func NewRegion(regionId, accessKey, secretKey string, config *cloudprovider.ProviderConfig) *SRegion {
|
||||
func NewRegion(regionId, accessKey, secretKey string, config *cloudprovider.ProviderConfig, debug bool) *SRegion {
|
||||
name, ok := regionList[regionId]
|
||||
if !ok {
|
||||
return nil
|
||||
@@ -81,6 +89,11 @@ func NewRegion(regionId, accessKey, secretKey string, config *cloudprovider.Prov
|
||||
if config != nil {
|
||||
region.cpcfg = *config
|
||||
}
|
||||
if debug {
|
||||
log.SetLogLevel(log.Logger(), logrus.DebugLevel)
|
||||
} else {
|
||||
log.SetLogLevel(log.Logger(), logrus.InfoLevel)
|
||||
}
|
||||
return region
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package shell
|
||||
|
||||
import (
|
||||
"yunion.io/x/onecloud/pkg/multicloud/jdcloud"
|
||||
"yunion.io/x/onecloud/pkg/util/shellutils"
|
||||
)
|
||||
|
||||
func init() {
|
||||
type BalanceShowOptions struct {
|
||||
}
|
||||
shellutils.R(&BalanceShowOptions{}, "balance-show", "Show balance", func(cli *jdcloud.SRegion, args *BalanceShowOptions) error {
|
||||
balance, err := cli.DescribeAccountAmount()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(balance)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package shell
|
||||
|
||||
import (
|
||||
"yunion.io/x/onecloud/pkg/multicloud/jdcloud"
|
||||
"yunion.io/x/onecloud/pkg/util/shellutils"
|
||||
)
|
||||
|
||||
func init() {
|
||||
type DBInstanceListOptions struct {
|
||||
PageNumber int `default:"1"`
|
||||
PageSize int `default:"100"`
|
||||
}
|
||||
|
||||
shellutils.R(&DBInstanceListOptions{}, "dbinstance-list", "List rds", func(cli *jdcloud.SRegion, args *DBInstanceListOptions) error {
|
||||
dbs, _, err := cli.GetDBInstances(args.PageNumber, args.PageSize)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printList(dbs, 0, 0, 0, nil)
|
||||
return nil
|
||||
})
|
||||
|
||||
type DBInstanceShowOptions struct {
|
||||
ID string
|
||||
}
|
||||
|
||||
shellutils.R(&DBInstanceShowOptions{}, "dbinstance-show", "Show rds", func(cli *jdcloud.SRegion, args *DBInstanceShowOptions) error {
|
||||
rds, err := cli.GetDBInstance(args.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(rds)
|
||||
return nil
|
||||
})
|
||||
|
||||
type DBInstanceAccountListOptions struct {
|
||||
PageNumber int `default:"1"`
|
||||
PageSize int `default:"100"`
|
||||
ID string
|
||||
}
|
||||
|
||||
shellutils.R(&DBInstanceAccountListOptions{}, "dbinstance-account-list", "List rds account", func(cli *jdcloud.SRegion, args *DBInstanceAccountListOptions) error {
|
||||
accounts, _, err := cli.GetDBInstanceAccounts(args.ID, args.PageNumber, args.PageSize)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printList(accounts, 0, 0, 0, nil)
|
||||
return nil
|
||||
})
|
||||
|
||||
type DBInstanceDatabaseListOptions struct {
|
||||
PageNumber int `default:"1"`
|
||||
PageSize int `default:"100"`
|
||||
ID string
|
||||
}
|
||||
|
||||
shellutils.R(&DBInstanceDatabaseListOptions{}, "dbinstance-database-list", "List rds database", func(cli *jdcloud.SRegion, args *DBInstanceDatabaseListOptions) error {
|
||||
databases, _, err := cli.GetDBInstanceDatabases(args.ID, args.PageNumber, args.PageSize)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printList(databases, 0, 0, 0, nil)
|
||||
return nil
|
||||
})
|
||||
|
||||
type DBInstanceBackupListOptions struct {
|
||||
PageNumber int `default:"1"`
|
||||
PageSize int `default:"100"`
|
||||
ID string
|
||||
}
|
||||
|
||||
shellutils.R(&DBInstanceBackupListOptions{}, "dbinstance-backup-list", "List rds backup", func(cli *jdcloud.SRegion, args *DBInstanceBackupListOptions) error {
|
||||
backups, _, err := cli.GetDBInstanceBackups(args.ID, args.PageNumber, args.PageSize)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printList(backups, 0, 0, 0, nil)
|
||||
return nil
|
||||
})
|
||||
|
||||
}
|
||||
Generated
Vendored
+105
@@ -0,0 +1,105 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeAccountAmountRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAccountAmountRequest(
|
||||
regionId string,
|
||||
) *DescribeAccountAmountRequest {
|
||||
|
||||
return &DescribeAccountAmountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/assets:describeAccountAmount",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
*/
|
||||
func NewDescribeAccountAmountRequestWithAllParams(
|
||||
regionId string,
|
||||
) *DescribeAccountAmountRequest {
|
||||
|
||||
return &DescribeAccountAmountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/assets:describeAccountAmount",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAccountAmountRequestWithoutParam() *DescribeAccountAmountRequest {
|
||||
|
||||
return &DescribeAccountAmountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/assets:describeAccountAmount",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DescribeAccountAmountRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAccountAmountRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAccountAmountResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAccountAmountResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAccountAmountResult struct {
|
||||
TotalAmount string `json:"totalAmount"`
|
||||
AvailableAmount string `json:"availableAmount"`
|
||||
FrozenAmount string `json:"frozenAmount"`
|
||||
EnableWithdrawAmount string `json:"enableWithdrawAmount"`
|
||||
WithdrawingAmount string `json:"withdrawingAmount"`
|
||||
}
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
asset "github.com/jdcloud-api/jdcloud-sdk-go/services/asset/models"
|
||||
)
|
||||
|
||||
type ModifyBalanceWarningInfoRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* */
|
||||
BalanceWarningInfoVo *asset.BalanceWarningInfoVo `json:"balanceWarningInfoVo"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param balanceWarningInfoVo: (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewModifyBalanceWarningInfoRequest(
|
||||
regionId string,
|
||||
balanceWarningInfoVo *asset.BalanceWarningInfoVo,
|
||||
) *ModifyBalanceWarningInfoRequest {
|
||||
|
||||
return &ModifyBalanceWarningInfoRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/assets:modifyBalanceWarningInfo",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
BalanceWarningInfoVo: balanceWarningInfoVo,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param balanceWarningInfoVo: (Required)
|
||||
*/
|
||||
func NewModifyBalanceWarningInfoRequestWithAllParams(
|
||||
regionId string,
|
||||
balanceWarningInfoVo *asset.BalanceWarningInfoVo,
|
||||
) *ModifyBalanceWarningInfoRequest {
|
||||
|
||||
return &ModifyBalanceWarningInfoRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/assets:modifyBalanceWarningInfo",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
BalanceWarningInfoVo: balanceWarningInfoVo,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewModifyBalanceWarningInfoRequestWithoutParam() *ModifyBalanceWarningInfoRequest {
|
||||
|
||||
return &ModifyBalanceWarningInfoRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/assets:modifyBalanceWarningInfo",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *ModifyBalanceWarningInfoRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param balanceWarningInfoVo: (Required) */
|
||||
func (r *ModifyBalanceWarningInfoRequest) SetBalanceWarningInfoVo(balanceWarningInfoVo *asset.BalanceWarningInfoVo) {
|
||||
r.BalanceWarningInfoVo = balanceWarningInfoVo
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r ModifyBalanceWarningInfoRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type ModifyBalanceWarningInfoResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result ModifyBalanceWarningInfoResult `json:"result"`
|
||||
}
|
||||
|
||||
type ModifyBalanceWarningInfoResult struct {
|
||||
Status bool `json:"status"`
|
||||
}
|
||||
Generated
Vendored
+99
@@ -0,0 +1,99 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
asset "github.com/jdcloud-api/jdcloud-sdk-go/services/asset/apis"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
)
|
||||
|
||||
type AssetClient struct {
|
||||
core.JDCloudClient
|
||||
}
|
||||
|
||||
func NewAssetClient(credential *core.Credential) *AssetClient {
|
||||
if credential == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
config := core.NewConfig()
|
||||
config.SetEndpoint("asset.jdcloud-api.com")
|
||||
|
||||
return &AssetClient{
|
||||
core.JDCloudClient{
|
||||
Credential: *credential,
|
||||
Config: *config,
|
||||
ServiceName: "asset",
|
||||
Revision: "0.0.3",
|
||||
Logger: core.NewDefaultLogger(core.LogInfo),
|
||||
}}
|
||||
}
|
||||
|
||||
func (c *AssetClient) SetConfig(config *core.Config) {
|
||||
c.Config = *config
|
||||
}
|
||||
|
||||
func (c *AssetClient) SetLogger(logger core.Logger) {
|
||||
c.Logger = logger
|
||||
}
|
||||
|
||||
func (c *AssetClient) DisableLogger() {
|
||||
c.Logger = core.NewDummyLogger()
|
||||
}
|
||||
|
||||
/* 查询账户金额(总金额、可用金额、冻结金额、可提现金额、提现中金额) */
|
||||
func (c *AssetClient) DescribeAccountAmount(request *asset.DescribeAccountAmountRequest) (*asset.DescribeAccountAmountResponse, error) {
|
||||
if request == nil {
|
||||
return nil, errors.New("Request object is nil. ")
|
||||
}
|
||||
resp, err := c.Send(request, c.ServiceName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
jdResp := &asset.DescribeAccountAmountResponse{}
|
||||
err = json.Unmarshal(resp, jdResp)
|
||||
if err != nil {
|
||||
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return jdResp, err
|
||||
}
|
||||
|
||||
/* 设置余额预警信息 */
|
||||
func (c *AssetClient) ModifyBalanceWarningInfo(request *asset.ModifyBalanceWarningInfoRequest) (*asset.ModifyBalanceWarningInfoResponse, error) {
|
||||
if request == nil {
|
||||
return nil, errors.New("Request object is nil. ")
|
||||
}
|
||||
resp, err := c.Send(request, c.ServiceName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
jdResp := &asset.ModifyBalanceWarningInfoResponse{}
|
||||
err = json.Unmarshal(resp, jdResp)
|
||||
if err != nil {
|
||||
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return jdResp, err
|
||||
}
|
||||
|
||||
Generated
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type BalanceWarningInfoVo struct {
|
||||
|
||||
/* 余额预警状态:1-启用;2-停用(状态不为空时修改状态) (Optional) */
|
||||
Status *string `json:"status"`
|
||||
|
||||
/* 余额预警阈值 (Optional) */
|
||||
Threshold *string `json:"threshold"`
|
||||
}
|
||||
Generated
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type BalanceWarningStatusVo struct {
|
||||
|
||||
/* 余额预警状态 (Optional) */
|
||||
Status string `json:"status"`
|
||||
}
|
||||
Generated
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type BalanceWarningThresholdVo struct {
|
||||
|
||||
/* 余额预警阈值 (Optional) */
|
||||
Threshold string `json:"threshold"`
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type BankInfoVo struct {
|
||||
|
||||
/* 银行代码 (Optional) */
|
||||
Key string `json:"key"`
|
||||
|
||||
/* 是否可用:1-可用;0-不可用 (Optional) */
|
||||
Value string `json:"value"`
|
||||
|
||||
/* 银行描述 (Optional) */
|
||||
Description string `json:"description"`
|
||||
}
|
||||
Generated
Vendored
+69
@@ -0,0 +1,69 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type OffLineRemittanceBillInfo struct {
|
||||
|
||||
/* 当前id (Optional) */
|
||||
Id string `json:"id"`
|
||||
|
||||
/* 用户pin (Optional) */
|
||||
Pin string `json:"pin"`
|
||||
|
||||
/* 汇款人账号名称 (Optional) */
|
||||
RemittorAccount string `json:"remittorAccount"`
|
||||
|
||||
/* 汇款人银行账号 (Optional) */
|
||||
RemittorBankAccount string `json:"remittorBankAccount"`
|
||||
|
||||
/* 汇款金额 (Optional) */
|
||||
RemitAmount string `json:"remitAmount"`
|
||||
|
||||
/* 汇款银行名称 (Optional) */
|
||||
RemitBankName string `json:"remitBankName"`
|
||||
|
||||
/* 汇款时间 (Optional) */
|
||||
RemitTime string `json:"remitTime"`
|
||||
|
||||
/* 联系人手机 (Optional) */
|
||||
ContactsPhone string `json:"contactsPhone"`
|
||||
|
||||
/* 状态 (Optional) */
|
||||
Status string `json:"status"`
|
||||
|
||||
/* 汇款底单扫描件 (Optional) */
|
||||
RemitPicture string `json:"remitPicture"`
|
||||
|
||||
/* 创建时间 (Optional) */
|
||||
CreateTime string `json:"createTime"`
|
||||
|
||||
/* 更新时间 (Optional) */
|
||||
UpdateTime string `json:"updateTime"`
|
||||
|
||||
/* 备查id (Optional) */
|
||||
ClaId string `json:"claId"`
|
||||
|
||||
/* 充值单号 (Optional) */
|
||||
ErpOrderId string `json:"erpOrderId"`
|
||||
|
||||
/* 提交起始时间 (Optional) */
|
||||
CreateBeginTime string `json:"createBeginTime"`
|
||||
|
||||
/* 提交截止时间 (Optional) */
|
||||
CreateEndTime string `json:"createEndTime"`
|
||||
}
|
||||
Generated
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type OperatingStatement struct {
|
||||
|
||||
/* 用户pin (Optional) */
|
||||
Pin string `json:"pin"`
|
||||
|
||||
/* 流水单号 (Optional) */
|
||||
TradeNumber string `json:"tradeNumber"`
|
||||
|
||||
/* 交易类型:1-充值(11.在线充值 12.退单充值 13.线下汇款非人工认领 14.线下汇款人工认领 15.补单充值 16.退款充值);2-消费;3-提现 (Optional) */
|
||||
TradeType string `json:"tradeType"`
|
||||
|
||||
/* 交易额 (Optional) */
|
||||
TradeAmount string `json:"tradeAmount"`
|
||||
|
||||
/* 交易状态:1-成功 2-失败 31-提现全部成功 32-提现全部失败 33-提现部分成功 34-运营待审核 35-运营通过 36-运营驳回 37-处理中 38-预占充值单失败 (Optional) */
|
||||
TradeStatus string `json:"tradeStatus"`
|
||||
|
||||
/* 创建时间 (Optional) */
|
||||
CreateTime string `json:"createTime"`
|
||||
|
||||
/* 更新时间 (Optional) */
|
||||
UpdateTime string `json:"updateTime"`
|
||||
|
||||
/* 可用金额 (Optional) */
|
||||
AvailableAmount string `json:"availableAmount"`
|
||||
}
|
||||
Generated
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type OperatingStatementVo struct {
|
||||
|
||||
/* 交易类型:1-充值(11.在线充值 12.退单充值 13.线下汇款非人工认领 14.线下汇款人工认领 15.补单充值 16.退款充值);2-消费;3-提现 (Optional) */
|
||||
TradeType string `json:"tradeType"`
|
||||
|
||||
/* 交易状态:1-成功 2-失败 31-提现全部成功 32-提现全部失败 33-提现部分成功 34-运营待审核 35-运营通过 36-运营驳回 37-处理中 38-预占充值单失败 (Optional) */
|
||||
TradeStatus string `json:"tradeStatus"`
|
||||
|
||||
/* 开始时间 (Optional) */
|
||||
BeginTime string `json:"beginTime"`
|
||||
|
||||
/* 结束时间 (Optional) */
|
||||
EndTime string `json:"endTime"`
|
||||
|
||||
/* 当前页码 (Optional) */
|
||||
PageIndex string `json:"pageIndex"`
|
||||
|
||||
/* 每页条数 (Optional) */
|
||||
PageSize string `json:"pageSize"`
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type PageInfoVo struct {
|
||||
|
||||
/* 当前页码 (Optional) */
|
||||
CurrentPage int `json:"currentPage"`
|
||||
|
||||
/* 每页条数 (Optional) */
|
||||
PageSize int `json:"pageSize"`
|
||||
|
||||
/* 总条数 (Optional) */
|
||||
TotalRecord int `json:"totalRecord"`
|
||||
|
||||
/* 总页数 (Optional) */
|
||||
TotalPage int `json:"totalPage"`
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type PayTypeVo struct {
|
||||
|
||||
/* 支付方式 (Optional) */
|
||||
PayType string `json:"payType"`
|
||||
|
||||
/* 是否可用:1-可用;0-不可用 (Optional) */
|
||||
IsEnable string `json:"isEnable"`
|
||||
}
|
||||
Generated
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type ReceiptsResult struct {
|
||||
|
||||
/* (Optional) */
|
||||
CreateTime string `json:"createTime"`
|
||||
|
||||
/* (Optional) */
|
||||
Fee float64 `json:"fee"`
|
||||
|
||||
/* (Optional) */
|
||||
Pin string `json:"pin"`
|
||||
|
||||
/* (Optional) */
|
||||
Status int `json:"status"`
|
||||
|
||||
/* (Optional) */
|
||||
Trade_no string `json:"trade_no"`
|
||||
|
||||
/* (Optional) */
|
||||
Trade_type int `json:"trade_type"`
|
||||
|
||||
/* (Optional) */
|
||||
UpdateTime string `json:"updateTime"`
|
||||
|
||||
/* (Optional) */
|
||||
UsableFee float64 `json:"usableFee"`
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type RechargeVo struct {
|
||||
|
||||
/* 充值方式 (Optional) */
|
||||
RechargeType string `json:"rechargeType"`
|
||||
|
||||
/* 充值金额 (Optional) */
|
||||
RechargeAmount string `json:"rechargeAmount"`
|
||||
|
||||
/* 银行代码 (Optional) */
|
||||
BankCode string `json:"bankCode"`
|
||||
}
|
||||
Generated
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type ReduceBalanceParam struct {
|
||||
|
||||
/* 要扣减余额的pin */
|
||||
Pin string `json:"pin"`
|
||||
|
||||
/* 当前余额 */
|
||||
CurrentBalance string `json:"currentBalance"`
|
||||
|
||||
/* 要扣减的金额:不能大于当前余额,不能为0,不能为负数,只支持两位小数 */
|
||||
ReducedAmount string `json:"reducedAmount"`
|
||||
|
||||
/* 扣减原因 */
|
||||
ReducedReason string `json:"reducedReason"`
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type Voucher struct {
|
||||
|
||||
/* (Optional) */
|
||||
CashingFee float64 `json:"cashingFee"`
|
||||
|
||||
/* (Optional) */
|
||||
CreateTime string `json:"createTime"`
|
||||
|
||||
/* (Optional) */
|
||||
EndTime string `json:"endTime"`
|
||||
|
||||
/* (Optional) */
|
||||
ErpOrderId string `json:"erpOrderId"`
|
||||
|
||||
/* (Optional) */
|
||||
Fee float64 `json:"fee"`
|
||||
|
||||
/* (Optional) */
|
||||
Id int `json:"id"`
|
||||
|
||||
/* (Optional) */
|
||||
PaymentChannel int `json:"paymentChannel"`
|
||||
|
||||
/* (Optional) */
|
||||
PaymentNumber string `json:"paymentNumber"`
|
||||
|
||||
/* (Optional) */
|
||||
Pin string `json:"pin"`
|
||||
|
||||
/* (Optional) */
|
||||
RechargeType int `json:"rechargeType"`
|
||||
|
||||
/* (Optional) */
|
||||
Status int `json:"status"`
|
||||
|
||||
/* (Optional) */
|
||||
UpdateTime string `json:"updateTime"`
|
||||
|
||||
/* (Optional) */
|
||||
UsableFee float64 `json:"usableFee"`
|
||||
|
||||
/* (Optional) */
|
||||
UserAllFee float64 `json:"userAllFee"`
|
||||
}
|
||||
Generated
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type WarnedGroupVo struct {
|
||||
|
||||
/* 联系组名称 (Optional) */
|
||||
GroupName string `json:"groupName"`
|
||||
|
||||
/* 联系组手机 (Optional) */
|
||||
Mobile string `json:"mobile"`
|
||||
|
||||
/* 联系组邮箱 (Optional) */
|
||||
Email string `json:"email"`
|
||||
}
|
||||
Generated
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type WarnedUserVo struct {
|
||||
|
||||
/* 联系人名称 (Optional) */
|
||||
UserName string `json:"userName"`
|
||||
|
||||
/* 联系人手机 (Optional) */
|
||||
Mobile string `json:"mobile"`
|
||||
|
||||
/* 联系人邮箱 (Optional) */
|
||||
Email string `json:"email"`
|
||||
}
|
||||
Generated
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type WarningInfoVo struct {
|
||||
|
||||
/* 余额预警状态:1-开启;2-关闭 (Optional) */
|
||||
Status string `json:"status"`
|
||||
|
||||
/* 余额预警阈值 (Optional) */
|
||||
Threshold string `json:"threshold"`
|
||||
}
|
||||
Generated
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type WithdrawAmountVo struct {
|
||||
|
||||
/* 提现金额 (Optional) */
|
||||
Amount string `json:"amount"`
|
||||
}
|
||||
Generated
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type WithdrawalsCondition struct {
|
||||
|
||||
/* (Optional) */
|
||||
BeginTime string `json:"beginTime"`
|
||||
|
||||
/* (Optional) */
|
||||
EndTime string `json:"endTime"`
|
||||
|
||||
/* (Optional) */
|
||||
PageNum int `json:"pageNum"`
|
||||
|
||||
/* (Optional) */
|
||||
PageSize int `json:"pageSize"`
|
||||
|
||||
/* (Optional) */
|
||||
Pin string `json:"pin"`
|
||||
|
||||
/* (Optional) */
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
Generated
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package models
|
||||
|
||||
|
||||
type WithdrawalsVo struct {
|
||||
|
||||
/* (Optional) */
|
||||
CreateTime string `json:"createTime"`
|
||||
|
||||
/* (Optional) */
|
||||
Fee float64 `json:"fee"`
|
||||
|
||||
/* (Optional) */
|
||||
Id int64 `json:"id"`
|
||||
|
||||
/* (Optional) */
|
||||
Pin string `json:"pin"`
|
||||
|
||||
/* (Optional) */
|
||||
Remark string `json:"remark"`
|
||||
|
||||
/* (Optional) */
|
||||
Status int `json:"status"`
|
||||
|
||||
/* (Optional) */
|
||||
UpdateTime string `json:"updateTime"`
|
||||
|
||||
/* (Optional) */
|
||||
UsableFee float64 `json:"usableFee"`
|
||||
|
||||
/* (Optional) */
|
||||
WithdrawalsId string `json:"withdrawalsId"`
|
||||
}
|
||||
Generated
Vendored
+156
@@ -0,0 +1,156 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type AlterTableWithOnlineDDLRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* DDL命令修改的库名 */
|
||||
Database string `json:"database"`
|
||||
|
||||
/* DDL命令修改的表名 */
|
||||
Table string `json:"table"`
|
||||
|
||||
/* 需要执行的的DDL命令 */
|
||||
Command string `json:"command"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param database: DDL命令修改的库名 (Required)
|
||||
* param table: DDL命令修改的表名 (Required)
|
||||
* param command: 需要执行的的DDL命令 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewAlterTableWithOnlineDDLRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
database string,
|
||||
table string,
|
||||
command string,
|
||||
) *AlterTableWithOnlineDDLRequest {
|
||||
|
||||
return &AlterTableWithOnlineDDLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:alterTableWithOnlineDDL",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
Database: database,
|
||||
Table: table,
|
||||
Command: command,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param database: DDL命令修改的库名 (Required)
|
||||
* param table: DDL命令修改的表名 (Required)
|
||||
* param command: 需要执行的的DDL命令 (Required)
|
||||
*/
|
||||
func NewAlterTableWithOnlineDDLRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
database string,
|
||||
table string,
|
||||
command string,
|
||||
) *AlterTableWithOnlineDDLRequest {
|
||||
|
||||
return &AlterTableWithOnlineDDLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:alterTableWithOnlineDDL",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
Database: database,
|
||||
Table: table,
|
||||
Command: command,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewAlterTableWithOnlineDDLRequestWithoutParam() *AlterTableWithOnlineDDLRequest {
|
||||
|
||||
return &AlterTableWithOnlineDDLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:alterTableWithOnlineDDL",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *AlterTableWithOnlineDDLRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *AlterTableWithOnlineDDLRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param database: DDL命令修改的库名(Required) */
|
||||
func (r *AlterTableWithOnlineDDLRequest) SetDatabase(database string) {
|
||||
r.Database = database
|
||||
}
|
||||
|
||||
/* param table: DDL命令修改的表名(Required) */
|
||||
func (r *AlterTableWithOnlineDDLRequest) SetTable(table string) {
|
||||
r.Table = table
|
||||
}
|
||||
|
||||
/* param command: 需要执行的的DDL命令(Required) */
|
||||
func (r *AlterTableWithOnlineDDLRequest) SetCommand(command string) {
|
||||
r.Command = command
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r AlterTableWithOnlineDDLRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type AlterTableWithOnlineDDLResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result AlterTableWithOnlineDDLResult `json:"result"`
|
||||
}
|
||||
|
||||
type AlterTableWithOnlineDDLResult struct {
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type ClearBinlogsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewClearBinlogsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *ClearBinlogsRequest {
|
||||
|
||||
return &ClearBinlogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs:clearBinlogs",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewClearBinlogsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *ClearBinlogsRequest {
|
||||
|
||||
return &ClearBinlogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs:clearBinlogs",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewClearBinlogsRequestWithoutParam() *ClearBinlogsRequest {
|
||||
|
||||
return &ClearBinlogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs:clearBinlogs",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *ClearBinlogsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *ClearBinlogsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r ClearBinlogsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type ClearBinlogsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result ClearBinlogsResult `json:"result"`
|
||||
}
|
||||
|
||||
type ClearBinlogsResult struct {
|
||||
}
|
||||
Generated
Vendored
+140
@@ -0,0 +1,140 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CopyParameterGroupRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 参数组ID */
|
||||
ParameterGroupId string `json:"parameterGroupId"`
|
||||
|
||||
/* 参数组的名字 */
|
||||
ParameterGroupName string `json:"parameterGroupName"`
|
||||
|
||||
/* 参数组的描述 (Optional) */
|
||||
Description *string `json:"description"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: 参数组ID (Required)
|
||||
* param parameterGroupName: 参数组的名字 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCopyParameterGroupRequest(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
parameterGroupName string,
|
||||
) *CopyParameterGroupRequest {
|
||||
|
||||
return &CopyParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups:copyParameterGroup",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
ParameterGroupName: parameterGroupName,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: 参数组ID (Required)
|
||||
* param parameterGroupName: 参数组的名字 (Required)
|
||||
* param description: 参数组的描述 (Optional)
|
||||
*/
|
||||
func NewCopyParameterGroupRequestWithAllParams(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
parameterGroupName string,
|
||||
description *string,
|
||||
) *CopyParameterGroupRequest {
|
||||
|
||||
return &CopyParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups:copyParameterGroup",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
ParameterGroupName: parameterGroupName,
|
||||
Description: description,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCopyParameterGroupRequestWithoutParam() *CopyParameterGroupRequest {
|
||||
|
||||
return &CopyParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups:copyParameterGroup",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *CopyParameterGroupRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param parameterGroupId: 参数组ID(Required) */
|
||||
func (r *CopyParameterGroupRequest) SetParameterGroupId(parameterGroupId string) {
|
||||
r.ParameterGroupId = parameterGroupId
|
||||
}
|
||||
|
||||
/* param parameterGroupName: 参数组的名字(Required) */
|
||||
func (r *CopyParameterGroupRequest) SetParameterGroupName(parameterGroupName string) {
|
||||
r.ParameterGroupName = parameterGroupName
|
||||
}
|
||||
|
||||
/* param description: 参数组的描述(Optional) */
|
||||
func (r *CopyParameterGroupRequest) SetDescription(description string) {
|
||||
r.Description = &description
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CopyParameterGroupRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CopyParameterGroupResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CopyParameterGroupResult `json:"result"`
|
||||
}
|
||||
|
||||
type CopyParameterGroupResult struct {
|
||||
ParameterGroupId string `json:"parameterGroupId"`
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CreateAccountRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 账号名,在同一个RDS实例中,账号名不能重复。账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) */
|
||||
AccountName string `json:"accountName"`
|
||||
|
||||
/* 密码,密码的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) */
|
||||
AccountPassword string `json:"accountPassword"`
|
||||
|
||||
/* 备注信息,仅支持PostgreSQL (Optional) */
|
||||
Notes *string `json:"notes"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param accountName: 账号名,在同一个RDS实例中,账号名不能重复。账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param accountPassword: 密码,密码的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateAccountRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
accountName string,
|
||||
accountPassword string,
|
||||
) *CreateAccountRequest {
|
||||
|
||||
return &CreateAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
AccountName: accountName,
|
||||
AccountPassword: accountPassword,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param accountName: 账号名,在同一个RDS实例中,账号名不能重复。账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param accountPassword: 密码,密码的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param notes: 备注信息,仅支持PostgreSQL (Optional)
|
||||
*/
|
||||
func NewCreateAccountRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
accountName string,
|
||||
accountPassword string,
|
||||
notes *string,
|
||||
) *CreateAccountRequest {
|
||||
|
||||
return &CreateAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
AccountName: accountName,
|
||||
AccountPassword: accountPassword,
|
||||
Notes: notes,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateAccountRequestWithoutParam() *CreateAccountRequest {
|
||||
|
||||
return &CreateAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateAccountRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *CreateAccountRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param accountName: 账号名,在同一个RDS实例中,账号名不能重复。账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md)(Required) */
|
||||
func (r *CreateAccountRequest) SetAccountName(accountName string) {
|
||||
r.AccountName = accountName
|
||||
}
|
||||
|
||||
/* param accountPassword: 密码,密码的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md)(Required) */
|
||||
func (r *CreateAccountRequest) SetAccountPassword(accountPassword string) {
|
||||
r.AccountPassword = accountPassword
|
||||
}
|
||||
|
||||
/* param notes: 备注信息,仅支持PostgreSQL(Optional) */
|
||||
func (r *CreateAccountRequest) SetNotes(notes string) {
|
||||
r.Notes = ¬es
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateAccountRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateAccountResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateAccountResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateAccountResult struct {
|
||||
}
|
||||
Generated
Vendored
+125
@@ -0,0 +1,125 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CreateAccountForOpsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 运维账号到期时间,UTC时间格式 (Optional) */
|
||||
ExpiredTime *string `json:"expiredTime"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateAccountForOpsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *CreateAccountForOpsRequest {
|
||||
|
||||
return &CreateAccountForOpsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accountsForOps",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param expiredTime: 运维账号到期时间,UTC时间格式 (Optional)
|
||||
*/
|
||||
func NewCreateAccountForOpsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
expiredTime *string,
|
||||
) *CreateAccountForOpsRequest {
|
||||
|
||||
return &CreateAccountForOpsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accountsForOps",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
ExpiredTime: expiredTime,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateAccountForOpsRequestWithoutParam() *CreateAccountForOpsRequest {
|
||||
|
||||
return &CreateAccountForOpsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accountsForOps",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateAccountForOpsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *CreateAccountForOpsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param expiredTime: 运维账号到期时间,UTC时间格式(Optional) */
|
||||
func (r *CreateAccountForOpsRequest) SetExpiredTime(expiredTime string) {
|
||||
r.ExpiredTime = &expiredTime
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateAccountForOpsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateAccountForOpsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateAccountForOpsResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateAccountForOpsResult struct {
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CreateAuditRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 要开启的审计选项,各个选项之间用英文逗号或空格进行分割,例如:DATABASE_OBJECT_ACCESS_GROUP,ACKUP_RESTORE_GROU等<br>各个数据库版本支持的审计选项可以通过接口[describeAuditOptions](./describeAuditOptions.md)获得,各个审计项的具体含义可以参看微软的官方文档 */
|
||||
Enabled string `json:"enabled"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param enabled: 要开启的审计选项,各个选项之间用英文逗号或空格进行分割,例如:DATABASE_OBJECT_ACCESS_GROUP,ACKUP_RESTORE_GROU等<br>各个数据库版本支持的审计选项可以通过接口[describeAuditOptions](./describeAuditOptions.md)获得,各个审计项的具体含义可以参看微软的官方文档 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateAuditRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
enabled string,
|
||||
) *CreateAuditRequest {
|
||||
|
||||
return &CreateAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
Enabled: enabled,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param enabled: 要开启的审计选项,各个选项之间用英文逗号或空格进行分割,例如:DATABASE_OBJECT_ACCESS_GROUP,ACKUP_RESTORE_GROU等<br>各个数据库版本支持的审计选项可以通过接口[describeAuditOptions](./describeAuditOptions.md)获得,各个审计项的具体含义可以参看微软的官方文档 (Required)
|
||||
*/
|
||||
func NewCreateAuditRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
enabled string,
|
||||
) *CreateAuditRequest {
|
||||
|
||||
return &CreateAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
Enabled: enabled,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateAuditRequestWithoutParam() *CreateAuditRequest {
|
||||
|
||||
return &CreateAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateAuditRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *CreateAuditRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param enabled: 要开启的审计选项,各个选项之间用英文逗号或空格进行分割,例如:DATABASE_OBJECT_ACCESS_GROUP,ACKUP_RESTORE_GROU等<br>各个数据库版本支持的审计选项可以通过接口[describeAuditOptions](./describeAuditOptions.md)获得,各个审计项的具体含义可以参看微软的官方文档(Required) */
|
||||
func (r *CreateAuditRequest) SetEnabled(enabled string) {
|
||||
r.Enabled = enabled
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateAuditRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateAuditResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateAuditResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateAuditResult struct {
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type CreateBackupRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS实例ID,唯一标识一个实例 (Optional) */
|
||||
InstanceId *string `json:"instanceId"`
|
||||
|
||||
/* 备份规格 (Optional) */
|
||||
BackupSpec *rds.BackupSpec `json:"backupSpec"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateBackupRequest(
|
||||
regionId string,
|
||||
) *CreateBackupRequest {
|
||||
|
||||
return &CreateBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS实例ID,唯一标识一个实例 (Optional)
|
||||
* param backupSpec: 备份规格 (Optional)
|
||||
*/
|
||||
func NewCreateBackupRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId *string,
|
||||
backupSpec *rds.BackupSpec,
|
||||
) *CreateBackupRequest {
|
||||
|
||||
return &CreateBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
BackupSpec: backupSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateBackupRequestWithoutParam() *CreateBackupRequest {
|
||||
|
||||
return &CreateBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateBackupRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS实例ID,唯一标识一个实例(Optional) */
|
||||
func (r *CreateBackupRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = &instanceId
|
||||
}
|
||||
|
||||
/* param backupSpec: 备份规格(Optional) */
|
||||
func (r *CreateBackupRequest) SetBackupSpec(backupSpec *rds.BackupSpec) {
|
||||
r.BackupSpec = backupSpec
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateBackupRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateBackupResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateBackupResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateBackupResult struct {
|
||||
BackupId string `json:"backupId"`
|
||||
}
|
||||
Generated
Vendored
+129
@@ -0,0 +1,129 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CreateBackupSynchronicityRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 源实例ID */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 备份同步的目标地域 */
|
||||
DestRegion string `json:"destRegion"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: 源实例ID (Required)
|
||||
* param destRegion: 备份同步的目标地域 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateBackupSynchronicityRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
destRegion string,
|
||||
) *CreateBackupSynchronicityRequest {
|
||||
|
||||
return &CreateBackupSynchronicityRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
DestRegion: destRegion,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: 源实例ID (Required)
|
||||
* param destRegion: 备份同步的目标地域 (Required)
|
||||
*/
|
||||
func NewCreateBackupSynchronicityRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
destRegion string,
|
||||
) *CreateBackupSynchronicityRequest {
|
||||
|
||||
return &CreateBackupSynchronicityRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
DestRegion: destRegion,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateBackupSynchronicityRequestWithoutParam() *CreateBackupSynchronicityRequest {
|
||||
|
||||
return &CreateBackupSynchronicityRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateBackupSynchronicityRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: 源实例ID(Required) */
|
||||
func (r *CreateBackupSynchronicityRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param destRegion: 备份同步的目标地域(Required) */
|
||||
func (r *CreateBackupSynchronicityRequest) SetDestRegion(destRegion string) {
|
||||
r.DestRegion = destRegion
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateBackupSynchronicityRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateBackupSynchronicityResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateBackupSynchronicityResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateBackupSynchronicityResult struct {
|
||||
ServiceId string `json:"serviceId"`
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CreateDatabaseRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 数据库名,数据库名称的限制请参考[帮助中心文档](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) */
|
||||
DbName string `json:"dbName"`
|
||||
|
||||
/* 数据库的字符集名,当前支持的字符集请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) */
|
||||
CharacterSetName string `json:"characterSetName"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param dbName: 数据库名,数据库名称的限制请参考[帮助中心文档](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param characterSetName: 数据库的字符集名,当前支持的字符集请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateDatabaseRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
dbName string,
|
||||
characterSetName string,
|
||||
) *CreateDatabaseRequest {
|
||||
|
||||
return &CreateDatabaseRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
DbName: dbName,
|
||||
CharacterSetName: characterSetName,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param dbName: 数据库名,数据库名称的限制请参考[帮助中心文档](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param characterSetName: 数据库的字符集名,当前支持的字符集请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
|
||||
*/
|
||||
func NewCreateDatabaseRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
dbName string,
|
||||
characterSetName string,
|
||||
) *CreateDatabaseRequest {
|
||||
|
||||
return &CreateDatabaseRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
DbName: dbName,
|
||||
CharacterSetName: characterSetName,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateDatabaseRequestWithoutParam() *CreateDatabaseRequest {
|
||||
|
||||
return &CreateDatabaseRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateDatabaseRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *CreateDatabaseRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param dbName: 数据库名,数据库名称的限制请参考[帮助中心文档](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md)(Required) */
|
||||
func (r *CreateDatabaseRequest) SetDbName(dbName string) {
|
||||
r.DbName = dbName
|
||||
}
|
||||
|
||||
/* param characterSetName: 数据库的字符集名,当前支持的字符集请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)(Required) */
|
||||
func (r *CreateDatabaseRequest) SetCharacterSetName(characterSetName string) {
|
||||
r.CharacterSetName = characterSetName
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateDatabaseRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateDatabaseResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateDatabaseResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateDatabaseResult struct {
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type CreateInstanceRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 新建实例规格 */
|
||||
InstanceSpec *rds.DBInstanceSpec `json:"instanceSpec"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceSpec: 新建实例规格 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateInstanceRequest(
|
||||
regionId string,
|
||||
instanceSpec *rds.DBInstanceSpec,
|
||||
) *CreateInstanceRequest {
|
||||
|
||||
return &CreateInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceSpec: instanceSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceSpec: 新建实例规格 (Required)
|
||||
*/
|
||||
func NewCreateInstanceRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceSpec *rds.DBInstanceSpec,
|
||||
) *CreateInstanceRequest {
|
||||
|
||||
return &CreateInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceSpec: instanceSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateInstanceRequestWithoutParam() *CreateInstanceRequest {
|
||||
|
||||
return &CreateInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateInstanceRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceSpec: 新建实例规格(Required) */
|
||||
func (r *CreateInstanceRequest) SetInstanceSpec(instanceSpec *rds.DBInstanceSpec) {
|
||||
r.InstanceSpec = instanceSpec
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateInstanceRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateInstanceResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateInstanceResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateInstanceResult struct {
|
||||
InstanceId string `json:"instanceId"`
|
||||
OrderId string `json:"orderId"`
|
||||
}
|
||||
Generated
Vendored
+145
@@ -0,0 +1,145 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type CreateInstanceByTimeRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 根据源实例的哪个时间点创建新实例 */
|
||||
RestoreTime string `json:"restoreTime"`
|
||||
|
||||
/* 新建实例规格 */
|
||||
InstanceSpec *rds.RestoredNewDBInstanceSpec `json:"instanceSpec"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param restoreTime: 根据源实例的哪个时间点创建新实例 (Required)
|
||||
* param instanceSpec: 新建实例规格 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateInstanceByTimeRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
restoreTime string,
|
||||
instanceSpec *rds.RestoredNewDBInstanceSpec,
|
||||
) *CreateInstanceByTimeRequest {
|
||||
|
||||
return &CreateInstanceByTimeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:createInstanceByTime",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
RestoreTime: restoreTime,
|
||||
InstanceSpec: instanceSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param restoreTime: 根据源实例的哪个时间点创建新实例 (Required)
|
||||
* param instanceSpec: 新建实例规格 (Required)
|
||||
*/
|
||||
func NewCreateInstanceByTimeRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
restoreTime string,
|
||||
instanceSpec *rds.RestoredNewDBInstanceSpec,
|
||||
) *CreateInstanceByTimeRequest {
|
||||
|
||||
return &CreateInstanceByTimeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:createInstanceByTime",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
RestoreTime: restoreTime,
|
||||
InstanceSpec: instanceSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateInstanceByTimeRequestWithoutParam() *CreateInstanceByTimeRequest {
|
||||
|
||||
return &CreateInstanceByTimeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:createInstanceByTime",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateInstanceByTimeRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *CreateInstanceByTimeRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param restoreTime: 根据源实例的哪个时间点创建新实例(Required) */
|
||||
func (r *CreateInstanceByTimeRequest) SetRestoreTime(restoreTime string) {
|
||||
r.RestoreTime = restoreTime
|
||||
}
|
||||
|
||||
/* param instanceSpec: 新建实例规格(Required) */
|
||||
func (r *CreateInstanceByTimeRequest) SetInstanceSpec(instanceSpec *rds.RestoredNewDBInstanceSpec) {
|
||||
r.InstanceSpec = instanceSpec
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateInstanceByTimeRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateInstanceByTimeResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateInstanceByTimeResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateInstanceByTimeResult struct {
|
||||
InstanceId string `json:"instanceId"`
|
||||
OrderId string `json:"orderId"`
|
||||
}
|
||||
Generated
Vendored
+145
@@ -0,0 +1,145 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type CreateInstanceByTimeInCrossRegionRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 根据源实例的哪个时间点创建新实例 */
|
||||
RestoreTime string `json:"restoreTime"`
|
||||
|
||||
/* 跨地域备份同步服务ID */
|
||||
ServiceId string `json:"serviceId"`
|
||||
|
||||
/* 新建实例规格 */
|
||||
InstanceSpec *rds.RestoredNewDBInstanceSpec `json:"instanceSpec"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param restoreTime: 根据源实例的哪个时间点创建新实例 (Required)
|
||||
* param serviceId: 跨地域备份同步服务ID (Required)
|
||||
* param instanceSpec: 新建实例规格 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateInstanceByTimeInCrossRegionRequest(
|
||||
regionId string,
|
||||
restoreTime string,
|
||||
serviceId string,
|
||||
instanceSpec *rds.RestoredNewDBInstanceSpec,
|
||||
) *CreateInstanceByTimeInCrossRegionRequest {
|
||||
|
||||
return &CreateInstanceByTimeInCrossRegionRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities:createInstanceByTimeInCrossRegion",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
RestoreTime: restoreTime,
|
||||
ServiceId: serviceId,
|
||||
InstanceSpec: instanceSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param restoreTime: 根据源实例的哪个时间点创建新实例 (Required)
|
||||
* param serviceId: 跨地域备份同步服务ID (Required)
|
||||
* param instanceSpec: 新建实例规格 (Required)
|
||||
*/
|
||||
func NewCreateInstanceByTimeInCrossRegionRequestWithAllParams(
|
||||
regionId string,
|
||||
restoreTime string,
|
||||
serviceId string,
|
||||
instanceSpec *rds.RestoredNewDBInstanceSpec,
|
||||
) *CreateInstanceByTimeInCrossRegionRequest {
|
||||
|
||||
return &CreateInstanceByTimeInCrossRegionRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities:createInstanceByTimeInCrossRegion",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
RestoreTime: restoreTime,
|
||||
ServiceId: serviceId,
|
||||
InstanceSpec: instanceSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateInstanceByTimeInCrossRegionRequestWithoutParam() *CreateInstanceByTimeInCrossRegionRequest {
|
||||
|
||||
return &CreateInstanceByTimeInCrossRegionRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities:createInstanceByTimeInCrossRegion",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateInstanceByTimeInCrossRegionRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param restoreTime: 根据源实例的哪个时间点创建新实例(Required) */
|
||||
func (r *CreateInstanceByTimeInCrossRegionRequest) SetRestoreTime(restoreTime string) {
|
||||
r.RestoreTime = restoreTime
|
||||
}
|
||||
|
||||
/* param serviceId: 跨地域备份同步服务ID(Required) */
|
||||
func (r *CreateInstanceByTimeInCrossRegionRequest) SetServiceId(serviceId string) {
|
||||
r.ServiceId = serviceId
|
||||
}
|
||||
|
||||
/* param instanceSpec: 新建实例规格(Required) */
|
||||
func (r *CreateInstanceByTimeInCrossRegionRequest) SetInstanceSpec(instanceSpec *rds.RestoredNewDBInstanceSpec) {
|
||||
r.InstanceSpec = instanceSpec
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateInstanceByTimeInCrossRegionRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateInstanceByTimeInCrossRegionResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateInstanceByTimeInCrossRegionResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateInstanceByTimeInCrossRegionResult struct {
|
||||
InstanceId string `json:"instanceId"`
|
||||
OrderId string `json:"orderId"`
|
||||
}
|
||||
Generated
Vendored
+145
@@ -0,0 +1,145 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type CreateInstanceFromBackupRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 备份ID */
|
||||
BackupId string `json:"backupId"`
|
||||
|
||||
/* 标识是创建什么类型的实例,例如MySQL,SQL Server等,具体可参见文档[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)<br>**注意:备份来源实例的engine和要创建的实例的engine必须一致** */
|
||||
Engine string `json:"engine"`
|
||||
|
||||
/* 新建实例规格 */
|
||||
InstanceSpec *rds.RestoredNewDBInstanceSpec `json:"instanceSpec"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param backupId: 备份ID (Required)
|
||||
* param engine: 标识是创建什么类型的实例,例如MySQL,SQL Server等,具体可参见文档[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)<br>**注意:备份来源实例的engine和要创建的实例的engine必须一致** (Required)
|
||||
* param instanceSpec: 新建实例规格 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateInstanceFromBackupRequest(
|
||||
regionId string,
|
||||
backupId string,
|
||||
engine string,
|
||||
instanceSpec *rds.RestoredNewDBInstanceSpec,
|
||||
) *CreateInstanceFromBackupRequest {
|
||||
|
||||
return &CreateInstanceFromBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances:createInstanceFromBackup",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
BackupId: backupId,
|
||||
Engine: engine,
|
||||
InstanceSpec: instanceSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param backupId: 备份ID (Required)
|
||||
* param engine: 标识是创建什么类型的实例,例如MySQL,SQL Server等,具体可参见文档[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)<br>**注意:备份来源实例的engine和要创建的实例的engine必须一致** (Required)
|
||||
* param instanceSpec: 新建实例规格 (Required)
|
||||
*/
|
||||
func NewCreateInstanceFromBackupRequestWithAllParams(
|
||||
regionId string,
|
||||
backupId string,
|
||||
engine string,
|
||||
instanceSpec *rds.RestoredNewDBInstanceSpec,
|
||||
) *CreateInstanceFromBackupRequest {
|
||||
|
||||
return &CreateInstanceFromBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances:createInstanceFromBackup",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
BackupId: backupId,
|
||||
Engine: engine,
|
||||
InstanceSpec: instanceSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateInstanceFromBackupRequestWithoutParam() *CreateInstanceFromBackupRequest {
|
||||
|
||||
return &CreateInstanceFromBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances:createInstanceFromBackup",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateInstanceFromBackupRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param backupId: 备份ID(Required) */
|
||||
func (r *CreateInstanceFromBackupRequest) SetBackupId(backupId string) {
|
||||
r.BackupId = backupId
|
||||
}
|
||||
|
||||
/* param engine: 标识是创建什么类型的实例,例如MySQL,SQL Server等,具体可参见文档[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)<br>**注意:备份来源实例的engine和要创建的实例的engine必须一致**(Required) */
|
||||
func (r *CreateInstanceFromBackupRequest) SetEngine(engine string) {
|
||||
r.Engine = engine
|
||||
}
|
||||
|
||||
/* param instanceSpec: 新建实例规格(Required) */
|
||||
func (r *CreateInstanceFromBackupRequest) SetInstanceSpec(instanceSpec *rds.RestoredNewDBInstanceSpec) {
|
||||
r.InstanceSpec = instanceSpec
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateInstanceFromBackupRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateInstanceFromBackupResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateInstanceFromBackupResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateInstanceFromBackupResult struct {
|
||||
InstanceId string `json:"instanceId"`
|
||||
OrderId string `json:"orderId"`
|
||||
}
|
||||
Generated
Vendored
+154
@@ -0,0 +1,154 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CreateParameterGroupRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 实例引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) */
|
||||
Engine string `json:"engine"`
|
||||
|
||||
/* 实例引擎版本,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) */
|
||||
EngineVersion string `json:"engineVersion"`
|
||||
|
||||
/* 参数组的名字 */
|
||||
ParameterGroupName string `json:"parameterGroupName"`
|
||||
|
||||
/* 参数组的描述 (Optional) */
|
||||
Description *string `json:"description"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param engine: 实例引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
|
||||
* param engineVersion: 实例引擎版本,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
|
||||
* param parameterGroupName: 参数组的名字 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateParameterGroupRequest(
|
||||
regionId string,
|
||||
engine string,
|
||||
engineVersion string,
|
||||
parameterGroupName string,
|
||||
) *CreateParameterGroupRequest {
|
||||
|
||||
return &CreateParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
Engine: engine,
|
||||
EngineVersion: engineVersion,
|
||||
ParameterGroupName: parameterGroupName,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param engine: 实例引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
|
||||
* param engineVersion: 实例引擎版本,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
|
||||
* param parameterGroupName: 参数组的名字 (Required)
|
||||
* param description: 参数组的描述 (Optional)
|
||||
*/
|
||||
func NewCreateParameterGroupRequestWithAllParams(
|
||||
regionId string,
|
||||
engine string,
|
||||
engineVersion string,
|
||||
parameterGroupName string,
|
||||
description *string,
|
||||
) *CreateParameterGroupRequest {
|
||||
|
||||
return &CreateParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
Engine: engine,
|
||||
EngineVersion: engineVersion,
|
||||
ParameterGroupName: parameterGroupName,
|
||||
Description: description,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateParameterGroupRequestWithoutParam() *CreateParameterGroupRequest {
|
||||
|
||||
return &CreateParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *CreateParameterGroupRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param engine: 实例引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)(Required) */
|
||||
func (r *CreateParameterGroupRequest) SetEngine(engine string) {
|
||||
r.Engine = engine
|
||||
}
|
||||
|
||||
/* param engineVersion: 实例引擎版本,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)(Required) */
|
||||
func (r *CreateParameterGroupRequest) SetEngineVersion(engineVersion string) {
|
||||
r.EngineVersion = engineVersion
|
||||
}
|
||||
|
||||
/* param parameterGroupName: 参数组的名字(Required) */
|
||||
func (r *CreateParameterGroupRequest) SetParameterGroupName(parameterGroupName string) {
|
||||
r.ParameterGroupName = parameterGroupName
|
||||
}
|
||||
|
||||
/* param description: 参数组的描述(Optional) */
|
||||
func (r *CreateParameterGroupRequest) SetDescription(description string) {
|
||||
r.Description = &description
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateParameterGroupRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateParameterGroupResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateParameterGroupResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateParameterGroupResult struct {
|
||||
ParameterGroupId string `json:"parameterGroupId"`
|
||||
}
|
||||
Generated
Vendored
+249
@@ -0,0 +1,249 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CreateROInstanceRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 实例名称,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) */
|
||||
InstanceName string `json:"instanceName"`
|
||||
|
||||
/* 只读实例规格FlavorId */
|
||||
InstanceClass string `json:"instanceClass"`
|
||||
|
||||
/* 存储类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md),缺省值为:LOCAL_SSD (Optional) */
|
||||
InstanceStorageType *string `json:"instanceStorageType"`
|
||||
|
||||
/* 磁盘空间 */
|
||||
InstanceStorageGB int `json:"instanceStorageGB"`
|
||||
|
||||
/* 可用区ID */
|
||||
AzId string `json:"azId"`
|
||||
|
||||
/* VPC的ID,如果没有填写就保持和常规实例一样的VPC (Optional) */
|
||||
VpcId *string `json:"vpcId"`
|
||||
|
||||
/* 子网ID,如果没有填写就保持和常规实例一样的subnet (Optional) */
|
||||
SubnetId *string `json:"subnetId"`
|
||||
|
||||
/* 参数组ID,缺省采用和常规实例一样的参数组 (Optional) */
|
||||
ParameterGroup *string `json:"parameterGroup"`
|
||||
|
||||
/* 实例数据加密(存储类型为云硬盘才支持数据加密)。false:不加密;true:加密。缺省为false。 (Optional) */
|
||||
StorageEncrypted *bool `json:"storageEncrypted"`
|
||||
|
||||
/* 创建只读实例的数目,缺省为1 (Optional) */
|
||||
Count *int `json:"count"`
|
||||
|
||||
/* 只读代理服务的ID,缺省值为 “NULL”,表示不绑定代理服务 (Optional) */
|
||||
RoInstanceProxy *string `json:"roInstanceProxy"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param instanceName: 实例名称,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param instanceClass: 只读实例规格FlavorId (Required)
|
||||
* param instanceStorageGB: 磁盘空间 (Required)
|
||||
* param azId: 可用区ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateROInstanceRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
instanceName string,
|
||||
instanceClass string,
|
||||
instanceStorageGB int,
|
||||
azId string,
|
||||
) *CreateROInstanceRequest {
|
||||
|
||||
return &CreateROInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:createROInstance",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
InstanceName: instanceName,
|
||||
InstanceClass: instanceClass,
|
||||
InstanceStorageGB: instanceStorageGB,
|
||||
AzId: azId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param instanceName: 实例名称,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param instanceClass: 只读实例规格FlavorId (Required)
|
||||
* param instanceStorageType: 存储类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md),缺省值为:LOCAL_SSD (Optional)
|
||||
* param instanceStorageGB: 磁盘空间 (Required)
|
||||
* param azId: 可用区ID (Required)
|
||||
* param vpcId: VPC的ID,如果没有填写就保持和常规实例一样的VPC (Optional)
|
||||
* param subnetId: 子网ID,如果没有填写就保持和常规实例一样的subnet (Optional)
|
||||
* param parameterGroup: 参数组ID,缺省采用和常规实例一样的参数组 (Optional)
|
||||
* param storageEncrypted: 实例数据加密(存储类型为云硬盘才支持数据加密)。false:不加密;true:加密。缺省为false。 (Optional)
|
||||
* param count: 创建只读实例的数目,缺省为1 (Optional)
|
||||
* param roInstanceProxy: 只读代理服务的ID,缺省值为 “NULL”,表示不绑定代理服务 (Optional)
|
||||
*/
|
||||
func NewCreateROInstanceRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
instanceName string,
|
||||
instanceClass string,
|
||||
instanceStorageType *string,
|
||||
instanceStorageGB int,
|
||||
azId string,
|
||||
vpcId *string,
|
||||
subnetId *string,
|
||||
parameterGroup *string,
|
||||
storageEncrypted *bool,
|
||||
count *int,
|
||||
roInstanceProxy *string,
|
||||
) *CreateROInstanceRequest {
|
||||
|
||||
return &CreateROInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:createROInstance",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
InstanceName: instanceName,
|
||||
InstanceClass: instanceClass,
|
||||
InstanceStorageType: instanceStorageType,
|
||||
InstanceStorageGB: instanceStorageGB,
|
||||
AzId: azId,
|
||||
VpcId: vpcId,
|
||||
SubnetId: subnetId,
|
||||
ParameterGroup: parameterGroup,
|
||||
StorageEncrypted: storageEncrypted,
|
||||
Count: count,
|
||||
RoInstanceProxy: roInstanceProxy,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateROInstanceRequestWithoutParam() *CreateROInstanceRequest {
|
||||
|
||||
return &CreateROInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:createROInstance",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateROInstanceRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *CreateROInstanceRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param instanceName: 实例名称,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md)(Required) */
|
||||
func (r *CreateROInstanceRequest) SetInstanceName(instanceName string) {
|
||||
r.InstanceName = instanceName
|
||||
}
|
||||
|
||||
/* param instanceClass: 只读实例规格FlavorId(Required) */
|
||||
func (r *CreateROInstanceRequest) SetInstanceClass(instanceClass string) {
|
||||
r.InstanceClass = instanceClass
|
||||
}
|
||||
|
||||
/* param instanceStorageType: 存储类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md),缺省值为:LOCAL_SSD(Optional) */
|
||||
func (r *CreateROInstanceRequest) SetInstanceStorageType(instanceStorageType string) {
|
||||
r.InstanceStorageType = &instanceStorageType
|
||||
}
|
||||
|
||||
/* param instanceStorageGB: 磁盘空间(Required) */
|
||||
func (r *CreateROInstanceRequest) SetInstanceStorageGB(instanceStorageGB int) {
|
||||
r.InstanceStorageGB = instanceStorageGB
|
||||
}
|
||||
|
||||
/* param azId: 可用区ID(Required) */
|
||||
func (r *CreateROInstanceRequest) SetAzId(azId string) {
|
||||
r.AzId = azId
|
||||
}
|
||||
|
||||
/* param vpcId: VPC的ID,如果没有填写就保持和常规实例一样的VPC(Optional) */
|
||||
func (r *CreateROInstanceRequest) SetVpcId(vpcId string) {
|
||||
r.VpcId = &vpcId
|
||||
}
|
||||
|
||||
/* param subnetId: 子网ID,如果没有填写就保持和常规实例一样的subnet(Optional) */
|
||||
func (r *CreateROInstanceRequest) SetSubnetId(subnetId string) {
|
||||
r.SubnetId = &subnetId
|
||||
}
|
||||
|
||||
/* param parameterGroup: 参数组ID,缺省采用和常规实例一样的参数组(Optional) */
|
||||
func (r *CreateROInstanceRequest) SetParameterGroup(parameterGroup string) {
|
||||
r.ParameterGroup = ¶meterGroup
|
||||
}
|
||||
|
||||
/* param storageEncrypted: 实例数据加密(存储类型为云硬盘才支持数据加密)。false:不加密;true:加密。缺省为false。(Optional) */
|
||||
func (r *CreateROInstanceRequest) SetStorageEncrypted(storageEncrypted bool) {
|
||||
r.StorageEncrypted = &storageEncrypted
|
||||
}
|
||||
|
||||
/* param count: 创建只读实例的数目,缺省为1(Optional) */
|
||||
func (r *CreateROInstanceRequest) SetCount(count int) {
|
||||
r.Count = &count
|
||||
}
|
||||
|
||||
/* param roInstanceProxy: 只读代理服务的ID,缺省值为 “NULL”,表示不绑定代理服务(Optional) */
|
||||
func (r *CreateROInstanceRequest) SetRoInstanceProxy(roInstanceProxy string) {
|
||||
r.RoInstanceProxy = &roInstanceProxy
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateROInstanceRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateROInstanceResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateROInstanceResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateROInstanceResult struct {
|
||||
RoInstanceId []string `json:"roInstanceId"`
|
||||
OrderId string `json:"orderId"`
|
||||
}
|
||||
Generated
Vendored
+149
@@ -0,0 +1,149 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type CreateReadWriteProxyRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 延迟阈值,范围是0~1000,单位:秒,默认为100 (Optional) */
|
||||
DelayThreshold *int `json:"delayThreshold"`
|
||||
|
||||
/* 读写分离代理后端实例负载均衡策略,默认值为LEAST_CURRENT_OPERATIONS;当前支持的负载均衡策略请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
|
||||
LoadBalancerPolicy *string `json:"loadBalancerPolicy"`
|
||||
|
||||
/* 后端实例健康检查配置 (Optional) */
|
||||
HealthCheckSpec *rds.HealthCheckSpec `json:"healthCheckSpec"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateReadWriteProxyRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *CreateReadWriteProxyRequest {
|
||||
|
||||
return &CreateReadWriteProxyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID (Required)
|
||||
* param delayThreshold: 延迟阈值,范围是0~1000,单位:秒,默认为100 (Optional)
|
||||
* param loadBalancerPolicy: 读写分离代理后端实例负载均衡策略,默认值为LEAST_CURRENT_OPERATIONS;当前支持的负载均衡策略请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional)
|
||||
* param healthCheckSpec: 后端实例健康检查配置 (Optional)
|
||||
*/
|
||||
func NewCreateReadWriteProxyRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
delayThreshold *int,
|
||||
loadBalancerPolicy *string,
|
||||
healthCheckSpec *rds.HealthCheckSpec,
|
||||
) *CreateReadWriteProxyRequest {
|
||||
|
||||
return &CreateReadWriteProxyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
DelayThreshold: delayThreshold,
|
||||
LoadBalancerPolicy: loadBalancerPolicy,
|
||||
HealthCheckSpec: healthCheckSpec,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateReadWriteProxyRequestWithoutParam() *CreateReadWriteProxyRequest {
|
||||
|
||||
return &CreateReadWriteProxyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateReadWriteProxyRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID(Required) */
|
||||
func (r *CreateReadWriteProxyRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param delayThreshold: 延迟阈值,范围是0~1000,单位:秒,默认为100(Optional) */
|
||||
func (r *CreateReadWriteProxyRequest) SetDelayThreshold(delayThreshold int) {
|
||||
r.DelayThreshold = &delayThreshold
|
||||
}
|
||||
|
||||
/* param loadBalancerPolicy: 读写分离代理后端实例负载均衡策略,默认值为LEAST_CURRENT_OPERATIONS;当前支持的负载均衡策略请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)(Optional) */
|
||||
func (r *CreateReadWriteProxyRequest) SetLoadBalancerPolicy(loadBalancerPolicy string) {
|
||||
r.LoadBalancerPolicy = &loadBalancerPolicy
|
||||
}
|
||||
|
||||
/* param healthCheckSpec: 后端实例健康检查配置(Optional) */
|
||||
func (r *CreateReadWriteProxyRequest) SetHealthCheckSpec(healthCheckSpec *rds.HealthCheckSpec) {
|
||||
r.HealthCheckSpec = healthCheckSpec
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateReadWriteProxyRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateReadWriteProxyResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateReadWriteProxyResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateReadWriteProxyResult struct {
|
||||
ReadWriteProxyId string `json:"readWriteProxyId"`
|
||||
}
|
||||
Generated
Vendored
+142
@@ -0,0 +1,142 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type CreateSuperAccountRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 账号名,在同一个RDS实例中,账号名不能重复。账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) */
|
||||
AccountName string `json:"accountName"`
|
||||
|
||||
/* 密码,密码的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) */
|
||||
AccountPassword string `json:"accountPassword"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param accountName: 账号名,在同一个RDS实例中,账号名不能重复。账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param accountPassword: 密码,密码的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewCreateSuperAccountRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
accountName string,
|
||||
accountPassword string,
|
||||
) *CreateSuperAccountRequest {
|
||||
|
||||
return &CreateSuperAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts:createSuperAccount",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
AccountName: accountName,
|
||||
AccountPassword: accountPassword,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param accountName: 账号名,在同一个RDS实例中,账号名不能重复。账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
* param accountPassword: 密码,密码的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Required)
|
||||
*/
|
||||
func NewCreateSuperAccountRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
accountName string,
|
||||
accountPassword string,
|
||||
) *CreateSuperAccountRequest {
|
||||
|
||||
return &CreateSuperAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts:createSuperAccount",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
AccountName: accountName,
|
||||
AccountPassword: accountPassword,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewCreateSuperAccountRequestWithoutParam() *CreateSuperAccountRequest {
|
||||
|
||||
return &CreateSuperAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts:createSuperAccount",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *CreateSuperAccountRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *CreateSuperAccountRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param accountName: 账号名,在同一个RDS实例中,账号名不能重复。账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md)(Required) */
|
||||
func (r *CreateSuperAccountRequest) SetAccountName(accountName string) {
|
||||
r.AccountName = accountName
|
||||
}
|
||||
|
||||
/* param accountPassword: 密码,密码的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Database-and-Cache-Service/RDS/Introduction/Restrictions/SQLServer-Restrictions.md)(Required) */
|
||||
func (r *CreateSuperAccountRequest) SetAccountPassword(accountPassword string) {
|
||||
r.AccountPassword = accountPassword
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r CreateSuperAccountRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type CreateSuperAccountResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result CreateSuperAccountResult `json:"result"`
|
||||
}
|
||||
|
||||
type CreateSuperAccountResult struct {
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteAccountRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 账号名,在同一个实例中账号名不能重复 */
|
||||
AccountName string `json:"accountName"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param accountName: 账号名,在同一个实例中账号名不能重复 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteAccountRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
accountName string,
|
||||
) *DeleteAccountRequest {
|
||||
|
||||
return &DeleteAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts/{accountName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
AccountName: accountName,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param accountName: 账号名,在同一个实例中账号名不能重复 (Required)
|
||||
*/
|
||||
func NewDeleteAccountRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
accountName string,
|
||||
) *DeleteAccountRequest {
|
||||
|
||||
return &DeleteAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts/{accountName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
AccountName: accountName,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteAccountRequestWithoutParam() *DeleteAccountRequest {
|
||||
|
||||
return &DeleteAccountRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts/{accountName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DeleteAccountRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DeleteAccountRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param accountName: 账号名,在同一个实例中账号名不能重复(Required) */
|
||||
func (r *DeleteAccountRequest) SetAccountName(accountName string) {
|
||||
r.AccountName = accountName
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteAccountRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteAccountResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteAccountResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteAccountResult struct {
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteAuditRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteAuditRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DeleteAuditRequest {
|
||||
|
||||
return &DeleteAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDeleteAuditRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DeleteAuditRequest {
|
||||
|
||||
return &DeleteAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteAuditRequestWithoutParam() *DeleteAuditRequest {
|
||||
|
||||
return &DeleteAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DeleteAuditRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DeleteAuditRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteAuditRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteAuditResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteAuditResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteAuditResult struct {
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteBackupRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 备份ID */
|
||||
BackupId string `json:"backupId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param backupId: 备份ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteBackupRequest(
|
||||
regionId string,
|
||||
backupId string,
|
||||
) *DeleteBackupRequest {
|
||||
|
||||
return &DeleteBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups/{backupId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
BackupId: backupId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param backupId: 备份ID (Required)
|
||||
*/
|
||||
func NewDeleteBackupRequestWithAllParams(
|
||||
regionId string,
|
||||
backupId string,
|
||||
) *DeleteBackupRequest {
|
||||
|
||||
return &DeleteBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups/{backupId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
BackupId: backupId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteBackupRequestWithoutParam() *DeleteBackupRequest {
|
||||
|
||||
return &DeleteBackupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups/{backupId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DeleteBackupRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param backupId: 备份ID(Required) */
|
||||
func (r *DeleteBackupRequest) SetBackupId(backupId string) {
|
||||
r.BackupId = backupId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteBackupRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteBackupResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteBackupResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteBackupResult struct {
|
||||
}
|
||||
Generated
Vendored
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteBackupSynchronicityRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 跨地域备份同步服务ID */
|
||||
ServiceId string `json:"serviceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param serviceId: 跨地域备份同步服务ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteBackupSynchronicityRequest(
|
||||
regionId string,
|
||||
serviceId string,
|
||||
) *DeleteBackupSynchronicityRequest {
|
||||
|
||||
return &DeleteBackupSynchronicityRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities/{serviceId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ServiceId: serviceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param serviceId: 跨地域备份同步服务ID (Required)
|
||||
*/
|
||||
func NewDeleteBackupSynchronicityRequestWithAllParams(
|
||||
regionId string,
|
||||
serviceId string,
|
||||
) *DeleteBackupSynchronicityRequest {
|
||||
|
||||
return &DeleteBackupSynchronicityRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities/{serviceId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ServiceId: serviceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteBackupSynchronicityRequestWithoutParam() *DeleteBackupSynchronicityRequest {
|
||||
|
||||
return &DeleteBackupSynchronicityRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities/{serviceId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DeleteBackupSynchronicityRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param serviceId: 跨地域备份同步服务ID(Required) */
|
||||
func (r *DeleteBackupSynchronicityRequest) SetServiceId(serviceId string) {
|
||||
r.ServiceId = serviceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteBackupSynchronicityRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteBackupSynchronicityResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteBackupSynchronicityResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteBackupSynchronicityResult struct {
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteDatabaseRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 库名称 */
|
||||
DbName string `json:"dbName"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param dbName: 库名称 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteDatabaseRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
dbName string,
|
||||
) *DeleteDatabaseRequest {
|
||||
|
||||
return &DeleteDatabaseRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases/{dbName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
DbName: dbName,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param dbName: 库名称 (Required)
|
||||
*/
|
||||
func NewDeleteDatabaseRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
dbName string,
|
||||
) *DeleteDatabaseRequest {
|
||||
|
||||
return &DeleteDatabaseRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases/{dbName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
DbName: dbName,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteDatabaseRequestWithoutParam() *DeleteDatabaseRequest {
|
||||
|
||||
return &DeleteDatabaseRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases/{dbName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DeleteDatabaseRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DeleteDatabaseRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param dbName: 库名称(Required) */
|
||||
func (r *DeleteDatabaseRequest) SetDbName(dbName string) {
|
||||
r.DbName = dbName
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteDatabaseRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteDatabaseResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteDatabaseResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteDatabaseResult struct {
|
||||
}
|
||||
Generated
Vendored
+139
@@ -0,0 +1,139 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteImportFileRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 单库上云文件名 */
|
||||
FileName string `json:"fileName"`
|
||||
|
||||
/* 共享文件的全局ID,可从上传文件查询接口describeImportFiles中获取;如果该文件不是共享文件,则无须输入该字段 (Optional) */
|
||||
SharedFileGid *string `json:"sharedFileGid"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param fileName: 单库上云文件名 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteImportFileRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
fileName string,
|
||||
) *DeleteImportFileRequest {
|
||||
|
||||
return &DeleteImportFileRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/importFiles/{fileName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
FileName: fileName,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param fileName: 单库上云文件名 (Required)
|
||||
* param sharedFileGid: 共享文件的全局ID,可从上传文件查询接口describeImportFiles中获取;如果该文件不是共享文件,则无须输入该字段 (Optional)
|
||||
*/
|
||||
func NewDeleteImportFileRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
fileName string,
|
||||
sharedFileGid *string,
|
||||
) *DeleteImportFileRequest {
|
||||
|
||||
return &DeleteImportFileRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/importFiles/{fileName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
FileName: fileName,
|
||||
SharedFileGid: sharedFileGid,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteImportFileRequestWithoutParam() *DeleteImportFileRequest {
|
||||
|
||||
return &DeleteImportFileRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/importFiles/{fileName}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DeleteImportFileRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DeleteImportFileRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param fileName: 单库上云文件名(Required) */
|
||||
func (r *DeleteImportFileRequest) SetFileName(fileName string) {
|
||||
r.FileName = fileName
|
||||
}
|
||||
|
||||
/* param sharedFileGid: 共享文件的全局ID,可从上传文件查询接口describeImportFiles中获取;如果该文件不是共享文件,则无须输入该字段(Optional) */
|
||||
func (r *DeleteImportFileRequest) SetSharedFileGid(sharedFileGid string) {
|
||||
r.SharedFileGid = &sharedFileGid
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteImportFileRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteImportFileResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteImportFileResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteImportFileResult struct {
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteInstanceRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteInstanceRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DeleteInstanceRequest {
|
||||
|
||||
return &DeleteInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDeleteInstanceRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DeleteInstanceRequest {
|
||||
|
||||
return &DeleteInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteInstanceRequestWithoutParam() *DeleteInstanceRequest {
|
||||
|
||||
return &DeleteInstanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DeleteInstanceRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DeleteInstanceRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteInstanceRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteInstanceResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteInstanceResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteInstanceResult struct {
|
||||
}
|
||||
Generated
Vendored
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteParameterGroupRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* Parameter Group ID */
|
||||
ParameterGroupId string `json:"parameterGroupId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: Parameter Group ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteParameterGroupRequest(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
) *DeleteParameterGroupRequest {
|
||||
|
||||
return &DeleteParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: Parameter Group ID (Required)
|
||||
*/
|
||||
func NewDeleteParameterGroupRequestWithAllParams(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
) *DeleteParameterGroupRequest {
|
||||
|
||||
return &DeleteParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteParameterGroupRequestWithoutParam() *DeleteParameterGroupRequest {
|
||||
|
||||
return &DeleteParameterGroupRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DeleteParameterGroupRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param parameterGroupId: Parameter Group ID(Required) */
|
||||
func (r *DeleteParameterGroupRequest) SetParameterGroupId(parameterGroupId string) {
|
||||
r.ParameterGroupId = parameterGroupId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteParameterGroupRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteParameterGroupResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteParameterGroupResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteParameterGroupResult struct {
|
||||
}
|
||||
Generated
Vendored
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DeleteReadWriteProxyRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 读写分离代理服务ID */
|
||||
ReadWriteProxyId string `json:"readWriteProxyId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param readWriteProxyId: 读写分离代理服务ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDeleteReadWriteProxyRequest(
|
||||
regionId string,
|
||||
readWriteProxyId string,
|
||||
) *DeleteReadWriteProxyRequest {
|
||||
|
||||
return &DeleteReadWriteProxyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy/{readWriteProxyId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ReadWriteProxyId: readWriteProxyId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param readWriteProxyId: 读写分离代理服务ID (Required)
|
||||
*/
|
||||
func NewDeleteReadWriteProxyRequestWithAllParams(
|
||||
regionId string,
|
||||
readWriteProxyId string,
|
||||
) *DeleteReadWriteProxyRequest {
|
||||
|
||||
return &DeleteReadWriteProxyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy/{readWriteProxyId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ReadWriteProxyId: readWriteProxyId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDeleteReadWriteProxyRequestWithoutParam() *DeleteReadWriteProxyRequest {
|
||||
|
||||
return &DeleteReadWriteProxyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy/{readWriteProxyId}",
|
||||
Method: "DELETE",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DeleteReadWriteProxyRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param readWriteProxyId: 读写分离代理服务ID(Required) */
|
||||
func (r *DeleteReadWriteProxyRequest) SetReadWriteProxyId(readWriteProxyId string) {
|
||||
r.ReadWriteProxyId = readWriteProxyId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DeleteReadWriteProxyRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DeleteReadWriteProxyResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DeleteReadWriteProxyResult `json:"result"`
|
||||
}
|
||||
|
||||
type DeleteReadWriteProxyResult struct {
|
||||
}
|
||||
Generated
Vendored
+131
@@ -0,0 +1,131 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeAccountPrivilegeRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 账号名,在同一个实例中账号名不能重复 */
|
||||
AccountName string `json:"accountName"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param accountName: 账号名,在同一个实例中账号名不能重复 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAccountPrivilegeRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
accountName string,
|
||||
) *DescribeAccountPrivilegeRequest {
|
||||
|
||||
return &DescribeAccountPrivilegeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts/{accountName}",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
AccountName: accountName,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param accountName: 账号名,在同一个实例中账号名不能重复 (Required)
|
||||
*/
|
||||
func NewDescribeAccountPrivilegeRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
accountName string,
|
||||
) *DescribeAccountPrivilegeRequest {
|
||||
|
||||
return &DescribeAccountPrivilegeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts/{accountName}",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
AccountName: accountName,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAccountPrivilegeRequestWithoutParam() *DescribeAccountPrivilegeRequest {
|
||||
|
||||
return &DescribeAccountPrivilegeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts/{accountName}",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAccountPrivilegeRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeAccountPrivilegeRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param accountName: 账号名,在同一个实例中账号名不能重复(Required) */
|
||||
func (r *DescribeAccountPrivilegeRequest) SetAccountName(accountName string) {
|
||||
r.AccountName = accountName
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAccountPrivilegeRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAccountPrivilegeResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAccountPrivilegeResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAccountPrivilegeResult struct {
|
||||
DatabasePrivileges []rds.DatabasePrivilege `json:"databasePrivileges"`
|
||||
GlobalPrivileges []string `json:"globalPrivileges"`
|
||||
}
|
||||
Generated
Vendored
+139
@@ -0,0 +1,139 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeAccountsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAccountsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeAccountsRequest {
|
||||
|
||||
return &DescribeAccountsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口 (Optional)
|
||||
*/
|
||||
func NewDescribeAccountsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeAccountsRequest {
|
||||
|
||||
return &DescribeAccountsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAccountsRequestWithoutParam() *DescribeAccountsRequest {
|
||||
|
||||
return &DescribeAccountsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accounts",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAccountsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeAccountsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页;(Optional) */
|
||||
func (r *DescribeAccountsRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口(Optional) */
|
||||
func (r *DescribeAccountsRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAccountsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAccountsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAccountsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAccountsResult struct {
|
||||
Accounts []rds.Account `json:"accounts"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+117
@@ -0,0 +1,117 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeAccountsForOpsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAccountsForOpsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeAccountsForOpsRequest {
|
||||
|
||||
return &DescribeAccountsForOpsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accountsForOps",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeAccountsForOpsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeAccountsForOpsRequest {
|
||||
|
||||
return &DescribeAccountsForOpsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accountsForOps",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAccountsForOpsRequestWithoutParam() *DescribeAccountsForOpsRequest {
|
||||
|
||||
return &DescribeAccountsForOpsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/accountsForOps",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAccountsForOpsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeAccountsForOpsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAccountsForOpsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAccountsForOpsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAccountsForOpsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAccountsForOpsResult struct {
|
||||
Accounts []rds.DBInstanceAccountForOps `json:"accounts"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+163
@@ -0,0 +1,163 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeActiveQueryPerformanceRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 需要查询的数据库名,多个数据库名之间用英文逗号分隔,默认所有数据库 (Optional) */
|
||||
Db *string `json:"db"`
|
||||
|
||||
/* 返回执行时间大于等于threshold的记录,默认10,单位秒 (Optional) */
|
||||
Threshold *int `json:"threshold"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeActiveQueryPerformanceRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeActiveQueryPerformanceRequest {
|
||||
|
||||
return &DescribeActiveQueryPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeActiveQueryPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param db: 需要查询的数据库名,多个数据库名之间用英文逗号分隔,默认所有数据库 (Optional)
|
||||
* param threshold: 返回执行时间大于等于threshold的记录,默认10,单位秒 (Optional)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数 (Optional)
|
||||
*/
|
||||
func NewDescribeActiveQueryPerformanceRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
db *string,
|
||||
threshold *int,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeActiveQueryPerformanceRequest {
|
||||
|
||||
return &DescribeActiveQueryPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeActiveQueryPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
Db: db,
|
||||
Threshold: threshold,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeActiveQueryPerformanceRequestWithoutParam() *DescribeActiveQueryPerformanceRequest {
|
||||
|
||||
return &DescribeActiveQueryPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeActiveQueryPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeActiveQueryPerformanceRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeActiveQueryPerformanceRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param db: 需要查询的数据库名,多个数据库名之间用英文逗号分隔,默认所有数据库(Optional) */
|
||||
func (r *DescribeActiveQueryPerformanceRequest) SetDb(db string) {
|
||||
r.Db = &db
|
||||
}
|
||||
|
||||
/* param threshold: 返回执行时间大于等于threshold的记录,默认10,单位秒(Optional) */
|
||||
func (r *DescribeActiveQueryPerformanceRequest) SetThreshold(threshold int) {
|
||||
r.Threshold = &threshold
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。(Optional) */
|
||||
func (r *DescribeActiveQueryPerformanceRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数(Optional) */
|
||||
func (r *DescribeActiveQueryPerformanceRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeActiveQueryPerformanceRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeActiveQueryPerformanceResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeActiveQueryPerformanceResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeActiveQueryPerformanceResult struct {
|
||||
ActiveQueryPerformanceResult []rds.ActiveQueryPerformanceResult `json:"activeQueryPerformanceResult"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
PageNumber int `json:"pageNumber"`
|
||||
PageSize int `json:"pageSize"`
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeAuditRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAuditRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeAuditRequest {
|
||||
|
||||
return &DescribeAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeAuditRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeAuditRequest {
|
||||
|
||||
return &DescribeAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAuditRequestWithoutParam() *DescribeAuditRequest {
|
||||
|
||||
return &DescribeAuditRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAuditRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeAuditRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAuditRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAuditResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAuditResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAuditResult struct {
|
||||
Enabled []string `json:"enabled"`
|
||||
}
|
||||
Generated
Vendored
+130
@@ -0,0 +1,130 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeAuditDownloadURLRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 审计文件名 */
|
||||
FileName string `json:"fileName"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param fileName: 审计文件名 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAuditDownloadURLRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
fileName string,
|
||||
) *DescribeAuditDownloadURLRequest {
|
||||
|
||||
return &DescribeAuditDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
FileName: fileName,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param fileName: 审计文件名 (Required)
|
||||
*/
|
||||
func NewDescribeAuditDownloadURLRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
fileName string,
|
||||
) *DescribeAuditDownloadURLRequest {
|
||||
|
||||
return &DescribeAuditDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
FileName: fileName,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAuditDownloadURLRequestWithoutParam() *DescribeAuditDownloadURLRequest {
|
||||
|
||||
return &DescribeAuditDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAuditDownloadURLRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeAuditDownloadURLRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param fileName: 审计文件名(Required) */
|
||||
func (r *DescribeAuditDownloadURLRequest) SetFileName(fileName string) {
|
||||
r.FileName = fileName
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAuditDownloadURLRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAuditDownloadURLResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAuditDownloadURLResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAuditDownloadURLResult struct {
|
||||
PublicURL string `json:"publicURL"`
|
||||
InternalURL string `json:"internalURL"`
|
||||
}
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeAuditFilesRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAuditFilesRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeAuditFilesRequest {
|
||||
|
||||
return &DescribeAuditFilesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditFiles",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeAuditFilesRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeAuditFilesRequest {
|
||||
|
||||
return &DescribeAuditFilesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditFiles",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAuditFilesRequestWithoutParam() *DescribeAuditFilesRequest {
|
||||
|
||||
return &DescribeAuditFilesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditFiles",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAuditFilesRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeAuditFilesRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAuditFilesRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAuditFilesResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAuditFilesResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAuditFilesResult struct {
|
||||
AuditFiles []rds.AuditFile `json:"auditFiles"`
|
||||
}
|
||||
Generated
Vendored
+130
@@ -0,0 +1,130 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeAuditOptionsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 审计选项类别,**大小写敏感**,目前支持两种类型:<br>(1)AuditOptions开头:在disalbed参数中返回SQL Server各个版本支持的所有选项,支持的名称为<br>AuditOptions2008R2<br>AuditOptions2012<br>AuditOptions2014<br>AuditOptions2016<br>例如输入参数为"AuditOptions2016",则在disabled字段中返回SQL Server 2016 版本所支持的所有的审计选项<br>(2)AuditDefault开头:京东云建议的默认选项,在enabled参数中返回建议开启的选项,在disabled参数中返回不开启的选项,支持的名称为:<br>AuditDefault2008R2<br>AuditDefault2012<br>AuditDefault2014<br>AuditDefault2016<br>例如输入参数为"AuditDefault2016",则在enabled字段返回SQL Server 2016 版本中京东云建议开启的审计选项,在disabled字段中返回建议不开启的选项 */
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param name: 审计选项类别,**大小写敏感**,目前支持两种类型:<br>(1)AuditOptions开头:在disalbed参数中返回SQL Server各个版本支持的所有选项,支持的名称为<br>AuditOptions2008R2<br>AuditOptions2012<br>AuditOptions2014<br>AuditOptions2016<br>例如输入参数为"AuditOptions2016",则在disabled字段中返回SQL Server 2016 版本所支持的所有的审计选项<br>(2)AuditDefault开头:京东云建议的默认选项,在enabled参数中返回建议开启的选项,在disabled参数中返回不开启的选项,支持的名称为:<br>AuditDefault2008R2<br>AuditDefault2012<br>AuditDefault2014<br>AuditDefault2016<br>例如输入参数为"AuditDefault2016",则在enabled字段返回SQL Server 2016 版本中京东云建议开启的审计选项,在disabled字段中返回建议不开启的选项 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAuditOptionsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
name string,
|
||||
) *DescribeAuditOptionsRequest {
|
||||
|
||||
return &DescribeAuditOptionsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditOptions",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
Name: name,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param name: 审计选项类别,**大小写敏感**,目前支持两种类型:<br>(1)AuditOptions开头:在disalbed参数中返回SQL Server各个版本支持的所有选项,支持的名称为<br>AuditOptions2008R2<br>AuditOptions2012<br>AuditOptions2014<br>AuditOptions2016<br>例如输入参数为"AuditOptions2016",则在disabled字段中返回SQL Server 2016 版本所支持的所有的审计选项<br>(2)AuditDefault开头:京东云建议的默认选项,在enabled参数中返回建议开启的选项,在disabled参数中返回不开启的选项,支持的名称为:<br>AuditDefault2008R2<br>AuditDefault2012<br>AuditDefault2014<br>AuditDefault2016<br>例如输入参数为"AuditDefault2016",则在enabled字段返回SQL Server 2016 版本中京东云建议开启的审计选项,在disabled字段中返回建议不开启的选项 (Required)
|
||||
*/
|
||||
func NewDescribeAuditOptionsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
name string,
|
||||
) *DescribeAuditOptionsRequest {
|
||||
|
||||
return &DescribeAuditOptionsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditOptions",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
Name: name,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAuditOptionsRequestWithoutParam() *DescribeAuditOptionsRequest {
|
||||
|
||||
return &DescribeAuditOptionsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditOptions",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAuditOptionsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeAuditOptionsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param name: 审计选项类别,**大小写敏感**,目前支持两种类型:<br>(1)AuditOptions开头:在disalbed参数中返回SQL Server各个版本支持的所有选项,支持的名称为<br>AuditOptions2008R2<br>AuditOptions2012<br>AuditOptions2014<br>AuditOptions2016<br>例如输入参数为"AuditOptions2016",则在disabled字段中返回SQL Server 2016 版本所支持的所有的审计选项<br>(2)AuditDefault开头:京东云建议的默认选项,在enabled参数中返回建议开启的选项,在disabled参数中返回不开启的选项,支持的名称为:<br>AuditDefault2008R2<br>AuditDefault2012<br>AuditDefault2014<br>AuditDefault2016<br>例如输入参数为"AuditDefault2016",则在enabled字段返回SQL Server 2016 版本中京东云建议开启的审计选项,在disabled字段中返回建议不开启的选项(Required) */
|
||||
func (r *DescribeAuditOptionsRequest) SetName(name string) {
|
||||
r.Name = name
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAuditOptionsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAuditOptionsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAuditOptionsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAuditOptionsResult struct {
|
||||
Enabled []string `json:"enabled"`
|
||||
Disabled []string `json:"disabled"`
|
||||
}
|
||||
Generated
Vendored
+210
@@ -0,0 +1,210 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
common "github.com/jdcloud-api/jdcloud-sdk-go/services/common/models"
|
||||
)
|
||||
|
||||
type DescribeAuditResultRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间不能早于当前时间30天 */
|
||||
StartTime string `json:"startTime"`
|
||||
|
||||
/* 查询截止时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不能超过3天 */
|
||||
EndTime string `json:"endTime"`
|
||||
|
||||
/* 数据库名 (Optional) */
|
||||
DbName *string `json:"dbName"`
|
||||
|
||||
/* 账号名 (Optional) */
|
||||
AccountName *string `json:"accountName"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞) (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:10、20、50 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
|
||||
/* 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:
|
||||
operation
|
||||
(Optional) */
|
||||
Filters []common.Filter `json:"filters"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间不能早于当前时间30天 (Required)
|
||||
* param endTime: 查询截止时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不能超过3天 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAuditResultRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
startTime string,
|
||||
endTime string,
|
||||
) *DescribeAuditResultRequest {
|
||||
|
||||
return &DescribeAuditResultRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditResult",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
StartTime: startTime,
|
||||
EndTime: endTime,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间不能早于当前时间30天 (Required)
|
||||
* param endTime: 查询截止时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不能超过3天 (Required)
|
||||
* param dbName: 数据库名 (Optional)
|
||||
* param accountName: 账号名 (Optional)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞) (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、50 (Optional)
|
||||
* param filters: 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:
|
||||
operation
|
||||
(Optional)
|
||||
*/
|
||||
func NewDescribeAuditResultRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
startTime string,
|
||||
endTime string,
|
||||
dbName *string,
|
||||
accountName *string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
filters []common.Filter,
|
||||
) *DescribeAuditResultRequest {
|
||||
|
||||
return &DescribeAuditResultRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditResult",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
StartTime: startTime,
|
||||
EndTime: endTime,
|
||||
DbName: dbName,
|
||||
AccountName: accountName,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
Filters: filters,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAuditResultRequestWithoutParam() *DescribeAuditResultRequest {
|
||||
|
||||
return &DescribeAuditResultRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/audit:describeAuditResult",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAuditResultRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeAuditResultRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间不能早于当前时间30天(Required) */
|
||||
func (r *DescribeAuditResultRequest) SetStartTime(startTime string) {
|
||||
r.StartTime = startTime
|
||||
}
|
||||
|
||||
/* param endTime: 查询截止时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不能超过3天(Required) */
|
||||
func (r *DescribeAuditResultRequest) SetEndTime(endTime string) {
|
||||
r.EndTime = endTime
|
||||
}
|
||||
|
||||
/* param dbName: 数据库名(Optional) */
|
||||
func (r *DescribeAuditResultRequest) SetDbName(dbName string) {
|
||||
r.DbName = &dbName
|
||||
}
|
||||
|
||||
/* param accountName: 账号名(Optional) */
|
||||
func (r *DescribeAuditResultRequest) SetAccountName(accountName string) {
|
||||
r.AccountName = &accountName
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)(Optional) */
|
||||
func (r *DescribeAuditResultRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、50(Optional) */
|
||||
func (r *DescribeAuditResultRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
/* param filters: 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:
|
||||
operation
|
||||
(Optional) */
|
||||
func (r *DescribeAuditResultRequest) SetFilters(filters []common.Filter) {
|
||||
r.Filters = filters
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAuditResultRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAuditResultResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAuditResultResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAuditResultResult struct {
|
||||
AuditResult []rds.AuditResult `json:"auditResult"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeAzsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) */
|
||||
Engine string `json:"engine"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param engine: RDS引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeAzsRequest(
|
||||
regionId string,
|
||||
engine string,
|
||||
) *DescribeAzsRequest {
|
||||
|
||||
return &DescribeAzsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/azs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
Engine: engine,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param engine: RDS引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
|
||||
*/
|
||||
func NewDescribeAzsRequestWithAllParams(
|
||||
regionId string,
|
||||
engine string,
|
||||
) *DescribeAzsRequest {
|
||||
|
||||
return &DescribeAzsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/azs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
Engine: engine,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeAzsRequestWithoutParam() *DescribeAzsRequest {
|
||||
|
||||
return &DescribeAzsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/azs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeAzsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param engine: RDS引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)(Required) */
|
||||
func (r *DescribeAzsRequest) SetEngine(engine string) {
|
||||
r.Engine = engine
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeAzsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeAzsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeAzsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeAzsResult struct {
|
||||
Azs []string `json:"azs"`
|
||||
}
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
charge "github.com/jdcloud-api/jdcloud-sdk-go/services/charge/models"
|
||||
)
|
||||
|
||||
type DescribeBackupChargeRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 实例引擎类型 */
|
||||
Engine string `json:"engine"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param engine: 实例引擎类型 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeBackupChargeRequest(
|
||||
regionId string,
|
||||
engine string,
|
||||
) *DescribeBackupChargeRequest {
|
||||
|
||||
return &DescribeBackupChargeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances:describeBackupCharge",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
Engine: engine,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param engine: 实例引擎类型 (Required)
|
||||
*/
|
||||
func NewDescribeBackupChargeRequestWithAllParams(
|
||||
regionId string,
|
||||
engine string,
|
||||
) *DescribeBackupChargeRequest {
|
||||
|
||||
return &DescribeBackupChargeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances:describeBackupCharge",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
Engine: engine,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeBackupChargeRequestWithoutParam() *DescribeBackupChargeRequest {
|
||||
|
||||
return &DescribeBackupChargeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances:describeBackupCharge",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeBackupChargeRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param engine: 实例引擎类型(Required) */
|
||||
func (r *DescribeBackupChargeRequest) SetEngine(engine string) {
|
||||
r.Engine = engine
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeBackupChargeRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeBackupChargeResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeBackupChargeResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeBackupChargeResult struct {
|
||||
Charge charge.Charge `json:"charge"`
|
||||
}
|
||||
Generated
Vendored
+138
@@ -0,0 +1,138 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeBackupDownloadURLRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 备份ID */
|
||||
BackupId string `json:"backupId"`
|
||||
|
||||
/* 文件名称<br>- MySQL:不支持该参数<br>- SQL Server:必须输入该参数,指定该备份中需要获取下载链接的文件名称。备份中的文件名(不包括后缀)即为备份的数据库名。例如文件名为my_test_db.bak,表示该文件是my_test_db数据库的备份 (Optional) */
|
||||
FileName *string `json:"fileName"`
|
||||
|
||||
/* 指定下载链接的过期时间,单位秒, 取值范围为 1 ~ 86400 秒;支持 SQL Server:缺省为 86400 秒。支持 MySQL, Percona, MariaDB:缺省为 300 秒。 (Optional) */
|
||||
UrlExpirationSecond *string `json:"urlExpirationSecond"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param backupId: 备份ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeBackupDownloadURLRequest(
|
||||
regionId string,
|
||||
backupId string,
|
||||
) *DescribeBackupDownloadURLRequest {
|
||||
|
||||
return &DescribeBackupDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups/{backupId}:describeBackupDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
BackupId: backupId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param backupId: 备份ID (Required)
|
||||
* param fileName: 文件名称<br>- MySQL:不支持该参数<br>- SQL Server:必须输入该参数,指定该备份中需要获取下载链接的文件名称。备份中的文件名(不包括后缀)即为备份的数据库名。例如文件名为my_test_db.bak,表示该文件是my_test_db数据库的备份 (Optional)
|
||||
* param urlExpirationSecond: 指定下载链接的过期时间,单位秒, 取值范围为 1 ~ 86400 秒;支持 SQL Server:缺省为 86400 秒。支持 MySQL, Percona, MariaDB:缺省为 300 秒。 (Optional)
|
||||
*/
|
||||
func NewDescribeBackupDownloadURLRequestWithAllParams(
|
||||
regionId string,
|
||||
backupId string,
|
||||
fileName *string,
|
||||
urlExpirationSecond *string,
|
||||
) *DescribeBackupDownloadURLRequest {
|
||||
|
||||
return &DescribeBackupDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups/{backupId}:describeBackupDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
BackupId: backupId,
|
||||
FileName: fileName,
|
||||
UrlExpirationSecond: urlExpirationSecond,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeBackupDownloadURLRequestWithoutParam() *DescribeBackupDownloadURLRequest {
|
||||
|
||||
return &DescribeBackupDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups/{backupId}:describeBackupDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeBackupDownloadURLRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param backupId: 备份ID(Required) */
|
||||
func (r *DescribeBackupDownloadURLRequest) SetBackupId(backupId string) {
|
||||
r.BackupId = backupId
|
||||
}
|
||||
|
||||
/* param fileName: 文件名称<br>- MySQL:不支持该参数<br>- SQL Server:必须输入该参数,指定该备份中需要获取下载链接的文件名称。备份中的文件名(不包括后缀)即为备份的数据库名。例如文件名为my_test_db.bak,表示该文件是my_test_db数据库的备份(Optional) */
|
||||
func (r *DescribeBackupDownloadURLRequest) SetFileName(fileName string) {
|
||||
r.FileName = &fileName
|
||||
}
|
||||
|
||||
/* param urlExpirationSecond: 指定下载链接的过期时间,单位秒, 取值范围为 1 ~ 86400 秒;支持 SQL Server:缺省为 86400 秒。支持 MySQL, Percona, MariaDB:缺省为 300 秒。(Optional) */
|
||||
func (r *DescribeBackupDownloadURLRequest) SetUrlExpirationSecond(urlExpirationSecond string) {
|
||||
r.UrlExpirationSecond = &urlExpirationSecond
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeBackupDownloadURLRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeBackupDownloadURLResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeBackupDownloadURLResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeBackupDownloadURLResult struct {
|
||||
PublicURL string `json:"publicURL"`
|
||||
InternalURL string `json:"internalURL"`
|
||||
}
|
||||
Generated
Vendored
+121
@@ -0,0 +1,121 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeBackupPolicyRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeBackupPolicyRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeBackupPolicyRequest {
|
||||
|
||||
return &DescribeBackupPolicyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeBackupPolicy",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeBackupPolicyRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeBackupPolicyRequest {
|
||||
|
||||
return &DescribeBackupPolicyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeBackupPolicy",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeBackupPolicyRequestWithoutParam() *DescribeBackupPolicyRequest {
|
||||
|
||||
return &DescribeBackupPolicyRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeBackupPolicy",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeBackupPolicyRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeBackupPolicyRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeBackupPolicyRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeBackupPolicyResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeBackupPolicyResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeBackupPolicyResult struct {
|
||||
StartWindow string `json:"startWindow"`
|
||||
RetentionPeriod int `json:"retentionPeriod"`
|
||||
BinlogRetentionPeriod int `json:"binlogRetentionPeriod"`
|
||||
BinlogUsageLimit int `json:"binlogUsageLimit"`
|
||||
CycleMode int `json:"cycleMode"`
|
||||
BackupBinlog string `json:"backupBinlog"`
|
||||
EnhancedBackup string `json:"enhancedBackup"`
|
||||
}
|
||||
Generated
Vendored
+117
@@ -0,0 +1,117 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeBackupSpaceRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeBackupSpaceRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeBackupSpaceRequest {
|
||||
|
||||
return &DescribeBackupSpaceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeBackupSpace",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeBackupSpaceRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeBackupSpaceRequest {
|
||||
|
||||
return &DescribeBackupSpaceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeBackupSpace",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeBackupSpaceRequestWithoutParam() *DescribeBackupSpaceRequest {
|
||||
|
||||
return &DescribeBackupSpaceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeBackupSpace",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeBackupSpaceRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeBackupSpaceRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeBackupSpaceRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeBackupSpaceResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeBackupSpaceResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeBackupSpaceResult struct {
|
||||
TotalFreeSpace float64 `json:"totalFreeSpace"`
|
||||
TotalUsedSpace float64 `json:"totalUsedSpace"`
|
||||
Current float64 `json:"current"`
|
||||
}
|
||||
Generated
Vendored
+125
@@ -0,0 +1,125 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeBackupSynchronicitiesRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[1,∞),页码超过总页数时,显示最后一页,用于查询列表的接口 (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeBackupSynchronicitiesRequest(
|
||||
regionId string,
|
||||
) *DescribeBackupSynchronicitiesRequest {
|
||||
|
||||
return &DescribeBackupSynchronicitiesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[1,∞),页码超过总页数时,显示最后一页,用于查询列表的接口 (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Optional)
|
||||
*/
|
||||
func NewDescribeBackupSynchronicitiesRequestWithAllParams(
|
||||
regionId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeBackupSynchronicitiesRequest {
|
||||
|
||||
return &DescribeBackupSynchronicitiesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeBackupSynchronicitiesRequestWithoutParam() *DescribeBackupSynchronicitiesRequest {
|
||||
|
||||
return &DescribeBackupSynchronicitiesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backupSynchronicities",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeBackupSynchronicitiesRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[1,∞),页码超过总页数时,显示最后一页,用于查询列表的接口(Optional) */
|
||||
func (r *DescribeBackupSynchronicitiesRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100(Optional) */
|
||||
func (r *DescribeBackupSynchronicitiesRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeBackupSynchronicitiesRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeBackupSynchronicitiesResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeBackupSynchronicitiesResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeBackupSynchronicitiesResult struct {
|
||||
BackupSynchronicities []rds.BackupSynchronicity `json:"backupSynchronicities"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+200
@@ -0,0 +1,200 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeBackupsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS实例ID,唯一标识一个实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 查询备份类型,0为手动备份,1为自动备份,不传表示全部. <br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional) */
|
||||
Auto *int `json:"auto"`
|
||||
|
||||
/* 返回backupType等于指定值的备份列表。full为全量备份,diff为增量备份<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional) */
|
||||
BackupTypeFilter *string `json:"backupTypeFilter"`
|
||||
|
||||
/* 返回dbName等于指定值的备份列表,不传或为空返回全部<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional) */
|
||||
DbNameFilter *string `json:"dbNameFilter"`
|
||||
|
||||
/* 返回备份开始时间大于该时间的备份列表<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional) */
|
||||
BackupTimeRangeStartFilter *string `json:"backupTimeRangeStartFilter"`
|
||||
|
||||
/* 返回备份开始时间小于等于该时间的备份列表<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional) */
|
||||
BackupTimeRangeEndFilter *string `json:"backupTimeRangeEndFilter"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 */
|
||||
PageNumber int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 */
|
||||
PageSize int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS实例ID,唯一标识一个实例 (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Required)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeBackupsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
pageNumber int,
|
||||
pageSize int,
|
||||
) *DescribeBackupsRequest {
|
||||
|
||||
return &DescribeBackupsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS实例ID,唯一标识一个实例 (Required)
|
||||
* param auto: 查询备份类型,0为手动备份,1为自动备份,不传表示全部. <br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional)
|
||||
* param backupTypeFilter: 返回backupType等于指定值的备份列表。full为全量备份,diff为增量备份<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional)
|
||||
* param dbNameFilter: 返回dbName等于指定值的备份列表,不传或为空返回全部<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional)
|
||||
* param backupTimeRangeStartFilter: 返回备份开始时间大于该时间的备份列表<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional)
|
||||
* param backupTimeRangeEndFilter: 返回备份开始时间小于等于该时间的备份列表<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代** (Optional)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Required)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Required)
|
||||
*/
|
||||
func NewDescribeBackupsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
auto *int,
|
||||
backupTypeFilter *string,
|
||||
dbNameFilter *string,
|
||||
backupTimeRangeStartFilter *string,
|
||||
backupTimeRangeEndFilter *string,
|
||||
pageNumber int,
|
||||
pageSize int,
|
||||
) *DescribeBackupsRequest {
|
||||
|
||||
return &DescribeBackupsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
Auto: auto,
|
||||
BackupTypeFilter: backupTypeFilter,
|
||||
DbNameFilter: dbNameFilter,
|
||||
BackupTimeRangeStartFilter: backupTimeRangeStartFilter,
|
||||
BackupTimeRangeEndFilter: backupTimeRangeEndFilter,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeBackupsRequestWithoutParam() *DescribeBackupsRequest {
|
||||
|
||||
return &DescribeBackupsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/backups",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeBackupsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS实例ID,唯一标识一个实例(Required) */
|
||||
func (r *DescribeBackupsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param auto: 查询备份类型,0为手动备份,1为自动备份,不传表示全部. <br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代**(Optional) */
|
||||
func (r *DescribeBackupsRequest) SetAuto(auto int) {
|
||||
r.Auto = &auto
|
||||
}
|
||||
|
||||
/* param backupTypeFilter: 返回backupType等于指定值的备份列表。full为全量备份,diff为增量备份<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代**(Optional) */
|
||||
func (r *DescribeBackupsRequest) SetBackupTypeFilter(backupTypeFilter string) {
|
||||
r.BackupTypeFilter = &backupTypeFilter
|
||||
}
|
||||
|
||||
/* param dbNameFilter: 返回dbName等于指定值的备份列表,不传或为空返回全部<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代**(Optional) */
|
||||
func (r *DescribeBackupsRequest) SetDbNameFilter(dbNameFilter string) {
|
||||
r.DbNameFilter = &dbNameFilter
|
||||
}
|
||||
|
||||
/* param backupTimeRangeStartFilter: 返回备份开始时间大于该时间的备份列表<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代**(Optional) */
|
||||
func (r *DescribeBackupsRequest) SetBackupTimeRangeStartFilter(backupTimeRangeStartFilter string) {
|
||||
r.BackupTimeRangeStartFilter = &backupTimeRangeStartFilter
|
||||
}
|
||||
|
||||
/* param backupTimeRangeEndFilter: 返回备份开始时间小于等于该时间的备份列表<br>**- 测试参数,仅支持SQL Server,后续可能被其他参数取代**(Optional) */
|
||||
func (r *DescribeBackupsRequest) SetBackupTimeRangeEndFilter(backupTimeRangeEndFilter string) {
|
||||
r.BackupTimeRangeEndFilter = &backupTimeRangeEndFilter
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。(Required) */
|
||||
func (r *DescribeBackupsRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100(Required) */
|
||||
func (r *DescribeBackupsRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeBackupsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeBackupsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeBackupsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeBackupsResult struct {
|
||||
Backup []rds.Backup `json:"backup"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+141
@@ -0,0 +1,141 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeBinlogDownloadURLRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* binlog的备份ID,可以通过describeBinlogs获得 */
|
||||
BinlogBackupId string `json:"binlogBackupId"`
|
||||
|
||||
/* 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒 (Optional) */
|
||||
Seconds *int `json:"seconds"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param binlogBackupId: binlog的备份ID,可以通过describeBinlogs获得 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeBinlogDownloadURLRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
binlogBackupId string,
|
||||
) *DescribeBinlogDownloadURLRequest {
|
||||
|
||||
return &DescribeBinlogDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs/{binlogBackupId}:describeBinlogDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
BinlogBackupId: binlogBackupId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param binlogBackupId: binlog的备份ID,可以通过describeBinlogs获得 (Required)
|
||||
* param seconds: 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒 (Optional)
|
||||
*/
|
||||
func NewDescribeBinlogDownloadURLRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
binlogBackupId string,
|
||||
seconds *int,
|
||||
) *DescribeBinlogDownloadURLRequest {
|
||||
|
||||
return &DescribeBinlogDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs/{binlogBackupId}:describeBinlogDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
BinlogBackupId: binlogBackupId,
|
||||
Seconds: seconds,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeBinlogDownloadURLRequestWithoutParam() *DescribeBinlogDownloadURLRequest {
|
||||
|
||||
return &DescribeBinlogDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs/{binlogBackupId}:describeBinlogDownloadURL",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeBinlogDownloadURLRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeBinlogDownloadURLRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param binlogBackupId: binlog的备份ID,可以通过describeBinlogs获得(Required) */
|
||||
func (r *DescribeBinlogDownloadURLRequest) SetBinlogBackupId(binlogBackupId string) {
|
||||
r.BinlogBackupId = binlogBackupId
|
||||
}
|
||||
|
||||
/* param seconds: 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒(Optional) */
|
||||
func (r *DescribeBinlogDownloadURLRequest) SetSeconds(seconds int) {
|
||||
r.Seconds = &seconds
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeBinlogDownloadURLRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeBinlogDownloadURLResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeBinlogDownloadURLResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeBinlogDownloadURLResult struct {
|
||||
PublicURL string `json:"publicURL"`
|
||||
InternalURL string `json:"internalURL"`
|
||||
}
|
||||
Generated
Vendored
+161
@@ -0,0 +1,161 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeBinlogsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
|
||||
/* 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天 (Optional) */
|
||||
StartTime *string `json:"startTime"`
|
||||
|
||||
/* 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天 (Optional) */
|
||||
EndTime *string `json:"endTime"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeBinlogsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeBinlogsRequest {
|
||||
|
||||
return &DescribeBinlogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Optional)
|
||||
* param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天 (Optional)
|
||||
* param endTime: 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天 (Optional)
|
||||
*/
|
||||
func NewDescribeBinlogsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
startTime *string,
|
||||
endTime *string,
|
||||
) *DescribeBinlogsRequest {
|
||||
|
||||
return &DescribeBinlogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
StartTime: startTime,
|
||||
EndTime: endTime,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeBinlogsRequestWithoutParam() *DescribeBinlogsRequest {
|
||||
|
||||
return &DescribeBinlogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/binlogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeBinlogsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeBinlogsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。(Optional) */
|
||||
func (r *DescribeBinlogsRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100(Optional) */
|
||||
func (r *DescribeBinlogsRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
/* param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天(Optional) */
|
||||
func (r *DescribeBinlogsRequest) SetStartTime(startTime string) {
|
||||
r.StartTime = &startTime
|
||||
}
|
||||
|
||||
/* param endTime: 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天(Optional) */
|
||||
func (r *DescribeBinlogsRequest) SetEndTime(endTime string) {
|
||||
r.EndTime = &endTime
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeBinlogsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeBinlogsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeBinlogsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeBinlogsResult struct {
|
||||
TotalCount int `json:"totalCount"`
|
||||
Binlogs []rds.Binlog `json:"binlogs"`
|
||||
}
|
||||
Generated
Vendored
+150
@@ -0,0 +1,150 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeDatabasesRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 数据库名。如果不指定数据库名,则返回所有数据库列表<br>- **MySQL:不支持该字段**<br>- **SQL Server:支持该字段** (Optional) */
|
||||
DbName *string `json:"dbName"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeDatabasesRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeDatabasesRequest {
|
||||
|
||||
return &DescribeDatabasesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param dbName: 数据库名。如果不指定数据库名,则返回所有数据库列表<br>- **MySQL:不支持该字段**<br>- **SQL Server:支持该字段** (Optional)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口 (Optional)
|
||||
*/
|
||||
func NewDescribeDatabasesRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
dbName *string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeDatabasesRequest {
|
||||
|
||||
return &DescribeDatabasesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
DbName: dbName,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeDatabasesRequestWithoutParam() *DescribeDatabasesRequest {
|
||||
|
||||
return &DescribeDatabasesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/databases",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeDatabasesRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeDatabasesRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param dbName: 数据库名。如果不指定数据库名,则返回所有数据库列表<br>- **MySQL:不支持该字段**<br>- **SQL Server:支持该字段**(Optional) */
|
||||
func (r *DescribeDatabasesRequest) SetDbName(dbName string) {
|
||||
r.DbName = &dbName
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页;(Optional) */
|
||||
func (r *DescribeDatabasesRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口(Optional) */
|
||||
func (r *DescribeDatabasesRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeDatabasesRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeDatabasesResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeDatabasesResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeDatabasesResult struct {
|
||||
Databases []rds.Database `json:"databases"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+178
@@ -0,0 +1,178 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeErrorLogRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 慢日志开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到当前时间不能大于 7 天,开始时间不能大于结束时间,结束时间不能大于当前时间 */
|
||||
StartTime string `json:"startTime"`
|
||||
|
||||
/* 慢日志结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到当前时间不能大于 7 天,开始时间不能大于结束时间,结束时间不能大于当前时间 */
|
||||
EndTime string `json:"endTime"`
|
||||
|
||||
/* 查询哪个数据库的慢日志,不填表示返回所有数据库的慢日志 (Optional) */
|
||||
DbName *string `json:"dbName"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param startTime: 慢日志开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到当前时间不能大于 7 天,开始时间不能大于结束时间,结束时间不能大于当前时间 (Required)
|
||||
* param endTime: 慢日志结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到当前时间不能大于 7 天,开始时间不能大于结束时间,结束时间不能大于当前时间 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeErrorLogRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
startTime string,
|
||||
endTime string,
|
||||
) *DescribeErrorLogRequest {
|
||||
|
||||
return &DescribeErrorLogRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeErrorLog",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
StartTime: startTime,
|
||||
EndTime: endTime,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param startTime: 慢日志开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到当前时间不能大于 7 天,开始时间不能大于结束时间,结束时间不能大于当前时间 (Required)
|
||||
* param endTime: 慢日志结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到当前时间不能大于 7 天,开始时间不能大于结束时间,结束时间不能大于当前时间 (Required)
|
||||
* param dbName: 查询哪个数据库的慢日志,不填表示返回所有数据库的慢日志 (Optional)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Optional)
|
||||
*/
|
||||
func NewDescribeErrorLogRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
startTime string,
|
||||
endTime string,
|
||||
dbName *string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeErrorLogRequest {
|
||||
|
||||
return &DescribeErrorLogRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeErrorLog",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
StartTime: startTime,
|
||||
EndTime: endTime,
|
||||
DbName: dbName,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeErrorLogRequestWithoutParam() *DescribeErrorLogRequest {
|
||||
|
||||
return &DescribeErrorLogRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeErrorLog",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeErrorLogRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeErrorLogRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param startTime: 慢日志开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到当前时间不能大于 7 天,开始时间不能大于结束时间,结束时间不能大于当前时间(Required) */
|
||||
func (r *DescribeErrorLogRequest) SetStartTime(startTime string) {
|
||||
r.StartTime = startTime
|
||||
}
|
||||
|
||||
/* param endTime: 慢日志结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到当前时间不能大于 7 天,开始时间不能大于结束时间,结束时间不能大于当前时间(Required) */
|
||||
func (r *DescribeErrorLogRequest) SetEndTime(endTime string) {
|
||||
r.EndTime = endTime
|
||||
}
|
||||
|
||||
/* param dbName: 查询哪个数据库的慢日志,不填表示返回所有数据库的慢日志(Optional) */
|
||||
func (r *DescribeErrorLogRequest) SetDbName(dbName string) {
|
||||
r.DbName = &dbName
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。(Optional) */
|
||||
func (r *DescribeErrorLogRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100(Optional) */
|
||||
func (r *DescribeErrorLogRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeErrorLogRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeErrorLogResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeErrorLogResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeErrorLogResult struct {
|
||||
ErrorLogs []rds.ErrorLogDigest `json:"errorLogs"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeErrorLogsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeErrorLogsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeErrorLogsRequest {
|
||||
|
||||
return &DescribeErrorLogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/errorLogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeErrorLogsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeErrorLogsRequest {
|
||||
|
||||
return &DescribeErrorLogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/errorLogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeErrorLogsRequestWithoutParam() *DescribeErrorLogsRequest {
|
||||
|
||||
return &DescribeErrorLogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/errorLogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeErrorLogsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeErrorLogsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeErrorLogsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeErrorLogsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeErrorLogsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeErrorLogsResult struct {
|
||||
ErrorLogs []rds.ErrorLog `json:"errorLogs"`
|
||||
}
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeImportFilesRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeImportFilesRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeImportFilesRequest {
|
||||
|
||||
return &DescribeImportFilesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/importFiles",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeImportFilesRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeImportFilesRequest {
|
||||
|
||||
return &DescribeImportFilesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/importFiles",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeImportFilesRequestWithoutParam() *DescribeImportFilesRequest {
|
||||
|
||||
return &DescribeImportFilesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/importFiles",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeImportFilesRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeImportFilesRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeImportFilesRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeImportFilesResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeImportFilesResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeImportFilesResult struct {
|
||||
ImportFiles []rds.ImportFile `json:"importFiles"`
|
||||
}
|
||||
Generated
Vendored
+167
@@ -0,0 +1,167 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeIndexPerformanceRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 查询类型,不同的查询类型按照相应的字段从高到低返回结果。<br>支持如下类型:<br>Missing:缺失索引<br>Size:索引大小,单位KB<br>Updates:索引更新次数<br>Scans:表扫描次数<br>Used:最少使用<br> */
|
||||
QueryType string `json:"queryType"`
|
||||
|
||||
/* 需要查询的数据库名,多个数据库名之间用英文逗号分隔,默认所有数据库 (Optional) */
|
||||
Db *string `json:"db"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数,用于查询列表的接口 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param queryType: 查询类型,不同的查询类型按照相应的字段从高到低返回结果。<br>支持如下类型:<br>Missing:缺失索引<br>Size:索引大小,单位KB<br>Updates:索引更新次数<br>Scans:表扫描次数<br>Used:最少使用<br> (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeIndexPerformanceRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
queryType string,
|
||||
) *DescribeIndexPerformanceRequest {
|
||||
|
||||
return &DescribeIndexPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeIndexPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
QueryType: queryType,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param queryType: 查询类型,不同的查询类型按照相应的字段从高到低返回结果。<br>支持如下类型:<br>Missing:缺失索引<br>Size:索引大小,单位KB<br>Updates:索引更新次数<br>Scans:表扫描次数<br>Used:最少使用<br> (Required)
|
||||
* param db: 需要查询的数据库名,多个数据库名之间用英文逗号分隔,默认所有数据库 (Optional)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数,用于查询列表的接口 (Optional)
|
||||
*/
|
||||
func NewDescribeIndexPerformanceRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
queryType string,
|
||||
db *string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeIndexPerformanceRequest {
|
||||
|
||||
return &DescribeIndexPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeIndexPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
QueryType: queryType,
|
||||
Db: db,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeIndexPerformanceRequestWithoutParam() *DescribeIndexPerformanceRequest {
|
||||
|
||||
return &DescribeIndexPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeIndexPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeIndexPerformanceRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeIndexPerformanceRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param queryType: 查询类型,不同的查询类型按照相应的字段从高到低返回结果。<br>支持如下类型:<br>Missing:缺失索引<br>Size:索引大小,单位KB<br>Updates:索引更新次数<br>Scans:表扫描次数<br>Used:最少使用<br>(Required) */
|
||||
func (r *DescribeIndexPerformanceRequest) SetQueryType(queryType string) {
|
||||
r.QueryType = queryType
|
||||
}
|
||||
|
||||
/* param db: 需要查询的数据库名,多个数据库名之间用英文逗号分隔,默认所有数据库(Optional) */
|
||||
func (r *DescribeIndexPerformanceRequest) SetDb(db string) {
|
||||
r.Db = &db
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,1000)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。(Optional) */
|
||||
func (r *DescribeIndexPerformanceRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数,用于查询列表的接口(Optional) */
|
||||
func (r *DescribeIndexPerformanceRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeIndexPerformanceRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeIndexPerformanceResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeIndexPerformanceResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeIndexPerformanceResult struct {
|
||||
MissingIndexResult []rds.MissingIndexResult `json:"missingIndexResult"`
|
||||
IndexPerformanceResult []rds.IndexPerformanceResult `json:"indexPerformanceResult"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
PageNumber int `json:"pageNumber"`
|
||||
PageSize int `json:"pageSize"`
|
||||
}
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeInstanceAttributesRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeInstanceAttributesRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeInstanceAttributesRequest {
|
||||
|
||||
return &DescribeInstanceAttributesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeInstanceAttributesRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeInstanceAttributesRequest {
|
||||
|
||||
return &DescribeInstanceAttributesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeInstanceAttributesRequestWithoutParam() *DescribeInstanceAttributesRequest {
|
||||
|
||||
return &DescribeInstanceAttributesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeInstanceAttributesRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeInstanceAttributesRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeInstanceAttributesRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeInstanceAttributesResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeInstanceAttributesResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeInstanceAttributesResult struct {
|
||||
DbInstanceAttributes rds.DBInstanceAttribute `json:"dbInstanceAttributes"`
|
||||
}
|
||||
Generated
Vendored
+181
@@ -0,0 +1,181 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
common "github.com/jdcloud-api/jdcloud-sdk-go/services/common/models"
|
||||
)
|
||||
|
||||
type DescribeInstancesRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
|
||||
/* 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:
|
||||
instanceId, 支持operator选项:eq
|
||||
instanceName, 支持operator选项:eq, like
|
||||
engine, 支持operator选项:eq
|
||||
engineVersion, 支持operator选项:eq
|
||||
instanceStatus, 支持operator选项:eq
|
||||
vpcId, 支持operator选项:eq
|
||||
instanceType, 支持operator选项:eq
|
||||
internalDomainName, 支持operator选项:eq
|
||||
publicDomainName, 支持operator选项:eq
|
||||
(Optional) */
|
||||
Filters []common.Filter `json:"filters"`
|
||||
|
||||
/* 资源标签 (Optional) */
|
||||
TagFilters []common.TagFilter `json:"tagFilters"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeInstancesRequest(
|
||||
regionId string,
|
||||
) *DescribeInstancesRequest {
|
||||
|
||||
return &DescribeInstancesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional)
|
||||
* param filters: 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:
|
||||
instanceId, 支持operator选项:eq
|
||||
instanceName, 支持operator选项:eq, like
|
||||
engine, 支持operator选项:eq
|
||||
engineVersion, 支持operator选项:eq
|
||||
instanceStatus, 支持operator选项:eq
|
||||
vpcId, 支持operator选项:eq
|
||||
instanceType, 支持operator选项:eq
|
||||
internalDomainName, 支持operator选项:eq
|
||||
publicDomainName, 支持operator选项:eq
|
||||
(Optional)
|
||||
* param tagFilters: 资源标签 (Optional)
|
||||
*/
|
||||
func NewDescribeInstancesRequestWithAllParams(
|
||||
regionId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
filters []common.Filter,
|
||||
tagFilters []common.TagFilter,
|
||||
) *DescribeInstancesRequest {
|
||||
|
||||
return &DescribeInstancesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
Filters: filters,
|
||||
TagFilters: tagFilters,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeInstancesRequestWithoutParam() *DescribeInstancesRequest {
|
||||
|
||||
return &DescribeInstancesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeInstancesRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页;(Optional) */
|
||||
func (r *DescribeInstancesRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍(Optional) */
|
||||
func (r *DescribeInstancesRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
/* param filters: 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:
|
||||
instanceId, 支持operator选项:eq
|
||||
instanceName, 支持operator选项:eq, like
|
||||
engine, 支持operator选项:eq
|
||||
engineVersion, 支持operator选项:eq
|
||||
instanceStatus, 支持operator选项:eq
|
||||
vpcId, 支持operator选项:eq
|
||||
instanceType, 支持operator选项:eq
|
||||
internalDomainName, 支持operator选项:eq
|
||||
publicDomainName, 支持operator选项:eq
|
||||
(Optional) */
|
||||
func (r *DescribeInstancesRequest) SetFilters(filters []common.Filter) {
|
||||
r.Filters = filters
|
||||
}
|
||||
|
||||
/* param tagFilters: 资源标签(Optional) */
|
||||
func (r *DescribeInstancesRequest) SetTagFilters(tagFilters []common.TagFilter) {
|
||||
r.TagFilters = tagFilters
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeInstancesRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeInstancesResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeInstancesResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeInstancesResult struct {
|
||||
DbInstances []rds.DBInstance `json:"dbInstances"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+115
@@ -0,0 +1,115 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeInterceptRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* Instance ID */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param instanceId: Instance ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeInterceptRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeInterceptRequest {
|
||||
|
||||
return &DescribeInterceptRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/intercept",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param instanceId: Instance ID (Required)
|
||||
*/
|
||||
func NewDescribeInterceptRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeInterceptRequest {
|
||||
|
||||
return &DescribeInterceptRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/intercept",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeInterceptRequestWithoutParam() *DescribeInterceptRequest {
|
||||
|
||||
return &DescribeInterceptRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/intercept",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DescribeInterceptRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: Instance ID(Required) */
|
||||
func (r *DescribeInterceptRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeInterceptRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeInterceptResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeInterceptResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeInterceptResult struct {
|
||||
Available bool `json:"available"`
|
||||
}
|
||||
Generated
Vendored
+139
@@ -0,0 +1,139 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeInterceptResultRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* Instance ID */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param instanceId: Instance ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeInterceptResultRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeInterceptResultRequest {
|
||||
|
||||
return &DescribeInterceptResultRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/intercept:describeInterceptResult",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param instanceId: Instance ID (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional)
|
||||
*/
|
||||
func NewDescribeInterceptResultRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeInterceptResultRequest {
|
||||
|
||||
return &DescribeInterceptResultRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/intercept:describeInterceptResult",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeInterceptResultRequestWithoutParam() *DescribeInterceptResultRequest {
|
||||
|
||||
return &DescribeInterceptResultRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/intercept:describeInterceptResult",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DescribeInterceptResultRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: Instance ID(Required) */
|
||||
func (r *DescribeInterceptResultRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页;(Optional) */
|
||||
func (r *DescribeInterceptResultRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍(Optional) */
|
||||
func (r *DescribeInterceptResultRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeInterceptResultRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeInterceptResultResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeInterceptResultResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeInterceptResultResult struct {
|
||||
InterceptResult []rds.InterceptResult `json:"interceptResult"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+115
@@ -0,0 +1,115 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeLatestRestoreTimeRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeLatestRestoreTimeRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeLatestRestoreTimeRequest {
|
||||
|
||||
return &DescribeLatestRestoreTimeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeLatestRestoreTime",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*/
|
||||
func NewDescribeLatestRestoreTimeRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeLatestRestoreTimeRequest {
|
||||
|
||||
return &DescribeLatestRestoreTimeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeLatestRestoreTime",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeLatestRestoreTimeRequestWithoutParam() *DescribeLatestRestoreTimeRequest {
|
||||
|
||||
return &DescribeLatestRestoreTimeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}:describeLatestRestoreTime",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeLatestRestoreTimeRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeLatestRestoreTimeRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeLatestRestoreTimeRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeLatestRestoreTimeResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeLatestRestoreTimeResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeLatestRestoreTimeResult struct {
|
||||
LatestRestoreTime string `json:"latestRestoreTime"`
|
||||
}
|
||||
Generated
Vendored
+141
@@ -0,0 +1,141 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribeLogDownloadURLRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 日志文件ID */
|
||||
LogId string `json:"logId"`
|
||||
|
||||
/* 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒 (Optional) */
|
||||
Seconds *int `json:"seconds"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param logId: 日志文件ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeLogDownloadURLRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
logId string,
|
||||
) *DescribeLogDownloadURLRequest {
|
||||
|
||||
return &DescribeLogDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/log/{logId}:describeLogDownloadURL",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
LogId: logId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param logId: 日志文件ID (Required)
|
||||
* param seconds: 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒 (Optional)
|
||||
*/
|
||||
func NewDescribeLogDownloadURLRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
logId string,
|
||||
seconds *int,
|
||||
) *DescribeLogDownloadURLRequest {
|
||||
|
||||
return &DescribeLogDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/log/{logId}:describeLogDownloadURL",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
LogId: logId,
|
||||
Seconds: seconds,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeLogDownloadURLRequestWithoutParam() *DescribeLogDownloadURLRequest {
|
||||
|
||||
return &DescribeLogDownloadURLRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/log/{logId}:describeLogDownloadURL",
|
||||
Method: "POST",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeLogDownloadURLRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeLogDownloadURLRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param logId: 日志文件ID(Required) */
|
||||
func (r *DescribeLogDownloadURLRequest) SetLogId(logId string) {
|
||||
r.LogId = logId
|
||||
}
|
||||
|
||||
/* param seconds: 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒(Optional) */
|
||||
func (r *DescribeLogDownloadURLRequest) SetSeconds(seconds int) {
|
||||
r.Seconds = &seconds
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeLogDownloadURLRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeLogDownloadURLResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeLogDownloadURLResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeLogDownloadURLResult struct {
|
||||
PublicURL string `json:"publicURL"`
|
||||
InternalURL string `json:"internalURL"`
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
common "github.com/jdcloud-api/jdcloud-sdk-go/services/common/models"
|
||||
)
|
||||
|
||||
type DescribeLogsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
|
||||
/* 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:logType, 支持operator选项:eq, 仅支持 MySQL,Percona,MariaDB
|
||||
(Optional) */
|
||||
Filters []common.Filter `json:"filters"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeLogsRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeLogsRequest {
|
||||
|
||||
return &DescribeLogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/log:describeLogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口 (Optional)
|
||||
* param filters: 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:logType, 支持operator选项:eq, 仅支持 MySQL,Percona,MariaDB
|
||||
(Optional)
|
||||
*/
|
||||
func NewDescribeLogsRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
filters []common.Filter,
|
||||
) *DescribeLogsRequest {
|
||||
|
||||
return &DescribeLogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/log:describeLogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
Filters: filters,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeLogsRequestWithoutParam() *DescribeLogsRequest {
|
||||
|
||||
return &DescribeLogsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/log:describeLogs",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeLogsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeLogsRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页;(Optional) */
|
||||
func (r *DescribeLogsRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为100,取值范围:[10,100],用于查询列表的接口(Optional) */
|
||||
func (r *DescribeLogsRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
/* param filters: 过滤参数,多个过滤参数之间的关系为“与”(and)
|
||||
支持以下属性的过滤:logType, 支持operator选项:eq, 仅支持 MySQL,Percona,MariaDB
|
||||
(Optional) */
|
||||
func (r *DescribeLogsRequest) SetFilters(filters []common.Filter) {
|
||||
r.Filters = filters
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeLogsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeLogsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeLogsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeLogsResult struct {
|
||||
Logs []rds.Log `json:"logs"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+139
@@ -0,0 +1,139 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeParameterGroupAttachedInstancesRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* Parameter Group ID */
|
||||
ParameterGroupId string `json:"parameterGroupId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页 (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: Parameter Group ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeParameterGroupAttachedInstancesRequest(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
) *DescribeParameterGroupAttachedInstancesRequest {
|
||||
|
||||
return &DescribeParameterGroupAttachedInstancesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/instances",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: Parameter Group ID (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页 (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional)
|
||||
*/
|
||||
func NewDescribeParameterGroupAttachedInstancesRequestWithAllParams(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeParameterGroupAttachedInstancesRequest {
|
||||
|
||||
return &DescribeParameterGroupAttachedInstancesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/instances",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeParameterGroupAttachedInstancesRequestWithoutParam() *DescribeParameterGroupAttachedInstancesRequest {
|
||||
|
||||
return &DescribeParameterGroupAttachedInstancesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/instances",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DescribeParameterGroupAttachedInstancesRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param parameterGroupId: Parameter Group ID(Required) */
|
||||
func (r *DescribeParameterGroupAttachedInstancesRequest) SetParameterGroupId(parameterGroupId string) {
|
||||
r.ParameterGroupId = parameterGroupId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页(Optional) */
|
||||
func (r *DescribeParameterGroupAttachedInstancesRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍(Optional) */
|
||||
func (r *DescribeParameterGroupAttachedInstancesRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeParameterGroupAttachedInstancesRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeParameterGroupAttachedInstancesResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeParameterGroupAttachedInstancesResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeParameterGroupAttachedInstancesResult struct {
|
||||
Instances []rds.AttachedDBInstance `json:"instances"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeParameterGroupParametersRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* Parameter Group ID */
|
||||
ParameterGroupId string `json:"parameterGroupId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: Parameter Group ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeParameterGroupParametersRequest(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
) *DescribeParameterGroupParametersRequest {
|
||||
|
||||
return &DescribeParameterGroupParametersRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/parameters",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: Parameter Group ID (Required)
|
||||
*/
|
||||
func NewDescribeParameterGroupParametersRequestWithAllParams(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
) *DescribeParameterGroupParametersRequest {
|
||||
|
||||
return &DescribeParameterGroupParametersRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/parameters",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeParameterGroupParametersRequestWithoutParam() *DescribeParameterGroupParametersRequest {
|
||||
|
||||
return &DescribeParameterGroupParametersRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/parameters",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DescribeParameterGroupParametersRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param parameterGroupId: Parameter Group ID(Required) */
|
||||
func (r *DescribeParameterGroupParametersRequest) SetParameterGroupId(parameterGroupId string) {
|
||||
r.ParameterGroupId = parameterGroupId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeParameterGroupParametersRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeParameterGroupParametersResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeParameterGroupParametersResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeParameterGroupParametersResult struct {
|
||||
Parameters []rds.ParameterGroupParameter `json:"parameters"`
|
||||
}
|
||||
Generated
Vendored
+125
@@ -0,0 +1,125 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeParameterGroupsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeParameterGroupsRequest(
|
||||
regionId string,
|
||||
) *DescribeParameterGroupsRequest {
|
||||
|
||||
return &DescribeParameterGroupsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional)
|
||||
*/
|
||||
func NewDescribeParameterGroupsRequestWithAllParams(
|
||||
regionId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeParameterGroupsRequest {
|
||||
|
||||
return &DescribeParameterGroupsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeParameterGroupsRequestWithoutParam() *DescribeParameterGroupsRequest {
|
||||
|
||||
return &DescribeParameterGroupsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DescribeParameterGroupsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页;(Optional) */
|
||||
func (r *DescribeParameterGroupsRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍(Optional) */
|
||||
func (r *DescribeParameterGroupsRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeParameterGroupsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeParameterGroupsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeParameterGroupsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeParameterGroupsResult struct {
|
||||
ParameterGroups []rds.ParameterGroup `json:"parameterGroups"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+161
@@ -0,0 +1,161 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeParameterModifyRecordsRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* Parameter Group ID */
|
||||
ParameterGroupId string `json:"parameterGroupId"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
|
||||
/* 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss (Optional) */
|
||||
StartTime *string `json:"startTime"`
|
||||
|
||||
/* 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss (Optional) */
|
||||
EndTime *string `json:"endTime"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: Parameter Group ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeParameterModifyRecordsRequest(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
) *DescribeParameterModifyRecordsRequest {
|
||||
|
||||
return &DescribeParameterModifyRecordsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/records",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param parameterGroupId: Parameter Group ID (Required)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页; (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional)
|
||||
* param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss (Optional)
|
||||
* param endTime: 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss (Optional)
|
||||
*/
|
||||
func NewDescribeParameterModifyRecordsRequestWithAllParams(
|
||||
regionId string,
|
||||
parameterGroupId string,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
startTime *string,
|
||||
endTime *string,
|
||||
) *DescribeParameterModifyRecordsRequest {
|
||||
|
||||
return &DescribeParameterModifyRecordsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/records",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
ParameterGroupId: parameterGroupId,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
StartTime: startTime,
|
||||
EndTime: endTime,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeParameterModifyRecordsRequestWithoutParam() *DescribeParameterModifyRecordsRequest {
|
||||
|
||||
return &DescribeParameterModifyRecordsRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/records",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DescribeParameterModifyRecordsRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param parameterGroupId: Parameter Group ID(Required) */
|
||||
func (r *DescribeParameterModifyRecordsRequest) SetParameterGroupId(parameterGroupId string) {
|
||||
r.ParameterGroupId = parameterGroupId
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页;(Optional) */
|
||||
func (r *DescribeParameterModifyRecordsRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍(Optional) */
|
||||
func (r *DescribeParameterModifyRecordsRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
/* param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss(Optional) */
|
||||
func (r *DescribeParameterModifyRecordsRequest) SetStartTime(startTime string) {
|
||||
r.StartTime = &startTime
|
||||
}
|
||||
|
||||
/* param endTime: 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss(Optional) */
|
||||
func (r *DescribeParameterModifyRecordsRequest) SetEndTime(endTime string) {
|
||||
r.EndTime = &endTime
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeParameterModifyRecordsRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeParameterModifyRecordsResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeParameterModifyRecordsResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeParameterModifyRecordsResult struct {
|
||||
Records []rds.ParameterModifyRecords `json:"records"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Generated
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeParametersRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* Region ID */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* Instance ID */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param instanceId: Instance ID (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeParametersRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeParametersRequest {
|
||||
|
||||
return &DescribeParametersRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/parameters",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: Region ID (Required)
|
||||
* param instanceId: Instance ID (Required)
|
||||
*/
|
||||
func NewDescribeParametersRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeParametersRequest {
|
||||
|
||||
return &DescribeParametersRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/parameters",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeParametersRequestWithoutParam() *DescribeParametersRequest {
|
||||
|
||||
return &DescribeParametersRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/parameters",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: Region ID(Required) */
|
||||
func (r *DescribeParametersRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: Instance ID(Required) */
|
||||
func (r *DescribeParametersRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeParametersRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeParametersResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeParametersResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeParametersResult struct {
|
||||
Parameters []rds.DBInstanceParameter `json:"parameters"`
|
||||
}
|
||||
Generated
Vendored
+128
@@ -0,0 +1,128 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
)
|
||||
|
||||
type DescribePrivilegeRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* 设置可见的引擎类型,如 MySQL 等 */
|
||||
Engine string `json:"engine"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 (Optional) */
|
||||
InstanceId *string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param engine: 设置可见的引擎类型,如 MySQL 等 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribePrivilegeRequest(
|
||||
regionId string,
|
||||
engine string,
|
||||
) *DescribePrivilegeRequest {
|
||||
|
||||
return &DescribePrivilegeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/common:describePrivilege",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
Engine: engine,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param engine: 设置可见的引擎类型,如 MySQL 等 (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Optional)
|
||||
*/
|
||||
func NewDescribePrivilegeRequestWithAllParams(
|
||||
regionId string,
|
||||
engine string,
|
||||
instanceId *string,
|
||||
) *DescribePrivilegeRequest {
|
||||
|
||||
return &DescribePrivilegeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/common:describePrivilege",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
Engine: engine,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribePrivilegeRequestWithoutParam() *DescribePrivilegeRequest {
|
||||
|
||||
return &DescribePrivilegeRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/common:describePrivilege",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribePrivilegeRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param engine: 设置可见的引擎类型,如 MySQL 等(Required) */
|
||||
func (r *DescribePrivilegeRequest) SetEngine(engine string) {
|
||||
r.Engine = engine
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Optional) */
|
||||
func (r *DescribePrivilegeRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = &instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribePrivilegeRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribePrivilegeResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribePrivilegeResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribePrivilegeResult struct {
|
||||
GlobalPrivileges []string `json:"globalPrivileges"`
|
||||
DatabasePrivileges []string `json:"databasePrivileges"`
|
||||
TablePrivileges []string `json:"tablePrivileges"`
|
||||
}
|
||||
Generated
Vendored
+166
@@ -0,0 +1,166 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeQueryPerformanceRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS 实例ID,唯一标识一个RDS实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
|
||||
/* 查询类型,不同的查询类型按照相应的字段从高到低返回结果。<br>支持如下类型:<br>ExecutionCount:执行次数<br>LastRows:上次返回行数<br>ElapsedTime:平均执行时间<br>CPUTime:平均CPU时间<br>LogicalReads:平均逻辑读<br>LogicalWrites:平均逻辑写<br>PhysicalReads:平均物理读<br> */
|
||||
QueryType string `json:"queryType"`
|
||||
|
||||
/* 只返回查询条件大于等于threshold的记录,默认为0 (Optional) */
|
||||
Threshold *int `json:"threshold"`
|
||||
|
||||
/* 显示数据的页码,默认为1,取值范围:[-1,1000]。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional) */
|
||||
PageNumber *int `json:"pageNumber"`
|
||||
|
||||
/* 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数,用于查询列表的接口 (Optional) */
|
||||
PageSize *int `json:"pageSize"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param queryType: 查询类型,不同的查询类型按照相应的字段从高到低返回结果。<br>支持如下类型:<br>ExecutionCount:执行次数<br>LastRows:上次返回行数<br>ElapsedTime:平均执行时间<br>CPUTime:平均CPU时间<br>LogicalReads:平均逻辑读<br>LogicalWrites:平均逻辑写<br>PhysicalReads:平均物理读<br> (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeQueryPerformanceRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
queryType string,
|
||||
) *DescribeQueryPerformanceRequest {
|
||||
|
||||
return &DescribeQueryPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeQueryPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
QueryType: queryType,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
|
||||
* param queryType: 查询类型,不同的查询类型按照相应的字段从高到低返回结果。<br>支持如下类型:<br>ExecutionCount:执行次数<br>LastRows:上次返回行数<br>ElapsedTime:平均执行时间<br>CPUTime:平均CPU时间<br>LogicalReads:平均逻辑读<br>LogicalWrites:平均逻辑写<br>PhysicalReads:平均物理读<br> (Required)
|
||||
* param threshold: 只返回查询条件大于等于threshold的记录,默认为0 (Optional)
|
||||
* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,1000]。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional)
|
||||
* param pageSize: 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数,用于查询列表的接口 (Optional)
|
||||
*/
|
||||
func NewDescribeQueryPerformanceRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
queryType string,
|
||||
threshold *int,
|
||||
pageNumber *int,
|
||||
pageSize *int,
|
||||
) *DescribeQueryPerformanceRequest {
|
||||
|
||||
return &DescribeQueryPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeQueryPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
QueryType: queryType,
|
||||
Threshold: threshold,
|
||||
PageNumber: pageNumber,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeQueryPerformanceRequestWithoutParam() *DescribeQueryPerformanceRequest {
|
||||
|
||||
return &DescribeQueryPerformanceRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/instances/{instanceId}/performance:describeQueryPerformance",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeQueryPerformanceRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
|
||||
func (r *DescribeQueryPerformanceRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
/* param queryType: 查询类型,不同的查询类型按照相应的字段从高到低返回结果。<br>支持如下类型:<br>ExecutionCount:执行次数<br>LastRows:上次返回行数<br>ElapsedTime:平均执行时间<br>CPUTime:平均CPU时间<br>LogicalReads:平均逻辑读<br>LogicalWrites:平均逻辑写<br>PhysicalReads:平均物理读<br>(Required) */
|
||||
func (r *DescribeQueryPerformanceRequest) SetQueryType(queryType string) {
|
||||
r.QueryType = queryType
|
||||
}
|
||||
|
||||
/* param threshold: 只返回查询条件大于等于threshold的记录,默认为0(Optional) */
|
||||
func (r *DescribeQueryPerformanceRequest) SetThreshold(threshold int) {
|
||||
r.Threshold = &threshold
|
||||
}
|
||||
|
||||
/* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,1000]。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。(Optional) */
|
||||
func (r *DescribeQueryPerformanceRequest) SetPageNumber(pageNumber int) {
|
||||
r.PageNumber = &pageNumber
|
||||
}
|
||||
|
||||
/* param pageSize: 每页显示的数据条数,默认为50,取值范围:[1,100],只能为10的倍数,用于查询列表的接口(Optional) */
|
||||
func (r *DescribeQueryPerformanceRequest) SetPageSize(pageSize int) {
|
||||
r.PageSize = &pageSize
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeQueryPerformanceRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeQueryPerformanceResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeQueryPerformanceResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeQueryPerformanceResult struct {
|
||||
QueryPerformanceResult []rds.QueryPerformanceResult `json:"queryPerformanceResult"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
PageNumber int `json:"pageNumber"`
|
||||
PageSize int `json:"pageSize"`
|
||||
}
|
||||
Generated
Vendored
+117
@@ -0,0 +1,117 @@
|
||||
// Copyright 2018 JDCLOUD.COM
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// NOTE: This class is auto generated by the jdcloud code generator program.
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"github.com/jdcloud-api/jdcloud-sdk-go/core"
|
||||
rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
|
||||
)
|
||||
|
||||
type DescribeReadWriteProxiesRequest struct {
|
||||
|
||||
core.JDCloudRequest
|
||||
|
||||
/* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
|
||||
RegionId string `json:"regionId"`
|
||||
|
||||
/* RDS实例ID,唯一标识一个实例 */
|
||||
InstanceId string `json:"instanceId"`
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS实例ID,唯一标识一个实例 (Required)
|
||||
*
|
||||
* @Deprecated, not compatible when mandatory parameters changed
|
||||
*/
|
||||
func NewDescribeReadWriteProxiesRequest(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeReadWriteProxiesRequest {
|
||||
|
||||
return &DescribeReadWriteProxiesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
|
||||
* param instanceId: RDS实例ID,唯一标识一个实例 (Required)
|
||||
*/
|
||||
func NewDescribeReadWriteProxiesRequestWithAllParams(
|
||||
regionId string,
|
||||
instanceId string,
|
||||
) *DescribeReadWriteProxiesRequest {
|
||||
|
||||
return &DescribeReadWriteProxiesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
RegionId: regionId,
|
||||
InstanceId: instanceId,
|
||||
}
|
||||
}
|
||||
|
||||
/* This constructor has better compatible ability when API parameters changed */
|
||||
func NewDescribeReadWriteProxiesRequestWithoutParam() *DescribeReadWriteProxiesRequest {
|
||||
|
||||
return &DescribeReadWriteProxiesRequest{
|
||||
JDCloudRequest: core.JDCloudRequest{
|
||||
URL: "/regions/{regionId}/readWriteProxy",
|
||||
Method: "GET",
|
||||
Header: nil,
|
||||
Version: "v1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
|
||||
func (r *DescribeReadWriteProxiesRequest) SetRegionId(regionId string) {
|
||||
r.RegionId = regionId
|
||||
}
|
||||
|
||||
/* param instanceId: RDS实例ID,唯一标识一个实例(Required) */
|
||||
func (r *DescribeReadWriteProxiesRequest) SetInstanceId(instanceId string) {
|
||||
r.InstanceId = instanceId
|
||||
}
|
||||
|
||||
// GetRegionId returns path parameter 'regionId' if exist,
|
||||
// otherwise return empty string
|
||||
func (r DescribeReadWriteProxiesRequest) GetRegionId() string {
|
||||
return r.RegionId
|
||||
}
|
||||
|
||||
type DescribeReadWriteProxiesResponse struct {
|
||||
RequestID string `json:"requestId"`
|
||||
Error core.ErrorResponse `json:"error"`
|
||||
Result DescribeReadWriteProxiesResult `json:"result"`
|
||||
}
|
||||
|
||||
type DescribeReadWriteProxiesResult struct {
|
||||
ReadWriteProxies []rds.ReadWriteProxy `json:"readWriteProxies"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user