huaweicloudsdkdrs 3.1.116__py2.py3-none-any.whl → 3.1.117__py2.py3-none-any.whl
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.
- huaweicloudsdkdrs/v3/model/query_job_resp.py +7 -7
- huaweicloudsdkdrs/v5/__init__.py +40 -0
- huaweicloudsdkdrs/v5/drs_async_client.py +890 -17
- huaweicloudsdkdrs/v5/drs_client.py +890 -17
- huaweicloudsdkdrs/v5/model/__init__.py +40 -0
- huaweicloudsdkdrs/v5/model/backup_file_info.py +201 -0
- huaweicloudsdkdrs/v5/model/backup_file_resp.py +173 -0
- huaweicloudsdkdrs/v5/model/backup_info.py +171 -0
- huaweicloudsdkdrs/v5/model/backup_info_resp.py +173 -0
- huaweicloudsdkdrs/v5/model/backup_job_base_info.py +229 -0
- huaweicloudsdkdrs/v5/model/backup_job_endpoint_info.py +172 -0
- huaweicloudsdkdrs/v5/model/backup_restore_option_info.py +315 -0
- huaweicloudsdkdrs/v5/model/change_to_period_request.py +168 -0
- huaweicloudsdkdrs/v5/model/change_to_period_response.py +116 -0
- huaweicloudsdkdrs/v5/model/check_data_filter_response.py +3 -3
- huaweicloudsdkdrs/v5/model/clean_alarms_request.py +171 -0
- huaweicloudsdkdrs/v5/model/clean_alarms_response.py +116 -0
- huaweicloudsdkdrs/v5/model/collect_columns_response.py +3 -3
- huaweicloudsdkdrs/v5/model/collect_db_objects_async_response.py +3 -3
- huaweicloudsdkdrs/v5/model/collect_db_objects_info_response.py +3 -3
- huaweicloudsdkdrs/v5/model/collect_position_async_response.py +3 -3
- huaweicloudsdkdrs/v5/model/connection_config.py +115 -0
- huaweicloudsdkdrs/v5/model/connection_resp.py +355 -0
- huaweicloudsdkdrs/v5/model/create_connection_req.py +324 -0
- huaweicloudsdkdrs/v5/model/create_connection_request.py +140 -0
- huaweicloudsdkdrs/v5/model/create_connection_response.py +361 -0
- huaweicloudsdkdrs/v5/model/create_offline_task_req.py +182 -0
- huaweicloudsdkdrs/v5/model/create_replication_job_request.py +140 -0
- huaweicloudsdkdrs/v5/model/create_replication_job_response.py +116 -0
- huaweicloudsdkdrs/v5/model/ddl_alarm_resp.py +311 -0
- huaweicloudsdkdrs/v5/model/delete_connection_request.py +143 -0
- huaweicloudsdkdrs/v5/model/delete_connection_response.py +116 -0
- huaweicloudsdkdrs/v5/model/delete_replication_job_request.py +143 -0
- huaweicloudsdkdrs/v5/model/delete_replication_job_response.py +116 -0
- huaweicloudsdkdrs/v5/model/list_connections_request.py +492 -0
- huaweicloudsdkdrs/v5/model/list_connections_response.py +145 -0
- huaweicloudsdkdrs/v5/model/list_job_ddls_request.py +288 -0
- huaweicloudsdkdrs/v5/model/list_job_ddls_response.py +145 -0
- huaweicloudsdkdrs/v5/model/list_replication_jobs_request.py +463 -0
- huaweicloudsdkdrs/v5/model/list_replication_jobs_response.py +145 -0
- huaweicloudsdkdrs/v5/model/modify_connection_request.py +168 -0
- huaweicloudsdkdrs/v5/model/modify_connection_response.py +116 -0
- huaweicloudsdkdrs/v5/model/modify_offline_task_req.py +143 -0
- huaweicloudsdkdrs/v5/model/offline_task_info.py +342 -0
- huaweicloudsdkdrs/v5/model/resource_tag.py +3 -3
- huaweicloudsdkdrs/v5/model/show_data_processing_rules_result_response.py +3 -3
- huaweicloudsdkdrs/v5/model/show_replication_job_request.py +143 -0
- huaweicloudsdkdrs/v5/model/show_replication_job_response.py +390 -0
- huaweicloudsdkdrs/v5/model/show_update_object_saving_status_response.py +3 -3
- huaweicloudsdkdrs/v5/model/to_period_req.py +198 -0
- huaweicloudsdkdrs/v5/model/update_connection_req.py +327 -0
- huaweicloudsdkdrs/v5/model/update_data_progress_response.py +3 -3
- huaweicloudsdkdrs/v5/model/update_replication_job_request.py +168 -0
- huaweicloudsdkdrs/v5/model/update_replication_job_response.py +116 -0
- {huaweicloudsdkdrs-3.1.116.dist-info → huaweicloudsdkdrs-3.1.117.dist-info}/METADATA +2 -2
- {huaweicloudsdkdrs-3.1.116.dist-info → huaweicloudsdkdrs-3.1.117.dist-info}/RECORD +59 -19
- {huaweicloudsdkdrs-3.1.116.dist-info → huaweicloudsdkdrs-3.1.117.dist-info}/LICENSE +0 -0
- {huaweicloudsdkdrs-3.1.116.dist-info → huaweicloudsdkdrs-3.1.117.dist-info}/WHEEL +0 -0
- {huaweicloudsdkdrs-3.1.116.dist-info → huaweicloudsdkdrs-3.1.117.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,172 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class BackupJobEndpointInfo:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'target_instance_id': 'str',
|
21
|
+
'ms_file_stream_status': 'str',
|
22
|
+
'file_id': 'str'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'target_instance_id': 'target_instance_id',
|
27
|
+
'ms_file_stream_status': 'ms_file_stream_status',
|
28
|
+
'file_id': 'file_id'
|
29
|
+
}
|
30
|
+
|
31
|
+
def __init__(self, target_instance_id=None, ms_file_stream_status=None, file_id=None):
|
32
|
+
"""BackupJobEndpointInfo
|
33
|
+
|
34
|
+
The model defined in huaweicloud sdk
|
35
|
+
|
36
|
+
:param target_instance_id: 备份迁移任务恢复目标RDS for SQL Server实例ID。
|
37
|
+
:type target_instance_id: str
|
38
|
+
:param ms_file_stream_status: 目标实例是否开启FileStream模式。可通过RDS for SQL Server详情接口获取。
|
39
|
+
:type ms_file_stream_status: str
|
40
|
+
:param file_id: RDS for SQL Server备份文件的文件ID,通过RDS全量恢复时必填。可通过云数据库RDS备份管理页面获取。
|
41
|
+
:type file_id: str
|
42
|
+
"""
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
self._target_instance_id = None
|
47
|
+
self._ms_file_stream_status = None
|
48
|
+
self._file_id = None
|
49
|
+
self.discriminator = None
|
50
|
+
|
51
|
+
self.target_instance_id = target_instance_id
|
52
|
+
if ms_file_stream_status is not None:
|
53
|
+
self.ms_file_stream_status = ms_file_stream_status
|
54
|
+
if file_id is not None:
|
55
|
+
self.file_id = file_id
|
56
|
+
|
57
|
+
@property
|
58
|
+
def target_instance_id(self):
|
59
|
+
"""Gets the target_instance_id of this BackupJobEndpointInfo.
|
60
|
+
|
61
|
+
备份迁移任务恢复目标RDS for SQL Server实例ID。
|
62
|
+
|
63
|
+
:return: The target_instance_id of this BackupJobEndpointInfo.
|
64
|
+
:rtype: str
|
65
|
+
"""
|
66
|
+
return self._target_instance_id
|
67
|
+
|
68
|
+
@target_instance_id.setter
|
69
|
+
def target_instance_id(self, target_instance_id):
|
70
|
+
"""Sets the target_instance_id of this BackupJobEndpointInfo.
|
71
|
+
|
72
|
+
备份迁移任务恢复目标RDS for SQL Server实例ID。
|
73
|
+
|
74
|
+
:param target_instance_id: The target_instance_id of this BackupJobEndpointInfo.
|
75
|
+
:type target_instance_id: str
|
76
|
+
"""
|
77
|
+
self._target_instance_id = target_instance_id
|
78
|
+
|
79
|
+
@property
|
80
|
+
def ms_file_stream_status(self):
|
81
|
+
"""Gets the ms_file_stream_status of this BackupJobEndpointInfo.
|
82
|
+
|
83
|
+
目标实例是否开启FileStream模式。可通过RDS for SQL Server详情接口获取。
|
84
|
+
|
85
|
+
:return: The ms_file_stream_status of this BackupJobEndpointInfo.
|
86
|
+
:rtype: str
|
87
|
+
"""
|
88
|
+
return self._ms_file_stream_status
|
89
|
+
|
90
|
+
@ms_file_stream_status.setter
|
91
|
+
def ms_file_stream_status(self, ms_file_stream_status):
|
92
|
+
"""Sets the ms_file_stream_status of this BackupJobEndpointInfo.
|
93
|
+
|
94
|
+
目标实例是否开启FileStream模式。可通过RDS for SQL Server详情接口获取。
|
95
|
+
|
96
|
+
:param ms_file_stream_status: The ms_file_stream_status of this BackupJobEndpointInfo.
|
97
|
+
:type ms_file_stream_status: str
|
98
|
+
"""
|
99
|
+
self._ms_file_stream_status = ms_file_stream_status
|
100
|
+
|
101
|
+
@property
|
102
|
+
def file_id(self):
|
103
|
+
"""Gets the file_id of this BackupJobEndpointInfo.
|
104
|
+
|
105
|
+
RDS for SQL Server备份文件的文件ID,通过RDS全量恢复时必填。可通过云数据库RDS备份管理页面获取。
|
106
|
+
|
107
|
+
:return: The file_id of this BackupJobEndpointInfo.
|
108
|
+
:rtype: str
|
109
|
+
"""
|
110
|
+
return self._file_id
|
111
|
+
|
112
|
+
@file_id.setter
|
113
|
+
def file_id(self, file_id):
|
114
|
+
"""Sets the file_id of this BackupJobEndpointInfo.
|
115
|
+
|
116
|
+
RDS for SQL Server备份文件的文件ID,通过RDS全量恢复时必填。可通过云数据库RDS备份管理页面获取。
|
117
|
+
|
118
|
+
:param file_id: The file_id of this BackupJobEndpointInfo.
|
119
|
+
:type file_id: str
|
120
|
+
"""
|
121
|
+
self._file_id = file_id
|
122
|
+
|
123
|
+
def to_dict(self):
|
124
|
+
"""Returns the model properties as a dict"""
|
125
|
+
result = {}
|
126
|
+
|
127
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
128
|
+
value = getattr(self, attr)
|
129
|
+
if isinstance(value, list):
|
130
|
+
result[attr] = list(map(
|
131
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
132
|
+
value
|
133
|
+
))
|
134
|
+
elif hasattr(value, "to_dict"):
|
135
|
+
result[attr] = value.to_dict()
|
136
|
+
elif isinstance(value, dict):
|
137
|
+
result[attr] = dict(map(
|
138
|
+
lambda item: (item[0], item[1].to_dict())
|
139
|
+
if hasattr(item[1], "to_dict") else item,
|
140
|
+
value.items()
|
141
|
+
))
|
142
|
+
else:
|
143
|
+
if attr in self.sensitive_list:
|
144
|
+
result[attr] = "****"
|
145
|
+
else:
|
146
|
+
result[attr] = value
|
147
|
+
|
148
|
+
return result
|
149
|
+
|
150
|
+
def to_str(self):
|
151
|
+
"""Returns the string representation of the model"""
|
152
|
+
import simplejson as json
|
153
|
+
if six.PY2:
|
154
|
+
import sys
|
155
|
+
reload(sys)
|
156
|
+
sys.setdefaultencoding("utf-8")
|
157
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
158
|
+
|
159
|
+
def __repr__(self):
|
160
|
+
"""For `print`"""
|
161
|
+
return self.to_str()
|
162
|
+
|
163
|
+
def __eq__(self, other):
|
164
|
+
"""Returns true if both objects are equal"""
|
165
|
+
if not isinstance(other, BackupJobEndpointInfo):
|
166
|
+
return False
|
167
|
+
|
168
|
+
return self.__dict__ == other.__dict__
|
169
|
+
|
170
|
+
def __ne__(self, other):
|
171
|
+
"""Returns true if both objects are not equal"""
|
172
|
+
return not self == other
|
@@ -0,0 +1,315 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class BackupRestoreOptionInfo:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'is_cover': 'bool',
|
21
|
+
'is_default_restore': 'bool',
|
22
|
+
'is_last_backup': 'bool',
|
23
|
+
'is_precheck': 'bool',
|
24
|
+
'recovery_mode': 'str',
|
25
|
+
'db_names': 'list[str]',
|
26
|
+
'reset_db_name_map': 'dict(str, str)',
|
27
|
+
'is_delete_backup_file': 'bool'
|
28
|
+
}
|
29
|
+
|
30
|
+
attribute_map = {
|
31
|
+
'is_cover': 'is_cover',
|
32
|
+
'is_default_restore': 'is_default_restore',
|
33
|
+
'is_last_backup': 'is_last_backup',
|
34
|
+
'is_precheck': 'is_precheck',
|
35
|
+
'recovery_mode': 'recovery_mode',
|
36
|
+
'db_names': 'db_names',
|
37
|
+
'reset_db_name_map': 'reset_db_name_map',
|
38
|
+
'is_delete_backup_file': 'is_delete_backup_file'
|
39
|
+
}
|
40
|
+
|
41
|
+
def __init__(self, is_cover=None, is_default_restore=None, is_last_backup=None, is_precheck=None, recovery_mode=None, db_names=None, reset_db_name_map=None, is_delete_backup_file=None):
|
42
|
+
"""BackupRestoreOptionInfo
|
43
|
+
|
44
|
+
The model defined in huaweicloud sdk
|
45
|
+
|
46
|
+
:param is_cover: 是否覆盖目标数据库,不填默认为false。 值为“true”表示覆盖。 值为“false”表示不覆盖。
|
47
|
+
:type is_cover: bool
|
48
|
+
:param is_default_restore: 是否默认恢复,默认恢复所有数据库。 “true”是代表默认恢复还原备份文件中的全部数据库。 “false”代表需要在db_names这个字段中指定需要恢复的数据库名。
|
49
|
+
:type is_default_restore: bool
|
50
|
+
:param is_last_backup: 一次典型的增量恢复过程,会涉及多次恢复增量备份。每个增量备份恢复均会使目标数据库保持还原中状态,此时数据库不可读写,直至最后一个增量备份恢复完成后,数据库才能变成可用状态。此后数据库将无法继续进行增量恢复,所以确定为最后一个备份的场景有: 一次性全量迁移,后续将不再进行增量恢复时,设置该字段值为“true”。 增量恢复流程中,确定为最后割接阶段的最后一个增量备份时,设置该字段值为“false”。
|
51
|
+
:type is_last_backup: bool
|
52
|
+
:param is_precheck: 是否执行预校验。 true:执行。 false:不执行。
|
53
|
+
:type is_precheck: bool
|
54
|
+
:param recovery_mode: 恢复模式: “full”表示全量迁移。 “incre”表示增量迁移 。
|
55
|
+
:type recovery_mode: str
|
56
|
+
:param db_names: 数据库名称。
|
57
|
+
:type db_names: list[str]
|
58
|
+
:param reset_db_name_map: 该字段为一个map,目前使用格式key是\"\",value是新数据库名字。 该功能将忽略备份文件中原有的数据库名,通过DRS将其恢复为指定的新数据库名。 使用条件: - 备份文件中只有一个数据库。 - 备份文件是全量备份类型(待恢复备份类型选择:全量备份),且是一次性恢复(最后一个备份选择:是)。
|
59
|
+
:type reset_db_name_map: dict(str, str)
|
60
|
+
:param is_delete_backup_file: 该参数控制使用OBS桶中备份文件恢复时,当任务结束时是否删除下载到RDS for SQL server磁盘中的OBS备份文件,默认删除。 - true 删除 - false 不删除
|
61
|
+
:type is_delete_backup_file: bool
|
62
|
+
"""
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
self._is_cover = None
|
67
|
+
self._is_default_restore = None
|
68
|
+
self._is_last_backup = None
|
69
|
+
self._is_precheck = None
|
70
|
+
self._recovery_mode = None
|
71
|
+
self._db_names = None
|
72
|
+
self._reset_db_name_map = None
|
73
|
+
self._is_delete_backup_file = None
|
74
|
+
self.discriminator = None
|
75
|
+
|
76
|
+
if is_cover is not None:
|
77
|
+
self.is_cover = is_cover
|
78
|
+
if is_default_restore is not None:
|
79
|
+
self.is_default_restore = is_default_restore
|
80
|
+
self.is_last_backup = is_last_backup
|
81
|
+
self.is_precheck = is_precheck
|
82
|
+
self.recovery_mode = recovery_mode
|
83
|
+
if db_names is not None:
|
84
|
+
self.db_names = db_names
|
85
|
+
if reset_db_name_map is not None:
|
86
|
+
self.reset_db_name_map = reset_db_name_map
|
87
|
+
if is_delete_backup_file is not None:
|
88
|
+
self.is_delete_backup_file = is_delete_backup_file
|
89
|
+
|
90
|
+
@property
|
91
|
+
def is_cover(self):
|
92
|
+
"""Gets the is_cover of this BackupRestoreOptionInfo.
|
93
|
+
|
94
|
+
是否覆盖目标数据库,不填默认为false。 值为“true”表示覆盖。 值为“false”表示不覆盖。
|
95
|
+
|
96
|
+
:return: The is_cover of this BackupRestoreOptionInfo.
|
97
|
+
:rtype: bool
|
98
|
+
"""
|
99
|
+
return self._is_cover
|
100
|
+
|
101
|
+
@is_cover.setter
|
102
|
+
def is_cover(self, is_cover):
|
103
|
+
"""Sets the is_cover of this BackupRestoreOptionInfo.
|
104
|
+
|
105
|
+
是否覆盖目标数据库,不填默认为false。 值为“true”表示覆盖。 值为“false”表示不覆盖。
|
106
|
+
|
107
|
+
:param is_cover: The is_cover of this BackupRestoreOptionInfo.
|
108
|
+
:type is_cover: bool
|
109
|
+
"""
|
110
|
+
self._is_cover = is_cover
|
111
|
+
|
112
|
+
@property
|
113
|
+
def is_default_restore(self):
|
114
|
+
"""Gets the is_default_restore of this BackupRestoreOptionInfo.
|
115
|
+
|
116
|
+
是否默认恢复,默认恢复所有数据库。 “true”是代表默认恢复还原备份文件中的全部数据库。 “false”代表需要在db_names这个字段中指定需要恢复的数据库名。
|
117
|
+
|
118
|
+
:return: The is_default_restore of this BackupRestoreOptionInfo.
|
119
|
+
:rtype: bool
|
120
|
+
"""
|
121
|
+
return self._is_default_restore
|
122
|
+
|
123
|
+
@is_default_restore.setter
|
124
|
+
def is_default_restore(self, is_default_restore):
|
125
|
+
"""Sets the is_default_restore of this BackupRestoreOptionInfo.
|
126
|
+
|
127
|
+
是否默认恢复,默认恢复所有数据库。 “true”是代表默认恢复还原备份文件中的全部数据库。 “false”代表需要在db_names这个字段中指定需要恢复的数据库名。
|
128
|
+
|
129
|
+
:param is_default_restore: The is_default_restore of this BackupRestoreOptionInfo.
|
130
|
+
:type is_default_restore: bool
|
131
|
+
"""
|
132
|
+
self._is_default_restore = is_default_restore
|
133
|
+
|
134
|
+
@property
|
135
|
+
def is_last_backup(self):
|
136
|
+
"""Gets the is_last_backup of this BackupRestoreOptionInfo.
|
137
|
+
|
138
|
+
一次典型的增量恢复过程,会涉及多次恢复增量备份。每个增量备份恢复均会使目标数据库保持还原中状态,此时数据库不可读写,直至最后一个增量备份恢复完成后,数据库才能变成可用状态。此后数据库将无法继续进行增量恢复,所以确定为最后一个备份的场景有: 一次性全量迁移,后续将不再进行增量恢复时,设置该字段值为“true”。 增量恢复流程中,确定为最后割接阶段的最后一个增量备份时,设置该字段值为“false”。
|
139
|
+
|
140
|
+
:return: The is_last_backup of this BackupRestoreOptionInfo.
|
141
|
+
:rtype: bool
|
142
|
+
"""
|
143
|
+
return self._is_last_backup
|
144
|
+
|
145
|
+
@is_last_backup.setter
|
146
|
+
def is_last_backup(self, is_last_backup):
|
147
|
+
"""Sets the is_last_backup of this BackupRestoreOptionInfo.
|
148
|
+
|
149
|
+
一次典型的增量恢复过程,会涉及多次恢复增量备份。每个增量备份恢复均会使目标数据库保持还原中状态,此时数据库不可读写,直至最后一个增量备份恢复完成后,数据库才能变成可用状态。此后数据库将无法继续进行增量恢复,所以确定为最后一个备份的场景有: 一次性全量迁移,后续将不再进行增量恢复时,设置该字段值为“true”。 增量恢复流程中,确定为最后割接阶段的最后一个增量备份时,设置该字段值为“false”。
|
150
|
+
|
151
|
+
:param is_last_backup: The is_last_backup of this BackupRestoreOptionInfo.
|
152
|
+
:type is_last_backup: bool
|
153
|
+
"""
|
154
|
+
self._is_last_backup = is_last_backup
|
155
|
+
|
156
|
+
@property
|
157
|
+
def is_precheck(self):
|
158
|
+
"""Gets the is_precheck of this BackupRestoreOptionInfo.
|
159
|
+
|
160
|
+
是否执行预校验。 true:执行。 false:不执行。
|
161
|
+
|
162
|
+
:return: The is_precheck of this BackupRestoreOptionInfo.
|
163
|
+
:rtype: bool
|
164
|
+
"""
|
165
|
+
return self._is_precheck
|
166
|
+
|
167
|
+
@is_precheck.setter
|
168
|
+
def is_precheck(self, is_precheck):
|
169
|
+
"""Sets the is_precheck of this BackupRestoreOptionInfo.
|
170
|
+
|
171
|
+
是否执行预校验。 true:执行。 false:不执行。
|
172
|
+
|
173
|
+
:param is_precheck: The is_precheck of this BackupRestoreOptionInfo.
|
174
|
+
:type is_precheck: bool
|
175
|
+
"""
|
176
|
+
self._is_precheck = is_precheck
|
177
|
+
|
178
|
+
@property
|
179
|
+
def recovery_mode(self):
|
180
|
+
"""Gets the recovery_mode of this BackupRestoreOptionInfo.
|
181
|
+
|
182
|
+
恢复模式: “full”表示全量迁移。 “incre”表示增量迁移 。
|
183
|
+
|
184
|
+
:return: The recovery_mode of this BackupRestoreOptionInfo.
|
185
|
+
:rtype: str
|
186
|
+
"""
|
187
|
+
return self._recovery_mode
|
188
|
+
|
189
|
+
@recovery_mode.setter
|
190
|
+
def recovery_mode(self, recovery_mode):
|
191
|
+
"""Sets the recovery_mode of this BackupRestoreOptionInfo.
|
192
|
+
|
193
|
+
恢复模式: “full”表示全量迁移。 “incre”表示增量迁移 。
|
194
|
+
|
195
|
+
:param recovery_mode: The recovery_mode of this BackupRestoreOptionInfo.
|
196
|
+
:type recovery_mode: str
|
197
|
+
"""
|
198
|
+
self._recovery_mode = recovery_mode
|
199
|
+
|
200
|
+
@property
|
201
|
+
def db_names(self):
|
202
|
+
"""Gets the db_names of this BackupRestoreOptionInfo.
|
203
|
+
|
204
|
+
数据库名称。
|
205
|
+
|
206
|
+
:return: The db_names of this BackupRestoreOptionInfo.
|
207
|
+
:rtype: list[str]
|
208
|
+
"""
|
209
|
+
return self._db_names
|
210
|
+
|
211
|
+
@db_names.setter
|
212
|
+
def db_names(self, db_names):
|
213
|
+
"""Sets the db_names of this BackupRestoreOptionInfo.
|
214
|
+
|
215
|
+
数据库名称。
|
216
|
+
|
217
|
+
:param db_names: The db_names of this BackupRestoreOptionInfo.
|
218
|
+
:type db_names: list[str]
|
219
|
+
"""
|
220
|
+
self._db_names = db_names
|
221
|
+
|
222
|
+
@property
|
223
|
+
def reset_db_name_map(self):
|
224
|
+
"""Gets the reset_db_name_map of this BackupRestoreOptionInfo.
|
225
|
+
|
226
|
+
该字段为一个map,目前使用格式key是\"\",value是新数据库名字。 该功能将忽略备份文件中原有的数据库名,通过DRS将其恢复为指定的新数据库名。 使用条件: - 备份文件中只有一个数据库。 - 备份文件是全量备份类型(待恢复备份类型选择:全量备份),且是一次性恢复(最后一个备份选择:是)。
|
227
|
+
|
228
|
+
:return: The reset_db_name_map of this BackupRestoreOptionInfo.
|
229
|
+
:rtype: dict(str, str)
|
230
|
+
"""
|
231
|
+
return self._reset_db_name_map
|
232
|
+
|
233
|
+
@reset_db_name_map.setter
|
234
|
+
def reset_db_name_map(self, reset_db_name_map):
|
235
|
+
"""Sets the reset_db_name_map of this BackupRestoreOptionInfo.
|
236
|
+
|
237
|
+
该字段为一个map,目前使用格式key是\"\",value是新数据库名字。 该功能将忽略备份文件中原有的数据库名,通过DRS将其恢复为指定的新数据库名。 使用条件: - 备份文件中只有一个数据库。 - 备份文件是全量备份类型(待恢复备份类型选择:全量备份),且是一次性恢复(最后一个备份选择:是)。
|
238
|
+
|
239
|
+
:param reset_db_name_map: The reset_db_name_map of this BackupRestoreOptionInfo.
|
240
|
+
:type reset_db_name_map: dict(str, str)
|
241
|
+
"""
|
242
|
+
self._reset_db_name_map = reset_db_name_map
|
243
|
+
|
244
|
+
@property
|
245
|
+
def is_delete_backup_file(self):
|
246
|
+
"""Gets the is_delete_backup_file of this BackupRestoreOptionInfo.
|
247
|
+
|
248
|
+
该参数控制使用OBS桶中备份文件恢复时,当任务结束时是否删除下载到RDS for SQL server磁盘中的OBS备份文件,默认删除。 - true 删除 - false 不删除
|
249
|
+
|
250
|
+
:return: The is_delete_backup_file of this BackupRestoreOptionInfo.
|
251
|
+
:rtype: bool
|
252
|
+
"""
|
253
|
+
return self._is_delete_backup_file
|
254
|
+
|
255
|
+
@is_delete_backup_file.setter
|
256
|
+
def is_delete_backup_file(self, is_delete_backup_file):
|
257
|
+
"""Sets the is_delete_backup_file of this BackupRestoreOptionInfo.
|
258
|
+
|
259
|
+
该参数控制使用OBS桶中备份文件恢复时,当任务结束时是否删除下载到RDS for SQL server磁盘中的OBS备份文件,默认删除。 - true 删除 - false 不删除
|
260
|
+
|
261
|
+
:param is_delete_backup_file: The is_delete_backup_file of this BackupRestoreOptionInfo.
|
262
|
+
:type is_delete_backup_file: bool
|
263
|
+
"""
|
264
|
+
self._is_delete_backup_file = is_delete_backup_file
|
265
|
+
|
266
|
+
def to_dict(self):
|
267
|
+
"""Returns the model properties as a dict"""
|
268
|
+
result = {}
|
269
|
+
|
270
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
271
|
+
value = getattr(self, attr)
|
272
|
+
if isinstance(value, list):
|
273
|
+
result[attr] = list(map(
|
274
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
275
|
+
value
|
276
|
+
))
|
277
|
+
elif hasattr(value, "to_dict"):
|
278
|
+
result[attr] = value.to_dict()
|
279
|
+
elif isinstance(value, dict):
|
280
|
+
result[attr] = dict(map(
|
281
|
+
lambda item: (item[0], item[1].to_dict())
|
282
|
+
if hasattr(item[1], "to_dict") else item,
|
283
|
+
value.items()
|
284
|
+
))
|
285
|
+
else:
|
286
|
+
if attr in self.sensitive_list:
|
287
|
+
result[attr] = "****"
|
288
|
+
else:
|
289
|
+
result[attr] = value
|
290
|
+
|
291
|
+
return result
|
292
|
+
|
293
|
+
def to_str(self):
|
294
|
+
"""Returns the string representation of the model"""
|
295
|
+
import simplejson as json
|
296
|
+
if six.PY2:
|
297
|
+
import sys
|
298
|
+
reload(sys)
|
299
|
+
sys.setdefaultencoding("utf-8")
|
300
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
301
|
+
|
302
|
+
def __repr__(self):
|
303
|
+
"""For `print`"""
|
304
|
+
return self.to_str()
|
305
|
+
|
306
|
+
def __eq__(self, other):
|
307
|
+
"""Returns true if both objects are equal"""
|
308
|
+
if not isinstance(other, BackupRestoreOptionInfo):
|
309
|
+
return False
|
310
|
+
|
311
|
+
return self.__dict__ == other.__dict__
|
312
|
+
|
313
|
+
def __ne__(self, other):
|
314
|
+
"""Returns true if both objects are not equal"""
|
315
|
+
return not self == other
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ChangeToPeriodRequest:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'job_id': 'str',
|
21
|
+
'x_language': 'str',
|
22
|
+
'body': 'ToPeriodReq'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'job_id': 'job_id',
|
27
|
+
'x_language': 'X-Language',
|
28
|
+
'body': 'body'
|
29
|
+
}
|
30
|
+
|
31
|
+
def __init__(self, job_id=None, x_language=None, body=None):
|
32
|
+
"""ChangeToPeriodRequest
|
33
|
+
|
34
|
+
The model defined in huaweicloud sdk
|
35
|
+
|
36
|
+
:param job_id: 转包周期的任务ID。
|
37
|
+
:type job_id: str
|
38
|
+
:param x_language: 请求语言类型。
|
39
|
+
:type x_language: str
|
40
|
+
:param body: Body of the ChangeToPeriodRequest
|
41
|
+
:type body: :class:`huaweicloudsdkdrs.v5.ToPeriodReq`
|
42
|
+
"""
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
self._job_id = None
|
47
|
+
self._x_language = None
|
48
|
+
self._body = None
|
49
|
+
self.discriminator = None
|
50
|
+
|
51
|
+
self.job_id = job_id
|
52
|
+
if x_language is not None:
|
53
|
+
self.x_language = x_language
|
54
|
+
if body is not None:
|
55
|
+
self.body = body
|
56
|
+
|
57
|
+
@property
|
58
|
+
def job_id(self):
|
59
|
+
"""Gets the job_id of this ChangeToPeriodRequest.
|
60
|
+
|
61
|
+
转包周期的任务ID。
|
62
|
+
|
63
|
+
:return: The job_id of this ChangeToPeriodRequest.
|
64
|
+
:rtype: str
|
65
|
+
"""
|
66
|
+
return self._job_id
|
67
|
+
|
68
|
+
@job_id.setter
|
69
|
+
def job_id(self, job_id):
|
70
|
+
"""Sets the job_id of this ChangeToPeriodRequest.
|
71
|
+
|
72
|
+
转包周期的任务ID。
|
73
|
+
|
74
|
+
:param job_id: The job_id of this ChangeToPeriodRequest.
|
75
|
+
:type job_id: str
|
76
|
+
"""
|
77
|
+
self._job_id = job_id
|
78
|
+
|
79
|
+
@property
|
80
|
+
def x_language(self):
|
81
|
+
"""Gets the x_language of this ChangeToPeriodRequest.
|
82
|
+
|
83
|
+
请求语言类型。
|
84
|
+
|
85
|
+
:return: The x_language of this ChangeToPeriodRequest.
|
86
|
+
:rtype: str
|
87
|
+
"""
|
88
|
+
return self._x_language
|
89
|
+
|
90
|
+
@x_language.setter
|
91
|
+
def x_language(self, x_language):
|
92
|
+
"""Sets the x_language of this ChangeToPeriodRequest.
|
93
|
+
|
94
|
+
请求语言类型。
|
95
|
+
|
96
|
+
:param x_language: The x_language of this ChangeToPeriodRequest.
|
97
|
+
:type x_language: str
|
98
|
+
"""
|
99
|
+
self._x_language = x_language
|
100
|
+
|
101
|
+
@property
|
102
|
+
def body(self):
|
103
|
+
"""Gets the body of this ChangeToPeriodRequest.
|
104
|
+
|
105
|
+
:return: The body of this ChangeToPeriodRequest.
|
106
|
+
:rtype: :class:`huaweicloudsdkdrs.v5.ToPeriodReq`
|
107
|
+
"""
|
108
|
+
return self._body
|
109
|
+
|
110
|
+
@body.setter
|
111
|
+
def body(self, body):
|
112
|
+
"""Sets the body of this ChangeToPeriodRequest.
|
113
|
+
|
114
|
+
:param body: The body of this ChangeToPeriodRequest.
|
115
|
+
:type body: :class:`huaweicloudsdkdrs.v5.ToPeriodReq`
|
116
|
+
"""
|
117
|
+
self._body = body
|
118
|
+
|
119
|
+
def to_dict(self):
|
120
|
+
"""Returns the model properties as a dict"""
|
121
|
+
result = {}
|
122
|
+
|
123
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
124
|
+
value = getattr(self, attr)
|
125
|
+
if isinstance(value, list):
|
126
|
+
result[attr] = list(map(
|
127
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
128
|
+
value
|
129
|
+
))
|
130
|
+
elif hasattr(value, "to_dict"):
|
131
|
+
result[attr] = value.to_dict()
|
132
|
+
elif isinstance(value, dict):
|
133
|
+
result[attr] = dict(map(
|
134
|
+
lambda item: (item[0], item[1].to_dict())
|
135
|
+
if hasattr(item[1], "to_dict") else item,
|
136
|
+
value.items()
|
137
|
+
))
|
138
|
+
else:
|
139
|
+
if attr in self.sensitive_list:
|
140
|
+
result[attr] = "****"
|
141
|
+
else:
|
142
|
+
result[attr] = value
|
143
|
+
|
144
|
+
return result
|
145
|
+
|
146
|
+
def to_str(self):
|
147
|
+
"""Returns the string representation of the model"""
|
148
|
+
import simplejson as json
|
149
|
+
if six.PY2:
|
150
|
+
import sys
|
151
|
+
reload(sys)
|
152
|
+
sys.setdefaultencoding("utf-8")
|
153
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
154
|
+
|
155
|
+
def __repr__(self):
|
156
|
+
"""For `print`"""
|
157
|
+
return self.to_str()
|
158
|
+
|
159
|
+
def __eq__(self, other):
|
160
|
+
"""Returns true if both objects are equal"""
|
161
|
+
if not isinstance(other, ChangeToPeriodRequest):
|
162
|
+
return False
|
163
|
+
|
164
|
+
return self.__dict__ == other.__dict__
|
165
|
+
|
166
|
+
def __ne__(self, other):
|
167
|
+
"""Returns true if both objects are not equal"""
|
168
|
+
return not self == other
|