tccli 3.0.1231.1__py2.py3-none-any.whl → 3.0.1233.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +1 -1
  3. tccli/services/batch/v20170312/api.json +4 -4
  4. tccli/services/clb/v20180317/api.json +1 -1
  5. tccli/services/cvm/v20170312/api.json +6 -6
  6. tccli/services/ess/v20201111/api.json +1 -1
  7. tccli/services/essbasic/v20210526/api.json +18 -0
  8. tccli/services/essbasic/v20210526/examples.json +2 -2
  9. tccli/services/lighthouse/v20200324/api.json +10 -10
  10. tccli/services/lighthouse/v20200324/examples.json +2 -2
  11. tccli/services/live/v20180801/api.json +7 -7
  12. tccli/services/live/v20180801/examples.json +1 -1
  13. tccli/services/monitor/monitor_client.py +107 -54
  14. tccli/services/monitor/v20180724/api.json +206 -0
  15. tccli/services/monitor/v20180724/examples.json +14 -0
  16. tccli/services/mqtt/v20240516/api.json +22 -22
  17. tccli/services/mqtt/v20240516/examples.json +8 -2
  18. tccli/services/mrs/v20200910/api.json +3 -3
  19. tccli/services/mrs/v20200910/examples.json +1 -1
  20. tccli/services/ocr/v20181119/api.json +4 -4
  21. tccli/services/ocr/v20181119/examples.json +2 -2
  22. tccli/services/redis/v20180412/api.json +2 -2
  23. tccli/services/redis/v20180412/examples.json +8 -8
  24. tccli/services/tcbr/v20220217/api.json +84 -88
  25. tccli/services/tcbr/v20220217/examples.json +14 -14
  26. tccli/services/tdmq/v20200217/api.json +10 -0
  27. tccli/services/tione/tione_client.py +166 -113
  28. tccli/services/tione/v20211111/api.json +939 -361
  29. tccli/services/tione/v20211111/examples.json +30 -22
  30. tccli/services/vclm/v20240523/api.json +1 -1
  31. tccli/services/vod/v20180717/api.json +6 -6
  32. tccli/services/vpc/v20170312/api.json +10 -1
  33. {tccli-3.0.1231.1.dist-info → tccli-3.0.1233.1.dist-info}/METADATA +2 -2
  34. {tccli-3.0.1231.1.dist-info → tccli-3.0.1233.1.dist-info}/RECORD +37 -37
  35. {tccli-3.0.1231.1.dist-info → tccli-3.0.1233.1.dist-info}/WHEEL +0 -0
  36. {tccli-3.0.1231.1.dist-info → tccli-3.0.1233.1.dist-info}/entry_points.txt +0 -0
  37. {tccli-3.0.1231.1.dist-info → tccli-3.0.1233.1.dist-info}/license_files/LICENSE +0 -0
@@ -1577,7 +1577,7 @@ def doDeleteAlertRules(args, parsed_globals):
1577
1577
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1578
1578
 
1579
1579
 
1580
- def doDescribePolicyGroupList(args, parsed_globals):
1580
+ def doDescribeBaseMetrics(args, parsed_globals):
1581
1581
  g_param = parse_global_arg(parsed_globals)
1582
1582
 
1583
1583
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1606,11 +1606,11 @@ def doDescribePolicyGroupList(args, parsed_globals):
1606
1606
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
1607
1607
  client._sdkVersion += ("_CLI_" + __version__)
1608
1608
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1609
- model = models.DescribePolicyGroupListRequest()
1609
+ model = models.DescribeBaseMetricsRequest()
1610
1610
  model.from_json_string(json.dumps(args))
1611
1611
  start_time = time.time()
1612
1612
  while True:
1613
- rsp = client.DescribePolicyGroupList(model)
1613
+ rsp = client.DescribeBaseMetrics(model)
1614
1614
  result = rsp.to_json_string()
1615
1615
  try:
1616
1616
  json_obj = json.loads(result)
@@ -1629,7 +1629,7 @@ def doDescribePolicyGroupList(args, parsed_globals):
1629
1629
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1630
 
1631
1631
 
1632
- def doDescribeBaseMetrics(args, parsed_globals):
1632
+ def doDescribeAlarmEvents(args, parsed_globals):
1633
1633
  g_param = parse_global_arg(parsed_globals)
1634
1634
 
1635
1635
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1658,11 +1658,11 @@ def doDescribeBaseMetrics(args, parsed_globals):
1658
1658
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
1659
1659
  client._sdkVersion += ("_CLI_" + __version__)
1660
1660
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
- model = models.DescribeBaseMetricsRequest()
1661
+ model = models.DescribeAlarmEventsRequest()
1662
1662
  model.from_json_string(json.dumps(args))
1663
1663
  start_time = time.time()
1664
1664
  while True:
1665
- rsp = client.DescribeBaseMetrics(model)
1665
+ rsp = client.DescribeAlarmEvents(model)
1666
1666
  result = rsp.to_json_string()
1667
1667
  try:
1668
1668
  json_obj = json.loads(result)
@@ -1681,7 +1681,7 @@ def doDescribeBaseMetrics(args, parsed_globals):
1681
1681
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1682
1682
 
1683
1683
 
1684
- def doDescribeAlarmEvents(args, parsed_globals):
1684
+ def doDescribePhoneAlarmFlowTotalCount(args, parsed_globals):
1685
1685
  g_param = parse_global_arg(parsed_globals)
1686
1686
 
1687
1687
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1710,11 +1710,11 @@ def doDescribeAlarmEvents(args, parsed_globals):
1710
1710
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
1711
1711
  client._sdkVersion += ("_CLI_" + __version__)
1712
1712
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1713
- model = models.DescribeAlarmEventsRequest()
1713
+ model = models.DescribePhoneAlarmFlowTotalCountRequest()
1714
1714
  model.from_json_string(json.dumps(args))
1715
1715
  start_time = time.time()
1716
1716
  while True:
1717
- rsp = client.DescribeAlarmEvents(model)
1717
+ rsp = client.DescribePhoneAlarmFlowTotalCount(model)
1718
1718
  result = rsp.to_json_string()
1719
1719
  try:
1720
1720
  json_obj = json.loads(result)
@@ -1733,7 +1733,7 @@ def doDescribeAlarmEvents(args, parsed_globals):
1733
1733
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1734
1734
 
1735
1735
 
1736
- def doDescribePhoneAlarmFlowTotalCount(args, parsed_globals):
1736
+ def doDeleteAlarmNotices(args, parsed_globals):
1737
1737
  g_param = parse_global_arg(parsed_globals)
1738
1738
 
1739
1739
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1762,11 +1762,11 @@ def doDescribePhoneAlarmFlowTotalCount(args, parsed_globals):
1762
1762
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
1763
1763
  client._sdkVersion += ("_CLI_" + __version__)
1764
1764
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1765
- model = models.DescribePhoneAlarmFlowTotalCountRequest()
1765
+ model = models.DeleteAlarmNoticesRequest()
1766
1766
  model.from_json_string(json.dumps(args))
1767
1767
  start_time = time.time()
1768
1768
  while True:
1769
- rsp = client.DescribePhoneAlarmFlowTotalCount(model)
1769
+ rsp = client.DeleteAlarmNotices(model)
1770
1770
  result = rsp.to_json_string()
1771
1771
  try:
1772
1772
  json_obj = json.loads(result)
@@ -1785,7 +1785,7 @@ def doDescribePhoneAlarmFlowTotalCount(args, parsed_globals):
1785
1785
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1786
1786
 
1787
1787
 
1788
- def doDeleteAlarmNotices(args, parsed_globals):
1788
+ def doModifyAlarmNotice(args, parsed_globals):
1789
1789
  g_param = parse_global_arg(parsed_globals)
1790
1790
 
1791
1791
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1814,11 +1814,11 @@ def doDeleteAlarmNotices(args, parsed_globals):
1814
1814
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
1815
1815
  client._sdkVersion += ("_CLI_" + __version__)
1816
1816
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1817
- model = models.DeleteAlarmNoticesRequest()
1817
+ model = models.ModifyAlarmNoticeRequest()
1818
1818
  model.from_json_string(json.dumps(args))
1819
1819
  start_time = time.time()
1820
1820
  while True:
1821
- rsp = client.DeleteAlarmNotices(model)
1821
+ rsp = client.ModifyAlarmNotice(model)
1822
1822
  result = rsp.to_json_string()
1823
1823
  try:
1824
1824
  json_obj = json.loads(result)
@@ -1837,7 +1837,7 @@ def doDeleteAlarmNotices(args, parsed_globals):
1837
1837
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1838
1838
 
1839
1839
 
1840
- def doModifyAlarmNotice(args, parsed_globals):
1840
+ def doDescribePrometheusInstanceDetail(args, parsed_globals):
1841
1841
  g_param = parse_global_arg(parsed_globals)
1842
1842
 
1843
1843
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1866,11 +1866,11 @@ def doModifyAlarmNotice(args, parsed_globals):
1866
1866
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
1867
1867
  client._sdkVersion += ("_CLI_" + __version__)
1868
1868
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1869
- model = models.ModifyAlarmNoticeRequest()
1869
+ model = models.DescribePrometheusInstanceDetailRequest()
1870
1870
  model.from_json_string(json.dumps(args))
1871
1871
  start_time = time.time()
1872
1872
  while True:
1873
- rsp = client.ModifyAlarmNotice(model)
1873
+ rsp = client.DescribePrometheusInstanceDetail(model)
1874
1874
  result = rsp.to_json_string()
1875
1875
  try:
1876
1876
  json_obj = json.loads(result)
@@ -1889,7 +1889,7 @@ def doModifyAlarmNotice(args, parsed_globals):
1889
1889
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1890
1890
 
1891
1891
 
1892
- def doDescribePrometheusInstanceDetail(args, parsed_globals):
1892
+ def doCreatePrometheusScrapeJob(args, parsed_globals):
1893
1893
  g_param = parse_global_arg(parsed_globals)
1894
1894
 
1895
1895
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1918,11 +1918,11 @@ def doDescribePrometheusInstanceDetail(args, parsed_globals):
1918
1918
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
1919
1919
  client._sdkVersion += ("_CLI_" + __version__)
1920
1920
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1921
- model = models.DescribePrometheusInstanceDetailRequest()
1921
+ model = models.CreatePrometheusScrapeJobRequest()
1922
1922
  model.from_json_string(json.dumps(args))
1923
1923
  start_time = time.time()
1924
1924
  while True:
1925
- rsp = client.DescribePrometheusInstanceDetail(model)
1925
+ rsp = client.CreatePrometheusScrapeJob(model)
1926
1926
  result = rsp.to_json_string()
1927
1927
  try:
1928
1928
  json_obj = json.loads(result)
@@ -1941,7 +1941,7 @@ def doDescribePrometheusInstanceDetail(args, parsed_globals):
1941
1941
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1942
1942
 
1943
1943
 
1944
- def doCreatePrometheusScrapeJob(args, parsed_globals):
1944
+ def doUnBindingPolicyObject(args, parsed_globals):
1945
1945
  g_param = parse_global_arg(parsed_globals)
1946
1946
 
1947
1947
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1970,11 +1970,11 @@ def doCreatePrometheusScrapeJob(args, parsed_globals):
1970
1970
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
1971
1971
  client._sdkVersion += ("_CLI_" + __version__)
1972
1972
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1973
- model = models.CreatePrometheusScrapeJobRequest()
1973
+ model = models.UnBindingPolicyObjectRequest()
1974
1974
  model.from_json_string(json.dumps(args))
1975
1975
  start_time = time.time()
1976
1976
  while True:
1977
- rsp = client.CreatePrometheusScrapeJob(model)
1977
+ rsp = client.UnBindingPolicyObject(model)
1978
1978
  result = rsp.to_json_string()
1979
1979
  try:
1980
1980
  json_obj = json.loads(result)
@@ -1993,7 +1993,7 @@ def doCreatePrometheusScrapeJob(args, parsed_globals):
1993
1993
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1994
1994
 
1995
1995
 
1996
- def doUnBindingPolicyObject(args, parsed_globals):
1996
+ def doDescribePrometheusInstancesOverview(args, parsed_globals):
1997
1997
  g_param = parse_global_arg(parsed_globals)
1998
1998
 
1999
1999
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2022,11 +2022,11 @@ def doUnBindingPolicyObject(args, parsed_globals):
2022
2022
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
2023
2023
  client._sdkVersion += ("_CLI_" + __version__)
2024
2024
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2025
- model = models.UnBindingPolicyObjectRequest()
2025
+ model = models.DescribePrometheusInstancesOverviewRequest()
2026
2026
  model.from_json_string(json.dumps(args))
2027
2027
  start_time = time.time()
2028
2028
  while True:
2029
- rsp = client.UnBindingPolicyObject(model)
2029
+ rsp = client.DescribePrometheusInstancesOverview(model)
2030
2030
  result = rsp.to_json_string()
2031
2031
  try:
2032
2032
  json_obj = json.loads(result)
@@ -2045,7 +2045,7 @@ def doUnBindingPolicyObject(args, parsed_globals):
2045
2045
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2046
2046
 
2047
2047
 
2048
- def doDescribePrometheusInstancesOverview(args, parsed_globals):
2048
+ def doDescribeConditionsTemplateList(args, parsed_globals):
2049
2049
  g_param = parse_global_arg(parsed_globals)
2050
2050
 
2051
2051
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2074,11 +2074,11 @@ def doDescribePrometheusInstancesOverview(args, parsed_globals):
2074
2074
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
2075
2075
  client._sdkVersion += ("_CLI_" + __version__)
2076
2076
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2077
- model = models.DescribePrometheusInstancesOverviewRequest()
2077
+ model = models.DescribeConditionsTemplateListRequest()
2078
2078
  model.from_json_string(json.dumps(args))
2079
2079
  start_time = time.time()
2080
2080
  while True:
2081
- rsp = client.DescribePrometheusInstancesOverview(model)
2081
+ rsp = client.DescribeConditionsTemplateList(model)
2082
2082
  result = rsp.to_json_string()
2083
2083
  try:
2084
2084
  json_obj = json.loads(result)
@@ -2097,7 +2097,7 @@ def doDescribePrometheusInstancesOverview(args, parsed_globals):
2097
2097
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2098
2098
 
2099
2099
 
2100
- def doDescribeConditionsTemplateList(args, parsed_globals):
2100
+ def doDescribePrometheusScrapeJobs(args, parsed_globals):
2101
2101
  g_param = parse_global_arg(parsed_globals)
2102
2102
 
2103
2103
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2126,11 +2126,11 @@ def doDescribeConditionsTemplateList(args, parsed_globals):
2126
2126
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
2127
2127
  client._sdkVersion += ("_CLI_" + __version__)
2128
2128
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2129
- model = models.DescribeConditionsTemplateListRequest()
2129
+ model = models.DescribePrometheusScrapeJobsRequest()
2130
2130
  model.from_json_string(json.dumps(args))
2131
2131
  start_time = time.time()
2132
2132
  while True:
2133
- rsp = client.DescribeConditionsTemplateList(model)
2133
+ rsp = client.DescribePrometheusScrapeJobs(model)
2134
2134
  result = rsp.to_json_string()
2135
2135
  try:
2136
2136
  json_obj = json.loads(result)
@@ -2149,7 +2149,7 @@ def doDescribeConditionsTemplateList(args, parsed_globals):
2149
2149
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2150
2150
 
2151
2151
 
2152
- def doDescribePrometheusScrapeJobs(args, parsed_globals):
2152
+ def doDeleteServiceDiscovery(args, parsed_globals):
2153
2153
  g_param = parse_global_arg(parsed_globals)
2154
2154
 
2155
2155
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2178,11 +2178,11 @@ def doDescribePrometheusScrapeJobs(args, parsed_globals):
2178
2178
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
2179
2179
  client._sdkVersion += ("_CLI_" + __version__)
2180
2180
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2181
- model = models.DescribePrometheusScrapeJobsRequest()
2181
+ model = models.DeleteServiceDiscoveryRequest()
2182
2182
  model.from_json_string(json.dumps(args))
2183
2183
  start_time = time.time()
2184
2184
  while True:
2185
- rsp = client.DescribePrometheusScrapeJobs(model)
2185
+ rsp = client.DeleteServiceDiscovery(model)
2186
2186
  result = rsp.to_json_string()
2187
2187
  try:
2188
2188
  json_obj = json.loads(result)
@@ -2201,7 +2201,7 @@ def doDescribePrometheusScrapeJobs(args, parsed_globals):
2201
2201
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2202
2202
 
2203
2203
 
2204
- def doDeleteServiceDiscovery(args, parsed_globals):
2204
+ def doDeleteExporterIntegration(args, parsed_globals):
2205
2205
  g_param = parse_global_arg(parsed_globals)
2206
2206
 
2207
2207
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2230,11 +2230,11 @@ def doDeleteServiceDiscovery(args, parsed_globals):
2230
2230
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
2231
2231
  client._sdkVersion += ("_CLI_" + __version__)
2232
2232
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2233
- model = models.DeleteServiceDiscoveryRequest()
2233
+ model = models.DeleteExporterIntegrationRequest()
2234
2234
  model.from_json_string(json.dumps(args))
2235
2235
  start_time = time.time()
2236
2236
  while True:
2237
- rsp = client.DeleteServiceDiscovery(model)
2237
+ rsp = client.DeleteExporterIntegration(model)
2238
2238
  result = rsp.to_json_string()
2239
2239
  try:
2240
2240
  json_obj = json.loads(result)
@@ -2253,7 +2253,7 @@ def doDeleteServiceDiscovery(args, parsed_globals):
2253
2253
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
2254
 
2255
2255
 
2256
- def doDeleteExporterIntegration(args, parsed_globals):
2256
+ def doDeletePrometheusTemp(args, parsed_globals):
2257
2257
  g_param = parse_global_arg(parsed_globals)
2258
2258
 
2259
2259
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2282,11 +2282,11 @@ def doDeleteExporterIntegration(args, parsed_globals):
2282
2282
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
2283
2283
  client._sdkVersion += ("_CLI_" + __version__)
2284
2284
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2285
- model = models.DeleteExporterIntegrationRequest()
2285
+ model = models.DeletePrometheusTempRequest()
2286
2286
  model.from_json_string(json.dumps(args))
2287
2287
  start_time = time.time()
2288
2288
  while True:
2289
- rsp = client.DeleteExporterIntegration(model)
2289
+ rsp = client.DeletePrometheusTemp(model)
2290
2290
  result = rsp.to_json_string()
2291
2291
  try:
2292
2292
  json_obj = json.loads(result)
@@ -2305,7 +2305,7 @@ def doDeleteExporterIntegration(args, parsed_globals):
2305
2305
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2306
2306
 
2307
2307
 
2308
- def doDeletePrometheusTemp(args, parsed_globals):
2308
+ def doCreateAlarmShield(args, parsed_globals):
2309
2309
  g_param = parse_global_arg(parsed_globals)
2310
2310
 
2311
2311
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2334,11 +2334,11 @@ def doDeletePrometheusTemp(args, parsed_globals):
2334
2334
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
2335
2335
  client._sdkVersion += ("_CLI_" + __version__)
2336
2336
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2337
- model = models.DeletePrometheusTempRequest()
2337
+ model = models.CreateAlarmShieldRequest()
2338
2338
  model.from_json_string(json.dumps(args))
2339
2339
  start_time = time.time()
2340
2340
  while True:
2341
- rsp = client.DeletePrometheusTemp(model)
2341
+ rsp = client.CreateAlarmShield(model)
2342
2342
  result = rsp.to_json_string()
2343
2343
  try:
2344
2344
  json_obj = json.loads(result)
@@ -6101,7 +6101,7 @@ def doUpdateGrafanaWhiteList(args, parsed_globals):
6101
6101
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6102
6102
 
6103
6103
 
6104
- def doDescribePrometheusAgents(args, parsed_globals):
6104
+ def doDescribePolicyGroupList(args, parsed_globals):
6105
6105
  g_param = parse_global_arg(parsed_globals)
6106
6106
 
6107
6107
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -6130,11 +6130,11 @@ def doDescribePrometheusAgents(args, parsed_globals):
6130
6130
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
6131
6131
  client._sdkVersion += ("_CLI_" + __version__)
6132
6132
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
6133
- model = models.DescribePrometheusAgentsRequest()
6133
+ model = models.DescribePolicyGroupListRequest()
6134
6134
  model.from_json_string(json.dumps(args))
6135
6135
  start_time = time.time()
6136
6136
  while True:
6137
- rsp = client.DescribePrometheusAgents(model)
6137
+ rsp = client.DescribePolicyGroupList(model)
6138
6138
  result = rsp.to_json_string()
6139
6139
  try:
6140
6140
  json_obj = json.loads(result)
@@ -6517,6 +6517,58 @@ def doCleanGrafanaInstance(args, parsed_globals):
6517
6517
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6518
6518
 
6519
6519
 
6520
+ def doGetMonitorData(args, parsed_globals):
6521
+ g_param = parse_global_arg(parsed_globals)
6522
+
6523
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6524
+ cred = credential.CVMRoleCredential()
6525
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6526
+ cred = credential.STSAssumeRoleCredential(
6527
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6528
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
6529
+ )
6530
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
6531
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6532
+ else:
6533
+ cred = credential.Credential(
6534
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6535
+ )
6536
+ http_profile = HttpProfile(
6537
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6538
+ reqMethod="POST",
6539
+ endpoint=g_param[OptionsDefine.Endpoint],
6540
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6541
+ )
6542
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6543
+ if g_param[OptionsDefine.Language]:
6544
+ profile.language = g_param[OptionsDefine.Language]
6545
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6546
+ client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
6547
+ client._sdkVersion += ("_CLI_" + __version__)
6548
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6549
+ model = models.GetMonitorDataRequest()
6550
+ model.from_json_string(json.dumps(args))
6551
+ start_time = time.time()
6552
+ while True:
6553
+ rsp = client.GetMonitorData(model)
6554
+ result = rsp.to_json_string()
6555
+ try:
6556
+ json_obj = json.loads(result)
6557
+ except TypeError as e:
6558
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6559
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6560
+ break
6561
+ cur_time = time.time()
6562
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6563
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6564
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6565
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6566
+ else:
6567
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6568
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6569
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6570
+
6571
+
6520
6572
  def doUninstallGrafanaDashboard(args, parsed_globals):
6521
6573
  g_param = parse_global_arg(parsed_globals)
6522
6574
 
@@ -6777,7 +6829,7 @@ def doModifyAlarmPolicyTasks(args, parsed_globals):
6777
6829
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6778
6830
 
6779
6831
 
6780
- def doGetMonitorData(args, parsed_globals):
6832
+ def doDescribePrometheusAgents(args, parsed_globals):
6781
6833
  g_param = parse_global_arg(parsed_globals)
6782
6834
 
6783
6835
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -6806,11 +6858,11 @@ def doGetMonitorData(args, parsed_globals):
6806
6858
  client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
6807
6859
  client._sdkVersion += ("_CLI_" + __version__)
6808
6860
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
6809
- model = models.GetMonitorDataRequest()
6861
+ model = models.DescribePrometheusAgentsRequest()
6810
6862
  model.from_json_string(json.dumps(args))
6811
6863
  start_time = time.time()
6812
6864
  while True:
6813
- rsp = client.GetMonitorData(model)
6865
+ rsp = client.DescribePrometheusAgents(model)
6814
6866
  result = rsp.to_json_string()
6815
6867
  try:
6816
6868
  json_obj = json.loads(result)
@@ -8118,7 +8170,6 @@ ACTION_MAP = {
8118
8170
  "DeletePrometheusScrapeJobs": doDeletePrometheusScrapeJobs,
8119
8171
  "EnableGrafanaSSO": doEnableGrafanaSSO,
8120
8172
  "DeleteAlertRules": doDeleteAlertRules,
8121
- "DescribePolicyGroupList": doDescribePolicyGroupList,
8122
8173
  "DescribeBaseMetrics": doDescribeBaseMetrics,
8123
8174
  "DescribeAlarmEvents": doDescribeAlarmEvents,
8124
8175
  "DescribePhoneAlarmFlowTotalCount": doDescribePhoneAlarmFlowTotalCount,
@@ -8133,6 +8184,7 @@ ACTION_MAP = {
8133
8184
  "DeleteServiceDiscovery": doDeleteServiceDiscovery,
8134
8185
  "DeleteExporterIntegration": doDeleteExporterIntegration,
8135
8186
  "DeletePrometheusTemp": doDeletePrometheusTemp,
8187
+ "CreateAlarmShield": doCreateAlarmShield,
8136
8188
  "CreatePrometheusMultiTenantInstancePostPayMode": doCreatePrometheusMultiTenantInstancePostPayMode,
8137
8189
  "UpdateGrafanaEnvironments": doUpdateGrafanaEnvironments,
8138
8190
  "DescribePolicyConditionList": doDescribePolicyConditionList,
@@ -8205,7 +8257,7 @@ ACTION_MAP = {
8205
8257
  "CreateRecordingRule": doCreateRecordingRule,
8206
8258
  "DescribeAlertRules": doDescribeAlertRules,
8207
8259
  "UpdateGrafanaWhiteList": doUpdateGrafanaWhiteList,
8208
- "DescribePrometheusAgents": doDescribePrometheusAgents,
8260
+ "DescribePolicyGroupList": doDescribePolicyGroupList,
8209
8261
  "DescribeAlarmPolicies": doDescribeAlarmPolicies,
8210
8262
  "DescribePrometheusTargetsTMP": doDescribePrometheusTargetsTMP,
8211
8263
  "DescribeRecordingRules": doDescribeRecordingRules,
@@ -8213,12 +8265,13 @@ ACTION_MAP = {
8213
8265
  "DeleteAlarmPolicy": doDeleteAlarmPolicy,
8214
8266
  "CreatePrometheusAlertPolicy": doCreatePrometheusAlertPolicy,
8215
8267
  "CleanGrafanaInstance": doCleanGrafanaInstance,
8268
+ "GetMonitorData": doGetMonitorData,
8216
8269
  "UninstallGrafanaDashboard": doUninstallGrafanaDashboard,
8217
8270
  "DescribePrometheusAlertPolicy": doDescribePrometheusAlertPolicy,
8218
8271
  "SyncPrometheusTemp": doSyncPrometheusTemp,
8219
8272
  "ModifyPrometheusInstanceAttributes": doModifyPrometheusInstanceAttributes,
8220
8273
  "ModifyAlarmPolicyTasks": doModifyAlarmPolicyTasks,
8221
- "GetMonitorData": doGetMonitorData,
8274
+ "DescribePrometheusAgents": doDescribePrometheusAgents,
8222
8275
  "UpdateDNSConfig": doUpdateDNSConfig,
8223
8276
  "DescribeServiceDiscovery": doDescribeServiceDiscovery,
8224
8277
  "RunPrometheusInstance": doRunPrometheusInstance,