oci-cli 3.66.1__py3-none-any.whl → 3.66.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. common_util/ignored_commands.py +2 -1
  2. oci_cli/bin/jms.psm1 +74 -6
  3. oci_cli/bin/marketplace.psm1 +7 -1
  4. oci_cli/help_text_producer/data_files/text/cmdref/data-safe/discovery-job/list-discovery-job-results.txt +13 -1
  5. oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-error-summary/list-masking-errors.txt +1 -1
  6. oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-policy/list-masking-reports.txt +5 -0
  7. oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-policy/mask-data.txt +6 -0
  8. oci_cli/help_text_producer/data_files/text/cmdref/data-safe/security-assessment/list-findings.txt +5 -0
  9. oci_cli/help_text_producer/data_files/text/cmdref/data-safe/sensitive-column/list.txt +22 -1
  10. oci_cli/help_text_producer/data_files/text/cmdref/data-safe/service/get.txt +2 -2
  11. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/configure-exascale.txt +136 -0
  12. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra.txt +2 -0
  13. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-vm-cluster/create.txt +4 -0
  14. oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/create.txt +1 -1
  15. oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/list.txt +23 -1
  16. oci_cli/help_text_producer/data_files/text/cmdref/db.txt +2 -0
  17. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error/{list.txt → list-errors.txt} +5 -5
  18. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error.txt +1 -1
  19. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/{work-request-log-entry/list-work-request-logs.txt → work-request-log/list.txt} +5 -5
  20. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log.txt +14 -0
  21. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +3 -3
  22. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +3 -3
  23. oci_cli/help_text_producer/data_files/text/cmdref/jms/agent-installer-summary/generate-agent-installer-configuration.txt +8 -0
  24. oci_cli/help_text_producer/data_files/text/cmdref/jms/blocklist/create.txt +1 -1
  25. oci_cli/help_text_producer/data_files/text/cmdref/jms/blocklist/list.txt +1 -1
  26. oci_cli/help_text_producer/data_files/text/cmdref/jms/container-summary/list-containers.txt +338 -0
  27. oci_cli/help_text_producer/data_files/text/cmdref/jms/container-summary.txt +14 -0
  28. oci_cli/help_text_producer/data_files/text/cmdref/jms/export-setting/update.txt +15 -0
  29. oci_cli/help_text_producer/data_files/text/cmdref/jms/fleet-agent-configuration/update.txt +8 -0
  30. oci_cli/help_text_producer/data_files/text/cmdref/jms/installation-usage/summarize.txt +1 -1
  31. oci_cli/help_text_producer/data_files/text/cmdref/jms/jms-plugin/create.txt +12 -3
  32. oci_cli/help_text_producer/data_files/text/cmdref/jms/jms-plugin/list.txt +3 -3
  33. oci_cli/help_text_producer/data_files/text/cmdref/jms/library-application-usage-summary/list-library-application-usage.txt +332 -0
  34. oci_cli/help_text_producer/data_files/text/cmdref/jms/library-application-usage-summary.txt +16 -0
  35. oci_cli/help_text_producer/data_files/text/cmdref/jms/library-inventory/summarize.txt +284 -0
  36. oci_cli/help_text_producer/data_files/text/cmdref/jms/library-inventory.txt +14 -0
  37. oci_cli/help_text_producer/data_files/text/cmdref/jms/library-managed-instance-usage-summary/list-library-managed-instance-usage.txt +332 -0
  38. oci_cli/help_text_producer/data_files/text/cmdref/jms/library-managed-instance-usage-summary.txt +16 -0
  39. oci_cli/help_text_producer/data_files/text/cmdref/jms/library-usage/scan.txt +8 -0
  40. oci_cli/help_text_producer/data_files/text/cmdref/jms/library-usage/summarize.txt +3 -3
  41. oci_cli/help_text_producer/data_files/text/cmdref/jms/managed-instance-usage/summarize.txt +1 -1
  42. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-add-installation-site-task-details.txt +148 -0
  43. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-crypto-task-details.txt +148 -0
  44. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-deployed-application-migration-task-details.txt +148 -0
  45. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-java-migration-task-details.txt +148 -0
  46. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-jfr-task-details.txt +148 -0
  47. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-performance-tuning-task-details.txt +148 -0
  48. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-remove-installation-site-task-details.txt +148 -0
  49. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-scan-java-server-task-details.txt +148 -0
  50. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-scan-library-task-details.txt +148 -0
  51. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create.txt +150 -0
  52. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/delete.txt +146 -0
  53. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/get.txt +108 -0
  54. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/list.txt +136 -0
  55. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-add-installation-site-task-details.txt +165 -0
  56. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-crypto-task-details.txt +165 -0
  57. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-deployed-application-migration-task-details.txt +165 -0
  58. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-java-migration-task-details.txt +165 -0
  59. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-jfr-task-details.txt +165 -0
  60. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-performance-tuning-task-details.txt +165 -0
  61. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-remove-installation-site-task-details.txt +165 -0
  62. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-scan-java-server-task-details.txt +165 -0
  63. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-scan-library-task-details.txt +165 -0
  64. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update.txt +171 -0
  65. oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule.txt +58 -0
  66. oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-application-usage-summary/list-uncorrelated-package-application-usage.txt +324 -0
  67. oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-application-usage-summary.txt +16 -0
  68. oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-managed-instance-usage-summary/list-uncorrelated-package-managed-instance-usage.txt +324 -0
  69. oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-managed-instance-usage-summary.txt +16 -0
  70. oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-usage-summary/list-uncorrelated-package-usage.txt +323 -0
  71. oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-usage-summary.txt +14 -0
  72. oci_cli/help_text_producer/data_files/text/cmdref/jms/work-request/list.txt +1 -1
  73. oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license/get.txt +1 -1
  74. oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license/list.txt +1 -1
  75. oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license-acceptance-record/create.txt +1 -1
  76. oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license-acceptance-record/list.txt +1 -1
  77. oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads.txt +1 -3
  78. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration/get.txt +83 -0
  79. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration/update.txt +99 -0
  80. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration.txt +16 -0
  81. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/delete.txt +103 -0
  82. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/get.txt +91 -0
  83. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/list.txt +128 -0
  84. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/request.txt +172 -0
  85. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis.txt +23 -0
  86. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/delete.txt +103 -0
  87. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/get.txt +91 -0
  88. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/list.txt +136 -0
  89. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/request.txt +172 -0
  90. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis.txt +23 -0
  91. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration/get.txt +83 -0
  92. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration/update.txt +95 -0
  93. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration.txt +16 -0
  94. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-item-summary/list-work-items.txt +110 -0
  95. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-item-summary.txt +14 -0
  96. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/cancel.txt +103 -0
  97. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/get.txt +91 -0
  98. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/list.txt +137 -0
  99. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-error/list.txt +128 -0
  100. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-error.txt +15 -0
  101. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-log-entry/list-work-request-logs.txt +128 -0
  102. oci_cli/help_text_producer/data_files/text/cmdref/{delegate-access-control/work-request → jms-utils}/work-request-log-entry.txt +2 -1
  103. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request.txt +23 -0
  104. oci_cli/help_text_producer/data_files/text/cmdref/jms-utils.txt +65 -0
  105. oci_cli/help_text_producer/data_files/text/cmdref/jms.txt +76 -0
  106. oci_cli/help_text_producer/data_files/text/cmdref/marketplace/create-marketplace-external-attested-metadata-details/create-marketplace-external-attested-metadata.txt +96 -0
  107. oci_cli/help_text_producer/data_files/text/cmdref/marketplace/create-marketplace-external-attested-metadata-details.txt +15 -0
  108. oci_cli/help_text_producer/data_files/text/cmdref/marketplace/marketplace-metadata-public-key-summary/list-marketplace-metadata-public-keys.txt +121 -0
  109. oci_cli/help_text_producer/data_files/text/cmdref/marketplace/marketplace-metadata-public-key-summary.txt +15 -0
  110. oci_cli/help_text_producer/data_files/text/cmdref/marketplace.txt +8 -0
  111. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error/{list.txt → list-errors.txt} +5 -5
  112. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error.txt +1 -1
  113. oci_cli/help_text_producer/data_files/text/cmdref/ocvs.txt +1 -1
  114. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/create.txt +127 -0
  115. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/delete.txt +136 -0
  116. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/get.txt +98 -0
  117. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/list.txt +137 -0
  118. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region.txt +26 -0
  119. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/change-compartment.txt +135 -0
  120. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/create.txt +204 -0
  121. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/delete.txt +133 -0
  122. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/disable-oac.txt +129 -0
  123. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/enable-oac.txt +154 -0
  124. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/get.txt +95 -0
  125. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/list.txt +142 -0
  126. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/update.txt +179 -0
  127. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance.txt +34 -0
  128. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/create.txt +131 -0
  129. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/delete.txt +136 -0
  130. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/get.txt +98 -0
  131. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/list.txt +137 -0
  132. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/update.txt +137 -0
  133. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment.txt +29 -0
  134. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/cancel.txt +103 -0
  135. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/get.txt +91 -0
  136. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/list.txt +140 -0
  137. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-error/list.txt +131 -0
  138. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-error.txt +15 -0
  139. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-log-entry/list.txt +131 -0
  140. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-log-entry.txt +15 -0
  141. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request.txt +23 -0
  142. oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics.txt +68 -0
  143. oci_cli/help_text_producer/data_files/text/cmdref/session/authenticate.txt +7 -7
  144. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +6 -6
  145. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
  146. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
  147. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
  148. oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
  149. oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
  150. oci_cli/help_text_producer/data_files/text/index.txt +6 -2
  151. oci_cli/service_mapping.py +11 -1
  152. oci_cli/version.py +1 -1
  153. {oci_cli-3.66.1.dist-info → oci_cli-3.66.2.dist-info}/METADATA +2 -2
  154. {oci_cli-3.66.1.dist-info → oci_cli-3.66.2.dist-info}/RECORD +193 -66
  155. services/data_safe/src/oci_cli_data_safe/generated/datasafe_cli.py +28 -9
  156. services/database/src/oci_cli_database/database_cli_extended.py +43 -2
  157. services/database/src/oci_cli_database/generated/database_cli.py +62 -1
  158. services/jms/src/oci_cli_java_management_service/generated/javamanagementservice_cli.py +4359 -2378
  159. services/jms_java_downloads/src/oci_cli_java_download/generated/javadownload_cli.py +5 -5
  160. services/jms_utils/__init__.py +4 -0
  161. services/jms_utils/src/__init__.py +4 -0
  162. services/jms_utils/src/oci_cli_jms_utils/__init__.py +4 -0
  163. services/jms_utils/src/oci_cli_jms_utils/generated/__init__.py +4 -0
  164. services/jms_utils/src/oci_cli_jms_utils/generated/client_mappings.py +14 -0
  165. services/jms_utils/src/oci_cli_jms_utils/generated/jmsutils_cli.py +812 -0
  166. services/jms_utils/tests/__init__.py +4 -0
  167. services/marketplace/src/oci_cli_marketplace/generated/marketplace_cli.py +94 -0
  168. services/resource_analytics/__init__.py +4 -0
  169. services/resource_analytics/src/__init__.py +4 -0
  170. services/resource_analytics/src/oci_cli_monitored_region/__init__.py +4 -0
  171. services/resource_analytics/src/oci_cli_monitored_region/generated/__init__.py +4 -0
  172. services/resource_analytics/src/oci_cli_monitored_region/generated/client_mappings.py +14 -0
  173. services/resource_analytics/src/oci_cli_monitored_region/generated/monitoredregion_cli.py +233 -0
  174. services/resource_analytics/src/oci_cli_monitored_region/monitored_region_cli_extended.py +39 -0
  175. services/resource_analytics/src/oci_cli_resource_analytics/__init__.py +4 -0
  176. services/resource_analytics/src/oci_cli_resource_analytics/generated/__init__.py +4 -0
  177. services/resource_analytics/src/oci_cli_resource_analytics/generated/resource_analytics_service_cli.py +14 -0
  178. services/resource_analytics/src/oci_cli_resource_analytics_instance/__init__.py +4 -0
  179. services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/__init__.py +4 -0
  180. services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/client_mappings.py +14 -0
  181. services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/resourceanalyticsinstance_cli.py +968 -0
  182. services/resource_analytics/src/oci_cli_resource_analytics_instance/resource_analytics_instance_cli_extended.py +40 -0
  183. services/resource_analytics/src/oci_cli_tenancy_attachment/__init__.py +4 -0
  184. services/resource_analytics/src/oci_cli_tenancy_attachment/generated/__init__.py +4 -0
  185. services/resource_analytics/src/oci_cli_tenancy_attachment/generated/client_mappings.py +14 -0
  186. services/resource_analytics/src/oci_cli_tenancy_attachment/generated/tenancyattachment_cli.py +298 -0
  187. services/resource_analytics/src/oci_cli_tenancy_attachment/tenancy_attachment_cli_extended.py +39 -0
  188. services/resource_analytics/tests/__init__.py +4 -0
  189. {oci_cli-3.66.1.dist-info → oci_cli-3.66.2.dist-info}/LICENSE.txt +0 -0
  190. {oci_cli-3.66.1.dist-info → oci_cli-3.66.2.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  191. {oci_cli-3.66.1.dist-info → oci_cli-3.66.2.dist-info}/WHEEL +0 -0
  192. {oci_cli-3.66.1.dist-info → oci_cli-3.66.2.dist-info}/entry_points.txt +0 -0
  193. {oci_cli-3.66.1.dist-info → oci_cli-3.66.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,968 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+ # NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20241031
5
+
6
+ from __future__ import print_function
7
+ import click
8
+ import oci # noqa: F401
9
+ import six # noqa: F401
10
+ import sys # noqa: F401
11
+ from oci_cli import cli_constants # noqa: F401
12
+ from oci_cli import cli_util
13
+ from oci_cli import json_skeleton_utils
14
+ from oci_cli import custom_types # noqa: F401
15
+ from oci_cli.aliasing import CommandGroupWithAlias
16
+ from services.resource_analytics.src.oci_cli_resource_analytics.generated import resource_analytics_service_cli
17
+
18
+
19
+ @click.command(cli_util.override('resource_analytics_instance.resource_analytics_instance_root_group.command_name', 'resource-analytics-instance'), cls=CommandGroupWithAlias, help=cli_util.override('resource_analytics_instance.resource_analytics_instance_root_group.help', """Use the Resource Analytics API to manage Resource Analytics Instances."""), short_help=cli_util.override('resource_analytics_instance.resource_analytics_instance_root_group.short_help', """Resource Analytics API"""))
20
+ @cli_util.help_option_group
21
+ def resource_analytics_instance_root_group():
22
+ pass
23
+
24
+
25
+ @click.command(cli_util.override('resource_analytics_instance.resource_analytics_instance_group.command_name', 'resource-analytics-instance'), cls=CommandGroupWithAlias, help="""A ResourceAnalyticsInstance is an ADW housing analytics for all of a customers' OCI resources.
26
+
27
+ To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies].""")
28
+ @cli_util.help_option_group
29
+ def resource_analytics_instance_group():
30
+ pass
31
+
32
+
33
+ @click.command(cli_util.override('resource_analytics_instance.work_request_error_group.command_name', 'work-request-error'), cls=CommandGroupWithAlias, help="""An error encountered while performing an operation that is tracked by a work request.""")
34
+ @cli_util.help_option_group
35
+ def work_request_error_group():
36
+ pass
37
+
38
+
39
+ @click.command(cli_util.override('resource_analytics_instance.work_request_log_entry_group.command_name', 'work-request-log-entry'), cls=CommandGroupWithAlias, help="""A log message from performing an operation that is tracked by a work request.""")
40
+ @cli_util.help_option_group
41
+ def work_request_log_entry_group():
42
+ pass
43
+
44
+
45
+ @click.command(cli_util.override('resource_analytics_instance.work_request_group.command_name', 'work-request'), cls=CommandGroupWithAlias, help="""An asynchronous work request. Work requests help you monitor long-running operations. When you start a long-running operation, the service creates a work request. A work request is an activity log that lets you track each step in the operation's progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation.""")
46
+ @cli_util.help_option_group
47
+ def work_request_group():
48
+ pass
49
+
50
+
51
+ @click.command(cli_util.override('resource_analytics_instance.resource_analytics_instance_collection_group.command_name', 'resource-analytics-instance-collection'), cls=CommandGroupWithAlias, help="""Results of a ResourceAnalyticsInstance search. Contains both ResourceAnalyticsInstanceSummary items and other information, such as metadata.""")
52
+ @cli_util.help_option_group
53
+ def resource_analytics_instance_collection_group():
54
+ pass
55
+
56
+
57
+ resource_analytics_service_cli.resource_analytics_service_group.add_command(resource_analytics_instance_root_group)
58
+ resource_analytics_instance_root_group.add_command(resource_analytics_instance_group)
59
+ resource_analytics_instance_root_group.add_command(work_request_error_group)
60
+ resource_analytics_instance_root_group.add_command(work_request_log_entry_group)
61
+ resource_analytics_instance_root_group.add_command(work_request_group)
62
+ resource_analytics_instance_root_group.add_command(resource_analytics_instance_collection_group)
63
+
64
+
65
+ @work_request_group.command(name=cli_util.override('resource_analytics_instance.cancel_work_request.command_name', 'cancel'), help=u"""Cancels a work request. \n[Command Reference](cancelWorkRequest)""")
66
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
67
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
68
+ @cli_util.confirm_delete_option
69
+ @json_skeleton_utils.get_cli_json_input_option({})
70
+ @cli_util.help_option
71
+ @click.pass_context
72
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
73
+ @cli_util.wrap_exceptions
74
+ def cancel_work_request(ctx, from_json, work_request_id, if_match):
75
+
76
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
77
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
78
+
79
+ kwargs = {}
80
+ if if_match is not None:
81
+ kwargs['if_match'] = if_match
82
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
83
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
84
+ result = client.cancel_work_request(
85
+ work_request_id=work_request_id,
86
+ **kwargs
87
+ )
88
+ cli_util.render_response(result, ctx)
89
+
90
+
91
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.change_resource_analytics_instance_compartment.command_name', 'change-compartment'), help=u"""Moves a ResourceAnalyticsInstance into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeResourceAnalyticsInstanceCompartment)""")
92
+ @cli_util.option('--resource-analytics-instance-id', required=True, help=u"""The [OCID] of the ResourceAnalyticsInstance.""")
93
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the ResourceAnalyticsInstance to.""")
94
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
95
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
96
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
97
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
98
+ @json_skeleton_utils.get_cli_json_input_option({})
99
+ @cli_util.help_option
100
+ @click.pass_context
101
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
102
+ @cli_util.wrap_exceptions
103
+ def change_resource_analytics_instance_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, resource_analytics_instance_id, compartment_id, if_match):
104
+
105
+ if isinstance(resource_analytics_instance_id, six.string_types) and len(resource_analytics_instance_id.strip()) == 0:
106
+ raise click.UsageError('Parameter --resource-analytics-instance-id cannot be whitespace or empty string')
107
+
108
+ kwargs = {}
109
+ if if_match is not None:
110
+ kwargs['if_match'] = if_match
111
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
112
+
113
+ _details = {}
114
+ _details['compartmentId'] = compartment_id
115
+
116
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
117
+ result = client.change_resource_analytics_instance_compartment(
118
+ resource_analytics_instance_id=resource_analytics_instance_id,
119
+ change_resource_analytics_instance_compartment_details=_details,
120
+ **kwargs
121
+ )
122
+ if wait_for_state:
123
+
124
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
125
+ try:
126
+ wait_period_kwargs = {}
127
+ if max_wait_seconds is not None:
128
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
129
+ if wait_interval_seconds is not None:
130
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
131
+ if 'opc-work-request-id' not in result.headers:
132
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
133
+ cli_util.render_response(result, ctx)
134
+ return
135
+
136
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
137
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
138
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
139
+ # If we fail, we should show an error, but we should still provide the information to the customer
140
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
141
+ cli_util.render_response(result, ctx)
142
+ sys.exit(2)
143
+ except Exception:
144
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
145
+ cli_util.render_response(result, ctx)
146
+ raise
147
+ else:
148
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
149
+ cli_util.render_response(result, ctx)
150
+
151
+
152
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.create_resource_analytics_instance.command_name', 'create'), help=u"""Creates a ResourceAnalyticsInstance. \n[Command Reference](createResourceAnalyticsInstance)""")
153
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the ResourceAnalyticsInstance in.""")
154
+ @cli_util.option('--adw-admin-password', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
155
+ @cli_util.option('--subnet-id', required=True, help=u"""The [OCID] of the subnet the resource is associated with.""")
156
+ @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
157
+ @cli_util.option('--description', help=u"""A description of the ResourceAnalyticsInstance instance.""")
158
+ @cli_util.option('--is-mutual-tls-required', type=click.BOOL, help=u"""Require mutual TLS (mTLS) when authenticating connections to the ADW database.""")
159
+ @cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of Network Security Group [OCID]'s.
160
+
161
+ Example: `[\"ocid...\", \"ocid...\"]`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
162
+ @cli_util.option('--license-model', type=custom_types.CliCaseInsensitiveChoice(["LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"]), help=u"""The Oracle license model that applies to the ADW instance.""")
163
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
164
+
165
+ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
166
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
167
+
168
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
169
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
170
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
171
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
172
+ @json_skeleton_utils.get_cli_json_input_option({'adw-admin-password': {'module': 'resource_analytics', 'class': 'AdwAdminPasswordDetails'}, 'nsg-ids': {'module': 'resource_analytics', 'class': 'list[string]'}, 'freeform-tags': {'module': 'resource_analytics', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'resource_analytics', 'class': 'dict(str, dict(str, object))'}})
173
+ @cli_util.help_option
174
+ @click.pass_context
175
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'adw-admin-password': {'module': 'resource_analytics', 'class': 'AdwAdminPasswordDetails'}, 'nsg-ids': {'module': 'resource_analytics', 'class': 'list[string]'}, 'freeform-tags': {'module': 'resource_analytics', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'resource_analytics', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'resource_analytics', 'class': 'ResourceAnalyticsInstance'})
176
+ @cli_util.wrap_exceptions
177
+ def create_resource_analytics_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, adw_admin_password, subnet_id, display_name, description, is_mutual_tls_required, nsg_ids, license_model, freeform_tags, defined_tags):
178
+
179
+ kwargs = {}
180
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
181
+
182
+ _details = {}
183
+ _details['compartmentId'] = compartment_id
184
+ _details['adwAdminPassword'] = cli_util.parse_json_parameter("adw_admin_password", adw_admin_password)
185
+ _details['subnetId'] = subnet_id
186
+
187
+ if display_name is not None:
188
+ _details['displayName'] = display_name
189
+
190
+ if description is not None:
191
+ _details['description'] = description
192
+
193
+ if is_mutual_tls_required is not None:
194
+ _details['isMutualTlsRequired'] = is_mutual_tls_required
195
+
196
+ if nsg_ids is not None:
197
+ _details['nsgIds'] = cli_util.parse_json_parameter("nsg_ids", nsg_ids)
198
+
199
+ if license_model is not None:
200
+ _details['licenseModel'] = license_model
201
+
202
+ if freeform_tags is not None:
203
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
204
+
205
+ if defined_tags is not None:
206
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
207
+
208
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
209
+ result = client.create_resource_analytics_instance(
210
+ create_resource_analytics_instance_details=_details,
211
+ **kwargs
212
+ )
213
+ if wait_for_state:
214
+
215
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
216
+ try:
217
+ wait_period_kwargs = {}
218
+ if max_wait_seconds is not None:
219
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
220
+ if wait_interval_seconds is not None:
221
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
222
+ if 'opc-work-request-id' not in result.headers:
223
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
224
+ cli_util.render_response(result, ctx)
225
+ return
226
+
227
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
228
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
229
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
230
+ # If we fail, we should show an error, but we should still provide the information to the customer
231
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
232
+ cli_util.render_response(result, ctx)
233
+ sys.exit(2)
234
+ except Exception:
235
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
236
+ cli_util.render_response(result, ctx)
237
+ raise
238
+ else:
239
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
240
+ cli_util.render_response(result, ctx)
241
+
242
+
243
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.create_resource_analytics_instance_plain_text_password_details.command_name', 'create'), help=u"""Creates a ResourceAnalyticsInstance. \n[Command Reference](createResourceAnalyticsInstance)""")
244
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the ResourceAnalyticsInstance in.""")
245
+ @cli_util.option('--subnet-id', required=True, help=u"""The [OCID] of the subnet the resource is associated with.""")
246
+ @cli_util.option('--adw-admin-password-password', required=True, help=u"""Password for the ADW to be created in User Tenancy. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (\") or the username \"admin\", regardless of casing.""")
247
+ @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
248
+ @cli_util.option('--description', help=u"""A description of the ResourceAnalyticsInstance instance.""")
249
+ @cli_util.option('--is-mutual-tls-required', type=click.BOOL, help=u"""Require mutual TLS (mTLS) when authenticating connections to the ADW database.""")
250
+ @cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of Network Security Group [OCID]'s.
251
+
252
+ Example: `[\"ocid...\", \"ocid...\"]`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
253
+ @cli_util.option('--license-model', type=custom_types.CliCaseInsensitiveChoice(["LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"]), help=u"""The Oracle license model that applies to the ADW instance.""")
254
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
255
+
256
+ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
257
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
258
+
259
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
260
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
261
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
262
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
263
+ @json_skeleton_utils.get_cli_json_input_option({'nsg-ids': {'module': 'resource_analytics', 'class': 'list[string]'}, 'freeform-tags': {'module': 'resource_analytics', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'resource_analytics', 'class': 'dict(str, dict(str, object))'}})
264
+ @cli_util.help_option
265
+ @click.pass_context
266
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'resource_analytics', 'class': 'list[string]'}, 'freeform-tags': {'module': 'resource_analytics', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'resource_analytics', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'resource_analytics', 'class': 'ResourceAnalyticsInstance'})
267
+ @cli_util.wrap_exceptions
268
+ def create_resource_analytics_instance_plain_text_password_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, subnet_id, adw_admin_password_password, display_name, description, is_mutual_tls_required, nsg_ids, license_model, freeform_tags, defined_tags):
269
+
270
+ kwargs = {}
271
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
272
+
273
+ _details = {}
274
+ _details['adwAdminPassword'] = {}
275
+ _details['compartmentId'] = compartment_id
276
+ _details['subnetId'] = subnet_id
277
+ _details['adwAdminPassword']['password'] = adw_admin_password_password
278
+
279
+ if display_name is not None:
280
+ _details['displayName'] = display_name
281
+
282
+ if description is not None:
283
+ _details['description'] = description
284
+
285
+ if is_mutual_tls_required is not None:
286
+ _details['isMutualTlsRequired'] = is_mutual_tls_required
287
+
288
+ if nsg_ids is not None:
289
+ _details['nsgIds'] = cli_util.parse_json_parameter("nsg_ids", nsg_ids)
290
+
291
+ if license_model is not None:
292
+ _details['licenseModel'] = license_model
293
+
294
+ if freeform_tags is not None:
295
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
296
+
297
+ if defined_tags is not None:
298
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
299
+
300
+ _details['adwAdminPassword']['passwordType'] = 'PLAIN_TEXT'
301
+
302
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
303
+ result = client.create_resource_analytics_instance(
304
+ create_resource_analytics_instance_details=_details,
305
+ **kwargs
306
+ )
307
+ if wait_for_state:
308
+
309
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
310
+ try:
311
+ wait_period_kwargs = {}
312
+ if max_wait_seconds is not None:
313
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
314
+ if wait_interval_seconds is not None:
315
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
316
+ if 'opc-work-request-id' not in result.headers:
317
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
318
+ cli_util.render_response(result, ctx)
319
+ return
320
+
321
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
322
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
323
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
324
+ # If we fail, we should show an error, but we should still provide the information to the customer
325
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
326
+ cli_util.render_response(result, ctx)
327
+ sys.exit(2)
328
+ except Exception:
329
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
330
+ cli_util.render_response(result, ctx)
331
+ raise
332
+ else:
333
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
334
+ cli_util.render_response(result, ctx)
335
+
336
+
337
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.create_resource_analytics_instance_vault_secret_password_details.command_name', 'create'), help=u"""Creates a ResourceAnalyticsInstance. \n[Command Reference](createResourceAnalyticsInstance)""")
338
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the ResourceAnalyticsInstance in.""")
339
+ @cli_util.option('--subnet-id', required=True, help=u"""The [OCID] of the subnet the resource is associated with.""")
340
+ @cli_util.option('--adw-admin-password-secret-id', required=True, help=u"""The [OCID] of the vault secret to use as the ADW admin password.""")
341
+ @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
342
+ @cli_util.option('--description', help=u"""A description of the ResourceAnalyticsInstance instance.""")
343
+ @cli_util.option('--is-mutual-tls-required', type=click.BOOL, help=u"""Require mutual TLS (mTLS) when authenticating connections to the ADW database.""")
344
+ @cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of Network Security Group [OCID]'s.
345
+
346
+ Example: `[\"ocid...\", \"ocid...\"]`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
347
+ @cli_util.option('--license-model', type=custom_types.CliCaseInsensitiveChoice(["LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"]), help=u"""The Oracle license model that applies to the ADW instance.""")
348
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
349
+
350
+ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
351
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
352
+
353
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
354
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
355
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
356
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
357
+ @json_skeleton_utils.get_cli_json_input_option({'nsg-ids': {'module': 'resource_analytics', 'class': 'list[string]'}, 'freeform-tags': {'module': 'resource_analytics', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'resource_analytics', 'class': 'dict(str, dict(str, object))'}})
358
+ @cli_util.help_option
359
+ @click.pass_context
360
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'resource_analytics', 'class': 'list[string]'}, 'freeform-tags': {'module': 'resource_analytics', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'resource_analytics', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'resource_analytics', 'class': 'ResourceAnalyticsInstance'})
361
+ @cli_util.wrap_exceptions
362
+ def create_resource_analytics_instance_vault_secret_password_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, subnet_id, adw_admin_password_secret_id, display_name, description, is_mutual_tls_required, nsg_ids, license_model, freeform_tags, defined_tags):
363
+
364
+ kwargs = {}
365
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
366
+
367
+ _details = {}
368
+ _details['adwAdminPassword'] = {}
369
+ _details['compartmentId'] = compartment_id
370
+ _details['subnetId'] = subnet_id
371
+ _details['adwAdminPassword']['secretId'] = adw_admin_password_secret_id
372
+
373
+ if display_name is not None:
374
+ _details['displayName'] = display_name
375
+
376
+ if description is not None:
377
+ _details['description'] = description
378
+
379
+ if is_mutual_tls_required is not None:
380
+ _details['isMutualTlsRequired'] = is_mutual_tls_required
381
+
382
+ if nsg_ids is not None:
383
+ _details['nsgIds'] = cli_util.parse_json_parameter("nsg_ids", nsg_ids)
384
+
385
+ if license_model is not None:
386
+ _details['licenseModel'] = license_model
387
+
388
+ if freeform_tags is not None:
389
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
390
+
391
+ if defined_tags is not None:
392
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
393
+
394
+ _details['adwAdminPassword']['passwordType'] = 'VAULT_SECRET'
395
+
396
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
397
+ result = client.create_resource_analytics_instance(
398
+ create_resource_analytics_instance_details=_details,
399
+ **kwargs
400
+ )
401
+ if wait_for_state:
402
+
403
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
404
+ try:
405
+ wait_period_kwargs = {}
406
+ if max_wait_seconds is not None:
407
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
408
+ if wait_interval_seconds is not None:
409
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
410
+ if 'opc-work-request-id' not in result.headers:
411
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
412
+ cli_util.render_response(result, ctx)
413
+ return
414
+
415
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
416
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
417
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
418
+ # If we fail, we should show an error, but we should still provide the information to the customer
419
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
420
+ cli_util.render_response(result, ctx)
421
+ sys.exit(2)
422
+ except Exception:
423
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
424
+ cli_util.render_response(result, ctx)
425
+ raise
426
+ else:
427
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
428
+ cli_util.render_response(result, ctx)
429
+
430
+
431
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.delete_resource_analytics_instance.command_name', 'delete'), help=u"""Deletes a ResourceAnalyticsInstance. \n[Command Reference](deleteResourceAnalyticsInstance)""")
432
+ @cli_util.option('--resource-analytics-instance-id', required=True, help=u"""The [OCID] of the ResourceAnalyticsInstance.""")
433
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
434
+ @cli_util.confirm_delete_option
435
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
436
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
437
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
438
+ @json_skeleton_utils.get_cli_json_input_option({})
439
+ @cli_util.help_option
440
+ @click.pass_context
441
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
442
+ @cli_util.wrap_exceptions
443
+ def delete_resource_analytics_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, resource_analytics_instance_id, if_match):
444
+
445
+ if isinstance(resource_analytics_instance_id, six.string_types) and len(resource_analytics_instance_id.strip()) == 0:
446
+ raise click.UsageError('Parameter --resource-analytics-instance-id cannot be whitespace or empty string')
447
+
448
+ kwargs = {}
449
+ if if_match is not None:
450
+ kwargs['if_match'] = if_match
451
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
452
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
453
+ result = client.delete_resource_analytics_instance(
454
+ resource_analytics_instance_id=resource_analytics_instance_id,
455
+ **kwargs
456
+ )
457
+ if wait_for_state:
458
+
459
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
460
+ try:
461
+ wait_period_kwargs = {}
462
+ if max_wait_seconds is not None:
463
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
464
+ if wait_interval_seconds is not None:
465
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
466
+ if 'opc-work-request-id' not in result.headers:
467
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
468
+ cli_util.render_response(result, ctx)
469
+ return
470
+
471
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
472
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
473
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
474
+ # If we fail, we should show an error, but we should still provide the information to the customer
475
+ click.echo('Failed to wait until the work request entered the specified state. Please retrieve the work request to find its current state', file=sys.stderr)
476
+ cli_util.render_response(result, ctx)
477
+ sys.exit(2)
478
+ except Exception:
479
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
480
+ cli_util.render_response(result, ctx)
481
+ raise
482
+ else:
483
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
484
+ cli_util.render_response(result, ctx)
485
+
486
+
487
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.get_resource_analytics_instance.command_name', 'get'), help=u"""Gets information about a ResourceAnalyticsInstance. \n[Command Reference](getResourceAnalyticsInstance)""")
488
+ @cli_util.option('--resource-analytics-instance-id', required=True, help=u"""The [OCID] of the ResourceAnalyticsInstance.""")
489
+ @json_skeleton_utils.get_cli_json_input_option({})
490
+ @cli_util.help_option
491
+ @click.pass_context
492
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'resource_analytics', 'class': 'ResourceAnalyticsInstance'})
493
+ @cli_util.wrap_exceptions
494
+ def get_resource_analytics_instance(ctx, from_json, resource_analytics_instance_id):
495
+
496
+ if isinstance(resource_analytics_instance_id, six.string_types) and len(resource_analytics_instance_id.strip()) == 0:
497
+ raise click.UsageError('Parameter --resource-analytics-instance-id cannot be whitespace or empty string')
498
+
499
+ kwargs = {}
500
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
501
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
502
+ result = client.get_resource_analytics_instance(
503
+ resource_analytics_instance_id=resource_analytics_instance_id,
504
+ **kwargs
505
+ )
506
+ cli_util.render_response(result, ctx)
507
+
508
+
509
+ @work_request_group.command(name=cli_util.override('resource_analytics_instance.get_work_request.command_name', 'get'), help=u"""Gets the details of a work request. \n[Command Reference](getWorkRequest)""")
510
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
511
+ @json_skeleton_utils.get_cli_json_input_option({})
512
+ @cli_util.help_option
513
+ @click.pass_context
514
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'resource_analytics', 'class': 'WorkRequest'})
515
+ @cli_util.wrap_exceptions
516
+ def get_work_request(ctx, from_json, work_request_id):
517
+
518
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
519
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
520
+
521
+ kwargs = {}
522
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
523
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
524
+ result = client.get_work_request(
525
+ work_request_id=work_request_id,
526
+ **kwargs
527
+ )
528
+ cli_util.render_response(result, ctx)
529
+
530
+
531
+ @resource_analytics_instance_collection_group.command(name=cli_util.override('resource_analytics_instance.list_resource_analytics_instances.command_name', 'list'), help=u"""Gets a list of ResourceAnalyticsInstances. \n[Command Reference](listResourceAnalyticsInstances)""")
532
+ @cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""")
533
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "NEEDS_ATTENTION", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.""")
534
+ @cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""")
535
+ @cli_util.option('--id', help=u"""The [OCID] of the ResourceAnalyticsInstance.""")
536
+ @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
537
+ @cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
538
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
539
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["TIME_CREATED", "DISPLAY_NAME"]), help=u"""The field to sort by. You can provide only one sort order. Default order for `TIME_CREATED` is descending. Default order for `DISPLAY_NAME` is ascending.""")
540
+ @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
541
+ @cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
542
+ @json_skeleton_utils.get_cli_json_input_option({})
543
+ @cli_util.help_option
544
+ @click.pass_context
545
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'resource_analytics', 'class': 'ResourceAnalyticsInstanceCollection'})
546
+ @cli_util.wrap_exceptions
547
+ def list_resource_analytics_instances(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, display_name, id, limit, page, sort_order, sort_by):
548
+
549
+ if all_pages and limit:
550
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
551
+
552
+ kwargs = {}
553
+ if compartment_id is not None:
554
+ kwargs['compartment_id'] = compartment_id
555
+ if lifecycle_state is not None:
556
+ kwargs['lifecycle_state'] = lifecycle_state
557
+ if display_name is not None:
558
+ kwargs['display_name'] = display_name
559
+ if id is not None:
560
+ kwargs['id'] = id
561
+ if limit is not None:
562
+ kwargs['limit'] = limit
563
+ if page is not None:
564
+ kwargs['page'] = page
565
+ if sort_order is not None:
566
+ kwargs['sort_order'] = sort_order
567
+ if sort_by is not None:
568
+ kwargs['sort_by'] = sort_by
569
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
570
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
571
+ if all_pages:
572
+ if page_size:
573
+ kwargs['limit'] = page_size
574
+
575
+ result = cli_util.list_call_get_all_results(
576
+ client.list_resource_analytics_instances,
577
+ **kwargs
578
+ )
579
+ elif limit is not None:
580
+ result = cli_util.list_call_get_up_to_limit(
581
+ client.list_resource_analytics_instances,
582
+ limit,
583
+ page_size,
584
+ **kwargs
585
+ )
586
+ else:
587
+ result = client.list_resource_analytics_instances(
588
+ **kwargs
589
+ )
590
+ cli_util.render_response(result, ctx)
591
+
592
+
593
+ @work_request_error_group.command(name=cli_util.override('resource_analytics_instance.list_work_request_errors.command_name', 'list'), help=u"""Lists the errors for a work request. \n[Command Reference](listWorkRequestErrors)""")
594
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
595
+ @cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
596
+ @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
597
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timestamp"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending.""")
598
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
599
+ @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
600
+ @cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
601
+ @json_skeleton_utils.get_cli_json_input_option({})
602
+ @cli_util.help_option
603
+ @click.pass_context
604
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'resource_analytics', 'class': 'WorkRequestErrorCollection'})
605
+ @cli_util.wrap_exceptions
606
+ def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_by, sort_order):
607
+
608
+ if all_pages and limit:
609
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
610
+
611
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
612
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
613
+
614
+ kwargs = {}
615
+ if page is not None:
616
+ kwargs['page'] = page
617
+ if limit is not None:
618
+ kwargs['limit'] = limit
619
+ if sort_by is not None:
620
+ kwargs['sort_by'] = sort_by
621
+ if sort_order is not None:
622
+ kwargs['sort_order'] = sort_order
623
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
624
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
625
+ if all_pages:
626
+ if page_size:
627
+ kwargs['limit'] = page_size
628
+
629
+ result = cli_util.list_call_get_all_results(
630
+ client.list_work_request_errors,
631
+ work_request_id=work_request_id,
632
+ **kwargs
633
+ )
634
+ elif limit is not None:
635
+ result = cli_util.list_call_get_up_to_limit(
636
+ client.list_work_request_errors,
637
+ limit,
638
+ page_size,
639
+ work_request_id=work_request_id,
640
+ **kwargs
641
+ )
642
+ else:
643
+ result = client.list_work_request_errors(
644
+ work_request_id=work_request_id,
645
+ **kwargs
646
+ )
647
+ cli_util.render_response(result, ctx)
648
+
649
+
650
+ @work_request_log_entry_group.command(name=cli_util.override('resource_analytics_instance.list_work_request_logs.command_name', 'list'), help=u"""Lists the logs for a work request. \n[Command Reference](listWorkRequestLogs)""")
651
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
652
+ @cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
653
+ @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
654
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timestamp"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending.""")
655
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
656
+ @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
657
+ @cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
658
+ @json_skeleton_utils.get_cli_json_input_option({})
659
+ @cli_util.help_option
660
+ @click.pass_context
661
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'resource_analytics', 'class': 'WorkRequestLogEntryCollection'})
662
+ @cli_util.wrap_exceptions
663
+ def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_by, sort_order):
664
+
665
+ if all_pages and limit:
666
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
667
+
668
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
669
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
670
+
671
+ kwargs = {}
672
+ if page is not None:
673
+ kwargs['page'] = page
674
+ if limit is not None:
675
+ kwargs['limit'] = limit
676
+ if sort_by is not None:
677
+ kwargs['sort_by'] = sort_by
678
+ if sort_order is not None:
679
+ kwargs['sort_order'] = sort_order
680
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
681
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
682
+ if all_pages:
683
+ if page_size:
684
+ kwargs['limit'] = page_size
685
+
686
+ result = cli_util.list_call_get_all_results(
687
+ client.list_work_request_logs,
688
+ work_request_id=work_request_id,
689
+ **kwargs
690
+ )
691
+ elif limit is not None:
692
+ result = cli_util.list_call_get_up_to_limit(
693
+ client.list_work_request_logs,
694
+ limit,
695
+ page_size,
696
+ work_request_id=work_request_id,
697
+ **kwargs
698
+ )
699
+ else:
700
+ result = client.list_work_request_logs(
701
+ work_request_id=work_request_id,
702
+ **kwargs
703
+ )
704
+ cli_util.render_response(result, ctx)
705
+
706
+
707
+ @work_request_group.command(name=cli_util.override('resource_analytics_instance.list_work_requests.command_name', 'list'), help=u"""Lists the work requests in a compartment. \n[Command Reference](listWorkRequests)""")
708
+ @cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""")
709
+ @cli_util.option('--work-request-id', help=u"""The [OCID] of the asynchronous work request.""")
710
+ @cli_util.option('--status', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), help=u"""A filter to return only the resources that match the given lifecycle state.""")
711
+ @cli_util.option('--resource-id', help=u"""The [OCID] of the resource affected by the work request.""")
712
+ @cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
713
+ @cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
714
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
715
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeAccepted"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for `timeAccepted` is descending.""")
716
+ @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
717
+ @cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
718
+ @json_skeleton_utils.get_cli_json_input_option({})
719
+ @cli_util.help_option
720
+ @click.pass_context
721
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'resource_analytics', 'class': 'WorkRequestSummaryCollection'})
722
+ @cli_util.wrap_exceptions
723
+ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, work_request_id, status, resource_id, page, limit, sort_order, sort_by):
724
+
725
+ if all_pages and limit:
726
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
727
+
728
+ kwargs = {}
729
+ if compartment_id is not None:
730
+ kwargs['compartment_id'] = compartment_id
731
+ if work_request_id is not None:
732
+ kwargs['work_request_id'] = work_request_id
733
+ if status is not None:
734
+ kwargs['status'] = status
735
+ if resource_id is not None:
736
+ kwargs['resource_id'] = resource_id
737
+ if page is not None:
738
+ kwargs['page'] = page
739
+ if limit is not None:
740
+ kwargs['limit'] = limit
741
+ if sort_order is not None:
742
+ kwargs['sort_order'] = sort_order
743
+ if sort_by is not None:
744
+ kwargs['sort_by'] = sort_by
745
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
746
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
747
+ if all_pages:
748
+ if page_size:
749
+ kwargs['limit'] = page_size
750
+
751
+ result = cli_util.list_call_get_all_results(
752
+ client.list_work_requests,
753
+ **kwargs
754
+ )
755
+ elif limit is not None:
756
+ result = cli_util.list_call_get_up_to_limit(
757
+ client.list_work_requests,
758
+ limit,
759
+ page_size,
760
+ **kwargs
761
+ )
762
+ else:
763
+ result = client.list_work_requests(
764
+ **kwargs
765
+ )
766
+ cli_util.render_response(result, ctx)
767
+
768
+
769
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.resource_analytics_instance_disable_oac.command_name', 'disable-oac'), help=u"""Disable an OAC instance for a ResourceAnalyticsInstance. \n[Command Reference](resourceAnalyticsInstanceDisableOac)""")
770
+ @cli_util.option('--resource-analytics-instance-id', required=True, help=u"""The [OCID] of the ResourceAnalyticsInstance.""")
771
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
772
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
773
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
774
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
775
+ @json_skeleton_utils.get_cli_json_input_option({})
776
+ @cli_util.help_option
777
+ @click.pass_context
778
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
779
+ @cli_util.wrap_exceptions
780
+ def resource_analytics_instance_disable_oac(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, resource_analytics_instance_id, if_match):
781
+
782
+ if isinstance(resource_analytics_instance_id, six.string_types) and len(resource_analytics_instance_id.strip()) == 0:
783
+ raise click.UsageError('Parameter --resource-analytics-instance-id cannot be whitespace or empty string')
784
+
785
+ kwargs = {}
786
+ if if_match is not None:
787
+ kwargs['if_match'] = if_match
788
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
789
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
790
+ result = client.resource_analytics_instance_disable_oac(
791
+ resource_analytics_instance_id=resource_analytics_instance_id,
792
+ **kwargs
793
+ )
794
+ if wait_for_state:
795
+
796
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
797
+ try:
798
+ wait_period_kwargs = {}
799
+ if max_wait_seconds is not None:
800
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
801
+ if wait_interval_seconds is not None:
802
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
803
+ if 'opc-work-request-id' not in result.headers:
804
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
805
+ cli_util.render_response(result, ctx)
806
+ return
807
+
808
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
809
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
810
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
811
+ # If we fail, we should show an error, but we should still provide the information to the customer
812
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
813
+ cli_util.render_response(result, ctx)
814
+ sys.exit(2)
815
+ except Exception:
816
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
817
+ cli_util.render_response(result, ctx)
818
+ raise
819
+ else:
820
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
821
+ cli_util.render_response(result, ctx)
822
+
823
+
824
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.resource_analytics_instance_enable_oac.command_name', 'enable-oac'), help=u"""Attaches an OAC instance to a ResourceAnalyticsInstance. \n[Command Reference](resourceAnalyticsInstanceEnableOac)""")
825
+ @cli_util.option('--resource-analytics-instance-id', required=True, help=u"""The [OCID] of the ResourceAnalyticsInstance.""")
826
+ @cli_util.option('--attachment-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["MANAGED"]), help=u"""The type of attachment the OAC instance is using.""")
827
+ @cli_util.option('--attachment-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
828
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
829
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
830
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
831
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
832
+ @json_skeleton_utils.get_cli_json_input_option({'attachment-details': {'module': 'resource_analytics', 'class': 'ResourceAnalyticsInstanceOacAttachmentDetails'}})
833
+ @cli_util.help_option
834
+ @click.pass_context
835
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'attachment-details': {'module': 'resource_analytics', 'class': 'ResourceAnalyticsInstanceOacAttachmentDetails'}})
836
+ @cli_util.wrap_exceptions
837
+ def resource_analytics_instance_enable_oac(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, resource_analytics_instance_id, attachment_type, attachment_details, if_match):
838
+
839
+ if isinstance(resource_analytics_instance_id, six.string_types) and len(resource_analytics_instance_id.strip()) == 0:
840
+ raise click.UsageError('Parameter --resource-analytics-instance-id cannot be whitespace or empty string')
841
+
842
+ kwargs = {}
843
+ if if_match is not None:
844
+ kwargs['if_match'] = if_match
845
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
846
+
847
+ _details = {}
848
+ _details['attachmentType'] = attachment_type
849
+ _details['attachmentDetails'] = cli_util.parse_json_parameter("attachment_details", attachment_details)
850
+
851
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
852
+ result = client.resource_analytics_instance_enable_oac(
853
+ resource_analytics_instance_id=resource_analytics_instance_id,
854
+ resource_analytics_instance_enable_oac_details=_details,
855
+ **kwargs
856
+ )
857
+ if wait_for_state:
858
+
859
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
860
+ try:
861
+ wait_period_kwargs = {}
862
+ if max_wait_seconds is not None:
863
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
864
+ if wait_interval_seconds is not None:
865
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
866
+ if 'opc-work-request-id' not in result.headers:
867
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
868
+ cli_util.render_response(result, ctx)
869
+ return
870
+
871
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
872
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
873
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
874
+ # If we fail, we should show an error, but we should still provide the information to the customer
875
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
876
+ cli_util.render_response(result, ctx)
877
+ sys.exit(2)
878
+ except Exception:
879
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
880
+ cli_util.render_response(result, ctx)
881
+ raise
882
+ else:
883
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
884
+ cli_util.render_response(result, ctx)
885
+
886
+
887
+ @resource_analytics_instance_group.command(name=cli_util.override('resource_analytics_instance.update_resource_analytics_instance.command_name', 'update'), help=u"""Updates a ResourceAnalyticsInstance. \n[Command Reference](updateResourceAnalyticsInstance)""")
888
+ @cli_util.option('--resource-analytics-instance-id', required=True, help=u"""The [OCID] of the ResourceAnalyticsInstance.""")
889
+ @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
890
+ @cli_util.option('--description', help=u"""A description of the ResourceAnalyticsInstance instance.""")
891
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
892
+
893
+ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
894
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
895
+
896
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
897
+ @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
898
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
899
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
900
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
901
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
902
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'resource_analytics', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'resource_analytics', 'class': 'dict(str, dict(str, object))'}})
903
+ @cli_util.help_option
904
+ @click.pass_context
905
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'resource_analytics', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'resource_analytics', 'class': 'dict(str, dict(str, object))'}})
906
+ @cli_util.wrap_exceptions
907
+ def update_resource_analytics_instance(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, resource_analytics_instance_id, display_name, description, freeform_tags, defined_tags, if_match):
908
+
909
+ if isinstance(resource_analytics_instance_id, six.string_types) and len(resource_analytics_instance_id.strip()) == 0:
910
+ raise click.UsageError('Parameter --resource-analytics-instance-id cannot be whitespace or empty string')
911
+ if not force:
912
+ if freeform_tags or defined_tags:
913
+ if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
914
+ ctx.abort()
915
+
916
+ kwargs = {}
917
+ if if_match is not None:
918
+ kwargs['if_match'] = if_match
919
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
920
+
921
+ _details = {}
922
+
923
+ if display_name is not None:
924
+ _details['displayName'] = display_name
925
+
926
+ if description is not None:
927
+ _details['description'] = description
928
+
929
+ if freeform_tags is not None:
930
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
931
+
932
+ if defined_tags is not None:
933
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
934
+
935
+ client = cli_util.build_client('resource_analytics', 'resource_analytics_instance', ctx)
936
+ result = client.update_resource_analytics_instance(
937
+ resource_analytics_instance_id=resource_analytics_instance_id,
938
+ update_resource_analytics_instance_details=_details,
939
+ **kwargs
940
+ )
941
+ if wait_for_state:
942
+
943
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
944
+ try:
945
+ wait_period_kwargs = {}
946
+ if max_wait_seconds is not None:
947
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
948
+ if wait_interval_seconds is not None:
949
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
950
+ if 'opc-work-request-id' not in result.headers:
951
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
952
+ cli_util.render_response(result, ctx)
953
+ return
954
+
955
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
956
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
957
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
958
+ # If we fail, we should show an error, but we should still provide the information to the customer
959
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
960
+ cli_util.render_response(result, ctx)
961
+ sys.exit(2)
962
+ except Exception:
963
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
964
+ cli_util.render_response(result, ctx)
965
+ raise
966
+ else:
967
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
968
+ cli_util.render_response(result, ctx)