Documentation
¶
Index ¶
- type Account
- type AccountPrivilege
- type ActiveQueryPerformanceResult
- type AuditFile
- type AuditResult
- type Backup
- type BackupSpec
- type BackupSynchronicity
- type Binlog
- type DBAccessPrivilege
- type DBInstance
- type DBInstanceAttribute
- type DBInstanceNode
- type DBInstanceParameter
- type DBInstanceSpec
- type Database
- type DigestData
- type ErrorLog
- type File
- type FileDownloadURL
- type ImportFile
- type IndexPerformanceResult
- type MissingIndexResult
- type Parameter
- type QueryPerformanceResult
- type ResourceInfo
- type RestoredNewDBInstanceSpec
- type SlowLogAttributes
- type SlowLogDigest
- type Tag
- type WhiteList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶ added in v1.0.6
type Account struct {
/* 账号名,账号名的具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Cloud-Database-and-Cache/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Optional) */
AccountName string `json:"accountName"`
/* 账号状态,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)<br>- **MySQL:不支持,不返回该字段**<br>- **SQL Server:返回该字段** (Optional) */
AccountStatus string `json:"accountStatus"`
/* 具有的权限 (Optional) */
AccountPrivileges []AccountPrivilege `json:"accountPrivileges"`
}
type AccountPrivilege ¶
type AccountPrivilege struct {
/* 数据库名称,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Cloud-Database-and-Cache/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Optional) */
DbName *string `json:"dbName"`
/* 账号对数据库所具有的权限,权限的具体定义可以参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
Privilege *string `json:"privilege"`
}
type ActiveQueryPerformanceResult ¶ added in v1.3.0
type ActiveQueryPerformanceResult struct {
/* sql语句 (Optional) */
Sql string `json:"sql"`
/* 开始执行时间,格式为YYYY-MM-DD hh:mm:ss (Optional) */
StartTime string `json:"startTime"`
/* 执行时长,单位秒 (Optional) */
ElapsedTime int `json:"elapsedTime"`
/* 数据库名 (Optional) */
Db string `json:"db"`
/* 该SQL执行时的Session ID (Optional) */
SessionId string `json:"sessionId"`
/* 执行该SQL的用户名 (Optional) */
User string `json:"user"`
/* SQL 的执行状态 (Optional) */
Status string `json:"status"`
}
type AuditResult ¶ added in v1.1.3
type AuditResult struct {
/* SQL开始执行时间 (Optional) */
StartTime string `json:"startTime"`
/* 源IP (Optional) */
Ip string `json:"ip"`
/* 账号名 (Optional) */
AccountName string `json:"accountName"`
/* 操作类型 (Optional) */
Operation string `json:"operation"`
/* 线程ID (Optional) */
ThreadId string `json:"threadId"`
/* 数据库名 (Optional) */
DbName string `json:"dbName"`
/* sql语句 (Optional) */
Sql string `json:"sql"`
}
type Backup ¶
type Backup struct {
/* 备份ID (Optional) */
BackupId string `json:"backupId"`
/* 备份名称,最长支持64个英文字符或等长的中文字符 (Optional) */
BackupName string `json:"backupName"`
/* 备份所属实例ID (Optional) */
InstanceId string `json:"instanceId"`
/* 备份状态,请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
BackupStatus string `json:"backupStatus"`
/* 备份开始时间,格式为:YYYY-MM-DD HH:mm:ss (Optional) */
BackupStartTime string `json:"backupStartTime"`
/* 备份结束时间,格式为:YYYY-MM-DD HH:mm:ss<br>- **SQL Server支持**<br>- **MySQL不支持** (Optional) */
BackupEndTime string `json:"backupEndTime"`
/* 备份类型,全量备份或增量备份,请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)<br>- **SQL Server支持**<br>- **MySQL不支持** (Optional) */
BackupType string `json:"backupType"`
/* 备份模式,系统自动备份或手动备份,请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
BackupMode string `json:"backupMode"`
/* 备份粒度,实例备份或者多库备份,请查看[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)<br>- **SQL Server支持**<br>- **MySQL不支持** (Optional) */
BackupUnit string `json:"backupUnit"`
/* 备份文件列表<br>- **SQL Server支持**,备份可以有多个文件,文件名的命名规则为:<br>(1)全备:数据库名+.bak<br>(2)增量:数据库名+.diff<br>- **MySQL不支持** (Optional) */
BackupFiles []string `json:"backupFiles"`
/* 整个备份集大小,单位:Byte (Optional) */
BackupSizeByte int `json:"backupSizeByte"`
}
type BackupSpec ¶
type BackupSynchronicity ¶ added in v1.1.3
type BackupSynchronicity struct {
/* 跨地域备份同步服务ID (Optional) */
ServiceId string `json:"serviceId"`
/* RDS 实例ID (Optional) */
InstanceId string `json:"instanceId"`
/* 跨地域备份同步服务状态,正常,running;错误,error (Optional) */
ServiceStatus string `json:"serviceStatus"`
/* 源实例所在地域 (Optional) */
SrcRegion string `json:"srcRegion"`
/* 备份同步的目标地域 (Optional) */
DestRegion string `json:"destRegion"`
/* 数据库类型 (Optional) */
Engine string `json:"engine"`
/* 数据库版本 (Optional) */
EngineVersion string `json:"engineVersion"`
/* 创建时间 (Optional) */
CreateTime string `json:"createTime"`
/* 跨地域备份的最新数据时间点 (Optional) */
NewestDataTime string `json:"newestDataTime"`
}
type Binlog ¶ added in v1.0.9
type Binlog struct {
/* binlog日志备份ID (Optional) */
BinlogBackupId string `json:"binlogBackupId"`
/* binlog日志名称 (Optional) */
BinlogName string `json:"binlogName"`
/* binlog日志大小,单位KB (Optional) */
BinlogSizeKB int64 `json:"binlogSizeKB"`
/* binlog开始时间,格式为:YYYY-MM-DD HH:mm:ss (Optional) */
BinlogStartTime string `json:"binlogStartTime"`
/* binlog结束时间,格式为:YYYY-MM-DD HH:mm:ss (Optional) */
BinlogEndTime string `json:"binlogEndTime"`
}
type DBAccessPrivilege ¶ added in v1.0.6
type DBInstance ¶ added in v1.0.6
type DBInstance struct {
/* 实例ID (Optional) */
InstanceId string `json:"instanceId"`
/* 实例名称,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Cloud-Database-and-Cache/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Optional) */
InstanceName string `json:"instanceName"`
/* 实例类别,例如主实例,只读实例等,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
InstanceType string `json:"instanceType"`
/* 实例引擎类型,如MySQL或SQL Server等,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
Engine string `json:"engine"`
/* 实例引擎版本,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
EngineVersion string `json:"engineVersion"`
/* 地域ID,参见[地域及可用区对照表](../Enum-Definitions/Regions-AZ.md) (Optional) */
RegionId string `json:"regionId"`
/* 可用区ID,第一个为主实例在的可用区,参见[地域及可用区对照表](../Enum-Definitions/Regions-AZ.md) (Optional) */
AzId []string `json:"azId"`
/* 实例状态,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
InstanceStatus string `json:"instanceStatus"`
/* 实例创建时间 (Optional) */
CreateTime string `json:"createTime"`
/* 计费配置 (Optional) */
Charge charge.Charge `json:"charge"`
/* 标签信息 (Optional) */
Tags []Tag `json:"tags"`
}
type DBInstanceAttribute ¶ added in v1.0.6
type DBInstanceAttribute struct {
/* 实例ID (Optional) */
InstanceId string `json:"instanceId"`
/* 实例名称,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Cloud-Database-and-Cache/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Optional) */
InstanceName string `json:"instanceName"`
/* 实例类型,例如主实例,只读实例等,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
InstanceType string `json:"instanceType"`
/* 实例引擎类型,如MySQL或SQL Server等,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
Engine string `json:"engine"`
/* 实例引擎版本,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
EngineVersion string `json:"engineVersion"`
/* 实例规格代码 (Optional) */
InstanceClass string `json:"instanceClass"`
/* 磁盘,单位GB (Optional) */
InstanceStorageGB int `json:"instanceStorageGB"`
/* CPU核数 (Optional) */
InstanceCPU int `json:"instanceCPU"`
/* 内存大小,单位MB (Optional) */
InstanceMemoryMB int `json:"instanceMemoryMB"`
/* 地域ID,参见[地域及可用区对照表](../Enum-Definitions/Regions-AZ.md) (Optional) */
RegionId string `json:"regionId"`
/* 可用区ID,第一个为主实例在的可用区,参见[地域及可用区对照表](../Enum-Definitions/Regions-AZ.md) (Optional) */
AzId []string `json:"azId"`
/* VPC的ID (Optional) */
VpcId string `json:"vpcId"`
/* 子网的ID (Optional) */
SubnetId string `json:"subnetId"`
/* 实例公网域名 (Optional) */
InternalDomainName string `json:"internalDomainName"`
/* 实例内网域名 (Optional) */
PublicDomainName string `json:"publicDomainName"`
/* 应用访问端口 (Optional) */
InstancePort string `json:"instancePort"`
/* 访问模式,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
ConnectionMode string `json:"connectionMode"`
/* 审计状态,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
AuditStatus string `json:"auditStatus"`
/* 实例状态,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
InstanceStatus string `json:"instanceStatus"`
/* 实例创建时间 (Optional) */
CreateTime string `json:"createTime"`
/* 计费配置 (Optional) */
Charge charge.Charge `json:"charge"`
/* 高可用集群中主节点的信息<br>- 仅支持SQL Server (Optional) */
PrimaryNode DBInstanceNode `json:"primaryNode"`
/* 高可用集群中从节点的信息<br>- 仅支持SQL Server (Optional) */
SecondaryNode DBInstanceNode `json:"secondaryNode"`
/* 标签信息 (Optional) */
Tags []Tag `json:"tags"`
}
type DBInstanceNode ¶ added in v1.1.3
type DBInstanceParameter ¶ added in v1.3.0
type DBInstanceParameter struct {
/* 参数名称 (Optional) */
Name string `json:"name"`
/* 参数描述 (Optional) */
Description string `json:"description"`
/* 参数修改后的数值,但不一定生效,需要视该参数生效是否需要重启 (Optional) */
ConfigureValue string `json:"configureValue"`
/* 当前在实例中生效的数值 (Optional) */
RunningValue string `json:"runningValue"`
/* 该参数数值的允许范围 (Optional) */
Range string `json:"range"`
/* 修改是否需要重启生效.- true:参数需要重启才能生效- false:参数生效无需重启 (Optional) */
NeedRestart string `json:"needRestart"`
}
type DBInstanceSpec ¶ added in v1.0.6
type DBInstanceSpec struct {
/* 实例名,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Cloud-Database-and-Cache/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Optional) */
InstanceName *string `json:"instanceName"`
/* 实例引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) */
Engine string `json:"engine"`
/* 实例引擎版本,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) */
EngineVersion string `json:"engineVersion"`
/* 实例规格代码,可以通过[describeInstanceClasses](../instance/describeInstanceClasses.md)接口获取 */
InstanceClass string `json:"instanceClass"`
/* 磁盘大小,单位GB */
InstanceStorageGB int `json:"instanceStorageGB"`
/* 可用区ID, 第一个ID必须为主实例所在的可用区。如两个可用区一样,也需输入两个azId */
AzId []string `json:"azId"`
/* VPC的ID */
VpcId string `json:"vpcId"`
/* 子网ID */
SubnetId string `json:"subnetId"`
/* 参数组ID, 缺省系统会创建一个默认参数组<br>- 仅支持MySQL (Optional) */
ParameterGroup *string `json:"parameterGroup"`
/* 计费规格,包括计费类型,计费周期等 */
ChargeSpec *charge.ChargeSpec `json:"chargeSpec"`
}
type Database ¶ added in v1.0.6
type Database struct {
/* 数据库名称,具体规则可参见帮助中心文档:[名称及密码限制](../../../documentation/Cloud-Database-and-Cache/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Optional) */
DbName string `json:"dbName"`
/* 数据库状态,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)<br>- **MySQL:不支持,不返回该字段**<br>- **SQL Server:返回该字段** (Optional) */
DbStatus string `json:"dbStatus"`
/* 字符集,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Optional) */
CharacterSetName string `json:"characterSetName"`
/* 数据库创建时间,格式YYYY-MM-DD HH:mm:ss<br>- 仅支持SQL Server (Optional) */
CreateTime string `json:"createTime"`
/* 该数据库相关账户权限列表 (Optional) */
AccessPrivilege []DBAccessPrivilege `json:"accessPrivilege"`
}
type DigestData ¶ added in v1.1.1
type DigestData struct {
/* 表示执行结果中95% 数据小于或等于此数值 (Optional) */
Pct95 float32 `json:"pct95"`
/* 执行结果的最大值 (Optional) */
Max float32 `json:"max"`
/* 执行结果的平均值 (Optional) */
Avg float32 `json:"avg"`
/* 执行结果的最小值 (Optional) */
Min float32 `json:"min"`
/* 执行结果的合计值 (Optional) */
Total float64 `json:"total"`
}
type ErrorLog ¶ added in v1.0.6
type ErrorLog struct {
/* 错误日志文件名称 (Optional) */
Name string `json:"name"`
/* 错误日志文件大小,单位Byte (Optional) */
SizeByte int64 `json:"sizeByte"`
/* 错误日志最后更新时间,格式为:YYYY-MM-DD HH:mm:ss (Optional) */
LastUpdateTime string `json:"lastUpdateTime"`
/* 错误日志上传时间,格式为:YYYY-MM-DD HH:mm:ss (Optional) */
UploadTime string `json:"uploadTime"`
/* 公网下载链接 (Optional) */
PublicURL string `json:"publicURL"`
/* 内网下载链接 (Optional) */
InternalURL string `json:"internalURL"`
}
type FileDownloadURL ¶
type ImportFile ¶
type ImportFile struct {
/* 文件名称 (Optional) */
Name string `json:"name"`
SharedFileGid string `json:"sharedFileGid"`
/* 文件大小,单位Byte (Optional) */
SizeByte int `json:"sizeByte"`
/* 文件上传完成时间,格式为:YYYY-MM-DD HH:mm:ss (Optional) */
UploadTime string `json:"uploadTime"`
/* 是否所属当前实例.<br> 1:当前实例;<br>0:不是当前实例,为共享文件 (Optional) */
IsLocal string `json:"isLocal"`
/* 文件状态<br>- 仅支持SQL Server (Optional) */
Status string `json:"status"`
/* 导入完成时间,格式为:YYYY-MM-DD HH:mm:ss<br>- 仅支持SQL Server (Optional) */
ImportTime string `json:"importTime"`
}
type IndexPerformanceResult ¶ added in v1.0.6
type IndexPerformanceResult struct {
/* 数据库名 (Optional) */
Db string `json:"db"`
/* 表名 (Optional) */
Table string `json:"table"`
/* 索引名 (Optional) */
Index string `json:"index"`
/* 索引大小,单位KB (Optional) */
SizeKB int `json:"sizeKB"`
/* 服务器启动以来,累计索引搜索次数 (Optional) */
UserSeeks int `json:"userSeeks"`
/* 服务器启动以来,累计表扫描次数 (Optional) */
UserScans int `json:"userScans"`
/* 服务器启动以来,累计索引更新次数 (Optional) */
UserUpdates int `json:"userUpdates"`
/* 最近索引搜索时间,格式为YYYY-MM-DD hh:mm:ss (Optional) */
LastUserSeek string `json:"lastUserSeek"`
/* 最近表扫描时间,格式为YYYY-MM-DD hh:mm:ss (Optional) */
LastUserScan string `json:"lastUserScan"`
/* 最近索引更新时间,格式为YYYY-MM-DD hh:mm:ss (Optional) */
LastUserUpdate string `json:"lastUserUpdate"`
}
type MissingIndexResult ¶ added in v1.0.6
type MissingIndexResult struct {
/* 数据库名 (Optional) */
Db string `json:"db"`
/* 表名 (Optional) */
Table string `json:"table"`
/* 构成相等谓词的列的逗号分隔列表,谓词的形式如下:<br>table.column =constant_value (Optional) */
EqualityColumns string `json:"equalityColumns"`
/* 用于查询的涵盖列的逗号分隔列表,即创建索引的SQL语句中,Include后的字段 (Optional) */
InequalityColumns string `json:"inequalityColumns"`
/* 构成不等谓词的列的逗号分隔列表,例如以下形式的谓词:<br>table.column > constant_value<br>“=”之外的任何比较运算符都表示不相等。 (Optional) */
IncludedColumns string `json:"includedColumns"`
/* 实现此缺失索引后,用户查询可能获得的平均百分比收益。 该值表示如果实现此缺失索引,则查询成本将按此百分比平均下降。 (Optional) */
AvgUserImpact float32 `json:"avgUserImpact"`
/* 由可能使用了组中建议索引的用户查询所导致的扫描次数。 (Optional) */
UserScans int `json:"userScans"`
/* 由可能使用了组中建议索引的用户查询所导致的搜索次数。 (Optional) */
UserSeeks int `json:"userSeeks"`
}
type QueryPerformanceResult ¶ added in v1.0.6
type QueryPerformanceResult struct {
/* sql语句 (Optional) */
Sql string `json:"sql"`
/* 上次执行时间,格式为YYYY-MM-DD hh:mm:ss (Optional) */
LastExecutionTime string `json:"lastExecutionTime"`
/* 平均执行时长,单位毫秒(ms) (Optional) */
ElapsedTime int `json:"elapsedTime"`
/* 执行次数 (Optional) */
ExecutionCount int `json:"executionCount"`
/* 平均CPU使用时间,单位毫秒(ms) (Optional) */
WorkerTime int `json:"workerTime"`
/* 平均逻辑读次数 (Optional) */
LogicalReads int `json:"logicalReads"`
/* 平均逻辑写次数 (Optional) */
LogicalWrites int `json:"logicalWrites"`
/* 平均物理读次数 (Optional) */
PhysicalReads int `json:"physicalReads"`
/* 上次返回记录数 (Optional) */
LastRows int `json:"lastRows"`
}
type ResourceInfo ¶ added in v1.3.0
type RestoredNewDBInstanceSpec ¶ added in v1.0.11
type RestoredNewDBInstanceSpec struct {
/* 数据库实例名,名称的限制可参考[帮助中心文档](../../../documentation/Cloud-Database-and-Cache/RDS/Introduction/Restrictions/SQLServer-Restrictions.md) (Optional) */
InstanceName *string `json:"instanceName"`
/* 实例规格代码,可以通过[describeInstanceClasses](../instance/describeInstanceClasses.md)接口获取 */
InstanceClass string `json:"instanceClass"`
/* 磁盘大小,单位GB */
InstanceStorageGB int `json:"instanceStorageGB"`
/* 可用区ID, 第一个ID必须为主实例所在的可用区。如两个可用区一样,也需输入两个azId */
AzId []string `json:"azId"`
/* VPC的ID */
VpcId string `json:"vpcId"`
/* 子网ID */
SubnetId string `json:"subnetId"`
/* 参数组ID, 缺省系统会创建一个默认参数组<br>- 仅支持MySQL (Optional) */
ParameterGroup *string `json:"parameterGroup"`
/* 计费规格,包括计费类型,计费周期等 */
ChargeSpec *charge.ChargeSpec `json:"chargeSpec"`
}
type SlowLogAttributes ¶ added in v1.1.1
type SlowLogAttributes struct {
/* 数据库名,表示该SQL是在哪个数据库中执行的 (Optional) */
DbName string `json:"dbName"`
/* SQL语句 (Optional) */
Sql string `json:"sql"`
/* SQL语句执行的开始时间,格式为YYYY-MM-DD hh:mm:ss (Optional) */
ExecutionTime string `json:"executionTime"`
/* SQL语句执行的时长,单位秒 (Optional) */
ElapsedTime float32 `json:"elapsedTime"`
/* SQL语句等待锁的时间,单位秒 (Optional) */
LockTime float32 `json:"lockTime"`
/* SQL语句扫描的行数 (Optional) */
RowsExamined int `json:"rowsExamined"`
/* SQL语句返回的行数 (Optional) */
RowsReturned int `json:"rowsReturned"`
}
type SlowLogDigest ¶ added in v1.1.1
type SlowLogDigest struct {
/* 数据库名,表示该SQL是在哪个数据库中执行的 (Optional) */
DbName string `json:"dbName"`
/* SQL语句 (Optional) */
Sql string `json:"sql"`
/* SQL语句执行的开始时间,格式为YYYY-MM-DD hh:mm:ss (Optional) */
ExecutionTime string `json:"executionTime"`
/* SQL语句的执行次数 (Optional) */
ExecutionCount int `json:"executionCount"`
/* SQL语句执行的时长,单位秒 (Optional) */
ElapsedTime DigestData `json:"elapsedTime"`
/* SQL语句等待锁的时间,单位秒 (Optional) */
LockTime DigestData `json:"lockTime"`
/* SQL语句的长度 (Optional) */
SqlLength DigestData `json:"sqlLength"`
/* SQL语句扫描的行数 (Optional) */
RowsExamined DigestData `json:"rowsExamined"`
/* SQL语句返回的行数 (Optional) */
RowsReturned DigestData `json:"rowsReturned"`
}
Source Files
¶
- Account.go
- AccountPrivilege.go
- ActiveQueryPerformanceResult.go
- AuditFile.go
- AuditResult.go
- Backup.go
- BackupSpec.go
- BackupSynchronicity.go
- Binlog.go
- DBAccessPrivilege.go
- DBInstance.go
- DBInstanceAttribute.go
- DBInstanceNode.go
- DBInstanceParameter.go
- DBInstanceSpec.go
- Database.go
- DigestData.go
- ErrorLog.go
- File.go
- FileDownloadURL.go
- ImportFile.go
- IndexPerformanceResult.go
- MissingIndexResult.go
- Parameter.go
- QueryPerformanceResult.go
- ResourceInfo.go
- RestoredNewDBInstanceSpec.go
- SlowLogAttributes.go
- SlowLogDigest.go
- Tag.go
- WhiteList.go
Click to show internal directories.
Click to hide internal directories.