@datadog/datadog-api-client 1.20.0 → 1.21.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 (248) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/packages/datadog-api-client-common/configuration.js +0 -1
  3. package/dist/packages/datadog-api-client-common/configuration.js.map +1 -1
  4. package/dist/packages/datadog-api-client-v1/apis/DowntimesApi.d.ts +7 -7
  5. package/dist/packages/datadog-api-client-v1/apis/DowntimesApi.js +7 -7
  6. package/dist/packages/datadog-api-client-v1/apis/MonitorsApi.d.ts +1 -1
  7. package/dist/packages/datadog-api-client-v1/apis/MonitorsApi.js +1 -1
  8. package/dist/packages/datadog-api-client-v1/index.d.ts +7 -0
  9. package/dist/packages/datadog-api-client-v1/index.js +14 -6
  10. package/dist/packages/datadog-api-client-v1/index.js.map +1 -1
  11. package/dist/packages/datadog-api-client-v1/models/GCPAccount.d.ts +9 -1
  12. package/dist/packages/datadog-api-client-v1/models/GCPAccount.js +8 -0
  13. package/dist/packages/datadog-api-client-v1/models/GCPAccount.js.map +1 -1
  14. package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js +13 -2
  15. package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js.map +1 -1
  16. package/dist/packages/datadog-api-client-v1/models/Organization.d.ts +1 -1
  17. package/dist/packages/datadog-api-client-v1/models/SLODataSourceQueryDefinition.d.ts +11 -0
  18. package/dist/packages/datadog-api-client-v1/models/SLODataSourceQueryDefinition.js +3 -0
  19. package/dist/packages/datadog-api-client-v1/models/SLODataSourceQueryDefinition.js.map +1 -0
  20. package/dist/packages/datadog-api-client-v1/models/SLOFormula.d.ts +28 -0
  21. package/dist/packages/datadog-api-client-v1/models/SLOFormula.js +32 -0
  22. package/dist/packages/datadog-api-client-v1/models/SLOFormula.js.map +1 -0
  23. package/dist/packages/datadog-api-client-v1/models/SLOResponseData.d.ts +5 -0
  24. package/dist/packages/datadog-api-client-v1/models/SLOResponseData.js +4 -0
  25. package/dist/packages/datadog-api-client-v1/models/SLOResponseData.js.map +1 -1
  26. package/dist/packages/datadog-api-client-v1/models/SLOSliSpec.d.ts +11 -0
  27. package/dist/packages/datadog-api-client-v1/models/SLOSliSpec.js +3 -0
  28. package/dist/packages/datadog-api-client-v1/models/SLOSliSpec.js.map +1 -0
  29. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceComparator.d.ts +14 -0
  30. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceComparator.js +13 -0
  31. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceComparator.js.map +1 -0
  32. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceCondition.d.ts +39 -0
  33. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceCondition.js +39 -0
  34. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceCondition.js.map +1 -0
  35. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceQuery.d.ts +34 -0
  36. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceQuery.js +32 -0
  37. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceQuery.js.map +1 -0
  38. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceSpec.d.ts +30 -0
  39. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceSpec.js +27 -0
  40. package/dist/packages/datadog-api-client-v1/models/SLOTimeSliceSpec.js.map +1 -0
  41. package/dist/packages/datadog-api-client-v1/models/SLOType.d.ts +2 -1
  42. package/dist/packages/datadog-api-client-v1/models/SLOType.js +2 -1
  43. package/dist/packages/datadog-api-client-v1/models/SLOType.js.map +1 -1
  44. package/dist/packages/datadog-api-client-v1/models/SLOTypeNumeric.d.ts +2 -1
  45. package/dist/packages/datadog-api-client-v1/models/SLOTypeNumeric.js +2 -1
  46. package/dist/packages/datadog-api-client-v1/models/SLOTypeNumeric.js.map +1 -1
  47. package/dist/packages/datadog-api-client-v1/models/ServiceLevelObjective.d.ts +5 -0
  48. package/dist/packages/datadog-api-client-v1/models/ServiceLevelObjective.js +4 -0
  49. package/dist/packages/datadog-api-client-v1/models/ServiceLevelObjective.js.map +1 -1
  50. package/dist/packages/datadog-api-client-v1/models/ServiceLevelObjectiveRequest.d.ts +5 -0
  51. package/dist/packages/datadog-api-client-v1/models/ServiceLevelObjectiveRequest.js +4 -0
  52. package/dist/packages/datadog-api-client-v1/models/ServiceLevelObjectiveRequest.js.map +1 -1
  53. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.d.ts +4 -0
  54. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.js +5 -0
  55. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.js.map +1 -1
  56. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.d.ts +4 -0
  57. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.js +5 -0
  58. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.js.map +1 -1
  59. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.d.ts +4 -0
  60. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.js +5 -0
  61. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.js.map +1 -1
  62. package/dist/packages/datadog-api-client-v2/apis/CIVisibilityPipelinesApi.js +0 -4
  63. package/dist/packages/datadog-api-client-v2/apis/CIVisibilityPipelinesApi.js.map +1 -1
  64. package/dist/packages/datadog-api-client-v2/apis/CloudCostManagementApi.d.ts +218 -0
  65. package/dist/packages/datadog-api-client-v2/apis/CloudCostManagementApi.js +794 -0
  66. package/dist/packages/datadog-api-client-v2/apis/CloudCostManagementApi.js.map +1 -0
  67. package/dist/packages/datadog-api-client-v2/apis/DowntimesApi.d.ts +16 -1
  68. package/dist/packages/datadog-api-client-v2/apis/DowntimesApi.js +43 -2
  69. package/dist/packages/datadog-api-client-v2/apis/DowntimesApi.js.map +1 -1
  70. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.d.ts +3 -2
  71. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.js +2 -1
  72. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.js.map +1 -1
  73. package/dist/packages/datadog-api-client-v2/index.d.ts +45 -0
  74. package/dist/packages/datadog-api-client-v2/index.js +94 -21
  75. package/dist/packages/datadog-api-client-v2/index.js.map +1 -1
  76. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccount.d.ts +38 -0
  77. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccount.js +36 -0
  78. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccount.js.map +1 -0
  79. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountAttributes.d.ts +32 -0
  80. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountAttributes.js +35 -0
  81. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountAttributes.js.map +1 -0
  82. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountType.d.ts +11 -0
  83. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountType.js +10 -0
  84. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountType.js.map +1 -0
  85. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountsResponse.d.ts +29 -0
  86. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountsResponse.js +26 -0
  87. package/dist/packages/datadog-api-client-v2/models/AWSRelatedAccountsResponse.js.map +1 -0
  88. package/dist/packages/datadog-api-client-v2/models/AwsCURConfig.d.ts +38 -0
  89. package/dist/packages/datadog-api-client-v2/models/AwsCURConfig.js +37 -0
  90. package/dist/packages/datadog-api-client-v2/models/AwsCURConfig.js.map +1 -0
  91. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigAttributes.d.ts +68 -0
  92. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigAttributes.js +78 -0
  93. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigAttributes.js.map +1 -0
  94. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchData.d.ts +34 -0
  95. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchData.js +32 -0
  96. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchData.js.map +1 -0
  97. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequest.d.ts +29 -0
  98. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequest.js +27 -0
  99. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequest.js.map +1 -0
  100. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequestAttributes.d.ts +28 -0
  101. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequestAttributes.js +32 -0
  102. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequestAttributes.js.map +1 -0
  103. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequestType.d.ts +11 -0
  104. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequestType.js +10 -0
  105. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPatchRequestType.js.map +1 -0
  106. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostData.d.ts +34 -0
  107. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostData.js +32 -0
  108. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostData.js.map +1 -0
  109. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequest.d.ts +29 -0
  110. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequest.js +27 -0
  111. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequest.js.map +1 -0
  112. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequestAttributes.d.ts +52 -0
  113. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequestAttributes.js +60 -0
  114. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequestAttributes.js.map +1 -0
  115. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequestType.d.ts +11 -0
  116. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequestType.js +10 -0
  117. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigPostRequestType.js.map +1 -0
  118. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigResponse.d.ts +29 -0
  119. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigResponse.js +26 -0
  120. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigResponse.js.map +1 -0
  121. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigType.d.ts +11 -0
  122. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigType.js +10 -0
  123. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigType.js.map +1 -0
  124. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigsResponse.d.ts +29 -0
  125. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigsResponse.js +26 -0
  126. package/dist/packages/datadog-api-client-v2/models/AwsCURConfigsResponse.js.map +1 -0
  127. package/dist/packages/datadog-api-client-v2/models/AzureUCConfig.d.ts +84 -0
  128. package/dist/packages/datadog-api-client-v2/models/AzureUCConfig.js +98 -0
  129. package/dist/packages/datadog-api-client-v2/models/AzureUCConfig.js.map +1 -0
  130. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPair.d.ts +38 -0
  131. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPair.js +37 -0
  132. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPair.js.map +1 -0
  133. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairAttributes.d.ts +33 -0
  134. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairAttributes.js +32 -0
  135. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairAttributes.js.map +1 -0
  136. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairType.d.ts +11 -0
  137. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairType.js +10 -0
  138. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairType.js.map +1 -0
  139. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairsResponse.d.ts +29 -0
  140. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairsResponse.js +26 -0
  141. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPairsResponse.js.map +1 -0
  142. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchData.d.ts +34 -0
  143. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchData.js +32 -0
  144. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchData.js.map +1 -0
  145. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequest.d.ts +29 -0
  146. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequest.js +27 -0
  147. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequest.js.map +1 -0
  148. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequestAttributes.d.ts +28 -0
  149. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequestAttributes.js +32 -0
  150. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequestAttributes.js.map +1 -0
  151. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequestType.d.ts +11 -0
  152. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequestType.js +10 -0
  153. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPatchRequestType.js.map +1 -0
  154. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostData.d.ts +34 -0
  155. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostData.js +32 -0
  156. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostData.js.map +1 -0
  157. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequest.d.ts +29 -0
  158. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequest.js +27 -0
  159. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequest.js.map +1 -0
  160. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequestAttributes.d.ts +49 -0
  161. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequestAttributes.js +51 -0
  162. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequestAttributes.js.map +1 -0
  163. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequestType.d.ts +11 -0
  164. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequestType.js +10 -0
  165. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigPostRequestType.js.map +1 -0
  166. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigsResponse.d.ts +29 -0
  167. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigsResponse.js +26 -0
  168. package/dist/packages/datadog-api-client-v2/models/AzureUCConfigsResponse.js.map +1 -0
  169. package/dist/packages/datadog-api-client-v2/models/BillConfig.d.ts +40 -0
  170. package/dist/packages/datadog-api-client-v2/models/BillConfig.js +47 -0
  171. package/dist/packages/datadog-api-client-v2/models/BillConfig.js.map +1 -0
  172. package/dist/packages/datadog-api-client-v2/models/CloudCostActivity.d.ts +34 -0
  173. package/dist/packages/datadog-api-client-v2/models/CloudCostActivity.js +32 -0
  174. package/dist/packages/datadog-api-client-v2/models/CloudCostActivity.js.map +1 -0
  175. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityAttributes.d.ts +28 -0
  176. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityAttributes.js +32 -0
  177. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityAttributes.js.map +1 -0
  178. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityResponse.d.ts +29 -0
  179. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityResponse.js +26 -0
  180. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityResponse.js.map +1 -0
  181. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityType.d.ts +11 -0
  182. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityType.js +10 -0
  183. package/dist/packages/datadog-api-client-v2/models/CloudCostActivityType.js.map +1 -0
  184. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountCreateRequestAttributes.d.ts +8 -0
  185. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountCreateRequestAttributes.js +8 -0
  186. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountCreateRequestAttributes.js.map +1 -1
  187. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountResponseAttributes.d.ts +8 -0
  188. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountResponseAttributes.js +8 -0
  189. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountResponseAttributes.js.map +1 -1
  190. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountUpdateRequestAttributes.d.ts +8 -0
  191. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountUpdateRequestAttributes.js +8 -0
  192. package/dist/packages/datadog-api-client-v2/models/CloudflareAccountUpdateRequestAttributes.js.map +1 -1
  193. package/dist/packages/datadog-api-client-v2/models/GCPSTSServiceAccountAttributes.d.ts +9 -1
  194. package/dist/packages/datadog-api-client-v2/models/GCPSTSServiceAccountAttributes.js +8 -0
  195. package/dist/packages/datadog-api-client-v2/models/GCPSTSServiceAccountAttributes.js.map +1 -1
  196. package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js +79 -0
  197. package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js.map +1 -1
  198. package/dist/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeam.d.ts +29 -0
  199. package/dist/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeam.js +27 -0
  200. package/dist/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeam.js.map +1 -0
  201. package/dist/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeamData.d.ts +33 -0
  202. package/dist/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeamData.js +32 -0
  203. package/dist/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeamData.js.map +1 -0
  204. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleOptions.d.ts +5 -0
  205. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleOptions.js +4 -0
  206. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleOptions.js.map +1 -1
  207. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleThirdPartyOptions.d.ts +42 -0
  208. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleThirdPartyOptions.js +38 -0
  209. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleThirdPartyOptions.js.map +1 -0
  210. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleUpdatePayload.d.ts +5 -0
  211. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleUpdatePayload.js +4 -0
  212. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleUpdatePayload.js.map +1 -1
  213. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.d.ts +5 -0
  214. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.js +4 -0
  215. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.js.map +1 -1
  216. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.d.ts +5 -0
  217. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.js +4 -0
  218. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.js.map +1 -1
  219. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRootQuery.d.ts +32 -0
  220. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRootQuery.js +35 -0
  221. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRootQuery.js.map +1 -0
  222. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRuleCase.d.ts +41 -0
  223. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRuleCase.js +38 -0
  224. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRuleCase.js.map +1 -0
  225. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRuleCaseCreate.d.ts +41 -0
  226. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRuleCaseCreate.js +39 -0
  227. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringThirdPartyRuleCaseCreate.js.map +1 -0
  228. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerIncludedKeywordConfiguration.d.ts +37 -0
  229. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerIncludedKeywordConfiguration.js +41 -0
  230. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerIncludedKeywordConfiguration.js.map +1 -0
  231. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerRuleAttributes.d.ts +12 -0
  232. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerRuleAttributes.js +9 -0
  233. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerRuleAttributes.js.map +1 -1
  234. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerStandardPatternAttributes.d.ts +4 -0
  235. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerStandardPatternAttributes.js +5 -0
  236. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerStandardPatternAttributes.js.map +1 -1
  237. package/dist/packages/datadog-api-client-v2/models/UserTeamAttributes.d.ts +9 -0
  238. package/dist/packages/datadog-api-client-v2/models/UserTeamAttributes.js +8 -0
  239. package/dist/packages/datadog-api-client-v2/models/UserTeamAttributes.js.map +1 -1
  240. package/dist/packages/datadog-api-client-v2/models/UserTeamRelationships.d.ts +5 -0
  241. package/dist/packages/datadog-api-client-v2/models/UserTeamRelationships.js +4 -0
  242. package/dist/packages/datadog-api-client-v2/models/UserTeamRelationships.js.map +1 -1
  243. package/dist/packages/datadog-api-client-v2/models/UserTeamTeamType.d.ts +11 -0
  244. package/dist/packages/datadog-api-client-v2/models/UserTeamTeamType.js +10 -0
  245. package/dist/packages/datadog-api-client-v2/models/UserTeamTeamType.js.map +1 -0
  246. package/dist/version.d.ts +1 -1
  247. package/dist/version.js +1 -1
  248. package/package.json +1 -1
@@ -0,0 +1,794 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CloudCostManagementApi = exports.CloudCostManagementApiResponseProcessor = exports.CloudCostManagementApiRequestFactory = void 0;
13
+ const baseapi_1 = require("../../datadog-api-client-common/baseapi");
14
+ const configuration_1 = require("../../datadog-api-client-common/configuration");
15
+ const http_1 = require("../../datadog-api-client-common/http/http");
16
+ const logger_1 = require("../../../logger");
17
+ const ObjectSerializer_1 = require("../models/ObjectSerializer");
18
+ const exception_1 = require("../../datadog-api-client-common/exception");
19
+ class CloudCostManagementApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
20
+ createCostAWSCURConfig(body, _options) {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ const _config = _options || this.configuration;
23
+ // verify required parameter 'body' is not null or undefined
24
+ if (body === null || body === undefined) {
25
+ throw new baseapi_1.RequiredError("body", "createCostAWSCURConfig");
26
+ }
27
+ // Path Params
28
+ const localVarPath = "/api/v2/cost/aws_cur_config";
29
+ // Make Request Context
30
+ const requestContext = _config
31
+ .getServer("v2.CloudCostManagementApi.createCostAWSCURConfig")
32
+ .makeRequestContext(localVarPath, http_1.HttpMethod.POST);
33
+ requestContext.setHeaderParam("Accept", "application/json");
34
+ requestContext.setHttpConfig(_config.httpConfig);
35
+ // Body Params
36
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
37
+ "application/json",
38
+ ]);
39
+ requestContext.setHeaderParam("Content-Type", contentType);
40
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "AwsCURConfigPostRequest", ""), contentType);
41
+ requestContext.setBody(serializedBody);
42
+ // Apply auth methods
43
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
44
+ "apiKeyAuth",
45
+ "appKeyAuth",
46
+ ]);
47
+ return requestContext;
48
+ });
49
+ }
50
+ createCostAzureUCConfigs(body, _options) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ const _config = _options || this.configuration;
53
+ // verify required parameter 'body' is not null or undefined
54
+ if (body === null || body === undefined) {
55
+ throw new baseapi_1.RequiredError("body", "createCostAzureUCConfigs");
56
+ }
57
+ // Path Params
58
+ const localVarPath = "/api/v2/cost/azure_uc_config";
59
+ // Make Request Context
60
+ const requestContext = _config
61
+ .getServer("v2.CloudCostManagementApi.createCostAzureUCConfigs")
62
+ .makeRequestContext(localVarPath, http_1.HttpMethod.POST);
63
+ requestContext.setHeaderParam("Accept", "application/json");
64
+ requestContext.setHttpConfig(_config.httpConfig);
65
+ // Body Params
66
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
67
+ "application/json",
68
+ ]);
69
+ requestContext.setHeaderParam("Content-Type", contentType);
70
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "AzureUCConfigPostRequest", ""), contentType);
71
+ requestContext.setBody(serializedBody);
72
+ // Apply auth methods
73
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
74
+ "apiKeyAuth",
75
+ "appKeyAuth",
76
+ ]);
77
+ return requestContext;
78
+ });
79
+ }
80
+ deleteCostAWSCURConfig(cloudAccountId, _options) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ const _config = _options || this.configuration;
83
+ // verify required parameter 'cloudAccountId' is not null or undefined
84
+ if (cloudAccountId === null || cloudAccountId === undefined) {
85
+ throw new baseapi_1.RequiredError("cloudAccountId", "deleteCostAWSCURConfig");
86
+ }
87
+ // Path Params
88
+ const localVarPath = "/api/v2/cost/aws_cur_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId)));
89
+ // Make Request Context
90
+ const requestContext = _config
91
+ .getServer("v2.CloudCostManagementApi.deleteCostAWSCURConfig")
92
+ .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
93
+ requestContext.setHeaderParam("Accept", "*/*");
94
+ requestContext.setHttpConfig(_config.httpConfig);
95
+ // Apply auth methods
96
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
97
+ "apiKeyAuth",
98
+ "appKeyAuth",
99
+ ]);
100
+ return requestContext;
101
+ });
102
+ }
103
+ deleteCostAzureUCConfig(cloudAccountId, _options) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ const _config = _options || this.configuration;
106
+ // verify required parameter 'cloudAccountId' is not null or undefined
107
+ if (cloudAccountId === null || cloudAccountId === undefined) {
108
+ throw new baseapi_1.RequiredError("cloudAccountId", "deleteCostAzureUCConfig");
109
+ }
110
+ // Path Params
111
+ const localVarPath = "/api/v2/cost/azure_uc_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId)));
112
+ // Make Request Context
113
+ const requestContext = _config
114
+ .getServer("v2.CloudCostManagementApi.deleteCostAzureUCConfig")
115
+ .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
116
+ requestContext.setHeaderParam("Accept", "*/*");
117
+ requestContext.setHttpConfig(_config.httpConfig);
118
+ // Apply auth methods
119
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
120
+ "apiKeyAuth",
121
+ "appKeyAuth",
122
+ ]);
123
+ return requestContext;
124
+ });
125
+ }
126
+ getCloudCostActivity(_options) {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ const _config = _options || this.configuration;
129
+ // Path Params
130
+ const localVarPath = "/api/v2/cost/enabled";
131
+ // Make Request Context
132
+ const requestContext = _config
133
+ .getServer("v2.CloudCostManagementApi.getCloudCostActivity")
134
+ .makeRequestContext(localVarPath, http_1.HttpMethod.GET);
135
+ requestContext.setHeaderParam("Accept", "application/json");
136
+ requestContext.setHttpConfig(_config.httpConfig);
137
+ // Apply auth methods
138
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
139
+ "apiKeyAuth",
140
+ "appKeyAuth",
141
+ ]);
142
+ return requestContext;
143
+ });
144
+ }
145
+ listAWSRelatedAccounts(filterManagementAccountId, _options) {
146
+ return __awaiter(this, void 0, void 0, function* () {
147
+ const _config = _options || this.configuration;
148
+ // verify required parameter 'filterManagementAccountId' is not null or undefined
149
+ if (filterManagementAccountId === null ||
150
+ filterManagementAccountId === undefined) {
151
+ throw new baseapi_1.RequiredError("filterManagementAccountId", "listAWSRelatedAccounts");
152
+ }
153
+ // Path Params
154
+ const localVarPath = "/api/v2/cost/aws_related_accounts";
155
+ // Make Request Context
156
+ const requestContext = _config
157
+ .getServer("v2.CloudCostManagementApi.listAWSRelatedAccounts")
158
+ .makeRequestContext(localVarPath, http_1.HttpMethod.GET);
159
+ requestContext.setHeaderParam("Accept", "application/json");
160
+ requestContext.setHttpConfig(_config.httpConfig);
161
+ // Query Params
162
+ if (filterManagementAccountId !== undefined) {
163
+ requestContext.setQueryParam("filter[management_account_id]", ObjectSerializer_1.ObjectSerializer.serialize(filterManagementAccountId, "string", ""));
164
+ }
165
+ // Apply auth methods
166
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
167
+ "apiKeyAuth",
168
+ "appKeyAuth",
169
+ ]);
170
+ return requestContext;
171
+ });
172
+ }
173
+ listCostAWSCURConfigs(_options) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ const _config = _options || this.configuration;
176
+ // Path Params
177
+ const localVarPath = "/api/v2/cost/aws_cur_config";
178
+ // Make Request Context
179
+ const requestContext = _config
180
+ .getServer("v2.CloudCostManagementApi.listCostAWSCURConfigs")
181
+ .makeRequestContext(localVarPath, http_1.HttpMethod.GET);
182
+ requestContext.setHeaderParam("Accept", "application/json");
183
+ requestContext.setHttpConfig(_config.httpConfig);
184
+ // Apply auth methods
185
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
186
+ "apiKeyAuth",
187
+ "appKeyAuth",
188
+ ]);
189
+ return requestContext;
190
+ });
191
+ }
192
+ listCostAzureUCConfigs(_options) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const _config = _options || this.configuration;
195
+ // Path Params
196
+ const localVarPath = "/api/v2/cost/azure_uc_config";
197
+ // Make Request Context
198
+ const requestContext = _config
199
+ .getServer("v2.CloudCostManagementApi.listCostAzureUCConfigs")
200
+ .makeRequestContext(localVarPath, http_1.HttpMethod.GET);
201
+ requestContext.setHeaderParam("Accept", "application/json");
202
+ requestContext.setHttpConfig(_config.httpConfig);
203
+ // Apply auth methods
204
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
205
+ "apiKeyAuth",
206
+ "appKeyAuth",
207
+ ]);
208
+ return requestContext;
209
+ });
210
+ }
211
+ updateCostAWSCURConfig(cloudAccountId, body, _options) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ const _config = _options || this.configuration;
214
+ // verify required parameter 'cloudAccountId' is not null or undefined
215
+ if (cloudAccountId === null || cloudAccountId === undefined) {
216
+ throw new baseapi_1.RequiredError("cloudAccountId", "updateCostAWSCURConfig");
217
+ }
218
+ // verify required parameter 'body' is not null or undefined
219
+ if (body === null || body === undefined) {
220
+ throw new baseapi_1.RequiredError("body", "updateCostAWSCURConfig");
221
+ }
222
+ // Path Params
223
+ const localVarPath = "/api/v2/cost/aws_cur_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId)));
224
+ // Make Request Context
225
+ const requestContext = _config
226
+ .getServer("v2.CloudCostManagementApi.updateCostAWSCURConfig")
227
+ .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
228
+ requestContext.setHeaderParam("Accept", "application/json");
229
+ requestContext.setHttpConfig(_config.httpConfig);
230
+ // Body Params
231
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
232
+ "application/json",
233
+ ]);
234
+ requestContext.setHeaderParam("Content-Type", contentType);
235
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "AwsCURConfigPatchRequest", ""), contentType);
236
+ requestContext.setBody(serializedBody);
237
+ // Apply auth methods
238
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
239
+ "apiKeyAuth",
240
+ "appKeyAuth",
241
+ ]);
242
+ return requestContext;
243
+ });
244
+ }
245
+ updateCostAzureUCConfigs(cloudAccountId, body, _options) {
246
+ return __awaiter(this, void 0, void 0, function* () {
247
+ const _config = _options || this.configuration;
248
+ // verify required parameter 'cloudAccountId' is not null or undefined
249
+ if (cloudAccountId === null || cloudAccountId === undefined) {
250
+ throw new baseapi_1.RequiredError("cloudAccountId", "updateCostAzureUCConfigs");
251
+ }
252
+ // verify required parameter 'body' is not null or undefined
253
+ if (body === null || body === undefined) {
254
+ throw new baseapi_1.RequiredError("body", "updateCostAzureUCConfigs");
255
+ }
256
+ // Path Params
257
+ const localVarPath = "/api/v2/cost/azure_uc_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId)));
258
+ // Make Request Context
259
+ const requestContext = _config
260
+ .getServer("v2.CloudCostManagementApi.updateCostAzureUCConfigs")
261
+ .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
262
+ requestContext.setHeaderParam("Accept", "application/json");
263
+ requestContext.setHttpConfig(_config.httpConfig);
264
+ // Body Params
265
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
266
+ "application/json",
267
+ ]);
268
+ requestContext.setHeaderParam("Content-Type", contentType);
269
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "AzureUCConfigPatchRequest", ""), contentType);
270
+ requestContext.setBody(serializedBody);
271
+ // Apply auth methods
272
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
273
+ "apiKeyAuth",
274
+ "appKeyAuth",
275
+ ]);
276
+ return requestContext;
277
+ });
278
+ }
279
+ }
280
+ exports.CloudCostManagementApiRequestFactory = CloudCostManagementApiRequestFactory;
281
+ class CloudCostManagementApiResponseProcessor {
282
+ /**
283
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
284
+ * to the expected objects
285
+ *
286
+ * @params response Response returned by the server for a request to createCostAWSCURConfig
287
+ * @throws ApiException if the response code was not in [200, 299]
288
+ */
289
+ createCostAWSCURConfig(response) {
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
292
+ if (response.httpStatusCode == 200) {
293
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AwsCURConfigResponse");
294
+ return body;
295
+ }
296
+ if (response.httpStatusCode == 400 ||
297
+ response.httpStatusCode == 403 ||
298
+ response.httpStatusCode == 429) {
299
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
300
+ let body;
301
+ try {
302
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
303
+ }
304
+ catch (error) {
305
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
306
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
307
+ }
308
+ throw new exception_1.ApiException(response.httpStatusCode, body);
309
+ }
310
+ // Work around for missing responses in specification, e.g. for petstore.yaml
311
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
312
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AwsCURConfigResponse", "");
313
+ return body;
314
+ }
315
+ const body = (yield response.body.text()) || "";
316
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
317
+ });
318
+ }
319
+ /**
320
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
321
+ * to the expected objects
322
+ *
323
+ * @params response Response returned by the server for a request to createCostAzureUCConfigs
324
+ * @throws ApiException if the response code was not in [200, 299]
325
+ */
326
+ createCostAzureUCConfigs(response) {
327
+ return __awaiter(this, void 0, void 0, function* () {
328
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
329
+ if (response.httpStatusCode == 200) {
330
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AzureUCConfigPairsResponse");
331
+ return body;
332
+ }
333
+ if (response.httpStatusCode == 400 ||
334
+ response.httpStatusCode == 403 ||
335
+ response.httpStatusCode == 429) {
336
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
337
+ let body;
338
+ try {
339
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
340
+ }
341
+ catch (error) {
342
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
343
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
344
+ }
345
+ throw new exception_1.ApiException(response.httpStatusCode, body);
346
+ }
347
+ // Work around for missing responses in specification, e.g. for petstore.yaml
348
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
349
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AzureUCConfigPairsResponse", "");
350
+ return body;
351
+ }
352
+ const body = (yield response.body.text()) || "";
353
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
354
+ });
355
+ }
356
+ /**
357
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
358
+ * to the expected objects
359
+ *
360
+ * @params response Response returned by the server for a request to deleteCostAWSCURConfig
361
+ * @throws ApiException if the response code was not in [200, 299]
362
+ */
363
+ deleteCostAWSCURConfig(response) {
364
+ return __awaiter(this, void 0, void 0, function* () {
365
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
366
+ if (response.httpStatusCode == 204) {
367
+ return;
368
+ }
369
+ if (response.httpStatusCode == 400 ||
370
+ response.httpStatusCode == 404 ||
371
+ response.httpStatusCode == 429) {
372
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
373
+ let body;
374
+ try {
375
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
376
+ }
377
+ catch (error) {
378
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
379
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
380
+ }
381
+ throw new exception_1.ApiException(response.httpStatusCode, body);
382
+ }
383
+ // Work around for missing responses in specification, e.g. for petstore.yaml
384
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
385
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
386
+ return body;
387
+ }
388
+ const body = (yield response.body.text()) || "";
389
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
390
+ });
391
+ }
392
+ /**
393
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
394
+ * to the expected objects
395
+ *
396
+ * @params response Response returned by the server for a request to deleteCostAzureUCConfig
397
+ * @throws ApiException if the response code was not in [200, 299]
398
+ */
399
+ deleteCostAzureUCConfig(response) {
400
+ return __awaiter(this, void 0, void 0, function* () {
401
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
402
+ if (response.httpStatusCode == 204) {
403
+ return;
404
+ }
405
+ if (response.httpStatusCode == 400 ||
406
+ response.httpStatusCode == 404 ||
407
+ response.httpStatusCode == 429) {
408
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
409
+ let body;
410
+ try {
411
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
412
+ }
413
+ catch (error) {
414
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
415
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
416
+ }
417
+ throw new exception_1.ApiException(response.httpStatusCode, body);
418
+ }
419
+ // Work around for missing responses in specification, e.g. for petstore.yaml
420
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
421
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
422
+ return body;
423
+ }
424
+ const body = (yield response.body.text()) || "";
425
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
426
+ });
427
+ }
428
+ /**
429
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
430
+ * to the expected objects
431
+ *
432
+ * @params response Response returned by the server for a request to getCloudCostActivity
433
+ * @throws ApiException if the response code was not in [200, 299]
434
+ */
435
+ getCloudCostActivity(response) {
436
+ return __awaiter(this, void 0, void 0, function* () {
437
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
438
+ if (response.httpStatusCode == 200) {
439
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CloudCostActivityResponse");
440
+ return body;
441
+ }
442
+ if (response.httpStatusCode == 403 || response.httpStatusCode == 429) {
443
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
444
+ let body;
445
+ try {
446
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
447
+ }
448
+ catch (error) {
449
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
450
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
451
+ }
452
+ throw new exception_1.ApiException(response.httpStatusCode, body);
453
+ }
454
+ // Work around for missing responses in specification, e.g. for petstore.yaml
455
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
456
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CloudCostActivityResponse", "");
457
+ return body;
458
+ }
459
+ const body = (yield response.body.text()) || "";
460
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
461
+ });
462
+ }
463
+ /**
464
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
465
+ * to the expected objects
466
+ *
467
+ * @params response Response returned by the server for a request to listAWSRelatedAccounts
468
+ * @throws ApiException if the response code was not in [200, 299]
469
+ */
470
+ listAWSRelatedAccounts(response) {
471
+ return __awaiter(this, void 0, void 0, function* () {
472
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
473
+ if (response.httpStatusCode == 200) {
474
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AWSRelatedAccountsResponse");
475
+ return body;
476
+ }
477
+ if (response.httpStatusCode == 400 ||
478
+ response.httpStatusCode == 403 ||
479
+ response.httpStatusCode == 429) {
480
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
481
+ let body;
482
+ try {
483
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
484
+ }
485
+ catch (error) {
486
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
487
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
488
+ }
489
+ throw new exception_1.ApiException(response.httpStatusCode, body);
490
+ }
491
+ // Work around for missing responses in specification, e.g. for petstore.yaml
492
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
493
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AWSRelatedAccountsResponse", "");
494
+ return body;
495
+ }
496
+ const body = (yield response.body.text()) || "";
497
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
498
+ });
499
+ }
500
+ /**
501
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
502
+ * to the expected objects
503
+ *
504
+ * @params response Response returned by the server for a request to listCostAWSCURConfigs
505
+ * @throws ApiException if the response code was not in [200, 299]
506
+ */
507
+ listCostAWSCURConfigs(response) {
508
+ return __awaiter(this, void 0, void 0, function* () {
509
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
510
+ if (response.httpStatusCode == 200) {
511
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AwsCURConfigsResponse");
512
+ return body;
513
+ }
514
+ if (response.httpStatusCode == 403 || response.httpStatusCode == 429) {
515
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
516
+ let body;
517
+ try {
518
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
519
+ }
520
+ catch (error) {
521
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
522
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
523
+ }
524
+ throw new exception_1.ApiException(response.httpStatusCode, body);
525
+ }
526
+ // Work around for missing responses in specification, e.g. for petstore.yaml
527
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
528
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AwsCURConfigsResponse", "");
529
+ return body;
530
+ }
531
+ const body = (yield response.body.text()) || "";
532
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
533
+ });
534
+ }
535
+ /**
536
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
537
+ * to the expected objects
538
+ *
539
+ * @params response Response returned by the server for a request to listCostAzureUCConfigs
540
+ * @throws ApiException if the response code was not in [200, 299]
541
+ */
542
+ listCostAzureUCConfigs(response) {
543
+ return __awaiter(this, void 0, void 0, function* () {
544
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
545
+ if (response.httpStatusCode == 200) {
546
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AzureUCConfigsResponse");
547
+ return body;
548
+ }
549
+ if (response.httpStatusCode == 403 || response.httpStatusCode == 429) {
550
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
551
+ let body;
552
+ try {
553
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
554
+ }
555
+ catch (error) {
556
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
557
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
558
+ }
559
+ throw new exception_1.ApiException(response.httpStatusCode, body);
560
+ }
561
+ // Work around for missing responses in specification, e.g. for petstore.yaml
562
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
563
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AzureUCConfigsResponse", "");
564
+ return body;
565
+ }
566
+ const body = (yield response.body.text()) || "";
567
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
568
+ });
569
+ }
570
+ /**
571
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
572
+ * to the expected objects
573
+ *
574
+ * @params response Response returned by the server for a request to updateCostAWSCURConfig
575
+ * @throws ApiException if the response code was not in [200, 299]
576
+ */
577
+ updateCostAWSCURConfig(response) {
578
+ return __awaiter(this, void 0, void 0, function* () {
579
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
580
+ if (response.httpStatusCode == 200) {
581
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AwsCURConfigsResponse");
582
+ return body;
583
+ }
584
+ if (response.httpStatusCode == 403 || response.httpStatusCode == 429) {
585
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
586
+ let body;
587
+ try {
588
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
589
+ }
590
+ catch (error) {
591
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
592
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
593
+ }
594
+ throw new exception_1.ApiException(response.httpStatusCode, body);
595
+ }
596
+ // Work around for missing responses in specification, e.g. for petstore.yaml
597
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
598
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AwsCURConfigsResponse", "");
599
+ return body;
600
+ }
601
+ const body = (yield response.body.text()) || "";
602
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
603
+ });
604
+ }
605
+ /**
606
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
607
+ * to the expected objects
608
+ *
609
+ * @params response Response returned by the server for a request to updateCostAzureUCConfigs
610
+ * @throws ApiException if the response code was not in [200, 299]
611
+ */
612
+ updateCostAzureUCConfigs(response) {
613
+ return __awaiter(this, void 0, void 0, function* () {
614
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
615
+ if (response.httpStatusCode == 200) {
616
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AzureUCConfigPairsResponse");
617
+ return body;
618
+ }
619
+ if (response.httpStatusCode == 400 ||
620
+ response.httpStatusCode == 403 ||
621
+ response.httpStatusCode == 429) {
622
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
623
+ let body;
624
+ try {
625
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
626
+ }
627
+ catch (error) {
628
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
629
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
630
+ }
631
+ throw new exception_1.ApiException(response.httpStatusCode, body);
632
+ }
633
+ // Work around for missing responses in specification, e.g. for petstore.yaml
634
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
635
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "AzureUCConfigPairsResponse", "");
636
+ return body;
637
+ }
638
+ const body = (yield response.body.text()) || "";
639
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
640
+ });
641
+ }
642
+ }
643
+ exports.CloudCostManagementApiResponseProcessor = CloudCostManagementApiResponseProcessor;
644
+ class CloudCostManagementApi {
645
+ constructor(configuration, requestFactory, responseProcessor) {
646
+ this.configuration = configuration;
647
+ this.requestFactory =
648
+ requestFactory || new CloudCostManagementApiRequestFactory(configuration);
649
+ this.responseProcessor =
650
+ responseProcessor || new CloudCostManagementApiResponseProcessor();
651
+ }
652
+ /**
653
+ * Create a Cloud Cost Management account for an AWS CUR config.
654
+ * @param param The request object
655
+ */
656
+ createCostAWSCURConfig(param, options) {
657
+ const requestContextPromise = this.requestFactory.createCostAWSCURConfig(param.body, options);
658
+ return requestContextPromise.then((requestContext) => {
659
+ return this.configuration.httpApi
660
+ .send(requestContext)
661
+ .then((responseContext) => {
662
+ return this.responseProcessor.createCostAWSCURConfig(responseContext);
663
+ });
664
+ });
665
+ }
666
+ /**
667
+ * Create a Cloud Cost Management account for an Azure config.
668
+ * @param param The request object
669
+ */
670
+ createCostAzureUCConfigs(param, options) {
671
+ const requestContextPromise = this.requestFactory.createCostAzureUCConfigs(param.body, options);
672
+ return requestContextPromise.then((requestContext) => {
673
+ return this.configuration.httpApi
674
+ .send(requestContext)
675
+ .then((responseContext) => {
676
+ return this.responseProcessor.createCostAzureUCConfigs(responseContext);
677
+ });
678
+ });
679
+ }
680
+ /**
681
+ * Archive a Cloud Cost Management Account.
682
+ * @param param The request object
683
+ */
684
+ deleteCostAWSCURConfig(param, options) {
685
+ const requestContextPromise = this.requestFactory.deleteCostAWSCURConfig(param.cloudAccountId, options);
686
+ return requestContextPromise.then((requestContext) => {
687
+ return this.configuration.httpApi
688
+ .send(requestContext)
689
+ .then((responseContext) => {
690
+ return this.responseProcessor.deleteCostAWSCURConfig(responseContext);
691
+ });
692
+ });
693
+ }
694
+ /**
695
+ * Archive a Cloud Cost Management Account.
696
+ * @param param The request object
697
+ */
698
+ deleteCostAzureUCConfig(param, options) {
699
+ const requestContextPromise = this.requestFactory.deleteCostAzureUCConfig(param.cloudAccountId, options);
700
+ return requestContextPromise.then((requestContext) => {
701
+ return this.configuration.httpApi
702
+ .send(requestContext)
703
+ .then((responseContext) => {
704
+ return this.responseProcessor.deleteCostAzureUCConfig(responseContext);
705
+ });
706
+ });
707
+ }
708
+ /**
709
+ * Get the Cloud Cost Management activity.
710
+ * @param param The request object
711
+ */
712
+ getCloudCostActivity(options) {
713
+ const requestContextPromise = this.requestFactory.getCloudCostActivity(options);
714
+ return requestContextPromise.then((requestContext) => {
715
+ return this.configuration.httpApi
716
+ .send(requestContext)
717
+ .then((responseContext) => {
718
+ return this.responseProcessor.getCloudCostActivity(responseContext);
719
+ });
720
+ });
721
+ }
722
+ /**
723
+ * List the AWS accounts in an organization by calling 'organizations:ListAccounts' from the specified management account.
724
+ * @param param The request object
725
+ */
726
+ listAWSRelatedAccounts(param, options) {
727
+ const requestContextPromise = this.requestFactory.listAWSRelatedAccounts(param.filterManagementAccountId, options);
728
+ return requestContextPromise.then((requestContext) => {
729
+ return this.configuration.httpApi
730
+ .send(requestContext)
731
+ .then((responseContext) => {
732
+ return this.responseProcessor.listAWSRelatedAccounts(responseContext);
733
+ });
734
+ });
735
+ }
736
+ /**
737
+ * List the AWS CUR configs.
738
+ * @param param The request object
739
+ */
740
+ listCostAWSCURConfigs(options) {
741
+ const requestContextPromise = this.requestFactory.listCostAWSCURConfigs(options);
742
+ return requestContextPromise.then((requestContext) => {
743
+ return this.configuration.httpApi
744
+ .send(requestContext)
745
+ .then((responseContext) => {
746
+ return this.responseProcessor.listCostAWSCURConfigs(responseContext);
747
+ });
748
+ });
749
+ }
750
+ /**
751
+ * List the Azure configs.
752
+ * @param param The request object
753
+ */
754
+ listCostAzureUCConfigs(options) {
755
+ const requestContextPromise = this.requestFactory.listCostAzureUCConfigs(options);
756
+ return requestContextPromise.then((requestContext) => {
757
+ return this.configuration.httpApi
758
+ .send(requestContext)
759
+ .then((responseContext) => {
760
+ return this.responseProcessor.listCostAzureUCConfigs(responseContext);
761
+ });
762
+ });
763
+ }
764
+ /**
765
+ * Update the status of an AWS CUR config (active/archived).
766
+ * @param param The request object
767
+ */
768
+ updateCostAWSCURConfig(param, options) {
769
+ const requestContextPromise = this.requestFactory.updateCostAWSCURConfig(param.cloudAccountId, param.body, options);
770
+ return requestContextPromise.then((requestContext) => {
771
+ return this.configuration.httpApi
772
+ .send(requestContext)
773
+ .then((responseContext) => {
774
+ return this.responseProcessor.updateCostAWSCURConfig(responseContext);
775
+ });
776
+ });
777
+ }
778
+ /**
779
+ * Update the status of an Azure config (active/archived).
780
+ * @param param The request object
781
+ */
782
+ updateCostAzureUCConfigs(param, options) {
783
+ const requestContextPromise = this.requestFactory.updateCostAzureUCConfigs(param.cloudAccountId, param.body, options);
784
+ return requestContextPromise.then((requestContext) => {
785
+ return this.configuration.httpApi
786
+ .send(requestContext)
787
+ .then((responseContext) => {
788
+ return this.responseProcessor.updateCostAzureUCConfigs(responseContext);
789
+ });
790
+ });
791
+ }
792
+ }
793
+ exports.CloudCostManagementApi = CloudCostManagementApi;
794
+ //# sourceMappingURL=CloudCostManagementApi.js.map