tencentcloud-sdk-postgres 3.0.627 → 3.0.628
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20170312/client.rb +79 -0
- data/lib/v20170312/models.rb +183 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2177359e6865b9bacd19a71824bb11f85a32955
|
4
|
+
data.tar.gz: 0dac2b70b8a96e6ea943eb526d8224dd77388c6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e5494524d07ef2524e9e19cf369d3f40e8f9493120699ae0f891ac66e5a242be64a7740e15a2fb0c10c089fef4faa6a272a184fa24a63489cd252b29cdb5249
|
7
|
+
data.tar.gz: a48ded629258e649f92af2b48c9443f360362f699b8755f56481b9013de20bbd6f8b29a764c2ed748dc7fc729ba435872acf806e548089eeea5df91abdba330b
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.628
|
data/lib/v20170312/client.rb
CHANGED
@@ -823,6 +823,32 @@ module TencentCloud
|
|
823
823
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
824
824
|
end
|
825
825
|
|
826
|
+
# 本接口(DescribeDBInstanceHAConfig)用于查询实例HA配置信息。其中HA配置信息包括:
|
827
|
+
# <li>允许备节点切换为主节点的条件配置
|
828
|
+
# <li>半同步实例使用同步复制或异步复制的条件配置
|
829
|
+
|
830
|
+
# @param request: Request instance for DescribeDBInstanceHAConfig.
|
831
|
+
# @type request: :class:`Tencentcloud::postgres::V20170312::DescribeDBInstanceHAConfigRequest`
|
832
|
+
# @rtype: :class:`Tencentcloud::postgres::V20170312::DescribeDBInstanceHAConfigResponse`
|
833
|
+
def DescribeDBInstanceHAConfig(request)
|
834
|
+
body = send_request('DescribeDBInstanceHAConfig', request.serialize)
|
835
|
+
response = JSON.parse(body)
|
836
|
+
if response['Response'].key?('Error') == false
|
837
|
+
model = DescribeDBInstanceHAConfigResponse.new
|
838
|
+
model.deserialize(response['Response'])
|
839
|
+
model
|
840
|
+
else
|
841
|
+
code = response['Response']['Error']['Code']
|
842
|
+
message = response['Response']['Error']['Message']
|
843
|
+
reqid = response['Response']['RequestId']
|
844
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
845
|
+
end
|
846
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
847
|
+
raise e
|
848
|
+
rescue StandardError => e
|
849
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
850
|
+
end
|
851
|
+
|
826
852
|
# 本接口(DescribeDBInstanceAttribute)用于查询实例的参数信息。
|
827
853
|
|
828
854
|
# @param request: Request instance for DescribeDBInstanceParameters.
|
@@ -1639,6 +1665,32 @@ module TencentCloud
|
|
1639
1665
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1640
1666
|
end
|
1641
1667
|
|
1668
|
+
# 本接口(ModifyDBInstanceHAConfig)用于修改实例HA配置信息。其中HA配置信息包括:
|
1669
|
+
# <li>允许备节点切换为主节点的条件配置
|
1670
|
+
# <li>半同步实例使用同步复制或异步复制的条件配置
|
1671
|
+
|
1672
|
+
# @param request: Request instance for ModifyDBInstanceHAConfig.
|
1673
|
+
# @type request: :class:`Tencentcloud::postgres::V20170312::ModifyDBInstanceHAConfigRequest`
|
1674
|
+
# @rtype: :class:`Tencentcloud::postgres::V20170312::ModifyDBInstanceHAConfigResponse`
|
1675
|
+
def ModifyDBInstanceHAConfig(request)
|
1676
|
+
body = send_request('ModifyDBInstanceHAConfig', request.serialize)
|
1677
|
+
response = JSON.parse(body)
|
1678
|
+
if response['Response'].key?('Error') == false
|
1679
|
+
model = ModifyDBInstanceHAConfigResponse.new
|
1680
|
+
model.deserialize(response['Response'])
|
1681
|
+
model
|
1682
|
+
else
|
1683
|
+
code = response['Response']['Error']['Code']
|
1684
|
+
message = response['Response']['Error']['Message']
|
1685
|
+
reqid = response['Response']['RequestId']
|
1686
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1687
|
+
end
|
1688
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1689
|
+
raise e
|
1690
|
+
rescue StandardError => e
|
1691
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1692
|
+
end
|
1693
|
+
|
1642
1694
|
# 本接口(ModifyDBInstanceName)用于修改postgresql实例名字。
|
1643
1695
|
|
1644
1696
|
# @param request: Request instance for ModifyDBInstanceName.
|
@@ -2047,6 +2099,33 @@ module TencentCloud
|
|
2047
2099
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2048
2100
|
end
|
2049
2101
|
|
2102
|
+
# 本接口(SwitchDBInstancePrimary)用于切换实例主备关系。
|
2103
|
+
# <li>通过主动发起切换,可以验证业务能否正确处理实例主备切换的场景
|
2104
|
+
# <li>通过使用强制切换,可以在备节点延迟不满足切换条件时,强制发起主从切换
|
2105
|
+
# <li>只有主实例可以执行该操作
|
2106
|
+
|
2107
|
+
# @param request: Request instance for SwitchDBInstancePrimary.
|
2108
|
+
# @type request: :class:`Tencentcloud::postgres::V20170312::SwitchDBInstancePrimaryRequest`
|
2109
|
+
# @rtype: :class:`Tencentcloud::postgres::V20170312::SwitchDBInstancePrimaryResponse`
|
2110
|
+
def SwitchDBInstancePrimary(request)
|
2111
|
+
body = send_request('SwitchDBInstancePrimary', request.serialize)
|
2112
|
+
response = JSON.parse(body)
|
2113
|
+
if response['Response'].key?('Error') == false
|
2114
|
+
model = SwitchDBInstancePrimaryResponse.new
|
2115
|
+
model.deserialize(response['Response'])
|
2116
|
+
model
|
2117
|
+
else
|
2118
|
+
code = response['Response']['Error']['Code']
|
2119
|
+
message = response['Response']['Error']['Message']
|
2120
|
+
reqid = response['Response']['RequestId']
|
2121
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2122
|
+
end
|
2123
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2124
|
+
raise e
|
2125
|
+
rescue StandardError => e
|
2126
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2127
|
+
end
|
2128
|
+
|
2050
2129
|
# 本接口(UpgradeDBInstance)用于升级实例配置。本接口已废弃,推荐使用接口[ModifyDBInstanceSpec](https://cloud.tencent.com/document/api/409/63689)替代。
|
2051
2130
|
|
2052
2131
|
# @param request: Request instance for UpgradeDBInstance.
|
data/lib/v20170312/models.rb
CHANGED
@@ -2800,6 +2800,72 @@ module TencentCloud
|
|
2800
2800
|
end
|
2801
2801
|
end
|
2802
2802
|
|
2803
|
+
# DescribeDBInstanceHAConfig请求参数结构体
|
2804
|
+
class DescribeDBInstanceHAConfigRequest < TencentCloud::Common::AbstractModel
|
2805
|
+
# @param DBInstanceId: 实例ID
|
2806
|
+
# @type DBInstanceId: String
|
2807
|
+
|
2808
|
+
attr_accessor :DBInstanceId
|
2809
|
+
|
2810
|
+
def initialize(dbinstanceid=nil)
|
2811
|
+
@DBInstanceId = dbinstanceid
|
2812
|
+
end
|
2813
|
+
|
2814
|
+
def deserialize(params)
|
2815
|
+
@DBInstanceId = params['DBInstanceId']
|
2816
|
+
end
|
2817
|
+
end
|
2818
|
+
|
2819
|
+
# DescribeDBInstanceHAConfig返回参数结构体
|
2820
|
+
class DescribeDBInstanceHAConfigResponse < TencentCloud::Common::AbstractModel
|
2821
|
+
# @param SyncMode: 主从同步方式:
|
2822
|
+
# <li>Semi-sync:半同步
|
2823
|
+
# <li>Async:异步
|
2824
|
+
# @type SyncMode: String
|
2825
|
+
# @param MaxStandbyLatency: 高可用备机最大延迟数据量。备节点延迟数据量小于等于该值,且备节点延迟时间小于等于MaxStandbyLag时,可以切换为主节点。
|
2826
|
+
# <li>单位:byte
|
2827
|
+
# <li>参数范围:[1073741824, 322122547200]
|
2828
|
+
# @type MaxStandbyLatency: Integer
|
2829
|
+
# @param MaxStandbyLag: 高可用备机最大延迟时间。备节点延迟时间小于等于该值,且备节点延迟数据量小于等于MaxStandbyLatency时,可以切换为主节点。
|
2830
|
+
# <li>单位:s
|
2831
|
+
# <li>参数范围:[5, 10]
|
2832
|
+
# @type MaxStandbyLag: Integer
|
2833
|
+
# @param MaxSyncStandbyLatency: 同步备机最大延迟数据量。备机延迟数据量小于等于该值,且该备机延迟时间小于等于MaxSyncStandbyLag时,则该备机采用同步复制;否则,采用异步复制。
|
2834
|
+
# 该参数值针对SyncMode设置为Semi-sync的实例有效。
|
2835
|
+
# 异步实例该字段返回null。
|
2836
|
+
# 半同步实例禁止退化为异步复制时,该字段返回null。
|
2837
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
2838
|
+
# @type MaxSyncStandbyLatency: Integer
|
2839
|
+
# @param MaxSyncStandbyLag: 同步备机最大延迟时间。备机延迟时间小于等于该值,且该备机延迟数据量小于等于MaxSyncStandbyLatency时,则该备机采用同步复制;否则,采用异步复制。
|
2840
|
+
# 该参数值针对SyncMode设置为Semi-sync的实例有效。
|
2841
|
+
# 异步实例不返回该字段。
|
2842
|
+
# 半同步实例禁止退化为异步复制时,不返回该字段。
|
2843
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
2844
|
+
# @type MaxSyncStandbyLag: Integer
|
2845
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
2846
|
+
# @type RequestId: String
|
2847
|
+
|
2848
|
+
attr_accessor :SyncMode, :MaxStandbyLatency, :MaxStandbyLag, :MaxSyncStandbyLatency, :MaxSyncStandbyLag, :RequestId
|
2849
|
+
|
2850
|
+
def initialize(syncmode=nil, maxstandbylatency=nil, maxstandbylag=nil, maxsyncstandbylatency=nil, maxsyncstandbylag=nil, requestid=nil)
|
2851
|
+
@SyncMode = syncmode
|
2852
|
+
@MaxStandbyLatency = maxstandbylatency
|
2853
|
+
@MaxStandbyLag = maxstandbylag
|
2854
|
+
@MaxSyncStandbyLatency = maxsyncstandbylatency
|
2855
|
+
@MaxSyncStandbyLag = maxsyncstandbylag
|
2856
|
+
@RequestId = requestid
|
2857
|
+
end
|
2858
|
+
|
2859
|
+
def deserialize(params)
|
2860
|
+
@SyncMode = params['SyncMode']
|
2861
|
+
@MaxStandbyLatency = params['MaxStandbyLatency']
|
2862
|
+
@MaxStandbyLag = params['MaxStandbyLag']
|
2863
|
+
@MaxSyncStandbyLatency = params['MaxSyncStandbyLatency']
|
2864
|
+
@MaxSyncStandbyLag = params['MaxSyncStandbyLag']
|
2865
|
+
@RequestId = params['RequestId']
|
2866
|
+
end
|
2867
|
+
end
|
2868
|
+
|
2803
2869
|
# DescribeDBInstanceParameters请求参数结构体
|
2804
2870
|
class DescribeDBInstanceParametersRequest < TencentCloud::Common::AbstractModel
|
2805
2871
|
# @param DBInstanceId: 实例ID
|
@@ -4954,6 +5020,70 @@ module TencentCloud
|
|
4954
5020
|
end
|
4955
5021
|
end
|
4956
5022
|
|
5023
|
+
# ModifyDBInstanceHAConfig请求参数结构体
|
5024
|
+
class ModifyDBInstanceHAConfigRequest < TencentCloud::Common::AbstractModel
|
5025
|
+
# @param DBInstanceId: 实例ID
|
5026
|
+
# @type DBInstanceId: String
|
5027
|
+
# @param SyncMode: 主从同步方式:
|
5028
|
+
# <li>Semi-sync:半同步
|
5029
|
+
# <li>Async:异步
|
5030
|
+
# @type SyncMode: String
|
5031
|
+
# @param MaxStandbyLatency: 高可用备机最大延迟数据量。备节点延迟数据量小于等于该值,且备节点延迟时间小于等于MaxStandbyLag时,可以切换为主节点。
|
5032
|
+
# <li>单位:byte
|
5033
|
+
# <li>参数范围:[1073741824, 322122547200]
|
5034
|
+
# @type MaxStandbyLatency: Integer
|
5035
|
+
# @param MaxStandbyLag: 高可用备机最大延迟时间。备节点延迟时间小于等于该值,且备节点延迟数据量小于等于MaxStandbyLatency时,可以切换为主节点。
|
5036
|
+
# <li>单位:s
|
5037
|
+
# <li>参数范围:[5, 10]
|
5038
|
+
# @type MaxStandbyLag: Integer
|
5039
|
+
# @param MaxSyncStandbyLatency: 同步备机最大延迟数据量。备机延迟数据量小于等于该值,且该备机延迟时间小于等于MaxSyncStandbyLag时,则该备机采用同步复制;否则,采用异步复制。
|
5040
|
+
# 该参数值针对SyncMode设置为Semi-sync的实例有效。
|
5041
|
+
# 半同步实例禁止退化为异步复制时,不设置MaxSyncStandbyLatency、MaxSyncStandbyLag。
|
5042
|
+
# 半同步实例允许退化异步复制时,PostgreSQL 9版本的实例须设置MaxSyncStandbyLatency且不设置MaxSyncStandbyLag,PostgreSQL 10及以上版本的实例须设置MaxSyncStandbyLatency、MaxSyncStandbyLag。
|
5043
|
+
# @type MaxSyncStandbyLatency: Integer
|
5044
|
+
# @param MaxSyncStandbyLag: 同步备机最大延迟时间。备机延迟时间小于等于该值,且该备机延迟数据量小于等于MaxSyncStandbyLatency时,则该备机采用同步复制;否则,采用异步复制。
|
5045
|
+
# 该参数值针对SyncMode设置为Semi-sync的实例有效。
|
5046
|
+
# 半同步实例禁止退化为异步复制时,不设置MaxSyncStandbyLatency、MaxSyncStandbyLag。
|
5047
|
+
# 半同步实例允许退化异步复制时,PostgreSQL 9版本的实例须设置MaxSyncStandbyLatency且不设置MaxSyncStandbyLag,PostgreSQL 10及以上版本的实例须设置MaxSyncStandbyLatency、MaxSyncStandbyLag,
|
5048
|
+
# @type MaxSyncStandbyLag: Integer
|
5049
|
+
|
5050
|
+
attr_accessor :DBInstanceId, :SyncMode, :MaxStandbyLatency, :MaxStandbyLag, :MaxSyncStandbyLatency, :MaxSyncStandbyLag
|
5051
|
+
|
5052
|
+
def initialize(dbinstanceid=nil, syncmode=nil, maxstandbylatency=nil, maxstandbylag=nil, maxsyncstandbylatency=nil, maxsyncstandbylag=nil)
|
5053
|
+
@DBInstanceId = dbinstanceid
|
5054
|
+
@SyncMode = syncmode
|
5055
|
+
@MaxStandbyLatency = maxstandbylatency
|
5056
|
+
@MaxStandbyLag = maxstandbylag
|
5057
|
+
@MaxSyncStandbyLatency = maxsyncstandbylatency
|
5058
|
+
@MaxSyncStandbyLag = maxsyncstandbylag
|
5059
|
+
end
|
5060
|
+
|
5061
|
+
def deserialize(params)
|
5062
|
+
@DBInstanceId = params['DBInstanceId']
|
5063
|
+
@SyncMode = params['SyncMode']
|
5064
|
+
@MaxStandbyLatency = params['MaxStandbyLatency']
|
5065
|
+
@MaxStandbyLag = params['MaxStandbyLag']
|
5066
|
+
@MaxSyncStandbyLatency = params['MaxSyncStandbyLatency']
|
5067
|
+
@MaxSyncStandbyLag = params['MaxSyncStandbyLag']
|
5068
|
+
end
|
5069
|
+
end
|
5070
|
+
|
5071
|
+
# ModifyDBInstanceHAConfig返回参数结构体
|
5072
|
+
class ModifyDBInstanceHAConfigResponse < TencentCloud::Common::AbstractModel
|
5073
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
5074
|
+
# @type RequestId: String
|
5075
|
+
|
5076
|
+
attr_accessor :RequestId
|
5077
|
+
|
5078
|
+
def initialize(requestid=nil)
|
5079
|
+
@RequestId = requestid
|
5080
|
+
end
|
5081
|
+
|
5082
|
+
def deserialize(params)
|
5083
|
+
@RequestId = params['RequestId']
|
5084
|
+
end
|
5085
|
+
end
|
5086
|
+
|
4957
5087
|
# ModifyDBInstanceName请求参数结构体
|
4958
5088
|
class ModifyDBInstanceNameRequest < TencentCloud::Common::AbstractModel
|
4959
5089
|
# @param DBInstanceId: 数据库实例ID,形如postgres-6fego161
|
@@ -6718,6 +6848,59 @@ module TencentCloud
|
|
6718
6848
|
end
|
6719
6849
|
end
|
6720
6850
|
|
6851
|
+
# SwitchDBInstancePrimary请求参数结构体
|
6852
|
+
class SwitchDBInstancePrimaryRequest < TencentCloud::Common::AbstractModel
|
6853
|
+
# @param DBInstanceId: 实例ID
|
6854
|
+
# @type DBInstanceId: String
|
6855
|
+
# @param Force: 是否强制切换。强制切换时只要备节点可访问,无论主备延迟多大都会发起切换。只有SwitchTag为0时,才可使用立即切换。
|
6856
|
+
# <li>默认:false
|
6857
|
+
# @type Force: Boolean
|
6858
|
+
# @param SwitchTag: 指定实例配置完成变更后的切换时间。
|
6859
|
+
# <li>0:立即切换
|
6860
|
+
# <li>1:指定时间切换
|
6861
|
+
# <li>2:维护时间窗口内切换
|
6862
|
+
# <li>默认值:0
|
6863
|
+
# @type SwitchTag: Integer
|
6864
|
+
# @param SwitchStartTime: 切换开始时间,时间格式:HH:MM:SS,例如:01:00:00。当SwitchTag为0或2时,该参数失效。
|
6865
|
+
# @type SwitchStartTime: String
|
6866
|
+
# @param SwitchEndTime: 切换截止时间,时间格式:HH:MM:SS,例如:01:30:00。当SwitchTag为0或2时,该参数失效。SwitchStartTime和SwitchEndTime时间窗口不能小于30分钟。
|
6867
|
+
# @type SwitchEndTime: String
|
6868
|
+
|
6869
|
+
attr_accessor :DBInstanceId, :Force, :SwitchTag, :SwitchStartTime, :SwitchEndTime
|
6870
|
+
|
6871
|
+
def initialize(dbinstanceid=nil, force=nil, switchtag=nil, switchstarttime=nil, switchendtime=nil)
|
6872
|
+
@DBInstanceId = dbinstanceid
|
6873
|
+
@Force = force
|
6874
|
+
@SwitchTag = switchtag
|
6875
|
+
@SwitchStartTime = switchstarttime
|
6876
|
+
@SwitchEndTime = switchendtime
|
6877
|
+
end
|
6878
|
+
|
6879
|
+
def deserialize(params)
|
6880
|
+
@DBInstanceId = params['DBInstanceId']
|
6881
|
+
@Force = params['Force']
|
6882
|
+
@SwitchTag = params['SwitchTag']
|
6883
|
+
@SwitchStartTime = params['SwitchStartTime']
|
6884
|
+
@SwitchEndTime = params['SwitchEndTime']
|
6885
|
+
end
|
6886
|
+
end
|
6887
|
+
|
6888
|
+
# SwitchDBInstancePrimary返回参数结构体
|
6889
|
+
class SwitchDBInstancePrimaryResponse < TencentCloud::Common::AbstractModel
|
6890
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
6891
|
+
# @type RequestId: String
|
6892
|
+
|
6893
|
+
attr_accessor :RequestId
|
6894
|
+
|
6895
|
+
def initialize(requestid=nil)
|
6896
|
+
@RequestId = requestid
|
6897
|
+
end
|
6898
|
+
|
6899
|
+
def deserialize(params)
|
6900
|
+
@RequestId = params['RequestId']
|
6901
|
+
end
|
6902
|
+
end
|
6903
|
+
|
6721
6904
|
# 实例绑定的标签信息,包含标签键TagKey和标签值TagValue
|
6722
6905
|
class Tag < TencentCloud::Common::AbstractModel
|
6723
6906
|
# @param TagKey: 标签键
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.628
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|