@alicloud/bdrc20230808 1.0.1 → 2.0.0

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.
Files changed (381) hide show
  1. package/dist/client.d.ts +355 -1677
  2. package/dist/client.js +977 -1490
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/CheckRulesRequest.d.ts +31 -0
  5. package/dist/models/CheckRulesRequest.js +60 -0
  6. package/dist/models/CheckRulesRequest.js.map +1 -0
  7. package/dist/models/CheckRulesResponse.d.ts +19 -0
  8. package/dist/models/CheckRulesResponse.js +69 -0
  9. package/dist/models/CheckRulesResponse.js.map +1 -0
  10. package/dist/models/CheckRulesResponseBody.d.ts +48 -0
  11. package/dist/models/CheckRulesResponseBody.js +84 -0
  12. package/dist/models/CheckRulesResponseBody.js.map +1 -0
  13. package/dist/models/CloseBdrcServiceResponse.d.ts +19 -0
  14. package/dist/models/CloseBdrcServiceResponse.js +69 -0
  15. package/dist/models/CloseBdrcServiceResponse.js.map +1 -0
  16. package/dist/models/CloseBdrcServiceResponseBody.d.ts +21 -0
  17. package/dist/models/CloseBdrcServiceResponseBody.js +58 -0
  18. package/dist/models/CloseBdrcServiceResponseBody.js.map +1 -0
  19. package/dist/models/CreateProtectionPolicyRequest.d.ts +87 -0
  20. package/dist/models/CreateProtectionPolicyRequest.js +93 -0
  21. package/dist/models/CreateProtectionPolicyRequest.js.map +1 -0
  22. package/dist/models/CreateProtectionPolicyResponse.d.ts +19 -0
  23. package/dist/models/CreateProtectionPolicyResponse.js +69 -0
  24. package/dist/models/CreateProtectionPolicyResponse.js.map +1 -0
  25. package/dist/models/CreateProtectionPolicyResponseBody.d.ts +46 -0
  26. package/dist/models/CreateProtectionPolicyResponseBody.js +82 -0
  27. package/dist/models/CreateProtectionPolicyResponseBody.js.map +1 -0
  28. package/dist/models/CreateProtectionPolicyShrinkRequest.d.ts +57 -0
  29. package/dist/models/CreateProtectionPolicyShrinkRequest.js +66 -0
  30. package/dist/models/CreateProtectionPolicyShrinkRequest.js.map +1 -0
  31. package/dist/models/CreateResourceCategoryRequest.d.ts +70 -0
  32. package/dist/models/CreateResourceCategoryRequest.js +62 -0
  33. package/dist/models/CreateResourceCategoryRequest.js.map +1 -0
  34. package/dist/models/CreateResourceCategoryResponse.d.ts +19 -0
  35. package/dist/models/CreateResourceCategoryResponse.js +69 -0
  36. package/dist/models/CreateResourceCategoryResponse.js.map +1 -0
  37. package/dist/models/CreateResourceCategoryResponseBody.d.ts +46 -0
  38. package/dist/models/CreateResourceCategoryResponseBody.js +82 -0
  39. package/dist/models/CreateResourceCategoryResponseBody.js.map +1 -0
  40. package/dist/models/DeleteProtectionPolicyRequest.d.ts +13 -0
  41. package/dist/models/DeleteProtectionPolicyRequest.js +54 -0
  42. package/dist/models/DeleteProtectionPolicyRequest.js.map +1 -0
  43. package/dist/models/DeleteProtectionPolicyResponse.d.ts +19 -0
  44. package/dist/models/DeleteProtectionPolicyResponse.js +69 -0
  45. package/dist/models/DeleteProtectionPolicyResponse.js.map +1 -0
  46. package/dist/models/DeleteProtectionPolicyResponseBody.d.ts +21 -0
  47. package/dist/models/DeleteProtectionPolicyResponseBody.js +58 -0
  48. package/dist/models/DeleteProtectionPolicyResponseBody.js.map +1 -0
  49. package/dist/models/DeleteResourceCategoryRequest.d.ts +23 -0
  50. package/dist/models/DeleteResourceCategoryRequest.js +58 -0
  51. package/dist/models/DeleteResourceCategoryRequest.js.map +1 -0
  52. package/dist/models/DeleteResourceCategoryResponse.d.ts +19 -0
  53. package/dist/models/DeleteResourceCategoryResponse.js +69 -0
  54. package/dist/models/DeleteResourceCategoryResponse.js.map +1 -0
  55. package/dist/models/DeleteResourceCategoryResponseBody.d.ts +21 -0
  56. package/dist/models/DeleteResourceCategoryResponseBody.js +58 -0
  57. package/dist/models/DeleteResourceCategoryResponseBody.js.map +1 -0
  58. package/dist/models/DescribeCheckDetailsRequest.d.ts +47 -0
  59. package/dist/models/DescribeCheckDetailsRequest.js +64 -0
  60. package/dist/models/DescribeCheckDetailsRequest.js.map +1 -0
  61. package/dist/models/DescribeCheckDetailsResponse.d.ts +19 -0
  62. package/dist/models/DescribeCheckDetailsResponse.js +69 -0
  63. package/dist/models/DescribeCheckDetailsResponse.js.map +1 -0
  64. package/dist/models/DescribeCheckDetailsResponseBody.d.ts +167 -0
  65. package/dist/models/DescribeCheckDetailsResponseBody.js +130 -0
  66. package/dist/models/DescribeCheckDetailsResponseBody.js.map +1 -0
  67. package/dist/models/DescribeProductDataRedundancyTypeStatRequest.d.ts +32 -0
  68. package/dist/models/DescribeProductDataRedundancyTypeStatRequest.js +65 -0
  69. package/dist/models/DescribeProductDataRedundancyTypeStatRequest.js.map +1 -0
  70. package/dist/models/DescribeProductDataRedundancyTypeStatResponse.d.ts +19 -0
  71. package/dist/models/DescribeProductDataRedundancyTypeStatResponse.js +69 -0
  72. package/dist/models/DescribeProductDataRedundancyTypeStatResponse.js.map +1 -0
  73. package/dist/models/DescribeProductDataRedundancyTypeStatResponseBody.d.ts +79 -0
  74. package/dist/models/DescribeProductDataRedundancyTypeStatResponseBody.js +108 -0
  75. package/dist/models/DescribeProductDataRedundancyTypeStatResponseBody.js.map +1 -0
  76. package/dist/models/DescribeProductDataRedundancyTypeStatShrinkRequest.d.ts +32 -0
  77. package/dist/models/DescribeProductDataRedundancyTypeStatShrinkRequest.js +62 -0
  78. package/dist/models/DescribeProductDataRedundancyTypeStatShrinkRequest.js.map +1 -0
  79. package/dist/models/DescribeProductsRequest.d.ts +45 -0
  80. package/dist/models/DescribeProductsRequest.js +67 -0
  81. package/dist/models/DescribeProductsRequest.js.map +1 -0
  82. package/dist/models/DescribeProductsResponse.d.ts +19 -0
  83. package/dist/models/DescribeProductsResponse.js +69 -0
  84. package/dist/models/DescribeProductsResponse.js.map +1 -0
  85. package/dist/models/DescribeProductsResponseBody.d.ts +225 -0
  86. package/dist/models/DescribeProductsResponseBody.js +180 -0
  87. package/dist/models/DescribeProductsResponseBody.js.map +1 -0
  88. package/dist/models/DescribeProductsShrinkRequest.d.ts +45 -0
  89. package/dist/models/DescribeProductsShrinkRequest.js +64 -0
  90. package/dist/models/DescribeProductsShrinkRequest.js.map +1 -0
  91. package/dist/models/DescribeResourcesRequest.d.ts +117 -0
  92. package/dist/models/DescribeResourcesRequest.js +85 -0
  93. package/dist/models/DescribeResourcesRequest.js.map +1 -0
  94. package/dist/models/DescribeResourcesResponse.d.ts +19 -0
  95. package/dist/models/DescribeResourcesResponse.js +69 -0
  96. package/dist/models/DescribeResourcesResponse.js.map +1 -0
  97. package/dist/models/DescribeResourcesResponseBody.d.ts +271 -0
  98. package/dist/models/DescribeResourcesResponseBody.js +156 -0
  99. package/dist/models/DescribeResourcesResponseBody.js.map +1 -0
  100. package/dist/models/DescribeResourcesShrinkRequest.d.ts +117 -0
  101. package/dist/models/DescribeResourcesShrinkRequest.js +82 -0
  102. package/dist/models/DescribeResourcesShrinkRequest.js.map +1 -0
  103. package/dist/models/DescribeRulesRequest.d.ts +54 -0
  104. package/dist/models/DescribeRulesRequest.js +71 -0
  105. package/dist/models/DescribeRulesRequest.js.map +1 -0
  106. package/dist/models/DescribeRulesResponse.d.ts +19 -0
  107. package/dist/models/DescribeRulesResponse.js +69 -0
  108. package/dist/models/DescribeRulesResponse.js.map +1 -0
  109. package/dist/models/DescribeRulesResponseBody.d.ts +151 -0
  110. package/dist/models/DescribeRulesResponseBody.js +126 -0
  111. package/dist/models/DescribeRulesResponseBody.js.map +1 -0
  112. package/dist/models/DescribeRulesShrinkRequest.d.ts +54 -0
  113. package/dist/models/DescribeRulesShrinkRequest.js +68 -0
  114. package/dist/models/DescribeRulesShrinkRequest.js.map +1 -0
  115. package/dist/models/DescribeTaskResponse.d.ts +19 -0
  116. package/dist/models/DescribeTaskResponse.js +69 -0
  117. package/dist/models/DescribeTaskResponse.js.map +1 -0
  118. package/dist/models/DescribeTaskResponseBody.d.ts +158 -0
  119. package/dist/models/DescribeTaskResponseBody.js +110 -0
  120. package/dist/models/DescribeTaskResponseBody.js.map +1 -0
  121. package/dist/models/DescribeTasksRequest.d.ts +42 -0
  122. package/dist/models/DescribeTasksRequest.js +64 -0
  123. package/dist/models/DescribeTasksRequest.js.map +1 -0
  124. package/dist/models/DescribeTasksResponse.d.ts +19 -0
  125. package/dist/models/DescribeTasksResponse.js +69 -0
  126. package/dist/models/DescribeTasksResponse.js.map +1 -0
  127. package/dist/models/DescribeTasksResponseBody.d.ts +199 -0
  128. package/dist/models/DescribeTasksResponseBody.js +138 -0
  129. package/dist/models/DescribeTasksResponseBody.js.map +1 -0
  130. package/dist/models/DescribeTopRiskyResourcesRequest.d.ts +30 -0
  131. package/dist/models/DescribeTopRiskyResourcesRequest.js +65 -0
  132. package/dist/models/DescribeTopRiskyResourcesRequest.js.map +1 -0
  133. package/dist/models/DescribeTopRiskyResourcesResponse.d.ts +19 -0
  134. package/dist/models/DescribeTopRiskyResourcesResponse.js +69 -0
  135. package/dist/models/DescribeTopRiskyResourcesResponse.js.map +1 -0
  136. package/dist/models/DescribeTopRiskyResourcesResponseBody.d.ts +271 -0
  137. package/dist/models/DescribeTopRiskyResourcesResponseBody.js +156 -0
  138. package/dist/models/DescribeTopRiskyResourcesResponseBody.js.map +1 -0
  139. package/dist/models/DescribeTopRiskyResourcesShrinkRequest.d.ts +30 -0
  140. package/dist/models/DescribeTopRiskyResourcesShrinkRequest.js +62 -0
  141. package/dist/models/DescribeTopRiskyResourcesShrinkRequest.js.map +1 -0
  142. package/dist/models/DisableCheckProductRequest.d.ts +23 -0
  143. package/dist/models/DisableCheckProductRequest.js +58 -0
  144. package/dist/models/DisableCheckProductRequest.js.map +1 -0
  145. package/dist/models/DisableCheckProductResponse.d.ts +19 -0
  146. package/dist/models/DisableCheckProductResponse.js +69 -0
  147. package/dist/models/DisableCheckProductResponse.js.map +1 -0
  148. package/dist/models/DisableCheckProductResponseBody.d.ts +21 -0
  149. package/dist/models/DisableCheckProductResponseBody.js +58 -0
  150. package/dist/models/DisableCheckProductResponseBody.js.map +1 -0
  151. package/dist/models/DisableCheckResourceRequest.d.ts +23 -0
  152. package/dist/models/DisableCheckResourceRequest.js +58 -0
  153. package/dist/models/DisableCheckResourceRequest.js.map +1 -0
  154. package/dist/models/DisableCheckResourceResponse.d.ts +19 -0
  155. package/dist/models/DisableCheckResourceResponse.js +69 -0
  156. package/dist/models/DisableCheckResourceResponse.js.map +1 -0
  157. package/dist/models/DisableCheckResourceResponseBody.d.ts +21 -0
  158. package/dist/models/DisableCheckResourceResponseBody.js +58 -0
  159. package/dist/models/DisableCheckResourceResponseBody.js.map +1 -0
  160. package/dist/models/EnableCheckProductRequest.d.ts +23 -0
  161. package/dist/models/EnableCheckProductRequest.js +58 -0
  162. package/dist/models/EnableCheckProductRequest.js.map +1 -0
  163. package/dist/models/EnableCheckProductResponse.d.ts +19 -0
  164. package/dist/models/EnableCheckProductResponse.js +69 -0
  165. package/dist/models/EnableCheckProductResponse.js.map +1 -0
  166. package/dist/models/EnableCheckProductResponseBody.d.ts +21 -0
  167. package/dist/models/EnableCheckProductResponseBody.js +58 -0
  168. package/dist/models/EnableCheckProductResponseBody.js.map +1 -0
  169. package/dist/models/EnableCheckResourceRequest.d.ts +23 -0
  170. package/dist/models/EnableCheckResourceRequest.js +58 -0
  171. package/dist/models/EnableCheckResourceRequest.js.map +1 -0
  172. package/dist/models/EnableCheckResourceResponse.d.ts +19 -0
  173. package/dist/models/EnableCheckResourceResponse.js +69 -0
  174. package/dist/models/EnableCheckResourceResponse.js.map +1 -0
  175. package/dist/models/EnableCheckResourceResponseBody.d.ts +21 -0
  176. package/dist/models/EnableCheckResourceResponseBody.js +58 -0
  177. package/dist/models/EnableCheckResourceResponseBody.js.map +1 -0
  178. package/dist/models/GetBdrcServiceResponse.d.ts +19 -0
  179. package/dist/models/GetBdrcServiceResponse.js +69 -0
  180. package/dist/models/GetBdrcServiceResponse.js.map +1 -0
  181. package/dist/models/GetBdrcServiceResponseBody.d.ts +70 -0
  182. package/dist/models/GetBdrcServiceResponseBody.js +88 -0
  183. package/dist/models/GetBdrcServiceResponseBody.js.map +1 -0
  184. package/dist/models/GetMessageRequest.d.ts +13 -0
  185. package/dist/models/GetMessageRequest.js +54 -0
  186. package/dist/models/GetMessageRequest.js.map +1 -0
  187. package/dist/models/GetMessageResponse.d.ts +19 -0
  188. package/dist/models/GetMessageResponse.js +69 -0
  189. package/dist/models/GetMessageResponse.js.map +1 -0
  190. package/dist/models/GetMessageResponseBody.d.ts +110 -0
  191. package/dist/models/GetMessageResponseBody.js +98 -0
  192. package/dist/models/GetMessageResponseBody.js.map +1 -0
  193. package/dist/models/GetProtectionPolicyRequest.d.ts +13 -0
  194. package/dist/models/GetProtectionPolicyRequest.js +54 -0
  195. package/dist/models/GetProtectionPolicyRequest.js.map +1 -0
  196. package/dist/models/GetProtectionPolicyResponse.d.ts +19 -0
  197. package/dist/models/GetProtectionPolicyResponse.js +69 -0
  198. package/dist/models/GetProtectionPolicyResponse.js.map +1 -0
  199. package/dist/models/GetProtectionPolicyResponseBody.d.ts +116 -0
  200. package/dist/models/GetProtectionPolicyResponseBody.js +121 -0
  201. package/dist/models/GetProtectionPolicyResponseBody.js.map +1 -0
  202. package/dist/models/GetResourceCategoryRequest.d.ts +23 -0
  203. package/dist/models/GetResourceCategoryRequest.js +58 -0
  204. package/dist/models/GetResourceCategoryRequest.js.map +1 -0
  205. package/dist/models/GetResourceCategoryResponse.d.ts +19 -0
  206. package/dist/models/GetResourceCategoryResponse.js +69 -0
  207. package/dist/models/GetResourceCategoryResponse.js.map +1 -0
  208. package/dist/models/GetResourceCategoryResponseBody.d.ts +123 -0
  209. package/dist/models/GetResourceCategoryResponseBody.js +118 -0
  210. package/dist/models/GetResourceCategoryResponseBody.js.map +1 -0
  211. package/dist/models/ListMessagesRequest.d.ts +63 -0
  212. package/dist/models/ListMessagesRequest.js +68 -0
  213. package/dist/models/ListMessagesRequest.js.map +1 -0
  214. package/dist/models/ListMessagesResponse.d.ts +19 -0
  215. package/dist/models/ListMessagesResponse.js +69 -0
  216. package/dist/models/ListMessagesResponse.js.map +1 -0
  217. package/dist/models/ListMessagesResponseBody.d.ts +143 -0
  218. package/dist/models/ListMessagesResponseBody.js +124 -0
  219. package/dist/models/ListMessagesResponseBody.js.map +1 -0
  220. package/dist/models/ListProtectionPoliciesRequest.d.ts +45 -0
  221. package/dist/models/ListProtectionPoliciesRequest.js +64 -0
  222. package/dist/models/ListProtectionPoliciesRequest.js.map +1 -0
  223. package/dist/models/ListProtectionPoliciesResponse.d.ts +19 -0
  224. package/dist/models/ListProtectionPoliciesResponse.js +69 -0
  225. package/dist/models/ListProtectionPoliciesResponse.js.map +1 -0
  226. package/dist/models/ListProtectionPoliciesResponseBody.d.ts +248 -0
  227. package/dist/models/ListProtectionPoliciesResponseBody.js +225 -0
  228. package/dist/models/ListProtectionPoliciesResponseBody.js.map +1 -0
  229. package/dist/models/ListProtectionPolicyApplicationsRequest.d.ts +63 -0
  230. package/dist/models/ListProtectionPolicyApplicationsRequest.js +68 -0
  231. package/dist/models/ListProtectionPolicyApplicationsRequest.js.map +1 -0
  232. package/dist/models/ListProtectionPolicyApplicationsResponse.d.ts +19 -0
  233. package/dist/models/ListProtectionPolicyApplicationsResponse.js +69 -0
  234. package/dist/models/ListProtectionPolicyApplicationsResponse.js.map +1 -0
  235. package/dist/models/ListProtectionPolicyApplicationsResponseBody.d.ts +164 -0
  236. package/dist/models/ListProtectionPolicyApplicationsResponseBody.js +130 -0
  237. package/dist/models/ListProtectionPolicyApplicationsResponseBody.js.map +1 -0
  238. package/dist/models/ListResourceCategoriesRequest.d.ts +34 -0
  239. package/dist/models/ListResourceCategoriesRequest.js +62 -0
  240. package/dist/models/ListResourceCategoriesRequest.js.map +1 -0
  241. package/dist/models/ListResourceCategoriesResponse.d.ts +19 -0
  242. package/dist/models/ListResourceCategoriesResponse.js +69 -0
  243. package/dist/models/ListResourceCategoriesResponse.js.map +1 -0
  244. package/dist/models/ListResourceCategoriesResponseBody.d.ts +164 -0
  245. package/dist/models/ListResourceCategoriesResponseBody.js +146 -0
  246. package/dist/models/ListResourceCategoriesResponseBody.js.map +1 -0
  247. package/dist/models/OpenBdrcServiceResponse.d.ts +19 -0
  248. package/dist/models/OpenBdrcServiceResponse.js +69 -0
  249. package/dist/models/OpenBdrcServiceResponse.js.map +1 -0
  250. package/dist/models/OpenBdrcServiceResponseBody.d.ts +21 -0
  251. package/dist/models/OpenBdrcServiceResponseBody.js +58 -0
  252. package/dist/models/OpenBdrcServiceResponseBody.js.map +1 -0
  253. package/dist/models/UpdateProtectionPolicyRequest.d.ts +67 -0
  254. package/dist/models/UpdateProtectionPolicyRequest.js +91 -0
  255. package/dist/models/UpdateProtectionPolicyRequest.js.map +1 -0
  256. package/dist/models/UpdateProtectionPolicyResponse.d.ts +19 -0
  257. package/dist/models/UpdateProtectionPolicyResponse.js +69 -0
  258. package/dist/models/UpdateProtectionPolicyResponse.js.map +1 -0
  259. package/dist/models/UpdateProtectionPolicyResponseBody.d.ts +21 -0
  260. package/dist/models/UpdateProtectionPolicyResponseBody.js +58 -0
  261. package/dist/models/UpdateProtectionPolicyResponseBody.js.map +1 -0
  262. package/dist/models/UpdateProtectionPolicyShrinkRequest.d.ts +39 -0
  263. package/dist/models/UpdateProtectionPolicyShrinkRequest.js +64 -0
  264. package/dist/models/UpdateProtectionPolicyShrinkRequest.js.map +1 -0
  265. package/dist/models/UpdateResourceCategoryRequest.d.ts +65 -0
  266. package/dist/models/UpdateResourceCategoryRequest.js +62 -0
  267. package/dist/models/UpdateResourceCategoryRequest.js.map +1 -0
  268. package/dist/models/UpdateResourceCategoryResponse.d.ts +19 -0
  269. package/dist/models/UpdateResourceCategoryResponse.js +69 -0
  270. package/dist/models/UpdateResourceCategoryResponse.js.map +1 -0
  271. package/dist/models/UpdateResourceCategoryResponseBody.d.ts +21 -0
  272. package/dist/models/UpdateResourceCategoryResponseBody.js +58 -0
  273. package/dist/models/UpdateResourceCategoryResponseBody.js.map +1 -0
  274. package/dist/models/UpdateResourcesRequest.d.ts +21 -0
  275. package/dist/models/UpdateResourcesRequest.js +58 -0
  276. package/dist/models/UpdateResourcesRequest.js.map +1 -0
  277. package/dist/models/UpdateResourcesResponse.d.ts +19 -0
  278. package/dist/models/UpdateResourcesResponse.js +69 -0
  279. package/dist/models/UpdateResourcesResponse.js.map +1 -0
  280. package/dist/models/UpdateResourcesResponseBody.d.ts +46 -0
  281. package/dist/models/UpdateResourcesResponseBody.js +82 -0
  282. package/dist/models/UpdateResourcesResponseBody.js.map +1 -0
  283. package/dist/models/model.d.ts +135 -0
  284. package/dist/models/model.js +276 -0
  285. package/dist/models/model.js.map +1 -0
  286. package/package.json +3 -6
  287. package/src/client.ts +1103 -2591
  288. package/src/models/CheckRulesRequest.ts +46 -0
  289. package/src/models/CheckRulesResponse.ts +40 -0
  290. package/src/models/CheckRulesResponseBody.ts +76 -0
  291. package/src/models/CloseBdrcServiceResponse.ts +40 -0
  292. package/src/models/CloseBdrcServiceResponseBody.ts +34 -0
  293. package/src/models/CreateProtectionPolicyRequest.ts +126 -0
  294. package/src/models/CreateProtectionPolicyResponse.ts +40 -0
  295. package/src/models/CreateProtectionPolicyResponseBody.ts +74 -0
  296. package/src/models/CreateProtectionPolicyShrinkRequest.ts +78 -0
  297. package/src/models/CreateResourceCategoryRequest.ts +87 -0
  298. package/src/models/CreateResourceCategoryResponse.ts +40 -0
  299. package/src/models/CreateResourceCategoryResponseBody.ts +74 -0
  300. package/src/models/DeleteProtectionPolicyRequest.ts +24 -0
  301. package/src/models/DeleteProtectionPolicyResponse.ts +40 -0
  302. package/src/models/DeleteProtectionPolicyResponseBody.ts +34 -0
  303. package/src/models/DeleteResourceCategoryRequest.ts +36 -0
  304. package/src/models/DeleteResourceCategoryResponse.ts +40 -0
  305. package/src/models/DeleteResourceCategoryResponseBody.ts +34 -0
  306. package/src/models/DescribeCheckDetailsRequest.ts +66 -0
  307. package/src/models/DescribeCheckDetailsResponse.ts +40 -0
  308. package/src/models/DescribeCheckDetailsResponseBody.ts +234 -0
  309. package/src/models/DescribeProductDataRedundancyTypeStatRequest.ts +52 -0
  310. package/src/models/DescribeProductDataRedundancyTypeStatResponse.ts +40 -0
  311. package/src/models/DescribeProductDataRedundancyTypeStatResponseBody.ts +124 -0
  312. package/src/models/DescribeProductDataRedundancyTypeStatShrinkRequest.ts +49 -0
  313. package/src/models/DescribeProductsRequest.ts +67 -0
  314. package/src/models/DescribeProductsResponse.ts +40 -0
  315. package/src/models/DescribeProductsResponseBody.ts +324 -0
  316. package/src/models/DescribeProductsShrinkRequest.ts +64 -0
  317. package/src/models/DescribeResourcesRequest.ts +157 -0
  318. package/src/models/DescribeResourcesResponse.ts +40 -0
  319. package/src/models/DescribeResourcesResponseBody.ts +364 -0
  320. package/src/models/DescribeResourcesShrinkRequest.ts +154 -0
  321. package/src/models/DescribeRulesRequest.ts +80 -0
  322. package/src/models/DescribeRulesResponse.ts +40 -0
  323. package/src/models/DescribeRulesResponseBody.ts +214 -0
  324. package/src/models/DescribeRulesShrinkRequest.ts +77 -0
  325. package/src/models/DescribeTaskResponse.ts +40 -0
  326. package/src/models/DescribeTaskResponseBody.ts +214 -0
  327. package/src/models/DescribeTasksRequest.ts +61 -0
  328. package/src/models/DescribeTasksResponse.ts +40 -0
  329. package/src/models/DescribeTasksResponseBody.ts +274 -0
  330. package/src/models/DescribeTopRiskyResourcesRequest.ts +50 -0
  331. package/src/models/DescribeTopRiskyResourcesResponse.ts +40 -0
  332. package/src/models/DescribeTopRiskyResourcesResponseBody.ts +364 -0
  333. package/src/models/DescribeTopRiskyResourcesShrinkRequest.ts +47 -0
  334. package/src/models/DisableCheckProductRequest.ts +36 -0
  335. package/src/models/DisableCheckProductResponse.ts +40 -0
  336. package/src/models/DisableCheckProductResponseBody.ts +34 -0
  337. package/src/models/DisableCheckResourceRequest.ts +36 -0
  338. package/src/models/DisableCheckResourceResponse.ts +40 -0
  339. package/src/models/DisableCheckResourceResponseBody.ts +34 -0
  340. package/src/models/EnableCheckProductRequest.ts +36 -0
  341. package/src/models/EnableCheckProductResponse.ts +40 -0
  342. package/src/models/EnableCheckProductResponseBody.ts +34 -0
  343. package/src/models/EnableCheckResourceRequest.ts +36 -0
  344. package/src/models/EnableCheckResourceResponse.ts +40 -0
  345. package/src/models/EnableCheckResourceResponseBody.ts +34 -0
  346. package/src/models/GetBdrcServiceResponse.ts +40 -0
  347. package/src/models/GetBdrcServiceResponseBody.ts +104 -0
  348. package/src/models/GetMessageRequest.ts +24 -0
  349. package/src/models/GetMessageResponse.ts +40 -0
  350. package/src/models/GetMessageResponseBody.ts +154 -0
  351. package/src/models/GetProtectionPolicyRequest.ts +24 -0
  352. package/src/models/GetProtectionPolicyResponse.ts +40 -0
  353. package/src/models/GetProtectionPolicyResponseBody.ts +174 -0
  354. package/src/models/GetResourceCategoryRequest.ts +36 -0
  355. package/src/models/GetResourceCategoryResponse.ts +40 -0
  356. package/src/models/GetResourceCategoryResponseBody.ts +178 -0
  357. package/src/models/ListMessagesRequest.ts +86 -0
  358. package/src/models/ListMessagesResponse.ts +40 -0
  359. package/src/models/ListMessagesResponseBody.ts +204 -0
  360. package/src/models/ListProtectionPoliciesRequest.ts +64 -0
  361. package/src/models/ListProtectionPoliciesResponse.ts +40 -0
  362. package/src/models/ListProtectionPoliciesResponseBody.ts +374 -0
  363. package/src/models/ListProtectionPolicyApplicationsRequest.ts +86 -0
  364. package/src/models/ListProtectionPolicyApplicationsResponse.ts +40 -0
  365. package/src/models/ListProtectionPolicyApplicationsResponseBody.ts +231 -0
  366. package/src/models/ListResourceCategoriesRequest.ts +51 -0
  367. package/src/models/ListResourceCategoriesResponse.ts +40 -0
  368. package/src/models/ListResourceCategoriesResponseBody.ts +238 -0
  369. package/src/models/OpenBdrcServiceResponse.ts +40 -0
  370. package/src/models/OpenBdrcServiceResponseBody.ts +34 -0
  371. package/src/models/UpdateProtectionPolicyRequest.ts +104 -0
  372. package/src/models/UpdateProtectionPolicyResponse.ts +40 -0
  373. package/src/models/UpdateProtectionPolicyResponseBody.ts +34 -0
  374. package/src/models/UpdateProtectionPolicyShrinkRequest.ts +58 -0
  375. package/src/models/UpdateResourceCategoryRequest.ts +82 -0
  376. package/src/models/UpdateResourceCategoryResponse.ts +40 -0
  377. package/src/models/UpdateResourceCategoryResponseBody.ts +34 -0
  378. package/src/models/UpdateResourcesRequest.ts +34 -0
  379. package/src/models/UpdateResourcesResponse.ts +40 -0
  380. package/src/models/UpdateResourcesResponseBody.ts +74 -0
  381. package/src/models/model.ts +135 -0
package/src/client.ts CHANGED
@@ -1,3074 +1,1584 @@
1
1
  // This file is auto-generated, don't edit it
2
- /**
3
- */
4
- import Util, * as $Util from '@alicloud/tea-util';
5
- import OpenApi, * as $OpenApi from '@alicloud/openapi-client';
6
- import OpenApiUtil from '@alicloud/openapi-util';
7
- import EndpointUtil from '@alicloud/endpoint-util';
8
- import * as $tea from '@alicloud/tea-typescript';
9
-
10
- export class CheckRulesRequest extends $tea.Model {
11
- /**
12
- * @remarks
13
- * This parameter is required.
14
- *
15
- * @example
16
- * acs:ecs:123***890:cn-shanghai:instance/i-001***90
17
- */
18
- resourceArn?: string;
19
- /**
20
- * @example
21
- * rule-000***dav
22
- */
23
- ruleId?: string;
24
- static names(): { [key: string]: string } {
25
- return {
26
- resourceArn: 'ResourceArn',
27
- ruleId: 'RuleId',
28
- };
29
- }
2
+ import * as $dara from '@darabonba/typescript';
3
+ import OpenApi from '@alicloud/openapi-core';
4
+ import { OpenApiUtil, $OpenApiUtil }from '@alicloud/openapi-core';
30
5
 
31
- static types(): { [key: string]: any } {
32
- return {
33
- resourceArn: 'string',
34
- ruleId: 'string',
35
- };
36
- }
37
6
 
38
- constructor(map?: { [key: string]: any }) {
39
- super(map);
40
- }
41
- }
7
+ import * as $_model from './models/model';
8
+ export * from './models/model';
42
9
 
43
- export class CheckRulesResponseBody extends $tea.Model {
44
- data?: CheckRulesResponseBodyData;
45
- /**
46
- * @example
47
- * 700683DE-0154-56D4-8D76-3B7A2C2C7DF9
48
- */
49
- requestId?: string;
50
- static names(): { [key: string]: string } {
51
- return {
52
- data: 'Data',
53
- requestId: 'RequestId',
54
- };
55
- }
10
+ export default class Client extends OpenApi {
56
11
 
57
- static types(): { [key: string]: any } {
58
- return {
59
- data: CheckRulesResponseBodyData,
60
- requestId: 'string',
12
+ constructor(config: $OpenApiUtil.Config) {
13
+ super(config);
14
+ this._endpointRule = "regional";
15
+ this._endpointMap = {
16
+ 'cn-shanghai-finance-1': "bdrc.cn-shanghai-finance-1.aliyuncs.com",
17
+ 'cn-shanghai': "bdrc.cn-shanghai.aliyuncs.com",
18
+ 'ap-southeast-1': "bdrc.ap-southeast-1.aliyuncs.com",
61
19
  };
20
+ this.checkConfig(config);
21
+ this._endpoint = this.getEndpoint("bdrc", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
62
22
  }
63
23
 
64
- constructor(map?: { [key: string]: any }) {
65
- super(map);
66
- }
67
- }
68
24
 
69
- export class CheckRulesResponse extends $tea.Model {
70
- headers?: { [key: string]: string };
71
- statusCode?: number;
72
- body?: CheckRulesResponseBody;
73
- static names(): { [key: string]: string } {
74
- return {
75
- headers: 'headers',
76
- statusCode: 'statusCode',
77
- body: 'body',
78
- };
79
- }
25
+ getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
26
+ if (!$dara.isNull(endpoint)) {
27
+ return endpoint;
28
+ }
80
29
 
81
- static types(): { [key: string]: any } {
82
- return {
83
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
84
- statusCode: 'number',
85
- body: CheckRulesResponseBody,
86
- };
87
- }
30
+ if (!$dara.isNull(endpointMap) && !$dara.isNull(endpointMap[regionId])) {
31
+ return endpointMap[regionId];
32
+ }
88
33
 
89
- constructor(map?: { [key: string]: any }) {
90
- super(map);
34
+ return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
91
35
  }
92
- }
93
36
 
94
- export class CloseBdrcServiceResponseBody extends $tea.Model {
95
37
  /**
96
- * @example
97
- * 663D8898-E0B5-5964-BF28-A191CE6A1825
38
+ * Checks data protection scoring rules. Calling this operation triggers an asynchronous task to check whether your resources meet the data protection scoring requirements.
39
+ *
40
+ * @param request - CheckRulesRequest
41
+ * @param headers - map
42
+ * @param runtime - runtime options for this request RuntimeOptions
43
+ * @returns CheckRulesResponse
98
44
  */
99
- requestId?: string;
100
- static names(): { [key: string]: string } {
101
- return {
102
- requestId: 'RequestId',
103
- };
104
- }
105
-
106
- static types(): { [key: string]: any } {
107
- return {
108
- requestId: 'string',
109
- };
110
- }
111
-
112
- constructor(map?: { [key: string]: any }) {
113
- super(map);
114
- }
115
- }
116
-
117
- export class CloseBdrcServiceResponse extends $tea.Model {
118
- headers?: { [key: string]: string };
119
- statusCode?: number;
120
- body?: CloseBdrcServiceResponseBody;
121
- static names(): { [key: string]: string } {
122
- return {
123
- headers: 'headers',
124
- statusCode: 'statusCode',
125
- body: 'body',
126
- };
127
- }
45
+ async checkRulesWithOptions(request: $_model.CheckRulesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.CheckRulesResponse> {
46
+ request.validate();
47
+ let body : {[key: string ]: any} = { };
48
+ if (!$dara.isNull(request.resourceArn)) {
49
+ body["ResourceArn"] = request.resourceArn;
50
+ }
128
51
 
129
- static types(): { [key: string]: any } {
130
- return {
131
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
132
- statusCode: 'number',
133
- body: CloseBdrcServiceResponseBody,
134
- };
135
- }
52
+ if (!$dara.isNull(request.ruleId)) {
53
+ body["RuleId"] = request.ruleId;
54
+ }
136
55
 
137
- constructor(map?: { [key: string]: any }) {
138
- super(map);
56
+ let req = new $OpenApiUtil.OpenApiRequest({
57
+ headers: headers,
58
+ body: OpenApiUtil.parseToMap(body),
59
+ });
60
+ let params = new $OpenApiUtil.Params({
61
+ action: "CheckRules",
62
+ version: "2023-08-08",
63
+ protocol: "HTTPS",
64
+ pathname: `/api/v1/rules/check`,
65
+ method: "POST",
66
+ authType: "AK",
67
+ style: "ROA",
68
+ reqBodyType: "formData",
69
+ bodyType: "json",
70
+ });
71
+ return $dara.cast<$_model.CheckRulesResponse>(await this.callApi(params, req, runtime), new $_model.CheckRulesResponse({}));
139
72
  }
140
- }
141
73
 
142
- export class DescribeCheckDetailsRequest extends $tea.Model {
143
- /**
144
- * @example
145
- * 10
146
- */
147
- maxResults?: number;
148
- /**
149
- * @example
150
- * cae**********699
151
- */
152
- nextToken?: string;
153
74
  /**
154
- * @remarks
155
- * This parameter is required.
75
+ * Checks data protection scoring rules. Calling this operation triggers an asynchronous task to check whether your resources meet the data protection scoring requirements.
156
76
  *
157
- * @example
158
- * acs:ecs:123***890:cn-shanghai:instance/i-001***90
159
- */
160
- resourceArn?: string;
161
- /**
162
- * @example
163
- * rule-000***dav
77
+ * @param request - CheckRulesRequest
78
+ * @returns CheckRulesResponse
164
79
  */
165
- ruleId?: string;
166
- static names(): { [key: string]: string } {
167
- return {
168
- maxResults: 'MaxResults',
169
- nextToken: 'NextToken',
170
- resourceArn: 'ResourceArn',
171
- ruleId: 'RuleId',
172
- };
173
- }
174
-
175
- static types(): { [key: string]: any } {
176
- return {
177
- maxResults: 'number',
178
- nextToken: 'string',
179
- resourceArn: 'string',
180
- ruleId: 'string',
181
- };
182
- }
183
-
184
- constructor(map?: { [key: string]: any }) {
185
- super(map);
80
+ async checkRules(request: $_model.CheckRulesRequest): Promise<$_model.CheckRulesResponse> {
81
+ let runtime = new $dara.RuntimeOptions({ });
82
+ let headers : {[key: string ]: string} = { };
83
+ return await this.checkRulesWithOptions(request, headers, runtime);
186
84
  }
187
- }
188
85
 
189
- export class DescribeCheckDetailsResponseBody extends $tea.Model {
190
- data?: DescribeCheckDetailsResponseBodyData;
191
86
  /**
192
- * @example
193
- * 92793A50-0B97-59F1-BAEA-EAED83BA1998
87
+ * Shuts down the Backup and Disaster Recovery Center.
88
+ *
89
+ * @param headers - map
90
+ * @param runtime - runtime options for this request RuntimeOptions
91
+ * @returns CloseBdrcServiceResponse
194
92
  */
195
- requestId?: string;
196
- static names(): { [key: string]: string } {
197
- return {
198
- data: 'Data',
199
- requestId: 'RequestId',
200
- };
201
- }
202
-
203
- static types(): { [key: string]: any } {
204
- return {
205
- data: DescribeCheckDetailsResponseBodyData,
206
- requestId: 'string',
207
- };
208
- }
209
-
210
- constructor(map?: { [key: string]: any }) {
211
- super(map);
212
- }
213
- }
214
-
215
- export class DescribeCheckDetailsResponse extends $tea.Model {
216
- headers?: { [key: string]: string };
217
- statusCode?: number;
218
- body?: DescribeCheckDetailsResponseBody;
219
- static names(): { [key: string]: string } {
220
- return {
221
- headers: 'headers',
222
- statusCode: 'statusCode',
223
- body: 'body',
224
- };
225
- }
226
-
227
- static types(): { [key: string]: any } {
228
- return {
229
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
230
- statusCode: 'number',
231
- body: DescribeCheckDetailsResponseBody,
232
- };
233
- }
234
-
235
- constructor(map?: { [key: string]: any }) {
236
- super(map);
93
+ async closeBdrcServiceWithOptions(headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.CloseBdrcServiceResponse> {
94
+ let req = new $OpenApiUtil.OpenApiRequest({
95
+ headers: headers,
96
+ });
97
+ let params = new $OpenApiUtil.Params({
98
+ action: "CloseBdrcService",
99
+ version: "2023-08-08",
100
+ protocol: "HTTPS",
101
+ pathname: `/api/v1/service/close`,
102
+ method: "POST",
103
+ authType: "AK",
104
+ style: "ROA",
105
+ reqBodyType: "json",
106
+ bodyType: "json",
107
+ });
108
+ return $dara.cast<$_model.CloseBdrcServiceResponse>(await this.callApi(params, req, runtime), new $_model.CloseBdrcServiceResponse({}));
237
109
  }
238
- }
239
110
 
240
- export class DescribeProductsResponseBody extends $tea.Model {
241
- data?: DescribeProductsResponseBodyData;
242
111
  /**
243
- * @example
244
- * 30FB202A-1D22-5394-AB02-4477CDFCF51F
112
+ * Shuts down the Backup and Disaster Recovery Center.
113
+ * @returns CloseBdrcServiceResponse
245
114
  */
246
- requestId?: string;
247
- static names(): { [key: string]: string } {
248
- return {
249
- data: 'Data',
250
- requestId: 'RequestId',
251
- };
115
+ async closeBdrcService(): Promise<$_model.CloseBdrcServiceResponse> {
116
+ let runtime = new $dara.RuntimeOptions({ });
117
+ let headers : {[key: string ]: string} = { };
118
+ return await this.closeBdrcServiceWithOptions(headers, runtime);
252
119
  }
253
120
 
254
- static types(): { [key: string]: any } {
255
- return {
256
- data: DescribeProductsResponseBodyData,
257
- requestId: 'string',
258
- };
259
- }
121
+ /**
122
+ * Creates a protection policy.
123
+ *
124
+ * @param tmpReq - CreateProtectionPolicyRequest
125
+ * @param headers - map
126
+ * @param runtime - runtime options for this request RuntimeOptions
127
+ * @returns CreateProtectionPolicyResponse
128
+ */
129
+ async createProtectionPolicyWithOptions(tmpReq: $_model.CreateProtectionPolicyRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.CreateProtectionPolicyResponse> {
130
+ tmpReq.validate();
131
+ let request = new $_model.CreateProtectionPolicyShrinkRequest({ });
132
+ OpenApiUtil.convert(tmpReq, request);
133
+ if (!$dara.isNull(tmpReq.boundResourceCategoryIds)) {
134
+ request.boundResourceCategoryIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.boundResourceCategoryIds, "BoundResourceCategoryIds", "json");
135
+ }
260
136
 
261
- constructor(map?: { [key: string]: any }) {
262
- super(map);
263
- }
264
- }
137
+ if (!$dara.isNull(tmpReq.subProtectionPolicies)) {
138
+ request.subProtectionPoliciesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.subProtectionPolicies, "SubProtectionPolicies", "json");
139
+ }
265
140
 
266
- export class DescribeProductsResponse extends $tea.Model {
267
- headers?: { [key: string]: string };
268
- statusCode?: number;
269
- body?: DescribeProductsResponseBody;
270
- static names(): { [key: string]: string } {
271
- return {
272
- headers: 'headers',
273
- statusCode: 'statusCode',
274
- body: 'body',
275
- };
276
- }
141
+ let body : {[key: string ]: any} = { };
142
+ if (!$dara.isNull(request.boundResourceCategoryIdsShrink)) {
143
+ body["BoundResourceCategoryIds"] = request.boundResourceCategoryIdsShrink;
144
+ }
277
145
 
278
- static types(): { [key: string]: any } {
279
- return {
280
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
281
- statusCode: 'number',
282
- body: DescribeProductsResponseBody,
283
- };
284
- }
146
+ if (!$dara.isNull(request.clientToken)) {
147
+ body["ClientToken"] = request.clientToken;
148
+ }
285
149
 
286
- constructor(map?: { [key: string]: any }) {
287
- super(map);
288
- }
289
- }
150
+ if (!$dara.isNull(request.protectionPolicyName)) {
151
+ body["ProtectionPolicyName"] = request.protectionPolicyName;
152
+ }
290
153
 
291
- export class DescribeResourcesRequest extends $tea.Model {
292
- /**
293
- * @example
294
- * LRS
295
- */
296
- dataRedundancyType?: string;
297
- /**
298
- * @example
299
- * rule-000c***yc9
300
- */
301
- failedRuleTemplate?: string;
302
- /**
303
- * @example
304
- * 10
305
- */
306
- maxResults?: number;
307
- /**
308
- * @example
309
- * cae**********699
310
- */
311
- nextToken?: string;
312
- /**
313
- * @example
314
- * i-0003***110
315
- */
316
- resourceId?: string;
317
- /**
318
- * @example
319
- * ACS::ECS::Instance
320
- */
321
- resourceType?: string;
322
- /**
323
- * @example
324
- * protectionScore
325
- */
326
- sortBy?: string;
327
- /**
328
- * @example
329
- * ASC
330
- */
331
- sortOrder?: string;
332
- /**
333
- * @example
334
- * ARCHIVE
335
- */
336
- storageClass?: string;
337
- static names(): { [key: string]: string } {
338
- return {
339
- dataRedundancyType: 'DataRedundancyType',
340
- failedRuleTemplate: 'FailedRuleTemplate',
341
- maxResults: 'MaxResults',
342
- nextToken: 'NextToken',
343
- resourceId: 'ResourceId',
344
- resourceType: 'ResourceType',
345
- sortBy: 'SortBy',
346
- sortOrder: 'SortOrder',
347
- storageClass: 'StorageClass',
348
- };
349
- }
154
+ if (!$dara.isNull(request.protectionPolicyRegionId)) {
155
+ body["ProtectionPolicyRegionId"] = request.protectionPolicyRegionId;
156
+ }
350
157
 
351
- static types(): { [key: string]: any } {
352
- return {
353
- dataRedundancyType: 'string',
354
- failedRuleTemplate: 'string',
355
- maxResults: 'number',
356
- nextToken: 'string',
357
- resourceId: 'string',
358
- resourceType: 'string',
359
- sortBy: 'string',
360
- sortOrder: 'string',
361
- storageClass: 'string',
362
- };
363
- }
158
+ if (!$dara.isNull(request.subProtectionPoliciesShrink)) {
159
+ body["SubProtectionPolicies"] = request.subProtectionPoliciesShrink;
160
+ }
364
161
 
365
- constructor(map?: { [key: string]: any }) {
366
- super(map);
162
+ let req = new $OpenApiUtil.OpenApiRequest({
163
+ headers: headers,
164
+ body: OpenApiUtil.parseToMap(body),
165
+ });
166
+ let params = new $OpenApiUtil.Params({
167
+ action: "CreateProtectionPolicy",
168
+ version: "2023-08-08",
169
+ protocol: "HTTPS",
170
+ pathname: `/api/v1/protection-policies`,
171
+ method: "POST",
172
+ authType: "AK",
173
+ style: "ROA",
174
+ reqBodyType: "formData",
175
+ bodyType: "json",
176
+ });
177
+ return $dara.cast<$_model.CreateProtectionPolicyResponse>(await this.callApi(params, req, runtime), new $_model.CreateProtectionPolicyResponse({}));
367
178
  }
368
- }
369
179
 
370
- export class DescribeResourcesResponseBody extends $tea.Model {
371
- data?: DescribeResourcesResponseBodyData;
372
180
  /**
373
- * @example
374
- * 700683DE-0154-56D4-8D76-3B7A2C2C7DF9
181
+ * Creates a protection policy.
182
+ *
183
+ * @param request - CreateProtectionPolicyRequest
184
+ * @returns CreateProtectionPolicyResponse
375
185
  */
376
- requestId?: string;
377
- static names(): { [key: string]: string } {
378
- return {
379
- data: 'Data',
380
- requestId: 'RequestId',
381
- };
382
- }
383
-
384
- static types(): { [key: string]: any } {
385
- return {
386
- data: DescribeResourcesResponseBodyData,
387
- requestId: 'string',
388
- };
186
+ async createProtectionPolicy(request: $_model.CreateProtectionPolicyRequest): Promise<$_model.CreateProtectionPolicyResponse> {
187
+ let runtime = new $dara.RuntimeOptions({ });
188
+ let headers : {[key: string ]: string} = { };
189
+ return await this.createProtectionPolicyWithOptions(request, headers, runtime);
389
190
  }
390
191
 
391
- constructor(map?: { [key: string]: any }) {
392
- super(map);
393
- }
394
- }
192
+ /**
193
+ * Creates a resource category.
194
+ *
195
+ * @param request - CreateResourceCategoryRequest
196
+ * @param headers - map
197
+ * @param runtime - runtime options for this request RuntimeOptions
198
+ * @returns CreateResourceCategoryResponse
199
+ */
200
+ async createResourceCategoryWithOptions(request: $_model.CreateResourceCategoryRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.CreateResourceCategoryResponse> {
201
+ request.validate();
202
+ let body : {[key: string ]: any} = { };
203
+ if (!$dara.isNull(request.resourceCategoryName)) {
204
+ body["ResourceCategoryName"] = request.resourceCategoryName;
205
+ }
395
206
 
396
- export class DescribeResourcesResponse extends $tea.Model {
397
- headers?: { [key: string]: string };
398
- statusCode?: number;
399
- body?: DescribeResourcesResponseBody;
400
- static names(): { [key: string]: string } {
401
- return {
402
- headers: 'headers',
403
- statusCode: 'statusCode',
404
- body: 'body',
405
- };
406
- }
207
+ if (!$dara.isNull(request.resourceMatcher)) {
208
+ body["ResourceMatcher"] = request.resourceMatcher;
209
+ }
407
210
 
408
- static types(): { [key: string]: any } {
409
- return {
410
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
411
- statusCode: 'number',
412
- body: DescribeResourcesResponseBody,
413
- };
414
- }
211
+ if (!$dara.isNull(request.resourceType)) {
212
+ body["ResourceType"] = request.resourceType;
213
+ }
415
214
 
416
- constructor(map?: { [key: string]: any }) {
417
- super(map);
215
+ let req = new $OpenApiUtil.OpenApiRequest({
216
+ headers: headers,
217
+ body: OpenApiUtil.parseToMap(body),
218
+ });
219
+ let params = new $OpenApiUtil.Params({
220
+ action: "CreateResourceCategory",
221
+ version: "2023-08-08",
222
+ protocol: "HTTPS",
223
+ pathname: `/api/v1/resource-categories/create`,
224
+ method: "POST",
225
+ authType: "AK",
226
+ style: "ROA",
227
+ reqBodyType: "formData",
228
+ bodyType: "json",
229
+ });
230
+ return $dara.cast<$_model.CreateResourceCategoryResponse>(await this.callApi(params, req, runtime), new $_model.CreateResourceCategoryResponse({}));
418
231
  }
419
- }
420
232
 
421
- export class DescribeRulesRequest extends $tea.Model {
422
233
  /**
423
- * @example
424
- * 10
234
+ * Creates a resource category.
235
+ *
236
+ * @param request - CreateResourceCategoryRequest
237
+ * @returns CreateResourceCategoryResponse
425
238
  */
426
- maxResults?: number;
239
+ async createResourceCategory(request: $_model.CreateResourceCategoryRequest): Promise<$_model.CreateResourceCategoryResponse> {
240
+ let runtime = new $dara.RuntimeOptions({ });
241
+ let headers : {[key: string ]: string} = { };
242
+ return await this.createResourceCategoryWithOptions(request, headers, runtime);
243
+ }
244
+
427
245
  /**
428
- * @example
429
- * cae**********699
246
+ * Deletes a protection policy.
247
+ *
248
+ * @param request - DeleteProtectionPolicyRequest
249
+ * @param headers - map
250
+ * @param runtime - runtime options for this request RuntimeOptions
251
+ * @returns DeleteProtectionPolicyResponse
430
252
  */
431
- nextToken?: string;
253
+ async deleteProtectionPolicyWithOptions(ProtectionPolicyId: string, request: $_model.DeleteProtectionPolicyRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteProtectionPolicyResponse> {
254
+ request.validate();
255
+ let req = new $OpenApiUtil.OpenApiRequest({
256
+ headers: headers,
257
+ });
258
+ let params = new $OpenApiUtil.Params({
259
+ action: "DeleteProtectionPolicy",
260
+ version: "2023-08-08",
261
+ protocol: "HTTPS",
262
+ pathname: `/api/v1/protection-policies/${$dara.URL.percentEncode(ProtectionPolicyId)}`,
263
+ method: "DELETE",
264
+ authType: "AK",
265
+ style: "ROA",
266
+ reqBodyType: "json",
267
+ bodyType: "json",
268
+ });
269
+ return $dara.cast<$_model.DeleteProtectionPolicyResponse>(await this.callApi(params, req, runtime), new $_model.DeleteProtectionPolicyResponse({}));
270
+ }
271
+
432
272
  /**
433
- * @example
434
- * ACS::ECS::Instance
273
+ * Deletes a protection policy.
274
+ *
275
+ * @param request - DeleteProtectionPolicyRequest
276
+ * @returns DeleteProtectionPolicyResponse
435
277
  */
436
- resourceType?: string;
437
- static names(): { [key: string]: string } {
438
- return {
439
- maxResults: 'MaxResults',
440
- nextToken: 'NextToken',
441
- resourceType: 'ResourceType',
442
- };
278
+ async deleteProtectionPolicy(ProtectionPolicyId: string, request: $_model.DeleteProtectionPolicyRequest): Promise<$_model.DeleteProtectionPolicyResponse> {
279
+ let runtime = new $dara.RuntimeOptions({ });
280
+ let headers : {[key: string ]: string} = { };
281
+ return await this.deleteProtectionPolicyWithOptions(ProtectionPolicyId, request, headers, runtime);
443
282
  }
444
283
 
445
- static types(): { [key: string]: any } {
446
- return {
447
- maxResults: 'number',
448
- nextToken: 'string',
449
- resourceType: 'string',
450
- };
451
- }
284
+ /**
285
+ * Deletes a resource category.
286
+ *
287
+ * @param request - DeleteResourceCategoryRequest
288
+ * @param headers - map
289
+ * @param runtime - runtime options for this request RuntimeOptions
290
+ * @returns DeleteResourceCategoryResponse
291
+ */
292
+ async deleteResourceCategoryWithOptions(request: $_model.DeleteResourceCategoryRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteResourceCategoryResponse> {
293
+ request.validate();
294
+ let body : {[key: string ]: any} = { };
295
+ if (!$dara.isNull(request.resourceCategoryId)) {
296
+ body["ResourceCategoryId"] = request.resourceCategoryId;
297
+ }
452
298
 
453
- constructor(map?: { [key: string]: any }) {
454
- super(map);
299
+ let req = new $OpenApiUtil.OpenApiRequest({
300
+ headers: headers,
301
+ body: OpenApiUtil.parseToMap(body),
302
+ });
303
+ let params = new $OpenApiUtil.Params({
304
+ action: "DeleteResourceCategory",
305
+ version: "2023-08-08",
306
+ protocol: "HTTPS",
307
+ pathname: `/api/v1/resource-categories/delete`,
308
+ method: "POST",
309
+ authType: "AK",
310
+ style: "ROA",
311
+ reqBodyType: "formData",
312
+ bodyType: "json",
313
+ });
314
+ return $dara.cast<$_model.DeleteResourceCategoryResponse>(await this.callApi(params, req, runtime), new $_model.DeleteResourceCategoryResponse({}));
455
315
  }
456
- }
457
316
 
458
- export class DescribeRulesResponseBody extends $tea.Model {
459
- data?: DescribeRulesResponseBodyData;
460
317
  /**
461
- * @example
462
- * 86DEBAC9-AB6A-59AB-9E5C-A540E579ECC9
318
+ * Deletes a resource category.
319
+ *
320
+ * @param request - DeleteResourceCategoryRequest
321
+ * @returns DeleteResourceCategoryResponse
463
322
  */
464
- requestId?: string;
465
- static names(): { [key: string]: string } {
466
- return {
467
- data: 'Data',
468
- requestId: 'RequestId',
469
- };
323
+ async deleteResourceCategory(request: $_model.DeleteResourceCategoryRequest): Promise<$_model.DeleteResourceCategoryResponse> {
324
+ let runtime = new $dara.RuntimeOptions({ });
325
+ let headers : {[key: string ]: string} = { };
326
+ return await this.deleteResourceCategoryWithOptions(request, headers, runtime);
470
327
  }
471
328
 
472
- static types(): { [key: string]: any } {
473
- return {
474
- data: DescribeRulesResponseBodyData,
475
- requestId: 'string',
476
- };
477
- }
329
+ /**
330
+ * Retrieves the check results for data protection rules.
331
+ *
332
+ * @param request - DescribeCheckDetailsRequest
333
+ * @param headers - map
334
+ * @param runtime - runtime options for this request RuntimeOptions
335
+ * @returns DescribeCheckDetailsResponse
336
+ */
337
+ async describeCheckDetailsWithOptions(request: $_model.DescribeCheckDetailsRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeCheckDetailsResponse> {
338
+ request.validate();
339
+ let query : {[key: string ]: any} = { };
340
+ if (!$dara.isNull(request.maxResults)) {
341
+ query["MaxResults"] = request.maxResults;
342
+ }
478
343
 
479
- constructor(map?: { [key: string]: any }) {
480
- super(map);
481
- }
482
- }
344
+ if (!$dara.isNull(request.nextToken)) {
345
+ query["NextToken"] = request.nextToken;
346
+ }
483
347
 
484
- export class DescribeRulesResponse extends $tea.Model {
485
- headers?: { [key: string]: string };
486
- statusCode?: number;
487
- body?: DescribeRulesResponseBody;
488
- static names(): { [key: string]: string } {
489
- return {
490
- headers: 'headers',
491
- statusCode: 'statusCode',
492
- body: 'body',
493
- };
494
- }
348
+ if (!$dara.isNull(request.resourceArn)) {
349
+ query["ResourceArn"] = request.resourceArn;
350
+ }
495
351
 
496
- static types(): { [key: string]: any } {
497
- return {
498
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
499
- statusCode: 'number',
500
- body: DescribeRulesResponseBody,
501
- };
502
- }
352
+ if (!$dara.isNull(request.ruleId)) {
353
+ query["RuleId"] = request.ruleId;
354
+ }
503
355
 
504
- constructor(map?: { [key: string]: any }) {
505
- super(map);
356
+ let req = new $OpenApiUtil.OpenApiRequest({
357
+ headers: headers,
358
+ query: OpenApiUtil.query(query),
359
+ });
360
+ let params = new $OpenApiUtil.Params({
361
+ action: "DescribeCheckDetails",
362
+ version: "2023-08-08",
363
+ protocol: "HTTPS",
364
+ pathname: `/api/v1/check-details`,
365
+ method: "GET",
366
+ authType: "AK",
367
+ style: "ROA",
368
+ reqBodyType: "json",
369
+ bodyType: "json",
370
+ });
371
+ return $dara.cast<$_model.DescribeCheckDetailsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeCheckDetailsResponse({}));
506
372
  }
507
- }
508
373
 
509
- export class DescribeTaskResponseBody extends $tea.Model {
510
- data?: DescribeTaskResponseBodyData;
511
374
  /**
512
- * @example
513
- * 14DFF801-A4E3-5136-AAB8-7D246012CD7A
375
+ * Retrieves the check results for data protection rules.
376
+ *
377
+ * @param request - DescribeCheckDetailsRequest
378
+ * @returns DescribeCheckDetailsResponse
514
379
  */
515
- requestId?: string;
516
- static names(): { [key: string]: string } {
517
- return {
518
- data: 'Data',
519
- requestId: 'RequestId',
520
- };
380
+ async describeCheckDetails(request: $_model.DescribeCheckDetailsRequest): Promise<$_model.DescribeCheckDetailsResponse> {
381
+ let runtime = new $dara.RuntimeOptions({ });
382
+ let headers : {[key: string ]: string} = { };
383
+ return await this.describeCheckDetailsWithOptions(request, headers, runtime);
521
384
  }
522
385
 
523
- static types(): { [key: string]: any } {
524
- return {
525
- data: DescribeTaskResponseBodyData,
526
- requestId: 'string',
527
- };
528
- }
386
+ /**
387
+ * Queries statistics on data redundancy types for a cloud service.
388
+ *
389
+ * @param tmpReq - DescribeProductDataRedundancyTypeStatRequest
390
+ * @param headers - map
391
+ * @param runtime - runtime options for this request RuntimeOptions
392
+ * @returns DescribeProductDataRedundancyTypeStatResponse
393
+ */
394
+ async describeProductDataRedundancyTypeStatWithOptions(tmpReq: $_model.DescribeProductDataRedundancyTypeStatRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeProductDataRedundancyTypeStatResponse> {
395
+ tmpReq.validate();
396
+ let request = new $_model.DescribeProductDataRedundancyTypeStatShrinkRequest({ });
397
+ OpenApiUtil.convert(tmpReq, request);
398
+ if (!$dara.isNull(tmpReq.resourceOwnerIds)) {
399
+ request.resourceOwnerIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourceOwnerIds, "ResourceOwnerIds", "json");
400
+ }
529
401
 
530
- constructor(map?: { [key: string]: any }) {
531
- super(map);
532
- }
533
- }
402
+ let query : {[key: string ]: any} = { };
403
+ if (!$dara.isNull(request.productType)) {
404
+ query["ProductType"] = request.productType;
405
+ }
534
406
 
535
- export class DescribeTaskResponse extends $tea.Model {
536
- headers?: { [key: string]: string };
537
- statusCode?: number;
538
- body?: DescribeTaskResponseBody;
539
- static names(): { [key: string]: string } {
540
- return {
541
- headers: 'headers',
542
- statusCode: 'statusCode',
543
- body: 'body',
544
- };
545
- }
407
+ if (!$dara.isNull(request.resourceCategoryId)) {
408
+ query["ResourceCategoryId"] = request.resourceCategoryId;
409
+ }
546
410
 
547
- static types(): { [key: string]: any } {
548
- return {
549
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
550
- statusCode: 'number',
551
- body: DescribeTaskResponseBody,
552
- };
553
- }
411
+ if (!$dara.isNull(request.resourceOwnerIdsShrink)) {
412
+ query["ResourceOwnerIds"] = request.resourceOwnerIdsShrink;
413
+ }
554
414
 
555
- constructor(map?: { [key: string]: any }) {
556
- super(map);
415
+ let req = new $OpenApiUtil.OpenApiRequest({
416
+ headers: headers,
417
+ query: OpenApiUtil.query(query),
418
+ });
419
+ let params = new $OpenApiUtil.Params({
420
+ action: "DescribeProductDataRedundancyTypeStat",
421
+ version: "2023-08-08",
422
+ protocol: "HTTPS",
423
+ pathname: `/api/v1/products/data-redundancy-type-stat`,
424
+ method: "GET",
425
+ authType: "AK",
426
+ style: "ROA",
427
+ reqBodyType: "json",
428
+ bodyType: "json",
429
+ });
430
+ return $dara.cast<$_model.DescribeProductDataRedundancyTypeStatResponse>(await this.callApi(params, req, runtime), new $_model.DescribeProductDataRedundancyTypeStatResponse({}));
557
431
  }
558
- }
559
432
 
560
- export class DescribeTasksRequest extends $tea.Model {
561
- /**
562
- * @example
563
- * 10
564
- */
565
- maxResults?: number;
566
- /**
567
- * @example
568
- * cae**********699
569
- */
570
- nextToken?: string;
571
433
  /**
572
- * @example
573
- * RUNNING
434
+ * Queries statistics on data redundancy types for a cloud service.
435
+ *
436
+ * @param request - DescribeProductDataRedundancyTypeStatRequest
437
+ * @returns DescribeProductDataRedundancyTypeStatResponse
574
438
  */
575
- taskStatus?: string;
576
- static names(): { [key: string]: string } {
577
- return {
578
- maxResults: 'MaxResults',
579
- nextToken: 'NextToken',
580
- taskStatus: 'TaskStatus',
581
- };
582
- }
583
-
584
- static types(): { [key: string]: any } {
585
- return {
586
- maxResults: 'number',
587
- nextToken: 'string',
588
- taskStatus: 'string',
589
- };
590
- }
591
-
592
- constructor(map?: { [key: string]: any }) {
593
- super(map);
439
+ async describeProductDataRedundancyTypeStat(request: $_model.DescribeProductDataRedundancyTypeStatRequest): Promise<$_model.DescribeProductDataRedundancyTypeStatResponse> {
440
+ let runtime = new $dara.RuntimeOptions({ });
441
+ let headers : {[key: string ]: string} = { };
442
+ return await this.describeProductDataRedundancyTypeStatWithOptions(request, headers, runtime);
594
443
  }
595
- }
596
444
 
597
- export class DescribeTasksResponseBody extends $tea.Model {
598
- data?: DescribeTasksResponseBodyData;
599
445
  /**
600
- * @example
601
- * AE43C4CB-8074-5EBD-9806-8CA6D12800B1
446
+ * Queries the data protection score status for cloud products.
447
+ *
448
+ * @param tmpReq - DescribeProductsRequest
449
+ * @param headers - map
450
+ * @param runtime - runtime options for this request RuntimeOptions
451
+ * @returns DescribeProductsResponse
602
452
  */
603
- requestId?: string;
604
- static names(): { [key: string]: string } {
605
- return {
606
- data: 'Data',
607
- requestId: 'RequestId',
608
- };
609
- }
453
+ async describeProductsWithOptions(tmpReq: $_model.DescribeProductsRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeProductsResponse> {
454
+ tmpReq.validate();
455
+ let request = new $_model.DescribeProductsShrinkRequest({ });
456
+ OpenApiUtil.convert(tmpReq, request);
457
+ if (!$dara.isNull(tmpReq.resourceOwnerIds)) {
458
+ request.resourceOwnerIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourceOwnerIds, "ResourceOwnerIds", "json");
459
+ }
610
460
 
611
- static types(): { [key: string]: any } {
612
- return {
613
- data: DescribeTasksResponseBodyData,
614
- requestId: 'string',
615
- };
616
- }
461
+ let query : {[key: string ]: any} = { };
462
+ if (!$dara.isNull(request.productType)) {
463
+ query["ProductType"] = request.productType;
464
+ }
617
465
 
618
- constructor(map?: { [key: string]: any }) {
619
- super(map);
620
- }
621
- }
466
+ if (!$dara.isNull(request.resourceCategoryId)) {
467
+ query["ResourceCategoryId"] = request.resourceCategoryId;
468
+ }
622
469
 
623
- export class DescribeTasksResponse extends $tea.Model {
624
- headers?: { [key: string]: string };
625
- statusCode?: number;
626
- body?: DescribeTasksResponseBody;
627
- static names(): { [key: string]: string } {
628
- return {
629
- headers: 'headers',
630
- statusCode: 'statusCode',
631
- body: 'body',
632
- };
633
- }
470
+ if (!$dara.isNull(request.resourceOwnerIdsShrink)) {
471
+ query["ResourceOwnerIds"] = request.resourceOwnerIdsShrink;
472
+ }
634
473
 
635
- static types(): { [key: string]: any } {
636
- return {
637
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
638
- statusCode: 'number',
639
- body: DescribeTasksResponseBody,
640
- };
641
- }
474
+ if (!$dara.isNull(request.resourceRegionId)) {
475
+ query["ResourceRegionId"] = request.resourceRegionId;
476
+ }
642
477
 
643
- constructor(map?: { [key: string]: any }) {
644
- super(map);
478
+ let req = new $OpenApiUtil.OpenApiRequest({
479
+ headers: headers,
480
+ query: OpenApiUtil.query(query),
481
+ });
482
+ let params = new $OpenApiUtil.Params({
483
+ action: "DescribeProducts",
484
+ version: "2023-08-08",
485
+ protocol: "HTTPS",
486
+ pathname: `/api/v1/products`,
487
+ method: "GET",
488
+ authType: "AK",
489
+ style: "ROA",
490
+ reqBodyType: "json",
491
+ bodyType: "json",
492
+ });
493
+ return $dara.cast<$_model.DescribeProductsResponse>(await this.callApi(params, req, runtime), new $_model.DescribeProductsResponse({}));
645
494
  }
646
- }
647
495
 
648
- export class DescribeTopRiskyResourcesRequest extends $tea.Model {
649
496
  /**
650
- * @example
651
- * ACS::ECS::Instance
497
+ * Queries the data protection score status for cloud products.
498
+ *
499
+ * @param request - DescribeProductsRequest
500
+ * @returns DescribeProductsResponse
652
501
  */
653
- resourceType?: string;
654
- static names(): { [key: string]: string } {
655
- return {
656
- resourceType: 'ResourceType',
657
- };
658
- }
659
-
660
- static types(): { [key: string]: any } {
661
- return {
662
- resourceType: 'string',
663
- };
664
- }
665
-
666
- constructor(map?: { [key: string]: any }) {
667
- super(map);
502
+ async describeProducts(request: $_model.DescribeProductsRequest): Promise<$_model.DescribeProductsResponse> {
503
+ let runtime = new $dara.RuntimeOptions({ });
504
+ let headers : {[key: string ]: string} = { };
505
+ return await this.describeProductsWithOptions(request, headers, runtime);
668
506
  }
669
- }
670
507
 
671
- export class DescribeTopRiskyResourcesResponseBody extends $tea.Model {
672
- data?: DescribeTopRiskyResourcesResponseBodyData;
673
508
  /**
674
- * @example
675
- * 34081B20-C4C0-514F-93F6-8EEC3D1A587E
509
+ * Query resources
510
+ *
511
+ * @param tmpReq - DescribeResourcesRequest
512
+ * @param headers - map
513
+ * @param runtime - runtime options for this request RuntimeOptions
514
+ * @returns DescribeResourcesResponse
676
515
  */
677
- requestId?: string;
678
- static names(): { [key: string]: string } {
679
- return {
680
- data: 'Data',
681
- requestId: 'RequestId',
682
- };
683
- }
516
+ async describeResourcesWithOptions(tmpReq: $_model.DescribeResourcesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeResourcesResponse> {
517
+ tmpReq.validate();
518
+ let request = new $_model.DescribeResourcesShrinkRequest({ });
519
+ OpenApiUtil.convert(tmpReq, request);
520
+ if (!$dara.isNull(tmpReq.resourceOwnerIds)) {
521
+ request.resourceOwnerIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourceOwnerIds, "ResourceOwnerIds", "json");
522
+ }
684
523
 
685
- static types(): { [key: string]: any } {
686
- return {
687
- data: DescribeTopRiskyResourcesResponseBodyData,
688
- requestId: 'string',
689
- };
690
- }
524
+ let query : {[key: string ]: any} = { };
525
+ if (!$dara.isNull(request.dataRedundancyType)) {
526
+ query["DataRedundancyType"] = request.dataRedundancyType;
527
+ }
691
528
 
692
- constructor(map?: { [key: string]: any }) {
693
- super(map);
694
- }
695
- }
529
+ if (!$dara.isNull(request.failedRuleTemplate)) {
530
+ query["FailedRuleTemplate"] = request.failedRuleTemplate;
531
+ }
696
532
 
697
- export class DescribeTopRiskyResourcesResponse extends $tea.Model {
698
- headers?: { [key: string]: string };
699
- statusCode?: number;
700
- body?: DescribeTopRiskyResourcesResponseBody;
701
- static names(): { [key: string]: string } {
702
- return {
703
- headers: 'headers',
704
- statusCode: 'statusCode',
705
- body: 'body',
706
- };
707
- }
533
+ if (!$dara.isNull(request.maxResults)) {
534
+ query["MaxResults"] = request.maxResults;
535
+ }
708
536
 
709
- static types(): { [key: string]: any } {
710
- return {
711
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
712
- statusCode: 'number',
713
- body: DescribeTopRiskyResourcesResponseBody,
714
- };
715
- }
537
+ if (!$dara.isNull(request.nextToken)) {
538
+ query["NextToken"] = request.nextToken;
539
+ }
716
540
 
717
- constructor(map?: { [key: string]: any }) {
718
- super(map);
719
- }
720
- }
541
+ if (!$dara.isNull(request.resourceArn)) {
542
+ query["ResourceArn"] = request.resourceArn;
543
+ }
721
544
 
722
- export class DisableCheckProductRequest extends $tea.Model {
723
- /**
724
- * @remarks
725
- * This parameter is required.
726
- *
727
- * @example
728
- * ecs
729
- */
730
- productType?: string;
731
- static names(): { [key: string]: string } {
732
- return {
733
- productType: 'ProductType',
734
- };
735
- }
545
+ if (!$dara.isNull(request.resourceCategoryId)) {
546
+ query["ResourceCategoryId"] = request.resourceCategoryId;
547
+ }
736
548
 
737
- static types(): { [key: string]: any } {
738
- return {
739
- productType: 'string',
740
- };
741
- }
549
+ if (!$dara.isNull(request.resourceId)) {
550
+ query["ResourceId"] = request.resourceId;
551
+ }
742
552
 
743
- constructor(map?: { [key: string]: any }) {
744
- super(map);
745
- }
746
- }
553
+ if (!$dara.isNull(request.resourceOwnerIdsShrink)) {
554
+ query["ResourceOwnerIds"] = request.resourceOwnerIdsShrink;
555
+ }
747
556
 
748
- export class DisableCheckProductResponseBody extends $tea.Model {
749
- /**
750
- * @example
751
- * 89E3CBB7-16F3-52AE-BD32-31A43A2A807F
752
- */
753
- requestId?: string;
754
- static names(): { [key: string]: string } {
755
- return {
756
- requestId: 'RequestId',
757
- };
758
- }
557
+ if (!$dara.isNull(request.resourceRegionId)) {
558
+ query["ResourceRegionId"] = request.resourceRegionId;
559
+ }
759
560
 
760
- static types(): { [key: string]: any } {
761
- return {
762
- requestId: 'string',
763
- };
764
- }
561
+ if (!$dara.isNull(request.resourceType)) {
562
+ query["ResourceType"] = request.resourceType;
563
+ }
765
564
 
766
- constructor(map?: { [key: string]: any }) {
767
- super(map);
768
- }
769
- }
565
+ if (!$dara.isNull(request.sortBy)) {
566
+ query["SortBy"] = request.sortBy;
567
+ }
770
568
 
771
- export class DisableCheckProductResponse extends $tea.Model {
772
- headers?: { [key: string]: string };
773
- statusCode?: number;
774
- body?: DisableCheckProductResponseBody;
775
- static names(): { [key: string]: string } {
776
- return {
777
- headers: 'headers',
778
- statusCode: 'statusCode',
779
- body: 'body',
780
- };
781
- }
569
+ if (!$dara.isNull(request.sortOrder)) {
570
+ query["SortOrder"] = request.sortOrder;
571
+ }
782
572
 
783
- static types(): { [key: string]: any } {
784
- return {
785
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
786
- statusCode: 'number',
787
- body: DisableCheckProductResponseBody,
788
- };
789
- }
573
+ if (!$dara.isNull(request.storageClass)) {
574
+ query["StorageClass"] = request.storageClass;
575
+ }
790
576
 
791
- constructor(map?: { [key: string]: any }) {
792
- super(map);
577
+ let req = new $OpenApiUtil.OpenApiRequest({
578
+ headers: headers,
579
+ query: OpenApiUtil.query(query),
580
+ });
581
+ let params = new $OpenApiUtil.Params({
582
+ action: "DescribeResources",
583
+ version: "2023-08-08",
584
+ protocol: "HTTPS",
585
+ pathname: `/api/v1/resources`,
586
+ method: "GET",
587
+ authType: "AK",
588
+ style: "ROA",
589
+ reqBodyType: "json",
590
+ bodyType: "json",
591
+ });
592
+ return $dara.cast<$_model.DescribeResourcesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeResourcesResponse({}));
793
593
  }
794
- }
795
594
 
796
- export class DisableCheckResourceRequest extends $tea.Model {
797
595
  /**
798
- * @remarks
799
- * This parameter is required.
596
+ * Query resources
800
597
  *
801
- * @example
802
- * acs:ecs:123***890:cn-shanghai:instance/i-001***90
598
+ * @param request - DescribeResourcesRequest
599
+ * @returns DescribeResourcesResponse
803
600
  */
804
- resourceArn?: string;
805
- static names(): { [key: string]: string } {
806
- return {
807
- resourceArn: 'ResourceArn',
808
- };
809
- }
810
-
811
- static types(): { [key: string]: any } {
812
- return {
813
- resourceArn: 'string',
814
- };
815
- }
816
-
817
- constructor(map?: { [key: string]: any }) {
818
- super(map);
601
+ async describeResources(request: $_model.DescribeResourcesRequest): Promise<$_model.DescribeResourcesResponse> {
602
+ let runtime = new $dara.RuntimeOptions({ });
603
+ let headers : {[key: string ]: string} = { };
604
+ return await this.describeResourcesWithOptions(request, headers, runtime);
819
605
  }
820
- }
821
606
 
822
- export class DisableCheckResourceResponseBody extends $tea.Model {
823
607
  /**
824
- * @example
825
- * 86DEBAC9-AB6A-59AB-9E5C-A540E579ECC9
608
+ * Lists all data protection rules.
609
+ *
610
+ * @param tmpReq - DescribeRulesRequest
611
+ * @param headers - map
612
+ * @param runtime - runtime options for this request RuntimeOptions
613
+ * @returns DescribeRulesResponse
826
614
  */
827
- requestId?: string;
828
- static names(): { [key: string]: string } {
829
- return {
830
- requestId: 'RequestId',
831
- };
832
- }
833
-
834
- static types(): { [key: string]: any } {
835
- return {
836
- requestId: 'string',
837
- };
838
- }
839
-
840
- constructor(map?: { [key: string]: any }) {
841
- super(map);
842
- }
843
- }
615
+ async describeRulesWithOptions(tmpReq: $_model.DescribeRulesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeRulesResponse> {
616
+ tmpReq.validate();
617
+ let request = new $_model.DescribeRulesShrinkRequest({ });
618
+ OpenApiUtil.convert(tmpReq, request);
619
+ if (!$dara.isNull(tmpReq.resourceOwnerIds)) {
620
+ request.resourceOwnerIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourceOwnerIds, "ResourceOwnerIds", "json");
621
+ }
844
622
 
845
- export class DisableCheckResourceResponse extends $tea.Model {
846
- headers?: { [key: string]: string };
847
- statusCode?: number;
848
- body?: DisableCheckResourceResponseBody;
849
- static names(): { [key: string]: string } {
850
- return {
851
- headers: 'headers',
852
- statusCode: 'statusCode',
853
- body: 'body',
854
- };
855
- }
623
+ let query : {[key: string ]: any} = { };
624
+ if (!$dara.isNull(request.maxResults)) {
625
+ query["MaxResults"] = request.maxResults;
626
+ }
856
627
 
857
- static types(): { [key: string]: any } {
858
- return {
859
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
860
- statusCode: 'number',
861
- body: DisableCheckResourceResponseBody,
862
- };
863
- }
628
+ if (!$dara.isNull(request.nextToken)) {
629
+ query["NextToken"] = request.nextToken;
630
+ }
864
631
 
865
- constructor(map?: { [key: string]: any }) {
866
- super(map);
867
- }
868
- }
632
+ if (!$dara.isNull(request.resourceCategoryId)) {
633
+ query["ResourceCategoryId"] = request.resourceCategoryId;
634
+ }
869
635
 
870
- export class EnableCheckProductRequest extends $tea.Model {
871
- /**
872
- * @remarks
873
- * This parameter is required.
874
- *
875
- * @example
876
- * ecs
877
- */
878
- productType?: string;
879
- static names(): { [key: string]: string } {
880
- return {
881
- productType: 'ProductType',
882
- };
883
- }
636
+ if (!$dara.isNull(request.resourceOwnerIdsShrink)) {
637
+ query["ResourceOwnerIds"] = request.resourceOwnerIdsShrink;
638
+ }
884
639
 
885
- static types(): { [key: string]: any } {
886
- return {
887
- productType: 'string',
888
- };
889
- }
640
+ if (!$dara.isNull(request.resourceRegionId)) {
641
+ query["ResourceRegionId"] = request.resourceRegionId;
642
+ }
890
643
 
891
- constructor(map?: { [key: string]: any }) {
892
- super(map);
893
- }
894
- }
644
+ if (!$dara.isNull(request.resourceType)) {
645
+ query["ResourceType"] = request.resourceType;
646
+ }
647
+
648
+ let req = new $OpenApiUtil.OpenApiRequest({
649
+ headers: headers,
650
+ query: OpenApiUtil.query(query),
651
+ });
652
+ let params = new $OpenApiUtil.Params({
653
+ action: "DescribeRules",
654
+ version: "2023-08-08",
655
+ protocol: "HTTPS",
656
+ pathname: `/api/v1/rules`,
657
+ method: "GET",
658
+ authType: "AK",
659
+ style: "ROA",
660
+ reqBodyType: "json",
661
+ bodyType: "json",
662
+ });
663
+ return $dara.cast<$_model.DescribeRulesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeRulesResponse({}));
664
+ }
895
665
 
896
- export class EnableCheckProductResponseBody extends $tea.Model {
897
- /**
898
- * @example
899
- * 8724BC18-904D-5A0D-BFF4-F0554F0037E7
900
- */
901
- requestId?: string;
902
- static names(): { [key: string]: string } {
903
- return {
904
- requestId: 'RequestId',
905
- };
906
- }
907
-
908
- static types(): { [key: string]: any } {
909
- return {
910
- requestId: 'string',
911
- };
912
- }
913
-
914
- constructor(map?: { [key: string]: any }) {
915
- super(map);
916
- }
917
- }
918
-
919
- export class EnableCheckProductResponse extends $tea.Model {
920
- headers?: { [key: string]: string };
921
- statusCode?: number;
922
- body?: EnableCheckProductResponseBody;
923
- static names(): { [key: string]: string } {
924
- return {
925
- headers: 'headers',
926
- statusCode: 'statusCode',
927
- body: 'body',
928
- };
929
- }
930
-
931
- static types(): { [key: string]: any } {
932
- return {
933
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
934
- statusCode: 'number',
935
- body: EnableCheckProductResponseBody,
936
- };
937
- }
938
-
939
- constructor(map?: { [key: string]: any }) {
940
- super(map);
941
- }
942
- }
943
-
944
- export class EnableCheckResourceRequest extends $tea.Model {
945
- /**
946
- * @remarks
947
- * This parameter is required.
948
- *
949
- * @example
950
- * acs:ecs:123***890:cn-shanghai:instance/i-001***90
951
- */
952
- resourceArn?: string;
953
- static names(): { [key: string]: string } {
954
- return {
955
- resourceArn: 'ResourceArn',
956
- };
957
- }
958
-
959
- static types(): { [key: string]: any } {
960
- return {
961
- resourceArn: 'string',
962
- };
963
- }
964
-
965
- constructor(map?: { [key: string]: any }) {
966
- super(map);
967
- }
968
- }
969
-
970
- export class EnableCheckResourceResponseBody extends $tea.Model {
971
- /**
972
- * @example
973
- * E583A0FF-803C-51C4-9AC9-E029471ACD6A
974
- */
975
- requestId?: string;
976
- static names(): { [key: string]: string } {
977
- return {
978
- requestId: 'RequestId',
979
- };
980
- }
981
-
982
- static types(): { [key: string]: any } {
983
- return {
984
- requestId: 'string',
985
- };
986
- }
987
-
988
- constructor(map?: { [key: string]: any }) {
989
- super(map);
990
- }
991
- }
992
-
993
- export class EnableCheckResourceResponse extends $tea.Model {
994
- headers?: { [key: string]: string };
995
- statusCode?: number;
996
- body?: EnableCheckResourceResponseBody;
997
- static names(): { [key: string]: string } {
998
- return {
999
- headers: 'headers',
1000
- statusCode: 'statusCode',
1001
- body: 'body',
1002
- };
1003
- }
1004
-
1005
- static types(): { [key: string]: any } {
1006
- return {
1007
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
1008
- statusCode: 'number',
1009
- body: EnableCheckResourceResponseBody,
1010
- };
1011
- }
1012
-
1013
- constructor(map?: { [key: string]: any }) {
1014
- super(map);
1015
- }
1016
- }
1017
-
1018
- export class GetBdrcServiceResponseBody extends $tea.Model {
1019
- data?: GetBdrcServiceResponseBodyData;
1020
- /**
1021
- * @example
1022
- * 5748C531-80B1-5C31-8421-63A1830B9E48
1023
- */
1024
- requestId?: string;
1025
- static names(): { [key: string]: string } {
1026
- return {
1027
- data: 'Data',
1028
- requestId: 'RequestId',
1029
- };
1030
- }
1031
-
1032
- static types(): { [key: string]: any } {
1033
- return {
1034
- data: GetBdrcServiceResponseBodyData,
1035
- requestId: 'string',
1036
- };
1037
- }
1038
-
1039
- constructor(map?: { [key: string]: any }) {
1040
- super(map);
1041
- }
1042
- }
1043
-
1044
- export class GetBdrcServiceResponse extends $tea.Model {
1045
- headers?: { [key: string]: string };
1046
- statusCode?: number;
1047
- body?: GetBdrcServiceResponseBody;
1048
- static names(): { [key: string]: string } {
1049
- return {
1050
- headers: 'headers',
1051
- statusCode: 'statusCode',
1052
- body: 'body',
1053
- };
1054
- }
1055
-
1056
- static types(): { [key: string]: any } {
1057
- return {
1058
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
1059
- statusCode: 'number',
1060
- body: GetBdrcServiceResponseBody,
1061
- };
1062
- }
1063
-
1064
- constructor(map?: { [key: string]: any }) {
1065
- super(map);
1066
- }
1067
- }
1068
-
1069
- export class OpenBdrcServiceResponseBody extends $tea.Model {
1070
- /**
1071
- * @example
1072
- * 86DEBAC9-AB6A-59AB-9E5C-A540E579ECC9
1073
- */
1074
- requestId?: string;
1075
- static names(): { [key: string]: string } {
1076
- return {
1077
- requestId: 'RequestId',
1078
- };
1079
- }
1080
-
1081
- static types(): { [key: string]: any } {
1082
- return {
1083
- requestId: 'string',
1084
- };
1085
- }
1086
-
1087
- constructor(map?: { [key: string]: any }) {
1088
- super(map);
1089
- }
1090
- }
1091
-
1092
- export class OpenBdrcServiceResponse extends $tea.Model {
1093
- headers?: { [key: string]: string };
1094
- statusCode?: number;
1095
- body?: OpenBdrcServiceResponseBody;
1096
- static names(): { [key: string]: string } {
1097
- return {
1098
- headers: 'headers',
1099
- statusCode: 'statusCode',
1100
- body: 'body',
1101
- };
1102
- }
1103
-
1104
- static types(): { [key: string]: any } {
1105
- return {
1106
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
1107
- statusCode: 'number',
1108
- body: OpenBdrcServiceResponseBody,
1109
- };
1110
- }
1111
-
1112
- constructor(map?: { [key: string]: any }) {
1113
- super(map);
1114
- }
1115
- }
1116
-
1117
- export class UpdateResourcesRequest extends $tea.Model {
1118
- /**
1119
- * @example
1120
- * ACS::ECS::Instance
1121
- */
1122
- resourceType?: string;
1123
- static names(): { [key: string]: string } {
1124
- return {
1125
- resourceType: 'ResourceType',
1126
- };
1127
- }
1128
-
1129
- static types(): { [key: string]: any } {
1130
- return {
1131
- resourceType: 'string',
1132
- };
1133
- }
1134
-
1135
- constructor(map?: { [key: string]: any }) {
1136
- super(map);
1137
- }
1138
- }
1139
-
1140
- export class UpdateResourcesResponseBody extends $tea.Model {
1141
- data?: UpdateResourcesResponseBodyData;
1142
- /**
1143
- * @example
1144
- * 5B2F09BF-CEBD-5A7E-AC01-E7F86169A5E5
1145
- */
1146
- requestId?: string;
1147
- static names(): { [key: string]: string } {
1148
- return {
1149
- data: 'Data',
1150
- requestId: 'RequestId',
1151
- };
1152
- }
1153
-
1154
- static types(): { [key: string]: any } {
1155
- return {
1156
- data: UpdateResourcesResponseBodyData,
1157
- requestId: 'string',
1158
- };
1159
- }
1160
-
1161
- constructor(map?: { [key: string]: any }) {
1162
- super(map);
1163
- }
1164
- }
1165
-
1166
- export class UpdateResourcesResponse extends $tea.Model {
1167
- headers?: { [key: string]: string };
1168
- statusCode?: number;
1169
- body?: UpdateResourcesResponseBody;
1170
- static names(): { [key: string]: string } {
1171
- return {
1172
- headers: 'headers',
1173
- statusCode: 'statusCode',
1174
- body: 'body',
1175
- };
1176
- }
1177
-
1178
- static types(): { [key: string]: any } {
1179
- return {
1180
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
1181
- statusCode: 'number',
1182
- body: UpdateResourcesResponseBody,
1183
- };
1184
- }
1185
-
1186
- constructor(map?: { [key: string]: any }) {
1187
- super(map);
1188
- }
1189
- }
1190
-
1191
- export class CheckRulesResponseBodyData extends $tea.Model {
1192
- /**
1193
- * @example
1194
- * t-0000e4w0u1v592zdf6s7
1195
- */
1196
- taskId?: string;
1197
- static names(): { [key: string]: string } {
1198
- return {
1199
- taskId: 'TaskId',
1200
- };
1201
- }
1202
-
1203
- static types(): { [key: string]: any } {
1204
- return {
1205
- taskId: 'string',
1206
- };
1207
- }
1208
-
1209
- constructor(map?: { [key: string]: any }) {
1210
- super(map);
1211
- }
1212
- }
1213
-
1214
- export class DescribeCheckDetailsResponseBodyDataContent extends $tea.Model {
1215
- /**
1216
- * @example
1217
- * PASSED
1218
- */
1219
- checkStatus?: string;
1220
- /**
1221
- * @example
1222
- * 1701725715
1223
- */
1224
- checkTime?: number;
1225
- /**
1226
- * @example
1227
- * {"ecsAutoSnapshotPolicyIds":[],"hbrBackupPlans":[{"planId":"po-xxxxxxxx","sourceType":"UDM_ECS"}]}
1228
- */
1229
- detail?: string;
1230
- /**
1231
- * @example
1232
- * ecs
1233
- */
1234
- productType?: string;
1235
- /**
1236
- * @example
1237
- * acs:ecs:123***890:cn-shanghai:instance/i-001***90
1238
- */
1239
- resourceArn?: string;
1240
- /**
1241
- * @example
1242
- * i-xxxxxxxx
1243
- */
1244
- resourceId?: string;
1245
- /**
1246
- * @example
1247
- * test server
1248
- */
1249
- resourceName?: string;
1250
- /**
1251
- * @example
1252
- * ACS::ECS::Instance
1253
- */
1254
- resourceType?: string;
1255
- /**
1256
- * @example
1257
- * rule-xxxxxxxx
1258
- */
1259
- ruleId?: string;
1260
- /**
1261
- * @example
1262
- * ecs-backup
1263
- */
1264
- ruleTemplate?: string;
1265
- static names(): { [key: string]: string } {
1266
- return {
1267
- checkStatus: 'CheckStatus',
1268
- checkTime: 'CheckTime',
1269
- detail: 'Detail',
1270
- productType: 'ProductType',
1271
- resourceArn: 'ResourceArn',
1272
- resourceId: 'ResourceId',
1273
- resourceName: 'ResourceName',
1274
- resourceType: 'ResourceType',
1275
- ruleId: 'RuleId',
1276
- ruleTemplate: 'RuleTemplate',
1277
- };
1278
- }
1279
-
1280
- static types(): { [key: string]: any } {
1281
- return {
1282
- checkStatus: 'string',
1283
- checkTime: 'number',
1284
- detail: 'string',
1285
- productType: 'string',
1286
- resourceArn: 'string',
1287
- resourceId: 'string',
1288
- resourceName: 'string',
1289
- resourceType: 'string',
1290
- ruleId: 'string',
1291
- ruleTemplate: 'string',
1292
- };
1293
- }
1294
-
1295
- constructor(map?: { [key: string]: any }) {
1296
- super(map);
1297
- }
1298
- }
1299
-
1300
- export class DescribeCheckDetailsResponseBodyData extends $tea.Model {
1301
- content?: DescribeCheckDetailsResponseBodyDataContent[];
1302
- /**
1303
- * @example
1304
- * 10
1305
- */
1306
- maxResults?: number;
1307
- /**
1308
- * @example
1309
- * CAESGgoSChAKDGNvbXBsZXRlVGltZRABCgQiAggAGAAiQAoJAOTzWWYAAAAACjMDLgAAADFTNzMyZDMwMzAzMDM4NzA3NTcwMzY2MjMwNzY2ODcyMzAzMTY2Nzg3ODY5MzY=
1310
- */
1311
- nextToken?: string;
1312
- /**
1313
- * @example
1314
- * 100
1315
- */
1316
- totalCount?: number;
1317
- static names(): { [key: string]: string } {
1318
- return {
1319
- content: 'Content',
1320
- maxResults: 'MaxResults',
1321
- nextToken: 'NextToken',
1322
- totalCount: 'TotalCount',
1323
- };
1324
- }
1325
-
1326
- static types(): { [key: string]: any } {
1327
- return {
1328
- content: { 'type': 'array', 'itemType': DescribeCheckDetailsResponseBodyDataContent },
1329
- maxResults: 'number',
1330
- nextToken: 'string',
1331
- totalCount: 'number',
1332
- };
1333
- }
1334
-
1335
- constructor(map?: { [key: string]: any }) {
1336
- super(map);
1337
- }
1338
- }
1339
-
1340
- export class DescribeProductsResponseBodyDataContentProtectionScoreDistributionRange extends $tea.Model {
1341
- /**
1342
- * @example
1343
- * 0
1344
- */
1345
- from?: number;
1346
- /**
1347
- * @example
1348
- * 60
1349
- */
1350
- to?: number;
1351
- static names(): { [key: string]: string } {
1352
- return {
1353
- from: 'From',
1354
- to: 'To',
1355
- };
1356
- }
1357
-
1358
- static types(): { [key: string]: any } {
1359
- return {
1360
- from: 'number',
1361
- to: 'number',
1362
- };
1363
- }
1364
-
1365
- constructor(map?: { [key: string]: any }) {
1366
- super(map);
1367
- }
1368
- }
1369
-
1370
- export class DescribeProductsResponseBodyDataContentProtectionScoreDistribution extends $tea.Model {
1371
- /**
1372
- * @example
1373
- * 5
1374
- */
1375
- count?: number;
1376
- range?: DescribeProductsResponseBodyDataContentProtectionScoreDistributionRange;
1377
- static names(): { [key: string]: string } {
1378
- return {
1379
- count: 'Count',
1380
- range: 'Range',
1381
- };
1382
- }
1383
-
1384
- static types(): { [key: string]: any } {
1385
- return {
1386
- count: 'number',
1387
- range: DescribeProductsResponseBodyDataContentProtectionScoreDistributionRange,
1388
- };
1389
- }
1390
-
1391
- constructor(map?: { [key: string]: any }) {
1392
- super(map);
1393
- }
1394
- }
1395
-
1396
- export class DescribeProductsResponseBodyDataContent extends $tea.Model {
1397
- /**
1398
- * @example
1399
- * 1
1400
- */
1401
- checkFailedCount?: number;
1402
- /**
1403
- * @example
1404
- * 1
1405
- */
1406
- checkFailedResourceCount?: number;
1407
- /**
1408
- * @example
1409
- * 1
1410
- */
1411
- disableCheckResourceCount?: number;
1412
- /**
1413
- * @example
1414
- * true
1415
- */
1416
- enableCheck?: boolean;
1417
- /**
1418
- * @example
1419
- * oss
1420
- */
1421
- productType?: string;
1422
- /**
1423
- * @example
1424
- * 90
1425
- */
1426
- protectionScore?: number;
1427
- protectionScoreDistribution?: DescribeProductsResponseBodyDataContentProtectionScoreDistribution[];
1428
- /**
1429
- * @example
1430
- * 1726036498
1431
- */
1432
- protectionScoreUpdatedTime?: number;
1433
- /**
1434
- * @example
1435
- * 1
1436
- */
1437
- riskCount?: number;
1438
- /**
1439
- * @example
1440
- * 1
1441
- */
1442
- riskyResourceCount?: number;
1443
- /**
1444
- * @example
1445
- * 100
1446
- */
1447
- totalResourceCount?: number;
1448
- static names(): { [key: string]: string } {
1449
- return {
1450
- checkFailedCount: 'CheckFailedCount',
1451
- checkFailedResourceCount: 'CheckFailedResourceCount',
1452
- disableCheckResourceCount: 'DisableCheckResourceCount',
1453
- enableCheck: 'EnableCheck',
1454
- productType: 'ProductType',
1455
- protectionScore: 'ProtectionScore',
1456
- protectionScoreDistribution: 'ProtectionScoreDistribution',
1457
- protectionScoreUpdatedTime: 'ProtectionScoreUpdatedTime',
1458
- riskCount: 'RiskCount',
1459
- riskyResourceCount: 'RiskyResourceCount',
1460
- totalResourceCount: 'TotalResourceCount',
1461
- };
1462
- }
1463
-
1464
- static types(): { [key: string]: any } {
1465
- return {
1466
- checkFailedCount: 'number',
1467
- checkFailedResourceCount: 'number',
1468
- disableCheckResourceCount: 'number',
1469
- enableCheck: 'boolean',
1470
- productType: 'string',
1471
- protectionScore: 'number',
1472
- protectionScoreDistribution: { 'type': 'array', 'itemType': DescribeProductsResponseBodyDataContentProtectionScoreDistribution },
1473
- protectionScoreUpdatedTime: 'number',
1474
- riskCount: 'number',
1475
- riskyResourceCount: 'number',
1476
- totalResourceCount: 'number',
1477
- };
1478
- }
1479
-
1480
- constructor(map?: { [key: string]: any }) {
1481
- super(map);
1482
- }
1483
- }
1484
-
1485
- export class DescribeProductsResponseBodyData extends $tea.Model {
1486
- content?: DescribeProductsResponseBodyDataContent[];
1487
- /**
1488
- * @example
1489
- * 10
1490
- */
1491
- maxResults?: number;
1492
- /**
1493
- * @example
1494
- * b4fd3cffcacafd65e3818a0b9b2ff9a2
1495
- */
1496
- nextToken?: string;
1497
- /**
1498
- * @example
1499
- * 50
1500
- */
1501
- totalCount?: number;
1502
- static names(): { [key: string]: string } {
1503
- return {
1504
- content: 'Content',
1505
- maxResults: 'MaxResults',
1506
- nextToken: 'NextToken',
1507
- totalCount: 'TotalCount',
1508
- };
1509
- }
1510
-
1511
- static types(): { [key: string]: any } {
1512
- return {
1513
- content: { 'type': 'array', 'itemType': DescribeProductsResponseBodyDataContent },
1514
- maxResults: 'number',
1515
- nextToken: 'string',
1516
- totalCount: 'number',
1517
- };
1518
- }
1519
-
1520
- constructor(map?: { [key: string]: any }) {
1521
- super(map);
1522
- }
1523
- }
1524
-
1525
- export class DescribeResourcesResponseBodyDataContent extends $tea.Model {
1526
- /**
1527
- * @example
1528
- * 0
1529
- */
1530
- archiveDataSize?: number;
1531
- /**
1532
- * @example
1533
- * 0
1534
- */
1535
- checkFailedCount?: number;
1536
- /**
1537
- * @example
1538
- * 0
1539
- */
1540
- coldArchiveDataSize?: number;
1541
- /**
1542
- * @example
1543
- * 1697798340
1544
- */
1545
- createTime?: number;
1546
- dataRedundancyType?: string;
1547
- /**
1548
- * @example
1549
- * 0
1550
- */
1551
- enableCheck?: boolean;
1552
- /**
1553
- * @example
1554
- * 0
1555
- */
1556
- iaDataSize?: number;
1557
- /**
1558
- * @example
1559
- * ecs
1560
- */
1561
- productType?: string;
1562
- /**
1563
- * @example
1564
- * 0
1565
- */
1566
- protectionScore?: number;
1567
- /**
1568
- * @example
1569
- * 0
1570
- */
1571
- protectionScoreUpdatedTime?: number;
1572
- /**
1573
- * @example
1574
- * cn-hangzhou
1575
- */
1576
- regionId?: string;
1577
- /**
1578
- * @example
1579
- * acs:ecs:cn-hangzhou:xxxxxxxx:instance/xxxxx
1580
- */
1581
- resourceArn?: string;
1582
- /**
1583
- * @example
1584
- * i-xxxxxxxx
1585
- */
1586
- resourceId?: string;
1587
- /**
1588
- * @example
1589
- * test server
1590
- */
1591
- resourceName?: string;
1592
- /**
1593
- * @example
1594
- * ACS::ECS::Instance
1595
- */
1596
- resourceType?: string;
1597
- /**
1598
- * @example
1599
- * 0
1600
- */
1601
- riskCount?: number;
1602
- /**
1603
- * @example
1604
- * 0
1605
- */
1606
- standardDataSize?: number;
1607
- /**
1608
- * @example
1609
- * Running
1610
- */
1611
- status?: string;
1612
- storageClass?: string;
1613
- /**
1614
- * @example
1615
- * 0
1616
- */
1617
- totalDataSize?: number;
1618
- /**
1619
- * @remarks
1620
- * vSwitch ID
1621
- *
1622
- * @example
1623
- * vsw-xxxxxxxx
1624
- */
1625
- vSwitchId?: string;
1626
- /**
1627
- * @remarks
1628
- * vpc ID
1629
- *
1630
- * @example
1631
- * vpc-xxxxxxxx
1632
- */
1633
- vpcId?: string;
1634
- /**
1635
- * @example
1636
- * cn-hangzhou-i
1637
- */
1638
- zoneId?: string;
1639
- static names(): { [key: string]: string } {
1640
- return {
1641
- archiveDataSize: 'ArchiveDataSize',
1642
- checkFailedCount: 'CheckFailedCount',
1643
- coldArchiveDataSize: 'ColdArchiveDataSize',
1644
- createTime: 'CreateTime',
1645
- dataRedundancyType: 'DataRedundancyType',
1646
- enableCheck: 'EnableCheck',
1647
- iaDataSize: 'IaDataSize',
1648
- productType: 'ProductType',
1649
- protectionScore: 'ProtectionScore',
1650
- protectionScoreUpdatedTime: 'ProtectionScoreUpdatedTime',
1651
- regionId: 'RegionId',
1652
- resourceArn: 'ResourceArn',
1653
- resourceId: 'ResourceId',
1654
- resourceName: 'ResourceName',
1655
- resourceType: 'ResourceType',
1656
- riskCount: 'RiskCount',
1657
- standardDataSize: 'StandardDataSize',
1658
- status: 'Status',
1659
- storageClass: 'StorageClass',
1660
- totalDataSize: 'TotalDataSize',
1661
- vSwitchId: 'VSwitchId',
1662
- vpcId: 'VpcId',
1663
- zoneId: 'ZoneId',
1664
- };
1665
- }
1666
-
1667
- static types(): { [key: string]: any } {
1668
- return {
1669
- archiveDataSize: 'number',
1670
- checkFailedCount: 'number',
1671
- coldArchiveDataSize: 'number',
1672
- createTime: 'number',
1673
- dataRedundancyType: 'string',
1674
- enableCheck: 'boolean',
1675
- iaDataSize: 'number',
1676
- productType: 'string',
1677
- protectionScore: 'number',
1678
- protectionScoreUpdatedTime: 'number',
1679
- regionId: 'string',
1680
- resourceArn: 'string',
1681
- resourceId: 'string',
1682
- resourceName: 'string',
1683
- resourceType: 'string',
1684
- riskCount: 'number',
1685
- standardDataSize: 'number',
1686
- status: 'string',
1687
- storageClass: 'string',
1688
- totalDataSize: 'number',
1689
- vSwitchId: 'string',
1690
- vpcId: 'string',
1691
- zoneId: 'string',
1692
- };
1693
- }
1694
-
1695
- constructor(map?: { [key: string]: any }) {
1696
- super(map);
1697
- }
1698
- }
1699
-
1700
- export class DescribeResourcesResponseBodyData extends $tea.Model {
1701
- content?: DescribeResourcesResponseBodyDataContent[];
1702
- /**
1703
- * @example
1704
- * 100
1705
- */
1706
- maxResults?: number;
1707
- /**
1708
- * @example
1709
- * fb836242f4225fa0f0e0257362dfc6dd
1710
- */
1711
- nextToken?: string;
1712
- /**
1713
- * @example
1714
- * 149
1715
- */
1716
- totalCount?: number;
1717
- static names(): { [key: string]: string } {
1718
- return {
1719
- content: 'Content',
1720
- maxResults: 'MaxResults',
1721
- nextToken: 'NextToken',
1722
- totalCount: 'TotalCount',
1723
- };
1724
- }
1725
-
1726
- static types(): { [key: string]: any } {
1727
- return {
1728
- content: { 'type': 'array', 'itemType': DescribeResourcesResponseBodyDataContent },
1729
- maxResults: 'number',
1730
- nextToken: 'string',
1731
- totalCount: 'number',
1732
- };
1733
- }
1734
-
1735
- constructor(map?: { [key: string]: any }) {
1736
- super(map);
1737
- }
1738
- }
1739
-
1740
- export class DescribeRulesResponseBodyDataContent extends $tea.Model {
1741
- /**
1742
- * @example
1743
- * 0
1744
- */
1745
- checkFailedResourceCount?: number;
1746
- /**
1747
- * @example
1748
- * PASSED
1749
- */
1750
- checkStatus?: string;
1751
- /**
1752
- * @example
1753
- * 1704157635
1754
- */
1755
- checkTime?: number;
1756
- /**
1757
- * @example
1758
- * ecs
1759
- */
1760
- productType?: string;
1761
- /**
1762
- * @example
1763
- * ACS::ECS::Instance
1764
- */
1765
- resourceType?: string;
1766
- /**
1767
- * @example
1768
- * 0
1769
- */
1770
- riskyResourceCount?: number;
1771
- /**
1772
- * @example
1773
- * rule-bp11ggd8wr762
1774
- */
1775
- ruleId?: string;
1776
- /**
1777
- * @example
1778
- * ecs-backup
1779
- */
1780
- ruleTemplate?: string;
1781
- /**
1782
- * @example
1783
- * 1
1784
- */
1785
- totalResourceCount?: number;
1786
- static names(): { [key: string]: string } {
1787
- return {
1788
- checkFailedResourceCount: 'CheckFailedResourceCount',
1789
- checkStatus: 'CheckStatus',
1790
- checkTime: 'CheckTime',
1791
- productType: 'ProductType',
1792
- resourceType: 'ResourceType',
1793
- riskyResourceCount: 'RiskyResourceCount',
1794
- ruleId: 'RuleId',
1795
- ruleTemplate: 'RuleTemplate',
1796
- totalResourceCount: 'TotalResourceCount',
1797
- };
1798
- }
1799
-
1800
- static types(): { [key: string]: any } {
1801
- return {
1802
- checkFailedResourceCount: 'number',
1803
- checkStatus: 'string',
1804
- checkTime: 'number',
1805
- productType: 'string',
1806
- resourceType: 'string',
1807
- riskyResourceCount: 'number',
1808
- ruleId: 'string',
1809
- ruleTemplate: 'string',
1810
- totalResourceCount: 'number',
1811
- };
1812
- }
1813
-
1814
- constructor(map?: { [key: string]: any }) {
1815
- super(map);
1816
- }
1817
- }
1818
-
1819
- export class DescribeRulesResponseBodyData extends $tea.Model {
1820
- content?: DescribeRulesResponseBodyDataContent[];
1821
- /**
1822
- * @example
1823
- * 10
1824
- */
1825
- maxResults?: number;
1826
- /**
1827
- * @example
1828
- * 0975951c75d7b41464c8d08ae17043ca
1829
- */
1830
- nextToken?: string;
1831
- /**
1832
- * @example
1833
- * 42
1834
- */
1835
- totalCount?: number;
1836
- static names(): { [key: string]: string } {
1837
- return {
1838
- content: 'Content',
1839
- maxResults: 'MaxResults',
1840
- nextToken: 'NextToken',
1841
- totalCount: 'TotalCount',
1842
- };
1843
- }
1844
-
1845
- static types(): { [key: string]: any } {
1846
- return {
1847
- content: { 'type': 'array', 'itemType': DescribeRulesResponseBodyDataContent },
1848
- maxResults: 'number',
1849
- nextToken: 'string',
1850
- totalCount: 'number',
1851
- };
1852
- }
1853
-
1854
- constructor(map?: { [key: string]: any }) {
1855
- super(map);
1856
- }
1857
- }
1858
-
1859
- export class DescribeTaskResponseBodyData extends $tea.Model {
1860
- /**
1861
- * @example
1862
- * 1724983927
1863
- */
1864
- completeTime?: number;
1865
- /**
1866
- * @example
1867
- * too many requests.
1868
- */
1869
- errorMessage?: string;
1870
- executionId?: string;
1871
- /**
1872
- * @example
1873
- * 1719026680
1874
- */
1875
- expireTime?: number;
1876
- /**
1877
- * @example
1878
- * 100
1879
- */
1880
- progress?: number;
1881
- /**
1882
- * @example
1883
- * 784076D6-BD6D-5564-9CEA-834EB11F0C62
1884
- */
1885
- requestId?: string;
1886
- /**
1887
- * @example
1888
- * 1724983927
1889
- */
1890
- startTime?: number;
1891
- taskDescription?: string;
1892
- /**
1893
- * @example
1894
- * {"resourceTypes":["ACS::ECS::Instance","ACS::OSS::Bucket","ACS::OTS::Instance","ACS::NAS::FileSystem"]}
1895
- */
1896
- taskDetail?: string;
1897
- /**
1898
- * @example
1899
- * t-xxxxxxxx
1900
- */
1901
- taskId?: string;
1902
- /**
1903
- * @example
1904
- * test5566
1905
- */
1906
- taskName?: string;
1907
- taskPriority?: string;
1908
- /**
1909
- * @example
1910
- * RUNNING
1911
- */
1912
- taskStatus?: string;
1913
- /**
1914
- * @example
1915
- * UPDATE_RESOURCES
1916
- */
1917
- taskType?: string;
1918
- static names(): { [key: string]: string } {
1919
- return {
1920
- completeTime: 'CompleteTime',
1921
- errorMessage: 'ErrorMessage',
1922
- executionId: 'ExecutionId',
1923
- expireTime: 'ExpireTime',
1924
- progress: 'Progress',
1925
- requestId: 'RequestId',
1926
- startTime: 'StartTime',
1927
- taskDescription: 'TaskDescription',
1928
- taskDetail: 'TaskDetail',
1929
- taskId: 'TaskId',
1930
- taskName: 'TaskName',
1931
- taskPriority: 'TaskPriority',
1932
- taskStatus: 'TaskStatus',
1933
- taskType: 'TaskType',
1934
- };
1935
- }
1936
-
1937
- static types(): { [key: string]: any } {
1938
- return {
1939
- completeTime: 'number',
1940
- errorMessage: 'string',
1941
- executionId: 'string',
1942
- expireTime: 'number',
1943
- progress: 'number',
1944
- requestId: 'string',
1945
- startTime: 'number',
1946
- taskDescription: 'string',
1947
- taskDetail: 'string',
1948
- taskId: 'string',
1949
- taskName: 'string',
1950
- taskPriority: 'string',
1951
- taskStatus: 'string',
1952
- taskType: 'string',
1953
- };
1954
- }
1955
-
1956
- constructor(map?: { [key: string]: any }) {
1957
- super(map);
1958
- }
1959
- }
1960
-
1961
- export class DescribeTasksResponseBodyDataContent extends $tea.Model {
1962
- /**
1963
- * @example
1964
- * 1724983927
1965
- */
1966
- completeTime?: number;
1967
- /**
1968
- * @example
1969
- * device not online
1970
- */
1971
- errorMessage?: string;
1972
- /**
1973
- * @example
1974
- * empty
1975
- */
1976
- executionId?: string;
1977
- /**
1978
- * @example
1979
- * 1724983927
1980
- */
1981
- expireTime?: number;
1982
- /**
1983
- * @example
1984
- * 100
1985
- */
1986
- progress?: number;
1987
- /**
1988
- * @example
1989
- * AE43C4CB-8074-5EBD-9806-8CA6D12800B1
1990
- */
1991
- requestId?: string;
1992
- /**
1993
- * @example
1994
- * 1724983927
1995
- */
1996
- startTime?: number;
1997
- /**
1998
- * @example
1999
- * empty
2000
- */
2001
- taskDescription?: string;
2002
- /**
2003
- * @example
2004
- * {"resourceTypes":["ACS::ECS::Instance","ACS::OSS::Bucket","ACS::OTS::Instance","ACS::NAS::FileSystem"]}
2005
- */
2006
- taskDetail?: string;
2007
- /**
2008
- * @example
2009
- * t-0000e4w0u1v592zdf6s7
2010
- */
2011
- taskId?: string;
2012
- /**
2013
- * @example
2014
- * empty
2015
- */
2016
- taskName?: string;
2017
- /**
2018
- * @example
2019
- * HIGH
2020
- */
2021
- taskPriority?: string;
2022
- /**
2023
- * @example
2024
- * RUNNING
2025
- */
2026
- taskStatus?: string;
2027
- /**
2028
- * @example
2029
- * UPDATE_RESOURCES
2030
- */
2031
- taskType?: string;
2032
- static names(): { [key: string]: string } {
2033
- return {
2034
- completeTime: 'CompleteTime',
2035
- errorMessage: 'ErrorMessage',
2036
- executionId: 'ExecutionId',
2037
- expireTime: 'ExpireTime',
2038
- progress: 'Progress',
2039
- requestId: 'RequestId',
2040
- startTime: 'StartTime',
2041
- taskDescription: 'TaskDescription',
2042
- taskDetail: 'TaskDetail',
2043
- taskId: 'TaskId',
2044
- taskName: 'TaskName',
2045
- taskPriority: 'TaskPriority',
2046
- taskStatus: 'TaskStatus',
2047
- taskType: 'TaskType',
2048
- };
2049
- }
2050
-
2051
- static types(): { [key: string]: any } {
2052
- return {
2053
- completeTime: 'number',
2054
- errorMessage: 'string',
2055
- executionId: 'string',
2056
- expireTime: 'number',
2057
- progress: 'number',
2058
- requestId: 'string',
2059
- startTime: 'number',
2060
- taskDescription: 'string',
2061
- taskDetail: 'string',
2062
- taskId: 'string',
2063
- taskName: 'string',
2064
- taskPriority: 'string',
2065
- taskStatus: 'string',
2066
- taskType: 'string',
2067
- };
2068
- }
2069
-
2070
- constructor(map?: { [key: string]: any }) {
2071
- super(map);
2072
- }
2073
- }
2074
-
2075
- export class DescribeTasksResponseBodyData extends $tea.Model {
2076
- content?: DescribeTasksResponseBodyDataContent[];
2077
- /**
2078
- * @example
2079
- * 10
2080
- */
2081
- maxResults?: number;
2082
- /**
2083
- * @example
2084
- * f4b8c2504545a3b41af5e75147d17d12e3818a0b9b2ff9a2
2085
- */
2086
- nextToken?: string;
2087
- /**
2088
- * @example
2089
- * 100
2090
- */
2091
- totalCount?: number;
2092
- static names(): { [key: string]: string } {
2093
- return {
2094
- content: 'Content',
2095
- maxResults: 'MaxResults',
2096
- nextToken: 'NextToken',
2097
- totalCount: 'TotalCount',
2098
- };
2099
- }
2100
-
2101
- static types(): { [key: string]: any } {
2102
- return {
2103
- content: { 'type': 'array', 'itemType': DescribeTasksResponseBodyDataContent },
2104
- maxResults: 'number',
2105
- nextToken: 'string',
2106
- totalCount: 'number',
2107
- };
2108
- }
2109
-
2110
- constructor(map?: { [key: string]: any }) {
2111
- super(map);
2112
- }
2113
- }
2114
-
2115
- export class DescribeTopRiskyResourcesResponseBodyDataContent extends $tea.Model {
2116
- /**
2117
- * @example
2118
- * 0
2119
- */
2120
- archiveDataSize?: number;
2121
- /**
2122
- * @example
2123
- * 0
2124
- */
2125
- checkFailedCount?: number;
2126
- /**
2127
- * @example
2128
- * 0
2129
- */
2130
- coldArchiveDataSize?: number;
2131
- /**
2132
- * @example
2133
- * 1697798340
2134
- */
2135
- createTime?: number;
2136
- dataRedundancyType?: string;
2137
- /**
2138
- * @example
2139
- * true
2140
- */
2141
- enableCheck?: boolean;
2142
- /**
2143
- * @example
2144
- * 0
2145
- */
2146
- iaDataSize?: number;
2147
- /**
2148
- * @example
2149
- * ecs
2150
- */
2151
- productType?: string;
2152
- /**
2153
- * @example
2154
- * 90
2155
- */
2156
- protectionScore?: number;
2157
- /**
2158
- * @example
2159
- * 1726036498
2160
- */
2161
- protectionScoreUpdatedTime?: number;
2162
- /**
2163
- * @example
2164
- * cn-hangzhou
2165
- */
2166
- regionId?: string;
2167
- /**
2168
- * @example
2169
- * acs:ecs:cn-hangzhou:xxxxxxxx:instance/xxxxx
2170
- */
2171
- resourceArn?: string;
2172
- /**
2173
- * @example
2174
- * i-xxxxxxxx
2175
- */
2176
- resourceId?: string;
2177
- /**
2178
- * @example
2179
- * test-server
2180
- */
2181
- resourceName?: string;
2182
- /**
2183
- * @example
2184
- * ACS::ECS::Instance
2185
- */
2186
- resourceType?: string;
2187
- /**
2188
- * @example
2189
- * 0
2190
- */
2191
- riskCount?: number;
2192
- /**
2193
- * @example
2194
- * 0
2195
- */
2196
- standardDataSize?: number;
2197
- /**
2198
- * @example
2199
- * Running
2200
- */
2201
- status?: string;
2202
- storageClass?: string;
2203
- /**
2204
- * @example
2205
- * 0
2206
- */
2207
- totalDataSize?: number;
2208
666
  /**
2209
- * @remarks
2210
- * vSwitch ID
667
+ * Lists all data protection rules.
2211
668
  *
2212
- * @example
2213
- * vsw-xxxxxxxx
669
+ * @param request - DescribeRulesRequest
670
+ * @returns DescribeRulesResponse
2214
671
  */
2215
- vSwitchId?: string;
672
+ async describeRules(request: $_model.DescribeRulesRequest): Promise<$_model.DescribeRulesResponse> {
673
+ let runtime = new $dara.RuntimeOptions({ });
674
+ let headers : {[key: string ]: string} = { };
675
+ return await this.describeRulesWithOptions(request, headers, runtime);
676
+ }
677
+
2216
678
  /**
2217
- * @remarks
2218
- * vpc ID
679
+ * Retrieves the details of an asynchronous task.
2219
680
  *
2220
- * @example
2221
- * vpc-xxxxxxxx
2222
- */
2223
- vpcId?: string;
2224
- /**
2225
- * @example
2226
- * cn-hangzhou-j
681
+ * @param headers - map
682
+ * @param runtime - runtime options for this request RuntimeOptions
683
+ * @returns DescribeTaskResponse
2227
684
  */
2228
- zoneId?: string;
2229
- static names(): { [key: string]: string } {
2230
- return {
2231
- archiveDataSize: 'ArchiveDataSize',
2232
- checkFailedCount: 'CheckFailedCount',
2233
- coldArchiveDataSize: 'ColdArchiveDataSize',
2234
- createTime: 'CreateTime',
2235
- dataRedundancyType: 'DataRedundancyType',
2236
- enableCheck: 'EnableCheck',
2237
- iaDataSize: 'IaDataSize',
2238
- productType: 'ProductType',
2239
- protectionScore: 'ProtectionScore',
2240
- protectionScoreUpdatedTime: 'ProtectionScoreUpdatedTime',
2241
- regionId: 'RegionId',
2242
- resourceArn: 'ResourceArn',
2243
- resourceId: 'ResourceId',
2244
- resourceName: 'ResourceName',
2245
- resourceType: 'ResourceType',
2246
- riskCount: 'RiskCount',
2247
- standardDataSize: 'StandardDataSize',
2248
- status: 'Status',
2249
- storageClass: 'StorageClass',
2250
- totalDataSize: 'TotalDataSize',
2251
- vSwitchId: 'VSwitchId',
2252
- vpcId: 'VpcId',
2253
- zoneId: 'ZoneId',
2254
- };
2255
- }
2256
-
2257
- static types(): { [key: string]: any } {
2258
- return {
2259
- archiveDataSize: 'number',
2260
- checkFailedCount: 'number',
2261
- coldArchiveDataSize: 'number',
2262
- createTime: 'number',
2263
- dataRedundancyType: 'string',
2264
- enableCheck: 'boolean',
2265
- iaDataSize: 'number',
2266
- productType: 'string',
2267
- protectionScore: 'number',
2268
- protectionScoreUpdatedTime: 'number',
2269
- regionId: 'string',
2270
- resourceArn: 'string',
2271
- resourceId: 'string',
2272
- resourceName: 'string',
2273
- resourceType: 'string',
2274
- riskCount: 'number',
2275
- standardDataSize: 'number',
2276
- status: 'string',
2277
- storageClass: 'string',
2278
- totalDataSize: 'number',
2279
- vSwitchId: 'string',
2280
- vpcId: 'string',
2281
- zoneId: 'string',
2282
- };
2283
- }
2284
-
2285
- constructor(map?: { [key: string]: any }) {
2286
- super(map);
685
+ async describeTaskWithOptions(TaskId: string, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeTaskResponse> {
686
+ let req = new $OpenApiUtil.OpenApiRequest({
687
+ headers: headers,
688
+ });
689
+ let params = new $OpenApiUtil.Params({
690
+ action: "DescribeTask",
691
+ version: "2023-08-08",
692
+ protocol: "HTTPS",
693
+ pathname: `/api/v1/tasks/${$dara.URL.percentEncode(TaskId)}`,
694
+ method: "GET",
695
+ authType: "AK",
696
+ style: "ROA",
697
+ reqBodyType: "json",
698
+ bodyType: "json",
699
+ });
700
+ return $dara.cast<$_model.DescribeTaskResponse>(await this.callApi(params, req, runtime), new $_model.DescribeTaskResponse({}));
2287
701
  }
2288
- }
2289
702
 
2290
- export class DescribeTopRiskyResourcesResponseBodyData extends $tea.Model {
2291
- content?: DescribeTopRiskyResourcesResponseBodyDataContent[];
2292
- /**
2293
- * @example
2294
- * 10
2295
- */
2296
- maxResults?: number;
2297
- /**
2298
- * @example
2299
- * e557bc9a65fe22cb5e2a3b240f06b0de
2300
- */
2301
- nextToken?: string;
2302
703
  /**
2303
- * @example
2304
- * 10
704
+ * Retrieves the details of an asynchronous task.
705
+ * @returns DescribeTaskResponse
2305
706
  */
2306
- totalCount?: number;
2307
- static names(): { [key: string]: string } {
2308
- return {
2309
- content: 'Content',
2310
- maxResults: 'MaxResults',
2311
- nextToken: 'NextToken',
2312
- totalCount: 'TotalCount',
2313
- };
2314
- }
2315
-
2316
- static types(): { [key: string]: any } {
2317
- return {
2318
- content: { 'type': 'array', 'itemType': DescribeTopRiskyResourcesResponseBodyDataContent },
2319
- maxResults: 'number',
2320
- nextToken: 'string',
2321
- totalCount: 'number',
2322
- };
2323
- }
2324
-
2325
- constructor(map?: { [key: string]: any }) {
2326
- super(map);
707
+ async describeTask(TaskId: string): Promise<$_model.DescribeTaskResponse> {
708
+ let runtime = new $dara.RuntimeOptions({ });
709
+ let headers : {[key: string ]: string} = { };
710
+ return await this.describeTaskWithOptions(TaskId, headers, runtime);
2327
711
  }
2328
- }
2329
712
 
2330
- export class GetBdrcServiceResponseBodyData extends $tea.Model {
2331
- /**
2332
- * @example
2333
- * 1726169608
2334
- */
2335
- openTime?: number;
2336
- /**
2337
- * @example
2338
- * 1726169608
2339
- */
2340
- protectionScoreUpdatedTime?: number;
2341
- /**
2342
- * @example
2343
- * SUCCESS
2344
- */
2345
- serviceInitializeStatus?: string;
2346
713
  /**
2347
- * @example
2348
- * OPENED
714
+ * Retrieves asynchronous tasks.
715
+ *
716
+ * @param request - DescribeTasksRequest
717
+ * @param headers - map
718
+ * @param runtime - runtime options for this request RuntimeOptions
719
+ * @returns DescribeTasksResponse
2349
720
  */
2350
- serviceStatus?: string;
2351
- static names(): { [key: string]: string } {
2352
- return {
2353
- openTime: 'OpenTime',
2354
- protectionScoreUpdatedTime: 'ProtectionScoreUpdatedTime',
2355
- serviceInitializeStatus: 'ServiceInitializeStatus',
2356
- serviceStatus: 'ServiceStatus',
2357
- };
2358
- }
721
+ async describeTasksWithOptions(request: $_model.DescribeTasksRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeTasksResponse> {
722
+ request.validate();
723
+ let query : {[key: string ]: any} = { };
724
+ if (!$dara.isNull(request.maxResults)) {
725
+ query["MaxResults"] = request.maxResults;
726
+ }
2359
727
 
2360
- static types(): { [key: string]: any } {
2361
- return {
2362
- openTime: 'number',
2363
- protectionScoreUpdatedTime: 'number',
2364
- serviceInitializeStatus: 'string',
2365
- serviceStatus: 'string',
2366
- };
2367
- }
728
+ if (!$dara.isNull(request.nextToken)) {
729
+ query["NextToken"] = request.nextToken;
730
+ }
731
+
732
+ if (!$dara.isNull(request.taskStatus)) {
733
+ query["TaskStatus"] = request.taskStatus;
734
+ }
735
+
736
+ if (!$dara.isNull(request.taskType)) {
737
+ query["TaskType"] = request.taskType;
738
+ }
2368
739
 
2369
- constructor(map?: { [key: string]: any }) {
2370
- super(map);
740
+ let req = new $OpenApiUtil.OpenApiRequest({
741
+ headers: headers,
742
+ query: OpenApiUtil.query(query),
743
+ });
744
+ let params = new $OpenApiUtil.Params({
745
+ action: "DescribeTasks",
746
+ version: "2023-08-08",
747
+ protocol: "HTTPS",
748
+ pathname: `/api/v1/tasks`,
749
+ method: "GET",
750
+ authType: "AK",
751
+ style: "ROA",
752
+ reqBodyType: "json",
753
+ bodyType: "json",
754
+ });
755
+ return $dara.cast<$_model.DescribeTasksResponse>(await this.callApi(params, req, runtime), new $_model.DescribeTasksResponse({}));
2371
756
  }
2372
- }
2373
757
 
2374
- export class UpdateResourcesResponseBodyData extends $tea.Model {
2375
758
  /**
2376
- * @example
2377
- * t-bp1ewftyzmeg3bl4dtd2
759
+ * Retrieves asynchronous tasks.
760
+ *
761
+ * @param request - DescribeTasksRequest
762
+ * @returns DescribeTasksResponse
2378
763
  */
2379
- taskId?: string;
2380
- static names(): { [key: string]: string } {
2381
- return {
2382
- taskId: 'TaskId',
2383
- };
764
+ async describeTasks(request: $_model.DescribeTasksRequest): Promise<$_model.DescribeTasksResponse> {
765
+ let runtime = new $dara.RuntimeOptions({ });
766
+ let headers : {[key: string ]: string} = { };
767
+ return await this.describeTasksWithOptions(request, headers, runtime);
2384
768
  }
2385
769
 
2386
- static types(): { [key: string]: any } {
2387
- return {
2388
- taskId: 'string',
2389
- };
2390
- }
770
+ /**
771
+ * Lists the most threatened resources.
772
+ *
773
+ * @param tmpReq - DescribeTopRiskyResourcesRequest
774
+ * @param headers - map
775
+ * @param runtime - runtime options for this request RuntimeOptions
776
+ * @returns DescribeTopRiskyResourcesResponse
777
+ */
778
+ async describeTopRiskyResourcesWithOptions(tmpReq: $_model.DescribeTopRiskyResourcesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DescribeTopRiskyResourcesResponse> {
779
+ tmpReq.validate();
780
+ let request = new $_model.DescribeTopRiskyResourcesShrinkRequest({ });
781
+ OpenApiUtil.convert(tmpReq, request);
782
+ if (!$dara.isNull(tmpReq.resourceOwnerIds)) {
783
+ request.resourceOwnerIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourceOwnerIds, "ResourceOwnerIds", "json");
784
+ }
2391
785
 
2392
- constructor(map?: { [key: string]: any }) {
2393
- super(map);
2394
- }
2395
- }
786
+ let query : {[key: string ]: any} = { };
787
+ if (!$dara.isNull(request.resourceCategoryId)) {
788
+ query["ResourceCategoryId"] = request.resourceCategoryId;
789
+ }
2396
790
 
791
+ if (!$dara.isNull(request.resourceOwnerIdsShrink)) {
792
+ query["ResourceOwnerIds"] = request.resourceOwnerIdsShrink;
793
+ }
2397
794
 
2398
- export default class Client extends OpenApi {
795
+ if (!$dara.isNull(request.resourceType)) {
796
+ query["ResourceType"] = request.resourceType;
797
+ }
2399
798
 
2400
- constructor(config: $OpenApi.Config) {
2401
- super(config);
2402
- this._endpointRule = "";
2403
- this.checkConfig(config);
2404
- this._endpoint = this.getEndpoint("bdrc", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
799
+ let req = new $OpenApiUtil.OpenApiRequest({
800
+ headers: headers,
801
+ query: OpenApiUtil.query(query),
802
+ });
803
+ let params = new $OpenApiUtil.Params({
804
+ action: "DescribeTopRiskyResources",
805
+ version: "2023-08-08",
806
+ protocol: "HTTPS",
807
+ pathname: `/api/v1/resources/top-risky`,
808
+ method: "GET",
809
+ authType: "AK",
810
+ style: "ROA",
811
+ reqBodyType: "json",
812
+ bodyType: "json",
813
+ });
814
+ return $dara.cast<$_model.DescribeTopRiskyResourcesResponse>(await this.callApi(params, req, runtime), new $_model.DescribeTopRiskyResourcesResponse({}));
2405
815
  }
2406
816
 
817
+ /**
818
+ * Lists the most threatened resources.
819
+ *
820
+ * @param request - DescribeTopRiskyResourcesRequest
821
+ * @returns DescribeTopRiskyResourcesResponse
822
+ */
823
+ async describeTopRiskyResources(request: $_model.DescribeTopRiskyResourcesRequest): Promise<$_model.DescribeTopRiskyResourcesResponse> {
824
+ let runtime = new $dara.RuntimeOptions({ });
825
+ let headers : {[key: string ]: string} = { };
826
+ return await this.describeTopRiskyResourcesWithOptions(request, headers, runtime);
827
+ }
2407
828
 
2408
- getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
2409
- if (!Util.empty(endpoint)) {
2410
- return endpoint;
829
+ /**
830
+ * Disables the data protection score for a cloud product.
831
+ *
832
+ * @param request - DisableCheckProductRequest
833
+ * @param headers - map
834
+ * @param runtime - runtime options for this request RuntimeOptions
835
+ * @returns DisableCheckProductResponse
836
+ */
837
+ async disableCheckProductWithOptions(request: $_model.DisableCheckProductRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DisableCheckProductResponse> {
838
+ request.validate();
839
+ let body : {[key: string ]: any} = { };
840
+ if (!$dara.isNull(request.productType)) {
841
+ body["ProductType"] = request.productType;
2411
842
  }
2412
843
 
2413
- if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
2414
- return endpointMap[regionId];
2415
- }
844
+ let req = new $OpenApiUtil.OpenApiRequest({
845
+ headers: headers,
846
+ body: OpenApiUtil.parseToMap(body),
847
+ });
848
+ let params = new $OpenApiUtil.Params({
849
+ action: "DisableCheckProduct",
850
+ version: "2023-08-08",
851
+ protocol: "HTTPS",
852
+ pathname: `/api/v1/products/disable-check`,
853
+ method: "POST",
854
+ authType: "AK",
855
+ style: "ROA",
856
+ reqBodyType: "formData",
857
+ bodyType: "json",
858
+ });
859
+ return $dara.cast<$_model.DisableCheckProductResponse>(await this.callApi(params, req, runtime), new $_model.DisableCheckProductResponse({}));
860
+ }
2416
861
 
2417
- return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
862
+ /**
863
+ * Disables the data protection score for a cloud product.
864
+ *
865
+ * @param request - DisableCheckProductRequest
866
+ * @returns DisableCheckProductResponse
867
+ */
868
+ async disableCheckProduct(request: $_model.DisableCheckProductRequest): Promise<$_model.DisableCheckProductResponse> {
869
+ let runtime = new $dara.RuntimeOptions({ });
870
+ let headers : {[key: string ]: string} = { };
871
+ return await this.disableCheckProductWithOptions(request, headers, runtime);
2418
872
  }
2419
873
 
2420
874
  /**
2421
- * @param request - CheckRulesRequest
875
+ * Disables the data protection score for a resource.
876
+ *
877
+ * @param request - DisableCheckResourceRequest
2422
878
  * @param headers - map
2423
879
  * @param runtime - runtime options for this request RuntimeOptions
2424
- * @returns CheckRulesResponse
880
+ * @returns DisableCheckResourceResponse
2425
881
  */
2426
- async checkRulesWithOptions(request: CheckRulesRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<CheckRulesResponse> {
2427
- Util.validateModel(request);
882
+ async disableCheckResourceWithOptions(request: $_model.DisableCheckResourceRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.DisableCheckResourceResponse> {
883
+ request.validate();
2428
884
  let body : {[key: string ]: any} = { };
2429
- if (!Util.isUnset(request.resourceArn)) {
885
+ if (!$dara.isNull(request.resourceArn)) {
2430
886
  body["ResourceArn"] = request.resourceArn;
2431
887
  }
2432
888
 
2433
- if (!Util.isUnset(request.ruleId)) {
2434
- body["RuleId"] = request.ruleId;
2435
- }
2436
-
2437
- let req = new $OpenApi.OpenApiRequest({
889
+ let req = new $OpenApiUtil.OpenApiRequest({
2438
890
  headers: headers,
2439
891
  body: OpenApiUtil.parseToMap(body),
2440
892
  });
2441
- let params = new $OpenApi.Params({
2442
- action: "CheckRules",
893
+ let params = new $OpenApiUtil.Params({
894
+ action: "DisableCheckResource",
2443
895
  version: "2023-08-08",
2444
896
  protocol: "HTTPS",
2445
- pathname: `/api/v1/rules/check`,
897
+ pathname: `/api/v1/resources/disable-check`,
2446
898
  method: "POST",
2447
899
  authType: "AK",
2448
900
  style: "ROA",
2449
901
  reqBodyType: "formData",
2450
902
  bodyType: "json",
2451
903
  });
2452
- return $tea.cast<CheckRulesResponse>(await this.callApi(params, req, runtime), new CheckRulesResponse({}));
904
+ return $dara.cast<$_model.DisableCheckResourceResponse>(await this.callApi(params, req, runtime), new $_model.DisableCheckResourceResponse({}));
2453
905
  }
2454
906
 
2455
907
  /**
2456
- * @param request - CheckRulesRequest
2457
- * @returns CheckRulesResponse
908
+ * Disables the data protection score for a resource.
909
+ *
910
+ * @param request - DisableCheckResourceRequest
911
+ * @returns DisableCheckResourceResponse
2458
912
  */
2459
- async checkRules(request: CheckRulesRequest): Promise<CheckRulesResponse> {
2460
- let runtime = new $Util.RuntimeOptions({ });
913
+ async disableCheckResource(request: $_model.DisableCheckResourceRequest): Promise<$_model.DisableCheckResourceResponse> {
914
+ let runtime = new $dara.RuntimeOptions({ });
2461
915
  let headers : {[key: string ]: string} = { };
2462
- return await this.checkRulesWithOptions(request, headers, runtime);
916
+ return await this.disableCheckResourceWithOptions(request, headers, runtime);
2463
917
  }
2464
918
 
2465
919
  /**
920
+ * Enables data protection scoring for a cloud product.
921
+ *
922
+ * @param request - EnableCheckProductRequest
2466
923
  * @param headers - map
2467
924
  * @param runtime - runtime options for this request RuntimeOptions
2468
- * @returns CloseBdrcServiceResponse
925
+ * @returns EnableCheckProductResponse
2469
926
  */
2470
- async closeBdrcServiceWithOptions(headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<CloseBdrcServiceResponse> {
2471
- let req = new $OpenApi.OpenApiRequest({
927
+ async enableCheckProductWithOptions(request: $_model.EnableCheckProductRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.EnableCheckProductResponse> {
928
+ request.validate();
929
+ let body : {[key: string ]: any} = { };
930
+ if (!$dara.isNull(request.productType)) {
931
+ body["ProductType"] = request.productType;
932
+ }
933
+
934
+ let req = new $OpenApiUtil.OpenApiRequest({
2472
935
  headers: headers,
936
+ body: OpenApiUtil.parseToMap(body),
2473
937
  });
2474
- let params = new $OpenApi.Params({
2475
- action: "CloseBdrcService",
938
+ let params = new $OpenApiUtil.Params({
939
+ action: "EnableCheckProduct",
2476
940
  version: "2023-08-08",
2477
941
  protocol: "HTTPS",
2478
- pathname: `/api/v1/service/close`,
942
+ pathname: `/api/v1/products/enable-check`,
2479
943
  method: "POST",
2480
944
  authType: "AK",
2481
945
  style: "ROA",
2482
- reqBodyType: "json",
946
+ reqBodyType: "formData",
2483
947
  bodyType: "json",
2484
948
  });
2485
- return $tea.cast<CloseBdrcServiceResponse>(await this.callApi(params, req, runtime), new CloseBdrcServiceResponse({}));
949
+ return $dara.cast<$_model.EnableCheckProductResponse>(await this.callApi(params, req, runtime), new $_model.EnableCheckProductResponse({}));
2486
950
  }
2487
951
 
2488
952
  /**
2489
- * @returns CloseBdrcServiceResponse
953
+ * Enables data protection scoring for a cloud product.
954
+ *
955
+ * @param request - EnableCheckProductRequest
956
+ * @returns EnableCheckProductResponse
2490
957
  */
2491
- async closeBdrcService(): Promise<CloseBdrcServiceResponse> {
2492
- let runtime = new $Util.RuntimeOptions({ });
958
+ async enableCheckProduct(request: $_model.EnableCheckProductRequest): Promise<$_model.EnableCheckProductResponse> {
959
+ let runtime = new $dara.RuntimeOptions({ });
2493
960
  let headers : {[key: string ]: string} = { };
2494
- return await this.closeBdrcServiceWithOptions(headers, runtime);
961
+ return await this.enableCheckProductWithOptions(request, headers, runtime);
2495
962
  }
2496
963
 
2497
964
  /**
2498
- * @param request - DescribeCheckDetailsRequest
965
+ * Enables data protection scoring for a single resource.
966
+ *
967
+ * @param request - EnableCheckResourceRequest
2499
968
  * @param headers - map
2500
969
  * @param runtime - runtime options for this request RuntimeOptions
2501
- * @returns DescribeCheckDetailsResponse
970
+ * @returns EnableCheckResourceResponse
2502
971
  */
2503
- async describeCheckDetailsWithOptions(request: DescribeCheckDetailsRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DescribeCheckDetailsResponse> {
2504
- Util.validateModel(request);
2505
- let query : {[key: string ]: any} = { };
2506
- if (!Util.isUnset(request.maxResults)) {
2507
- query["MaxResults"] = request.maxResults;
2508
- }
2509
-
2510
- if (!Util.isUnset(request.nextToken)) {
2511
- query["NextToken"] = request.nextToken;
972
+ async enableCheckResourceWithOptions(request: $_model.EnableCheckResourceRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.EnableCheckResourceResponse> {
973
+ request.validate();
974
+ let body : {[key: string ]: any} = { };
975
+ if (!$dara.isNull(request.resourceArn)) {
976
+ body["ResourceArn"] = request.resourceArn;
2512
977
  }
2513
978
 
2514
- if (!Util.isUnset(request.resourceArn)) {
2515
- query["ResourceArn"] = request.resourceArn;
2516
- }
979
+ let req = new $OpenApiUtil.OpenApiRequest({
980
+ headers: headers,
981
+ body: OpenApiUtil.parseToMap(body),
982
+ });
983
+ let params = new $OpenApiUtil.Params({
984
+ action: "EnableCheckResource",
985
+ version: "2023-08-08",
986
+ protocol: "HTTPS",
987
+ pathname: `/api/v1/resources/enable-check`,
988
+ method: "POST",
989
+ authType: "AK",
990
+ style: "ROA",
991
+ reqBodyType: "formData",
992
+ bodyType: "json",
993
+ });
994
+ return $dara.cast<$_model.EnableCheckResourceResponse>(await this.callApi(params, req, runtime), new $_model.EnableCheckResourceResponse({}));
995
+ }
2517
996
 
2518
- if (!Util.isUnset(request.ruleId)) {
2519
- query["RuleId"] = request.ruleId;
2520
- }
997
+ /**
998
+ * Enables data protection scoring for a single resource.
999
+ *
1000
+ * @param request - EnableCheckResourceRequest
1001
+ * @returns EnableCheckResourceResponse
1002
+ */
1003
+ async enableCheckResource(request: $_model.EnableCheckResourceRequest): Promise<$_model.EnableCheckResourceResponse> {
1004
+ let runtime = new $dara.RuntimeOptions({ });
1005
+ let headers : {[key: string ]: string} = { };
1006
+ return await this.enableCheckResourceWithOptions(request, headers, runtime);
1007
+ }
2521
1008
 
2522
- let req = new $OpenApi.OpenApiRequest({
1009
+ /**
1010
+ * Queries the status of the Backup and Disaster Recovery Center.
1011
+ *
1012
+ * @param headers - map
1013
+ * @param runtime - runtime options for this request RuntimeOptions
1014
+ * @returns GetBdrcServiceResponse
1015
+ */
1016
+ async getBdrcServiceWithOptions(headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.GetBdrcServiceResponse> {
1017
+ let req = new $OpenApiUtil.OpenApiRequest({
2523
1018
  headers: headers,
2524
- query: OpenApiUtil.query(query),
2525
1019
  });
2526
- let params = new $OpenApi.Params({
2527
- action: "DescribeCheckDetails",
1020
+ let params = new $OpenApiUtil.Params({
1021
+ action: "GetBdrcService",
2528
1022
  version: "2023-08-08",
2529
1023
  protocol: "HTTPS",
2530
- pathname: `/api/v1/check-details`,
1024
+ pathname: `/api/v1/service`,
2531
1025
  method: "GET",
2532
1026
  authType: "AK",
2533
1027
  style: "ROA",
2534
1028
  reqBodyType: "json",
2535
1029
  bodyType: "json",
2536
1030
  });
2537
- return $tea.cast<DescribeCheckDetailsResponse>(await this.callApi(params, req, runtime), new DescribeCheckDetailsResponse({}));
1031
+ return $dara.cast<$_model.GetBdrcServiceResponse>(await this.callApi(params, req, runtime), new $_model.GetBdrcServiceResponse({}));
2538
1032
  }
2539
1033
 
2540
1034
  /**
2541
- * @param request - DescribeCheckDetailsRequest
2542
- * @returns DescribeCheckDetailsResponse
1035
+ * Queries the status of the Backup and Disaster Recovery Center.
1036
+ * @returns GetBdrcServiceResponse
2543
1037
  */
2544
- async describeCheckDetails(request: DescribeCheckDetailsRequest): Promise<DescribeCheckDetailsResponse> {
2545
- let runtime = new $Util.RuntimeOptions({ });
1038
+ async getBdrcService(): Promise<$_model.GetBdrcServiceResponse> {
1039
+ let runtime = new $dara.RuntimeOptions({ });
2546
1040
  let headers : {[key: string ]: string} = { };
2547
- return await this.describeCheckDetailsWithOptions(request, headers, runtime);
1041
+ return await this.getBdrcServiceWithOptions(headers, runtime);
2548
1042
  }
2549
1043
 
2550
1044
  /**
1045
+ * Retrieves a single message.
1046
+ *
1047
+ * @param request - GetMessageRequest
2551
1048
  * @param headers - map
2552
1049
  * @param runtime - runtime options for this request RuntimeOptions
2553
- * @returns DescribeProductsResponse
1050
+ * @returns GetMessageResponse
2554
1051
  */
2555
- async describeProductsWithOptions(headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DescribeProductsResponse> {
2556
- let req = new $OpenApi.OpenApiRequest({
1052
+ async getMessageWithOptions(MessageId: string, request: $_model.GetMessageRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.GetMessageResponse> {
1053
+ request.validate();
1054
+ let req = new $OpenApiUtil.OpenApiRequest({
2557
1055
  headers: headers,
2558
1056
  });
2559
- let params = new $OpenApi.Params({
2560
- action: "DescribeProducts",
1057
+ let params = new $OpenApiUtil.Params({
1058
+ action: "GetMessage",
2561
1059
  version: "2023-08-08",
2562
1060
  protocol: "HTTPS",
2563
- pathname: `/api/v1/products`,
1061
+ pathname: `/api/v1/messages/${$dara.URL.percentEncode(MessageId)}`,
2564
1062
  method: "GET",
2565
1063
  authType: "AK",
2566
1064
  style: "ROA",
2567
1065
  reqBodyType: "json",
2568
1066
  bodyType: "json",
2569
1067
  });
2570
- return $tea.cast<DescribeProductsResponse>(await this.callApi(params, req, runtime), new DescribeProductsResponse({}));
1068
+ return $dara.cast<$_model.GetMessageResponse>(await this.callApi(params, req, runtime), new $_model.GetMessageResponse({}));
2571
1069
  }
2572
1070
 
2573
1071
  /**
2574
- * @returns DescribeProductsResponse
1072
+ * Retrieves a single message.
1073
+ *
1074
+ * @param request - GetMessageRequest
1075
+ * @returns GetMessageResponse
2575
1076
  */
2576
- async describeProducts(): Promise<DescribeProductsResponse> {
2577
- let runtime = new $Util.RuntimeOptions({ });
1077
+ async getMessage(MessageId: string, request: $_model.GetMessageRequest): Promise<$_model.GetMessageResponse> {
1078
+ let runtime = new $dara.RuntimeOptions({ });
2578
1079
  let headers : {[key: string ]: string} = { };
2579
- return await this.describeProductsWithOptions(headers, runtime);
1080
+ return await this.getMessageWithOptions(MessageId, request, headers, runtime);
2580
1081
  }
2581
1082
 
2582
1083
  /**
2583
- * @param request - DescribeResourcesRequest
1084
+ * Retrieves a protection policy.
1085
+ *
1086
+ * @param request - GetProtectionPolicyRequest
2584
1087
  * @param headers - map
2585
1088
  * @param runtime - runtime options for this request RuntimeOptions
2586
- * @returns DescribeResourcesResponse
1089
+ * @returns GetProtectionPolicyResponse
2587
1090
  */
2588
- async describeResourcesWithOptions(request: DescribeResourcesRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DescribeResourcesResponse> {
2589
- Util.validateModel(request);
2590
- let query : {[key: string ]: any} = { };
2591
- if (!Util.isUnset(request.dataRedundancyType)) {
2592
- query["DataRedundancyType"] = request.dataRedundancyType;
2593
- }
2594
-
2595
- if (!Util.isUnset(request.failedRuleTemplate)) {
2596
- query["FailedRuleTemplate"] = request.failedRuleTemplate;
2597
- }
2598
-
2599
- if (!Util.isUnset(request.maxResults)) {
2600
- query["MaxResults"] = request.maxResults;
2601
- }
2602
-
2603
- if (!Util.isUnset(request.nextToken)) {
2604
- query["NextToken"] = request.nextToken;
2605
- }
2606
-
2607
- if (!Util.isUnset(request.resourceId)) {
2608
- query["ResourceId"] = request.resourceId;
2609
- }
2610
-
2611
- if (!Util.isUnset(request.resourceType)) {
2612
- query["ResourceType"] = request.resourceType;
2613
- }
2614
-
2615
- if (!Util.isUnset(request.sortBy)) {
2616
- query["SortBy"] = request.sortBy;
2617
- }
2618
-
2619
- if (!Util.isUnset(request.sortOrder)) {
2620
- query["SortOrder"] = request.sortOrder;
2621
- }
2622
-
2623
- if (!Util.isUnset(request.storageClass)) {
2624
- query["StorageClass"] = request.storageClass;
2625
- }
2626
-
2627
- let req = new $OpenApi.OpenApiRequest({
1091
+ async getProtectionPolicyWithOptions(ProtectionPolicyId: string, request: $_model.GetProtectionPolicyRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.GetProtectionPolicyResponse> {
1092
+ request.validate();
1093
+ let req = new $OpenApiUtil.OpenApiRequest({
2628
1094
  headers: headers,
2629
- query: OpenApiUtil.query(query),
2630
1095
  });
2631
- let params = new $OpenApi.Params({
2632
- action: "DescribeResources",
1096
+ let params = new $OpenApiUtil.Params({
1097
+ action: "GetProtectionPolicy",
2633
1098
  version: "2023-08-08",
2634
1099
  protocol: "HTTPS",
2635
- pathname: `/api/v1/resources`,
1100
+ pathname: `/api/v1/protection-policies/${$dara.URL.percentEncode(ProtectionPolicyId)}`,
2636
1101
  method: "GET",
2637
1102
  authType: "AK",
2638
1103
  style: "ROA",
2639
1104
  reqBodyType: "json",
2640
1105
  bodyType: "json",
2641
1106
  });
2642
- return $tea.cast<DescribeResourcesResponse>(await this.callApi(params, req, runtime), new DescribeResourcesResponse({}));
1107
+ return $dara.cast<$_model.GetProtectionPolicyResponse>(await this.callApi(params, req, runtime), new $_model.GetProtectionPolicyResponse({}));
2643
1108
  }
2644
1109
 
2645
1110
  /**
2646
- * @param request - DescribeResourcesRequest
2647
- * @returns DescribeResourcesResponse
1111
+ * Retrieves a protection policy.
1112
+ *
1113
+ * @param request - GetProtectionPolicyRequest
1114
+ * @returns GetProtectionPolicyResponse
2648
1115
  */
2649
- async describeResources(request: DescribeResourcesRequest): Promise<DescribeResourcesResponse> {
2650
- let runtime = new $Util.RuntimeOptions({ });
1116
+ async getProtectionPolicy(ProtectionPolicyId: string, request: $_model.GetProtectionPolicyRequest): Promise<$_model.GetProtectionPolicyResponse> {
1117
+ let runtime = new $dara.RuntimeOptions({ });
2651
1118
  let headers : {[key: string ]: string} = { };
2652
- return await this.describeResourcesWithOptions(request, headers, runtime);
1119
+ return await this.getProtectionPolicyWithOptions(ProtectionPolicyId, request, headers, runtime);
2653
1120
  }
2654
1121
 
2655
1122
  /**
2656
- * @param request - DescribeRulesRequest
1123
+ * Retrieves a single resource category.
1124
+ *
1125
+ * @param request - GetResourceCategoryRequest
2657
1126
  * @param headers - map
2658
1127
  * @param runtime - runtime options for this request RuntimeOptions
2659
- * @returns DescribeRulesResponse
1128
+ * @returns GetResourceCategoryResponse
2660
1129
  */
2661
- async describeRulesWithOptions(request: DescribeRulesRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DescribeRulesResponse> {
2662
- Util.validateModel(request);
1130
+ async getResourceCategoryWithOptions(request: $_model.GetResourceCategoryRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.GetResourceCategoryResponse> {
1131
+ request.validate();
2663
1132
  let query : {[key: string ]: any} = { };
2664
- if (!Util.isUnset(request.maxResults)) {
2665
- query["MaxResults"] = request.maxResults;
2666
- }
2667
-
2668
- if (!Util.isUnset(request.nextToken)) {
2669
- query["NextToken"] = request.nextToken;
1133
+ if (!$dara.isNull(request.resourceCategoryId)) {
1134
+ query["ResourceCategoryId"] = request.resourceCategoryId;
2670
1135
  }
2671
1136
 
2672
- if (!Util.isUnset(request.resourceType)) {
2673
- query["ResourceType"] = request.resourceType;
2674
- }
2675
-
2676
- let req = new $OpenApi.OpenApiRequest({
1137
+ let req = new $OpenApiUtil.OpenApiRequest({
2677
1138
  headers: headers,
2678
1139
  query: OpenApiUtil.query(query),
2679
1140
  });
2680
- let params = new $OpenApi.Params({
2681
- action: "DescribeRules",
1141
+ let params = new $OpenApiUtil.Params({
1142
+ action: "GetResourceCategory",
2682
1143
  version: "2023-08-08",
2683
1144
  protocol: "HTTPS",
2684
- pathname: `/api/v1/rules`,
1145
+ pathname: `/api/v1/resource-categories/get`,
2685
1146
  method: "GET",
2686
1147
  authType: "AK",
2687
1148
  style: "ROA",
2688
1149
  reqBodyType: "json",
2689
1150
  bodyType: "json",
2690
1151
  });
2691
- return $tea.cast<DescribeRulesResponse>(await this.callApi(params, req, runtime), new DescribeRulesResponse({}));
1152
+ return $dara.cast<$_model.GetResourceCategoryResponse>(await this.callApi(params, req, runtime), new $_model.GetResourceCategoryResponse({}));
2692
1153
  }
2693
1154
 
2694
1155
  /**
2695
- * @param request - DescribeRulesRequest
2696
- * @returns DescribeRulesResponse
1156
+ * Retrieves a single resource category.
1157
+ *
1158
+ * @param request - GetResourceCategoryRequest
1159
+ * @returns GetResourceCategoryResponse
2697
1160
  */
2698
- async describeRules(request: DescribeRulesRequest): Promise<DescribeRulesResponse> {
2699
- let runtime = new $Util.RuntimeOptions({ });
1161
+ async getResourceCategory(request: $_model.GetResourceCategoryRequest): Promise<$_model.GetResourceCategoryResponse> {
1162
+ let runtime = new $dara.RuntimeOptions({ });
2700
1163
  let headers : {[key: string ]: string} = { };
2701
- return await this.describeRulesWithOptions(request, headers, runtime);
1164
+ return await this.getResourceCategoryWithOptions(request, headers, runtime);
2702
1165
  }
2703
1166
 
2704
1167
  /**
1168
+ * Queries messages in batches.
1169
+ *
1170
+ * @param request - ListMessagesRequest
2705
1171
  * @param headers - map
2706
1172
  * @param runtime - runtime options for this request RuntimeOptions
2707
- * @returns DescribeTaskResponse
1173
+ * @returns ListMessagesResponse
2708
1174
  */
2709
- async describeTaskWithOptions(TaskId: string, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DescribeTaskResponse> {
2710
- let req = new $OpenApi.OpenApiRequest({
1175
+ async listMessagesWithOptions(request: $_model.ListMessagesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.ListMessagesResponse> {
1176
+ request.validate();
1177
+ let query : {[key: string ]: any} = { };
1178
+ if (!$dara.isNull(request.maxResults)) {
1179
+ query["MaxResults"] = request.maxResults;
1180
+ }
1181
+
1182
+ if (!$dara.isNull(request.messageLevel)) {
1183
+ query["MessageLevel"] = request.messageLevel;
1184
+ }
1185
+
1186
+ if (!$dara.isNull(request.messageTimeEarlierThan)) {
1187
+ query["MessageTimeEarlierThan"] = request.messageTimeEarlierThan;
1188
+ }
1189
+
1190
+ if (!$dara.isNull(request.messageTimeLaterThan)) {
1191
+ query["MessageTimeLaterThan"] = request.messageTimeLaterThan;
1192
+ }
1193
+
1194
+ if (!$dara.isNull(request.messageType)) {
1195
+ query["MessageType"] = request.messageType;
1196
+ }
1197
+
1198
+ if (!$dara.isNull(request.nextToken)) {
1199
+ query["NextToken"] = request.nextToken;
1200
+ }
1201
+
1202
+ let req = new $OpenApiUtil.OpenApiRequest({
2711
1203
  headers: headers,
1204
+ query: OpenApiUtil.query(query),
2712
1205
  });
2713
- let params = new $OpenApi.Params({
2714
- action: "DescribeTask",
1206
+ let params = new $OpenApiUtil.Params({
1207
+ action: "ListMessages",
2715
1208
  version: "2023-08-08",
2716
1209
  protocol: "HTTPS",
2717
- pathname: `/api/v1/tasks/${OpenApiUtil.getEncodeParam(TaskId)}`,
1210
+ pathname: `/api/v1/messages`,
2718
1211
  method: "GET",
2719
1212
  authType: "AK",
2720
1213
  style: "ROA",
2721
1214
  reqBodyType: "json",
2722
1215
  bodyType: "json",
2723
1216
  });
2724
- return $tea.cast<DescribeTaskResponse>(await this.callApi(params, req, runtime), new DescribeTaskResponse({}));
1217
+ return $dara.cast<$_model.ListMessagesResponse>(await this.callApi(params, req, runtime), new $_model.ListMessagesResponse({}));
2725
1218
  }
2726
1219
 
2727
1220
  /**
2728
- * @returns DescribeTaskResponse
1221
+ * Queries messages in batches.
1222
+ *
1223
+ * @param request - ListMessagesRequest
1224
+ * @returns ListMessagesResponse
2729
1225
  */
2730
- async describeTask(TaskId: string): Promise<DescribeTaskResponse> {
2731
- let runtime = new $Util.RuntimeOptions({ });
1226
+ async listMessages(request: $_model.ListMessagesRequest): Promise<$_model.ListMessagesResponse> {
1227
+ let runtime = new $dara.RuntimeOptions({ });
2732
1228
  let headers : {[key: string ]: string} = { };
2733
- return await this.describeTaskWithOptions(TaskId, headers, runtime);
1229
+ return await this.listMessagesWithOptions(request, headers, runtime);
2734
1230
  }
2735
1231
 
2736
1232
  /**
2737
- * @param request - DescribeTasksRequest
1233
+ * Retrieves a list of protection policies.
1234
+ *
1235
+ * @param request - ListProtectionPoliciesRequest
2738
1236
  * @param headers - map
2739
1237
  * @param runtime - runtime options for this request RuntimeOptions
2740
- * @returns DescribeTasksResponse
1238
+ * @returns ListProtectionPoliciesResponse
2741
1239
  */
2742
- async describeTasksWithOptions(request: DescribeTasksRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DescribeTasksResponse> {
2743
- Util.validateModel(request);
1240
+ async listProtectionPoliciesWithOptions(request: $_model.ListProtectionPoliciesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.ListProtectionPoliciesResponse> {
1241
+ request.validate();
2744
1242
  let query : {[key: string ]: any} = { };
2745
- if (!Util.isUnset(request.maxResults)) {
1243
+ if (!$dara.isNull(request.maxResults)) {
2746
1244
  query["MaxResults"] = request.maxResults;
2747
1245
  }
2748
1246
 
2749
- if (!Util.isUnset(request.nextToken)) {
1247
+ if (!$dara.isNull(request.nextToken)) {
2750
1248
  query["NextToken"] = request.nextToken;
2751
1249
  }
2752
1250
 
2753
- if (!Util.isUnset(request.taskStatus)) {
2754
- query["TaskStatus"] = request.taskStatus;
1251
+ if (!$dara.isNull(request.protectionPolicyId)) {
1252
+ query["ProtectionPolicyId"] = request.protectionPolicyId;
1253
+ }
1254
+
1255
+ if (!$dara.isNull(request.protectionPolicyRegionId)) {
1256
+ query["ProtectionPolicyRegionId"] = request.protectionPolicyRegionId;
2755
1257
  }
2756
1258
 
2757
- let req = new $OpenApi.OpenApiRequest({
1259
+ let req = new $OpenApiUtil.OpenApiRequest({
2758
1260
  headers: headers,
2759
1261
  query: OpenApiUtil.query(query),
2760
1262
  });
2761
- let params = new $OpenApi.Params({
2762
- action: "DescribeTasks",
1263
+ let params = new $OpenApiUtil.Params({
1264
+ action: "ListProtectionPolicies",
2763
1265
  version: "2023-08-08",
2764
1266
  protocol: "HTTPS",
2765
- pathname: `/api/v1/tasks`,
1267
+ pathname: `/api/v1/protection-policies`,
2766
1268
  method: "GET",
2767
1269
  authType: "AK",
2768
1270
  style: "ROA",
2769
1271
  reqBodyType: "json",
2770
1272
  bodyType: "json",
2771
1273
  });
2772
- return $tea.cast<DescribeTasksResponse>(await this.callApi(params, req, runtime), new DescribeTasksResponse({}));
1274
+ return $dara.cast<$_model.ListProtectionPoliciesResponse>(await this.callApi(params, req, runtime), new $_model.ListProtectionPoliciesResponse({}));
2773
1275
  }
2774
1276
 
2775
1277
  /**
2776
- * @param request - DescribeTasksRequest
2777
- * @returns DescribeTasksResponse
1278
+ * Retrieves a list of protection policies.
1279
+ *
1280
+ * @param request - ListProtectionPoliciesRequest
1281
+ * @returns ListProtectionPoliciesResponse
2778
1282
  */
2779
- async describeTasks(request: DescribeTasksRequest): Promise<DescribeTasksResponse> {
2780
- let runtime = new $Util.RuntimeOptions({ });
1283
+ async listProtectionPolicies(request: $_model.ListProtectionPoliciesRequest): Promise<$_model.ListProtectionPoliciesResponse> {
1284
+ let runtime = new $dara.RuntimeOptions({ });
2781
1285
  let headers : {[key: string ]: string} = { };
2782
- return await this.describeTasksWithOptions(request, headers, runtime);
1286
+ return await this.listProtectionPoliciesWithOptions(request, headers, runtime);
2783
1287
  }
2784
1288
 
2785
1289
  /**
2786
- * @param request - DescribeTopRiskyResourcesRequest
1290
+ * Retrieves the application history of the protection policy.
1291
+ *
1292
+ * @param request - ListProtectionPolicyApplicationsRequest
2787
1293
  * @param headers - map
2788
1294
  * @param runtime - runtime options for this request RuntimeOptions
2789
- * @returns DescribeTopRiskyResourcesResponse
1295
+ * @returns ListProtectionPolicyApplicationsResponse
2790
1296
  */
2791
- async describeTopRiskyResourcesWithOptions(request: DescribeTopRiskyResourcesRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DescribeTopRiskyResourcesResponse> {
2792
- Util.validateModel(request);
1297
+ async listProtectionPolicyApplicationsWithOptions(ProtectionPolicyId: string, request: $_model.ListProtectionPolicyApplicationsRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.ListProtectionPolicyApplicationsResponse> {
1298
+ request.validate();
2793
1299
  let query : {[key: string ]: any} = { };
2794
- if (!Util.isUnset(request.resourceType)) {
1300
+ if (!$dara.isNull(request.applyStatus)) {
1301
+ query["ApplyStatus"] = request.applyStatus;
1302
+ }
1303
+
1304
+ if (!$dara.isNull(request.maxResults)) {
1305
+ query["MaxResults"] = request.maxResults;
1306
+ }
1307
+
1308
+ if (!$dara.isNull(request.nextToken)) {
1309
+ query["NextToken"] = request.nextToken;
1310
+ }
1311
+
1312
+ if (!$dara.isNull(request.resourceType)) {
2795
1313
  query["ResourceType"] = request.resourceType;
2796
1314
  }
2797
1315
 
2798
- let req = new $OpenApi.OpenApiRequest({
1316
+ if (!$dara.isNull(request.subProtectionPolicyType)) {
1317
+ query["SubProtectionPolicyType"] = request.subProtectionPolicyType;
1318
+ }
1319
+
1320
+ if (!$dara.isNull(request.taskId)) {
1321
+ query["TaskId"] = request.taskId;
1322
+ }
1323
+
1324
+ let req = new $OpenApiUtil.OpenApiRequest({
2799
1325
  headers: headers,
2800
1326
  query: OpenApiUtil.query(query),
2801
1327
  });
2802
- let params = new $OpenApi.Params({
2803
- action: "DescribeTopRiskyResources",
1328
+ let params = new $OpenApiUtil.Params({
1329
+ action: "ListProtectionPolicyApplications",
2804
1330
  version: "2023-08-08",
2805
1331
  protocol: "HTTPS",
2806
- pathname: `/api/v1/resources/top-risky`,
1332
+ pathname: `/api/v1/protection-policies/${$dara.URL.percentEncode(ProtectionPolicyId)}/list-applications`,
2807
1333
  method: "GET",
2808
1334
  authType: "AK",
2809
1335
  style: "ROA",
2810
1336
  reqBodyType: "json",
2811
1337
  bodyType: "json",
2812
1338
  });
2813
- return $tea.cast<DescribeTopRiskyResourcesResponse>(await this.callApi(params, req, runtime), new DescribeTopRiskyResourcesResponse({}));
1339
+ return $dara.cast<$_model.ListProtectionPolicyApplicationsResponse>(await this.callApi(params, req, runtime), new $_model.ListProtectionPolicyApplicationsResponse({}));
2814
1340
  }
2815
1341
 
2816
1342
  /**
2817
- * @param request - DescribeTopRiskyResourcesRequest
2818
- * @returns DescribeTopRiskyResourcesResponse
1343
+ * Retrieves the application history of the protection policy.
1344
+ *
1345
+ * @param request - ListProtectionPolicyApplicationsRequest
1346
+ * @returns ListProtectionPolicyApplicationsResponse
2819
1347
  */
2820
- async describeTopRiskyResources(request: DescribeTopRiskyResourcesRequest): Promise<DescribeTopRiskyResourcesResponse> {
2821
- let runtime = new $Util.RuntimeOptions({ });
1348
+ async listProtectionPolicyApplications(ProtectionPolicyId: string, request: $_model.ListProtectionPolicyApplicationsRequest): Promise<$_model.ListProtectionPolicyApplicationsResponse> {
1349
+ let runtime = new $dara.RuntimeOptions({ });
2822
1350
  let headers : {[key: string ]: string} = { };
2823
- return await this.describeTopRiskyResourcesWithOptions(request, headers, runtime);
1351
+ return await this.listProtectionPolicyApplicationsWithOptions(ProtectionPolicyId, request, headers, runtime);
2824
1352
  }
2825
1353
 
2826
1354
  /**
2827
- * @param request - DisableCheckProductRequest
1355
+ * Retrieves a list of resource categories.
1356
+ *
1357
+ * @param request - ListResourceCategoriesRequest
2828
1358
  * @param headers - map
2829
1359
  * @param runtime - runtime options for this request RuntimeOptions
2830
- * @returns DisableCheckProductResponse
1360
+ * @returns ListResourceCategoriesResponse
2831
1361
  */
2832
- async disableCheckProductWithOptions(request: DisableCheckProductRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DisableCheckProductResponse> {
2833
- Util.validateModel(request);
2834
- let body : {[key: string ]: any} = { };
2835
- if (!Util.isUnset(request.productType)) {
2836
- body["ProductType"] = request.productType;
1362
+ async listResourceCategoriesWithOptions(request: $_model.ListResourceCategoriesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.ListResourceCategoriesResponse> {
1363
+ request.validate();
1364
+ let query : {[key: string ]: any} = { };
1365
+ if (!$dara.isNull(request.maxResults)) {
1366
+ query["MaxResults"] = request.maxResults;
1367
+ }
1368
+
1369
+ if (!$dara.isNull(request.nextToken)) {
1370
+ query["NextToken"] = request.nextToken;
1371
+ }
1372
+
1373
+ if (!$dara.isNull(request.resourceCategoryId)) {
1374
+ query["ResourceCategoryId"] = request.resourceCategoryId;
2837
1375
  }
2838
1376
 
2839
- let req = new $OpenApi.OpenApiRequest({
1377
+ let req = new $OpenApiUtil.OpenApiRequest({
2840
1378
  headers: headers,
2841
- body: OpenApiUtil.parseToMap(body),
1379
+ query: OpenApiUtil.query(query),
2842
1380
  });
2843
- let params = new $OpenApi.Params({
2844
- action: "DisableCheckProduct",
1381
+ let params = new $OpenApiUtil.Params({
1382
+ action: "ListResourceCategories",
2845
1383
  version: "2023-08-08",
2846
1384
  protocol: "HTTPS",
2847
- pathname: `/api/v1/products/disable-check`,
2848
- method: "POST",
1385
+ pathname: `/api/v1/resource-categories/list`,
1386
+ method: "GET",
2849
1387
  authType: "AK",
2850
1388
  style: "ROA",
2851
- reqBodyType: "formData",
1389
+ reqBodyType: "json",
2852
1390
  bodyType: "json",
2853
1391
  });
2854
- return $tea.cast<DisableCheckProductResponse>(await this.callApi(params, req, runtime), new DisableCheckProductResponse({}));
1392
+ return $dara.cast<$_model.ListResourceCategoriesResponse>(await this.callApi(params, req, runtime), new $_model.ListResourceCategoriesResponse({}));
2855
1393
  }
2856
1394
 
2857
1395
  /**
2858
- * @param request - DisableCheckProductRequest
2859
- * @returns DisableCheckProductResponse
1396
+ * Retrieves a list of resource categories.
1397
+ *
1398
+ * @param request - ListResourceCategoriesRequest
1399
+ * @returns ListResourceCategoriesResponse
2860
1400
  */
2861
- async disableCheckProduct(request: DisableCheckProductRequest): Promise<DisableCheckProductResponse> {
2862
- let runtime = new $Util.RuntimeOptions({ });
1401
+ async listResourceCategories(request: $_model.ListResourceCategoriesRequest): Promise<$_model.ListResourceCategoriesResponse> {
1402
+ let runtime = new $dara.RuntimeOptions({ });
2863
1403
  let headers : {[key: string ]: string} = { };
2864
- return await this.disableCheckProductWithOptions(request, headers, runtime);
1404
+ return await this.listResourceCategoriesWithOptions(request, headers, runtime);
2865
1405
  }
2866
1406
 
2867
1407
  /**
2868
- * @param request - DisableCheckResourceRequest
1408
+ * Enables the Backup and Disaster Recovery Center.
1409
+ *
2869
1410
  * @param headers - map
2870
1411
  * @param runtime - runtime options for this request RuntimeOptions
2871
- * @returns DisableCheckResourceResponse
1412
+ * @returns OpenBdrcServiceResponse
2872
1413
  */
2873
- async disableCheckResourceWithOptions(request: DisableCheckResourceRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DisableCheckResourceResponse> {
2874
- Util.validateModel(request);
2875
- let body : {[key: string ]: any} = { };
2876
- if (!Util.isUnset(request.resourceArn)) {
2877
- body["ResourceArn"] = request.resourceArn;
2878
- }
2879
-
2880
- let req = new $OpenApi.OpenApiRequest({
1414
+ async openBdrcServiceWithOptions(headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.OpenBdrcServiceResponse> {
1415
+ let req = new $OpenApiUtil.OpenApiRequest({
2881
1416
  headers: headers,
2882
- body: OpenApiUtil.parseToMap(body),
2883
1417
  });
2884
- let params = new $OpenApi.Params({
2885
- action: "DisableCheckResource",
1418
+ let params = new $OpenApiUtil.Params({
1419
+ action: "OpenBdrcService",
2886
1420
  version: "2023-08-08",
2887
1421
  protocol: "HTTPS",
2888
- pathname: `/api/v1/resources/disable-check`,
1422
+ pathname: `/api/v1/service/open`,
2889
1423
  method: "POST",
2890
1424
  authType: "AK",
2891
1425
  style: "ROA",
2892
- reqBodyType: "formData",
1426
+ reqBodyType: "json",
2893
1427
  bodyType: "json",
2894
1428
  });
2895
- return $tea.cast<DisableCheckResourceResponse>(await this.callApi(params, req, runtime), new DisableCheckResourceResponse({}));
1429
+ return $dara.cast<$_model.OpenBdrcServiceResponse>(await this.callApi(params, req, runtime), new $_model.OpenBdrcServiceResponse({}));
2896
1430
  }
2897
1431
 
2898
1432
  /**
2899
- * @param request - DisableCheckResourceRequest
2900
- * @returns DisableCheckResourceResponse
1433
+ * Enables the Backup and Disaster Recovery Center.
1434
+ * @returns OpenBdrcServiceResponse
2901
1435
  */
2902
- async disableCheckResource(request: DisableCheckResourceRequest): Promise<DisableCheckResourceResponse> {
2903
- let runtime = new $Util.RuntimeOptions({ });
1436
+ async openBdrcService(): Promise<$_model.OpenBdrcServiceResponse> {
1437
+ let runtime = new $dara.RuntimeOptions({ });
2904
1438
  let headers : {[key: string ]: string} = { };
2905
- return await this.disableCheckResourceWithOptions(request, headers, runtime);
1439
+ return await this.openBdrcServiceWithOptions(headers, runtime);
2906
1440
  }
2907
1441
 
2908
1442
  /**
2909
- * @param request - EnableCheckProductRequest
1443
+ * Updates a protection policy.
1444
+ *
1445
+ * @param tmpReq - UpdateProtectionPolicyRequest
2910
1446
  * @param headers - map
2911
1447
  * @param runtime - runtime options for this request RuntimeOptions
2912
- * @returns EnableCheckProductResponse
2913
- */
2914
- async enableCheckProductWithOptions(request: EnableCheckProductRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<EnableCheckProductResponse> {
2915
- Util.validateModel(request);
1448
+ * @returns UpdateProtectionPolicyResponse
1449
+ */
1450
+ async updateProtectionPolicyWithOptions(ProtectionPolicyId: string, tmpReq: $_model.UpdateProtectionPolicyRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateProtectionPolicyResponse> {
1451
+ tmpReq.validate();
1452
+ let request = new $_model.UpdateProtectionPolicyShrinkRequest({ });
1453
+ OpenApiUtil.convert(tmpReq, request);
1454
+ if (!$dara.isNull(tmpReq.boundResourceCategoryIds)) {
1455
+ request.boundResourceCategoryIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.boundResourceCategoryIds, "BoundResourceCategoryIds", "json");
1456
+ }
1457
+
1458
+ if (!$dara.isNull(tmpReq.subProtectionPolicies)) {
1459
+ request.subProtectionPoliciesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.subProtectionPolicies, "SubProtectionPolicies", "json");
1460
+ }
1461
+
2916
1462
  let body : {[key: string ]: any} = { };
2917
- if (!Util.isUnset(request.productType)) {
2918
- body["ProductType"] = request.productType;
1463
+ if (!$dara.isNull(request.boundResourceCategoryIdsShrink)) {
1464
+ body["BoundResourceCategoryIds"] = request.boundResourceCategoryIdsShrink;
2919
1465
  }
2920
1466
 
2921
- let req = new $OpenApi.OpenApiRequest({
2922
- headers: headers,
2923
- body: OpenApiUtil.parseToMap(body),
2924
- });
2925
- let params = new $OpenApi.Params({
2926
- action: "EnableCheckProduct",
2927
- version: "2023-08-08",
2928
- protocol: "HTTPS",
2929
- pathname: `/api/v1/products/enable-check`,
2930
- method: "POST",
2931
- authType: "AK",
2932
- style: "ROA",
2933
- reqBodyType: "formData",
2934
- bodyType: "json",
2935
- });
2936
- return $tea.cast<EnableCheckProductResponse>(await this.callApi(params, req, runtime), new EnableCheckProductResponse({}));
2937
- }
1467
+ if (!$dara.isNull(request.clientToken)) {
1468
+ body["ClientToken"] = request.clientToken;
1469
+ }
2938
1470
 
2939
- /**
2940
- * @param request - EnableCheckProductRequest
2941
- * @returns EnableCheckProductResponse
2942
- */
2943
- async enableCheckProduct(request: EnableCheckProductRequest): Promise<EnableCheckProductResponse> {
2944
- let runtime = new $Util.RuntimeOptions({ });
2945
- let headers : {[key: string ]: string} = { };
2946
- return await this.enableCheckProductWithOptions(request, headers, runtime);
2947
- }
1471
+ if (!$dara.isNull(request.protectionPolicyName)) {
1472
+ body["ProtectionPolicyName"] = request.protectionPolicyName;
1473
+ }
2948
1474
 
2949
- /**
2950
- * @param request - EnableCheckResourceRequest
2951
- * @param headers - map
2952
- * @param runtime - runtime options for this request RuntimeOptions
2953
- * @returns EnableCheckResourceResponse
2954
- */
2955
- async enableCheckResourceWithOptions(request: EnableCheckResourceRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<EnableCheckResourceResponse> {
2956
- Util.validateModel(request);
2957
- let body : {[key: string ]: any} = { };
2958
- if (!Util.isUnset(request.resourceArn)) {
2959
- body["ResourceArn"] = request.resourceArn;
1475
+ if (!$dara.isNull(request.subProtectionPoliciesShrink)) {
1476
+ body["SubProtectionPolicies"] = request.subProtectionPoliciesShrink;
2960
1477
  }
2961
1478
 
2962
- let req = new $OpenApi.OpenApiRequest({
1479
+ let req = new $OpenApiUtil.OpenApiRequest({
2963
1480
  headers: headers,
2964
1481
  body: OpenApiUtil.parseToMap(body),
2965
1482
  });
2966
- let params = new $OpenApi.Params({
2967
- action: "EnableCheckResource",
1483
+ let params = new $OpenApiUtil.Params({
1484
+ action: "UpdateProtectionPolicy",
2968
1485
  version: "2023-08-08",
2969
1486
  protocol: "HTTPS",
2970
- pathname: `/api/v1/resources/enable-check`,
2971
- method: "POST",
1487
+ pathname: `/api/v1/protection-policies/${$dara.URL.percentEncode(ProtectionPolicyId)}`,
1488
+ method: "PATCH",
2972
1489
  authType: "AK",
2973
1490
  style: "ROA",
2974
1491
  reqBodyType: "formData",
2975
1492
  bodyType: "json",
2976
1493
  });
2977
- return $tea.cast<EnableCheckResourceResponse>(await this.callApi(params, req, runtime), new EnableCheckResourceResponse({}));
1494
+ return $dara.cast<$_model.UpdateProtectionPolicyResponse>(await this.callApi(params, req, runtime), new $_model.UpdateProtectionPolicyResponse({}));
2978
1495
  }
2979
1496
 
2980
1497
  /**
2981
- * @param request - EnableCheckResourceRequest
2982
- * @returns EnableCheckResourceResponse
1498
+ * Updates a protection policy.
1499
+ *
1500
+ * @param request - UpdateProtectionPolicyRequest
1501
+ * @returns UpdateProtectionPolicyResponse
2983
1502
  */
2984
- async enableCheckResource(request: EnableCheckResourceRequest): Promise<EnableCheckResourceResponse> {
2985
- let runtime = new $Util.RuntimeOptions({ });
1503
+ async updateProtectionPolicy(ProtectionPolicyId: string, request: $_model.UpdateProtectionPolicyRequest): Promise<$_model.UpdateProtectionPolicyResponse> {
1504
+ let runtime = new $dara.RuntimeOptions({ });
2986
1505
  let headers : {[key: string ]: string} = { };
2987
- return await this.enableCheckResourceWithOptions(request, headers, runtime);
1506
+ return await this.updateProtectionPolicyWithOptions(ProtectionPolicyId, request, headers, runtime);
2988
1507
  }
2989
1508
 
2990
1509
  /**
1510
+ * Updates a resource category.
1511
+ *
1512
+ * @param request - UpdateResourceCategoryRequest
2991
1513
  * @param headers - map
2992
1514
  * @param runtime - runtime options for this request RuntimeOptions
2993
- * @returns GetBdrcServiceResponse
1515
+ * @returns UpdateResourceCategoryResponse
2994
1516
  */
2995
- async getBdrcServiceWithOptions(headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<GetBdrcServiceResponse> {
2996
- let req = new $OpenApi.OpenApiRequest({
2997
- headers: headers,
2998
- });
2999
- let params = new $OpenApi.Params({
3000
- action: "GetBdrcService",
3001
- version: "2023-08-08",
3002
- protocol: "HTTPS",
3003
- pathname: `/api/v1/service`,
3004
- method: "GET",
3005
- authType: "AK",
3006
- style: "ROA",
3007
- reqBodyType: "json",
3008
- bodyType: "json",
3009
- });
3010
- return $tea.cast<GetBdrcServiceResponse>(await this.callApi(params, req, runtime), new GetBdrcServiceResponse({}));
3011
- }
1517
+ async updateResourceCategoryWithOptions(request: $_model.UpdateResourceCategoryRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateResourceCategoryResponse> {
1518
+ request.validate();
1519
+ let body : {[key: string ]: any} = { };
1520
+ if (!$dara.isNull(request.resourceCategoryId)) {
1521
+ body["ResourceCategoryId"] = request.resourceCategoryId;
1522
+ }
3012
1523
 
3013
- /**
3014
- * @returns GetBdrcServiceResponse
3015
- */
3016
- async getBdrcService(): Promise<GetBdrcServiceResponse> {
3017
- let runtime = new $Util.RuntimeOptions({ });
3018
- let headers : {[key: string ]: string} = { };
3019
- return await this.getBdrcServiceWithOptions(headers, runtime);
3020
- }
1524
+ if (!$dara.isNull(request.resourceCategoryName)) {
1525
+ body["ResourceCategoryName"] = request.resourceCategoryName;
1526
+ }
3021
1527
 
3022
- /**
3023
- * @param headers - map
3024
- * @param runtime - runtime options for this request RuntimeOptions
3025
- * @returns OpenBdrcServiceResponse
3026
- */
3027
- async openBdrcServiceWithOptions(headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<OpenBdrcServiceResponse> {
3028
- let req = new $OpenApi.OpenApiRequest({
1528
+ if (!$dara.isNull(request.resourceMatcher)) {
1529
+ body["ResourceMatcher"] = request.resourceMatcher;
1530
+ }
1531
+
1532
+ let req = new $OpenApiUtil.OpenApiRequest({
3029
1533
  headers: headers,
1534
+ body: OpenApiUtil.parseToMap(body),
3030
1535
  });
3031
- let params = new $OpenApi.Params({
3032
- action: "OpenBdrcService",
1536
+ let params = new $OpenApiUtil.Params({
1537
+ action: "UpdateResourceCategory",
3033
1538
  version: "2023-08-08",
3034
1539
  protocol: "HTTPS",
3035
- pathname: `/api/v1/service/open`,
1540
+ pathname: `/api/v1/resource-categories/update`,
3036
1541
  method: "POST",
3037
1542
  authType: "AK",
3038
1543
  style: "ROA",
3039
- reqBodyType: "json",
1544
+ reqBodyType: "formData",
3040
1545
  bodyType: "json",
3041
1546
  });
3042
- return $tea.cast<OpenBdrcServiceResponse>(await this.callApi(params, req, runtime), new OpenBdrcServiceResponse({}));
1547
+ return $dara.cast<$_model.UpdateResourceCategoryResponse>(await this.callApi(params, req, runtime), new $_model.UpdateResourceCategoryResponse({}));
3043
1548
  }
3044
1549
 
3045
1550
  /**
3046
- * @returns OpenBdrcServiceResponse
1551
+ * Updates a resource category.
1552
+ *
1553
+ * @param request - UpdateResourceCategoryRequest
1554
+ * @returns UpdateResourceCategoryResponse
3047
1555
  */
3048
- async openBdrcService(): Promise<OpenBdrcServiceResponse> {
3049
- let runtime = new $Util.RuntimeOptions({ });
1556
+ async updateResourceCategory(request: $_model.UpdateResourceCategoryRequest): Promise<$_model.UpdateResourceCategoryResponse> {
1557
+ let runtime = new $dara.RuntimeOptions({ });
3050
1558
  let headers : {[key: string ]: string} = { };
3051
- return await this.openBdrcServiceWithOptions(headers, runtime);
1559
+ return await this.updateResourceCategoryWithOptions(request, headers, runtime);
3052
1560
  }
3053
1561
 
3054
1562
  /**
1563
+ * Updates the resource list. When you call this operation, an asynchronous task is triggered to update your resource list and data protection score.
1564
+ *
3055
1565
  * @param request - UpdateResourcesRequest
3056
1566
  * @param headers - map
3057
1567
  * @param runtime - runtime options for this request RuntimeOptions
3058
1568
  * @returns UpdateResourcesResponse
3059
1569
  */
3060
- async updateResourcesWithOptions(request: UpdateResourcesRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<UpdateResourcesResponse> {
3061
- Util.validateModel(request);
1570
+ async updateResourcesWithOptions(request: $_model.UpdateResourcesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateResourcesResponse> {
1571
+ request.validate();
3062
1572
  let body : {[key: string ]: any} = { };
3063
- if (!Util.isUnset(request.resourceType)) {
1573
+ if (!$dara.isNull(request.resourceType)) {
3064
1574
  body["ResourceType"] = request.resourceType;
3065
1575
  }
3066
1576
 
3067
- let req = new $OpenApi.OpenApiRequest({
1577
+ let req = new $OpenApiUtil.OpenApiRequest({
3068
1578
  headers: headers,
3069
1579
  body: OpenApiUtil.parseToMap(body),
3070
1580
  });
3071
- let params = new $OpenApi.Params({
1581
+ let params = new $OpenApiUtil.Params({
3072
1582
  action: "UpdateResources",
3073
1583
  version: "2023-08-08",
3074
1584
  protocol: "HTTPS",
@@ -3079,15 +1589,17 @@ export default class Client extends OpenApi {
3079
1589
  reqBodyType: "formData",
3080
1590
  bodyType: "json",
3081
1591
  });
3082
- return $tea.cast<UpdateResourcesResponse>(await this.callApi(params, req, runtime), new UpdateResourcesResponse({}));
1592
+ return $dara.cast<$_model.UpdateResourcesResponse>(await this.callApi(params, req, runtime), new $_model.UpdateResourcesResponse({}));
3083
1593
  }
3084
1594
 
3085
1595
  /**
1596
+ * Updates the resource list. When you call this operation, an asynchronous task is triggered to update your resource list and data protection score.
1597
+ *
3086
1598
  * @param request - UpdateResourcesRequest
3087
1599
  * @returns UpdateResourcesResponse
3088
1600
  */
3089
- async updateResources(request: UpdateResourcesRequest): Promise<UpdateResourcesResponse> {
3090
- let runtime = new $Util.RuntimeOptions({ });
1601
+ async updateResources(request: $_model.UpdateResourcesRequest): Promise<$_model.UpdateResourcesResponse> {
1602
+ let runtime = new $dara.RuntimeOptions({ });
3091
1603
  let headers : {[key: string ]: string} = { };
3092
1604
  return await this.updateResourcesWithOptions(request, headers, runtime);
3093
1605
  }