oci-cli 3.63.0__py3-none-any.whl → 3.63.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 (187) hide show
  1. oci_cli/bin/devops.psm1 +5 -4
  2. oci_cli/bin/psql.psm1 +4 -4
  3. oci_cli/bin/vault.psm1 +3 -3
  4. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/add-lock.txt +141 -0
  5. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/change-compartment.txt +4 -0
  6. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/create.txt +17 -0
  7. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/delete.txt +4 -0
  8. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/remove-lock.txt +136 -0
  9. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api/update.txt +4 -0
  10. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/api.txt +4 -0
  11. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/add-lock.txt +143 -0
  12. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/change-compartment.txt +4 -0
  13. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/create.txt +17 -0
  14. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/delete.txt +4 -0
  15. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/remove-lock.txt +138 -0
  16. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate/update.txt +4 -0
  17. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/certificate.txt +4 -0
  18. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/add-lock.txt +150 -0
  19. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/change-compartment.txt +4 -0
  20. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/create.txt +17 -0
  21. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/delete.txt +4 -0
  22. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/remove-lock.txt +145 -0
  23. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment/update.txt +4 -0
  24. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/deployment.txt +4 -0
  25. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/add-lock.txt +142 -0
  26. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/change-compartment.txt +4 -0
  27. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/create.txt +18 -1
  28. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/delete.txt +4 -0
  29. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/remove-lock.txt +137 -0
  30. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway/update.txt +5 -1
  31. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/gateway.txt +4 -0
  32. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/add-lock.txt +144 -0
  33. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/create.txt +17 -0
  34. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/delete.txt +4 -0
  35. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/list.txt +4 -2
  36. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/remove-lock.txt +139 -0
  37. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk/update.txt +4 -0
  38. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/sdk.txt +4 -0
  39. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/add-lock.txt +147 -0
  40. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/change-compartment.txt +4 -0
  41. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/create.txt +17 -0
  42. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/delete.txt +4 -0
  43. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/remove-lock.txt +142 -0
  44. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber/update.txt +4 -0
  45. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/subscriber.txt +4 -0
  46. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/add-lock.txt +146 -0
  47. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/change-compartment.txt +4 -0
  48. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/create.txt +17 -0
  49. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/delete.txt +4 -0
  50. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/remove-lock.txt +141 -0
  51. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan/update.txt +4 -0
  52. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway/usage-plan.txt +4 -0
  53. oci_cli/help_text_producer/data_files/text/cmdref/api-gateway.txt +28 -0
  54. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/change-compartment.txt +108 -0
  55. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/create.txt +153 -0
  56. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/delete.txt +132 -0
  57. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/get.txt +94 -0
  58. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance/update.txt +162 -0
  59. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance-collection/list-api-platform-instances.txt +141 -0
  60. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance-collection.txt +15 -0
  61. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/api-platform-instance.txt +23 -0
  62. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request/get.txt +91 -0
  63. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request/list.txt +140 -0
  64. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request-error/list.txt +131 -0
  65. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request-error.txt +15 -0
  66. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request-log-entry/list-work-request-logs.txt +131 -0
  67. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request-log-entry.txt +15 -0
  68. oci_cli/help_text_producer/data_files/text/cmdref/api-platform/work-request.txt +21 -0
  69. oci_cli/help_text_producer/data_files/text/cmdref/api-platform.txt +42 -0
  70. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config/create-agent.txt +153 -0
  71. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config/create-macs-extension.txt +171 -0
  72. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config/update-agent.txt +162 -0
  73. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config/update-macs-extension.txt +174 -0
  74. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config-collection/list.txt +2 -1
  75. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/config.txt +8 -0
  76. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/match-agents-with-attribute-key/get.txt +91 -0
  77. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/match-agents-with-attribute-key/update.txt +107 -0
  78. oci_cli/help_text_producer/data_files/text/cmdref/apm-config/match-agents-with-attribute-key.txt +16 -0
  79. oci_cli/help_text_producer/data_files/text/cmdref/apm-config.txt +14 -0
  80. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment/create-model-deployment-model-group-deployment-configuration-details.txt +215 -0
  81. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment/update-model-deployment-update-model-group-deployment-configuration-details.txt +235 -0
  82. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment-model-state/list.txt +167 -0
  83. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment-model-state.txt +14 -0
  84. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-deployment.txt +5 -0
  85. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/activate.txt +130 -0
  86. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/change-compartment.txt +108 -0
  87. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/create-model-group-artifact.txt +123 -0
  88. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/create-model-group-clone-model-group-details.txt +139 -0
  89. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/create-model-group-create-model-group-details.txt +197 -0
  90. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/create.txt +132 -0
  91. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/deactivate.txt +130 -0
  92. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/delete.txt +134 -0
  93. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/get-model-group-artifact-content.txt +107 -0
  94. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/get.txt +97 -0
  95. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/head-model-group-artifact.txt +96 -0
  96. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/list-model-group-models.txt +171 -0
  97. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/list.txt +169 -0
  98. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group/update.txt +180 -0
  99. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/change-compartment.txt +108 -0
  100. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/create.txt +166 -0
  101. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/delete.txt +133 -0
  102. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/get.txt +95 -0
  103. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/list.txt +165 -0
  104. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history/update.txt +172 -0
  105. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group-version-history.txt +25 -0
  106. oci_cli/help_text_producer/data_files/text/cmdref/data-science/model-group.txt +41 -0
  107. oci_cli/help_text_producer/data_files/text/cmdref/data-science/work-request/list.txt +1 -1
  108. oci_cli/help_text_producer/data_files/text/cmdref/data-science.txt +54 -0
  109. oci_cli/help_text_producer/data_files/text/cmdref/devops/{protected-branch → protected-branch-collection}/list-protected-branches.txt +2 -2
  110. oci_cli/help_text_producer/data_files/text/cmdref/devops/protected-branch-collection.txt +14 -0
  111. oci_cli/help_text_producer/data_files/text/cmdref/devops/protected-branch.txt +0 -2
  112. oci_cli/help_text_producer/data_files/text/cmdref/devops.txt +2 -0
  113. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection/create-amazon-s3-connection.txt +9 -9
  114. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection/{create-connection-create-iceberg-connection-details.txt → create-iceberg-connection.txt} +9 -9
  115. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection/update-amazon-s3-connection.txt +9 -9
  116. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection/{update-connection-update-iceberg-connection-details.txt → update-iceberg-connection.txt} +5 -5
  117. oci_cli/help_text_producer/data_files/text/cmdref/goldengate/connection.txt +4 -4
  118. oci_cli/help_text_producer/data_files/text/cmdref/goldengate.txt +4 -4
  119. oci_cli/help_text_producer/data_files/text/cmdref/lfs/lustre-file-system.txt +1 -1
  120. oci_cli/help_text_producer/data_files/text/cmdref/lfs.txt +1 -2
  121. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/dashboard/get-oob.txt +3 -2
  122. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/dashboard/import.txt +24 -0
  123. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/dashboard/list-oob.txt +2 -2
  124. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/saved-search/get-oob.txt +1 -1
  125. oci_cli/help_text_producer/data_files/text/cmdref/management-dashboard/saved-search/list-oob.txt +1 -1
  126. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error/{list.txt → list-errors.txt} +5 -5
  127. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error.txt +1 -1
  128. oci_cli/help_text_producer/data_files/text/cmdref/ocvs.txt +1 -1
  129. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list.txt → list-errors.txt} +5 -5
  130. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
  131. oci_cli/help_text_producer/data_files/text/cmdref/organizations/{work-request-log-entry → work-request-log}/list.txt +19 -1
  132. oci_cli/help_text_producer/data_files/text/cmdref/organizations/{work-request-log-entry.txt → work-request-log.txt} +2 -2
  133. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +2 -2
  134. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/change-compartment.txt +1 -2
  135. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/create.txt +21 -7
  136. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/delete.txt +1 -2
  137. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/get.txt +1 -2
  138. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration/update.txt +13 -2
  139. oci_cli/help_text_producer/data_files/text/cmdref/psql/configuration-collection/list-configurations.txt +9 -2
  140. oci_cli/help_text_producer/data_files/text/cmdref/psql/default-configuration-collection/list-default-configurations.txt +9 -2
  141. oci_cli/help_text_producer/data_files/text/cmdref/session/authenticate.txt +8 -8
  142. oci_cli/help_text_producer/data_files/text/cmdref/speech/voice/list.txt +6 -1
  143. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +4 -4
  144. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
  145. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
  146. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
  147. oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
  148. oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
  149. oci_cli/help_text_producer/data_files/text/cmdref/vault/secret/create-base64.txt +11 -0
  150. oci_cli/help_text_producer/data_files/text/cmdref/vault/secret/update-base64.txt +11 -0
  151. oci_cli/help_text_producer/data_files/text/cmdref/vault/secret/update.txt +11 -0
  152. oci_cli/help_text_producer/data_files/text/index.txt +2 -0
  153. oci_cli/service_mapping.py +5 -0
  154. oci_cli/version.py +1 -1
  155. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/METADATA +2 -2
  156. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/RECORD +187 -116
  157. services/ai_speech/src/oci_cli_ai_service_speech/generated/aiservicespeech_cli.py +5 -2
  158. services/api_platform/__init__.py +4 -0
  159. services/api_platform/src/__init__.py +4 -0
  160. services/api_platform/src/oci_cli_api_platform/__init__.py +4 -0
  161. services/api_platform/src/oci_cli_api_platform/generated/__init__.py +4 -0
  162. services/api_platform/src/oci_cli_api_platform/generated/apiplatform_cli.py +567 -0
  163. services/api_platform/src/oci_cli_api_platform/generated/client_mappings.py +14 -0
  164. services/api_platform/tests/__init__.py +4 -0
  165. services/apigateway/src/oci_cli_api_gateway/api_gateway_cli_extended.py +24 -0
  166. services/apigateway/src/oci_cli_api_gateway/generated/apigateway_cli.py +415 -19
  167. services/apigateway/src/oci_cli_deployment/apigateway_deployment_extended.py +8 -0
  168. services/apigateway/src/oci_cli_deployment/generated/deployment_cli.py +139 -6
  169. services/apigateway/src/oci_cli_gateway/apigateway_gateway_extended.py +9 -1
  170. services/apigateway/src/oci_cli_gateway/generated/gateway_cli.py +171 -20
  171. services/apigateway/src/oci_cli_subscribers/generated/subscribers_cli.py +139 -6
  172. services/apigateway/src/oci_cli_subscribers/subscribers_cli_extended.py +9 -0
  173. services/apigateway/src/oci_cli_usage_plans/generated/usageplans_cli.py +139 -6
  174. services/apigateway/src/oci_cli_usage_plans/usageplans_cli_extended.py +9 -0
  175. services/apm_config/src/oci_cli_config/config_cli_extended.py +16 -0
  176. services/apm_config/src/oci_cli_config/generated/config_cli.py +289 -3
  177. services/data_science/src/oci_cli_data_science/generated/datascience_cli.py +1477 -98
  178. services/devops/src/oci_cli_devops/devops_cli_extended.py +11 -11
  179. services/golden_gate/src/oci_cli_golden_gate/golden_gate_cli_extended.py +44 -0
  180. services/management_dashboard/src/oci_cli_dashx_apis/generated/dashxapis_cli.py +18 -6
  181. services/psql/src/oci_cli_postgresql/generated/postgresql_cli.py +38 -14
  182. services/vault/src/oci_cli_vaults/generated/vaults_cli.py +80 -40
  183. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/LICENSE.txt +0 -0
  184. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  185. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/WHEEL +0 -0
  186. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/entry_points.txt +0 -0
  187. {oci_cli-3.63.0.dist-info → oci_cli-3.63.2.dist-info}/top_level.txt +0 -0
@@ -1091,7 +1091,8 @@ def list_transcription_tasks(ctx, from_json, all_pages, page_size, transcription
1091
1091
 
1092
1092
  @voice_group.command(name=cli_util.override('speech.list_voices.command_name', 'list'), help=u"""Returns a list of speakers available to the user to choose from based on language code and voice type provided. \n[Command Reference](listVoices)""")
1093
1093
  @cli_util.option('--compartment-id', help=u"""The ID of the compartment in which to list resources.""")
1094
- @cli_util.option('--model-name', type=custom_types.CliCaseInsensitiveChoice(["TTS_1_STANDARD", "TTS_2_NATURAL"]), help=u"""The model the user wants to run the inference on.""")
1094
+ @cli_util.option('--model-name', type=custom_types.CliCaseInsensitiveChoice(["TTS_1_STANDARD", "TTS_2_NATURAL"]), help=u"""The model name to filter voices for given model name.""")
1095
+ @cli_util.option('--language-code', help=u"""The Code or Id of the language to filter voices for given language code.""")
1095
1096
  @cli_util.option('--display-name', help=u"""The name of the speaker voice in which the user wants tts inference to be.""")
1096
1097
  @cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results.""")
1097
1098
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -1099,13 +1100,15 @@ def list_transcription_tasks(ctx, from_json, all_pages, page_size, transcription
1099
1100
  @click.pass_context
1100
1101
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_speech', 'class': 'VoiceCollection'})
1101
1102
  @cli_util.wrap_exceptions
1102
- def list_voices(ctx, from_json, all_pages, compartment_id, model_name, display_name):
1103
+ def list_voices(ctx, from_json, all_pages, compartment_id, model_name, language_code, display_name):
1103
1104
 
1104
1105
  kwargs = {}
1105
1106
  if compartment_id is not None:
1106
1107
  kwargs['compartment_id'] = compartment_id
1107
1108
  if model_name is not None:
1108
1109
  kwargs['model_name'] = model_name
1110
+ if language_code is not None:
1111
+ kwargs['language_code'] = language_code
1109
1112
  if display_name is not None:
1110
1113
  kwargs['display_name'] = display_name
1111
1114
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -0,0 +1,4 @@
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: 20240829
@@ -0,0 +1,4 @@
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: 20240829
@@ -0,0 +1,4 @@
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: 20240829
@@ -0,0 +1,4 @@
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: 20240829
@@ -0,0 +1,567 @@
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: 20240829
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.cli_root import cli
12
+ from oci_cli import cli_constants # noqa: F401
13
+ from oci_cli import cli_util
14
+ from oci_cli import json_skeleton_utils
15
+ from oci_cli import custom_types # noqa: F401
16
+ from oci_cli.aliasing import CommandGroupWithAlias
17
+
18
+
19
+ @cli.command(cli_util.override('api_platform.api_platform_root_group.command_name', 'api-platform'), cls=CommandGroupWithAlias, help=cli_util.override('api_platform.api_platform_root_group.help', """Control Plane designed to manage lifecycle of APIP Instances"""), short_help=cli_util.override('api_platform.api_platform_root_group.short_help', """APIP Control Plane API"""))
20
+ @cli_util.help_option_group
21
+ def api_platform_root_group():
22
+ pass
23
+
24
+
25
+ @click.command(cli_util.override('api_platform.api_platform_instance_group.command_name', 'api-platform-instance'), cls=CommandGroupWithAlias, help="""A Logical Entity that can be used to create, manage, secure, and advertise APIs to connect to new or existing services""")
26
+ @cli_util.help_option_group
27
+ def api_platform_instance_group():
28
+ pass
29
+
30
+
31
+ @click.command(cli_util.override('api_platform.api_platform_instance_collection_group.command_name', 'api-platform-instance-collection'), cls=CommandGroupWithAlias, help="""Results of a search. Contains both InstanceSummary items and other information, such as metadata.""")
32
+ @cli_util.help_option_group
33
+ def api_platform_instance_collection_group():
34
+ pass
35
+
36
+
37
+ @click.command(cli_util.override('api_platform.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.""")
38
+ @cli_util.help_option_group
39
+ def work_request_error_group():
40
+ pass
41
+
42
+
43
+ @click.command(cli_util.override('api_platform.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.""")
44
+ @cli_util.help_option_group
45
+ def work_request_log_entry_group():
46
+ pass
47
+
48
+
49
+ @click.command(cli_util.override('api_platform.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.""")
50
+ @cli_util.help_option_group
51
+ def work_request_group():
52
+ pass
53
+
54
+
55
+ api_platform_root_group.add_command(api_platform_instance_group)
56
+ api_platform_root_group.add_command(api_platform_instance_collection_group)
57
+ api_platform_root_group.add_command(work_request_error_group)
58
+ api_platform_root_group.add_command(work_request_log_entry_group)
59
+ api_platform_root_group.add_command(work_request_group)
60
+
61
+
62
+ @api_platform_instance_group.command(name=cli_util.override('api_platform.change_api_platform_instance_compartment.command_name', 'change-compartment'), help=u"""Moves an API Platform Instance 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](changeApiPlatformInstanceCompartment)""")
63
+ @cli_util.option('--api-platform-instance-id', required=True, help=u"""The [OCID] of the instance""")
64
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the instance to.""")
65
+ @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.""")
66
+ @json_skeleton_utils.get_cli_json_input_option({})
67
+ @cli_util.help_option
68
+ @click.pass_context
69
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
70
+ @cli_util.wrap_exceptions
71
+ def change_api_platform_instance_compartment(ctx, from_json, api_platform_instance_id, compartment_id, if_match):
72
+
73
+ if isinstance(api_platform_instance_id, six.string_types) and len(api_platform_instance_id.strip()) == 0:
74
+ raise click.UsageError('Parameter --api-platform-instance-id cannot be whitespace or empty string')
75
+
76
+ kwargs = {}
77
+ if if_match is not None:
78
+ kwargs['if_match'] = if_match
79
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
80
+
81
+ _details = {}
82
+ _details['compartmentId'] = compartment_id
83
+
84
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
85
+ result = client.change_api_platform_instance_compartment(
86
+ api_platform_instance_id=api_platform_instance_id,
87
+ change_api_platform_instance_compartment_details=_details,
88
+ **kwargs
89
+ )
90
+ cli_util.render_response(result, ctx)
91
+
92
+
93
+ @api_platform_instance_group.command(name=cli_util.override('api_platform.create_api_platform_instance.command_name', 'create'), help=u"""Creates an API Platform Instance \n[Command Reference](createApiPlatformInstance)""")
94
+ @cli_util.option('--name', required=True, help=u"""A regionally unique, non-changeable instance name provided by the user during creation""")
95
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the instance in.""")
96
+ @cli_util.option('--description', help=u"""User-provided changeable and non-unique description of the instance""")
97
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
98
+ @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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
99
+ @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.""")
100
+ @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.""")
101
+ @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.""")
102
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'api_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'api_platform', 'class': 'dict(str, dict(str, object))'}})
103
+ @cli_util.help_option
104
+ @click.pass_context
105
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'api_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'api_platform', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'api_platform', 'class': 'ApiPlatformInstance'})
106
+ @cli_util.wrap_exceptions
107
+ def create_api_platform_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, description, freeform_tags, defined_tags):
108
+
109
+ kwargs = {}
110
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
111
+
112
+ _details = {}
113
+ _details['name'] = name
114
+ _details['compartmentId'] = compartment_id
115
+
116
+ if description is not None:
117
+ _details['description'] = description
118
+
119
+ if freeform_tags is not None:
120
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
121
+
122
+ if defined_tags is not None:
123
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
124
+
125
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
126
+ result = client.create_api_platform_instance(
127
+ create_api_platform_instance_details=_details,
128
+ **kwargs
129
+ )
130
+ if wait_for_state:
131
+
132
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
133
+ try:
134
+ wait_period_kwargs = {}
135
+ if max_wait_seconds is not None:
136
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
137
+ if wait_interval_seconds is not None:
138
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
139
+ if 'opc-work-request-id' not in result.headers:
140
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
141
+ cli_util.render_response(result, ctx)
142
+ return
143
+
144
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
145
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
146
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
147
+ # If we fail, we should show an error, but we should still provide the information to the customer
148
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
149
+ cli_util.render_response(result, ctx)
150
+ sys.exit(2)
151
+ except Exception:
152
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
153
+ cli_util.render_response(result, ctx)
154
+ raise
155
+ else:
156
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
157
+ cli_util.render_response(result, ctx)
158
+
159
+
160
+ @api_platform_instance_group.command(name=cli_util.override('api_platform.delete_api_platform_instance.command_name', 'delete'), help=u"""Deletes an API Platform Instance \n[Command Reference](deleteApiPlatformInstance)""")
161
+ @cli_util.option('--api-platform-instance-id', required=True, help=u"""The [OCID] of the instance""")
162
+ @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.""")
163
+ @cli_util.confirm_delete_option
164
+ @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.""")
165
+ @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.""")
166
+ @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.""")
167
+ @json_skeleton_utils.get_cli_json_input_option({})
168
+ @cli_util.help_option
169
+ @click.pass_context
170
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
171
+ @cli_util.wrap_exceptions
172
+ def delete_api_platform_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, api_platform_instance_id, if_match):
173
+
174
+ if isinstance(api_platform_instance_id, six.string_types) and len(api_platform_instance_id.strip()) == 0:
175
+ raise click.UsageError('Parameter --api-platform-instance-id cannot be whitespace or empty string')
176
+
177
+ kwargs = {}
178
+ if if_match is not None:
179
+ kwargs['if_match'] = if_match
180
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
181
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
182
+ result = client.delete_api_platform_instance(
183
+ api_platform_instance_id=api_platform_instance_id,
184
+ **kwargs
185
+ )
186
+ if wait_for_state:
187
+
188
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
189
+ try:
190
+ wait_period_kwargs = {}
191
+ if max_wait_seconds is not None:
192
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
193
+ if wait_interval_seconds is not None:
194
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
195
+ if 'opc-work-request-id' not in result.headers:
196
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
197
+ cli_util.render_response(result, ctx)
198
+ return
199
+
200
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
201
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
202
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
203
+ # If we fail, we should show an error, but we should still provide the information to the customer
204
+ 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)
205
+ cli_util.render_response(result, ctx)
206
+ sys.exit(2)
207
+ except Exception:
208
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
209
+ cli_util.render_response(result, ctx)
210
+ raise
211
+ else:
212
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
213
+ cli_util.render_response(result, ctx)
214
+
215
+
216
+ @api_platform_instance_group.command(name=cli_util.override('api_platform.get_api_platform_instance.command_name', 'get'), help=u"""Gets information about an API Platform Instance \n[Command Reference](getApiPlatformInstance)""")
217
+ @cli_util.option('--api-platform-instance-id', required=True, help=u"""The [OCID] of the instance""")
218
+ @json_skeleton_utils.get_cli_json_input_option({})
219
+ @cli_util.help_option
220
+ @click.pass_context
221
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'api_platform', 'class': 'ApiPlatformInstance'})
222
+ @cli_util.wrap_exceptions
223
+ def get_api_platform_instance(ctx, from_json, api_platform_instance_id):
224
+
225
+ if isinstance(api_platform_instance_id, six.string_types) and len(api_platform_instance_id.strip()) == 0:
226
+ raise click.UsageError('Parameter --api-platform-instance-id cannot be whitespace or empty string')
227
+
228
+ kwargs = {}
229
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
230
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
231
+ result = client.get_api_platform_instance(
232
+ api_platform_instance_id=api_platform_instance_id,
233
+ **kwargs
234
+ )
235
+ cli_util.render_response(result, ctx)
236
+
237
+
238
+ @work_request_group.command(name=cli_util.override('api_platform.get_work_request.command_name', 'get'), help=u"""Gets the details of a work request. \n[Command Reference](getWorkRequest)""")
239
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
240
+ @json_skeleton_utils.get_cli_json_input_option({})
241
+ @cli_util.help_option
242
+ @click.pass_context
243
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'api_platform', 'class': 'WorkRequest'})
244
+ @cli_util.wrap_exceptions
245
+ def get_work_request(ctx, from_json, work_request_id):
246
+
247
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
248
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
249
+
250
+ kwargs = {}
251
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
252
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
253
+ result = client.get_work_request(
254
+ work_request_id=work_request_id,
255
+ **kwargs
256
+ )
257
+ cli_util.render_response(result, ctx)
258
+
259
+
260
+ @api_platform_instance_collection_group.command(name=cli_util.override('api_platform.list_api_platform_instances.command_name', 'list-api-platform-instances'), help=u"""Gets a list of API Platform Instances \n[Command Reference](listApiPlatformInstances)""")
261
+ @cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""")
262
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.""")
263
+ @cli_util.option('--name', help=u"""A filter to return only resources that match the given name exactly""")
264
+ @cli_util.option('--id', help=u"""The [OCID] of the instance""")
265
+ @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].""")
266
+ @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].""")
267
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
268
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["name", "timeCreated"]), help=u"""The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending. Default order for `name` is ascending.""")
269
+ @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.""")
270
+ @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.""")
271
+ @json_skeleton_utils.get_cli_json_input_option({})
272
+ @cli_util.help_option
273
+ @click.pass_context
274
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'api_platform', 'class': 'ApiPlatformInstanceCollection'})
275
+ @cli_util.wrap_exceptions
276
+ def list_api_platform_instances(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, name, id, limit, page, sort_order, sort_by):
277
+
278
+ if all_pages and limit:
279
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
280
+
281
+ kwargs = {}
282
+ if compartment_id is not None:
283
+ kwargs['compartment_id'] = compartment_id
284
+ if lifecycle_state is not None:
285
+ kwargs['lifecycle_state'] = lifecycle_state
286
+ if name is not None:
287
+ kwargs['name'] = name
288
+ if id is not None:
289
+ kwargs['id'] = id
290
+ if limit is not None:
291
+ kwargs['limit'] = limit
292
+ if page is not None:
293
+ kwargs['page'] = page
294
+ if sort_order is not None:
295
+ kwargs['sort_order'] = sort_order
296
+ if sort_by is not None:
297
+ kwargs['sort_by'] = sort_by
298
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
299
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
300
+ if all_pages:
301
+ if page_size:
302
+ kwargs['limit'] = page_size
303
+
304
+ result = cli_util.list_call_get_all_results(
305
+ client.list_api_platform_instances,
306
+ **kwargs
307
+ )
308
+ elif limit is not None:
309
+ result = cli_util.list_call_get_up_to_limit(
310
+ client.list_api_platform_instances,
311
+ limit,
312
+ page_size,
313
+ **kwargs
314
+ )
315
+ else:
316
+ result = client.list_api_platform_instances(
317
+ **kwargs
318
+ )
319
+ cli_util.render_response(result, ctx)
320
+
321
+
322
+ @work_request_error_group.command(name=cli_util.override('api_platform.list_work_request_errors.command_name', 'list'), help=u"""Lists the errors for a work request. \n[Command Reference](listWorkRequestErrors)""")
323
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
324
+ @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].""")
325
+ @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].""")
326
+ @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.""")
327
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
328
+ @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.""")
329
+ @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.""")
330
+ @json_skeleton_utils.get_cli_json_input_option({})
331
+ @cli_util.help_option
332
+ @click.pass_context
333
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'api_platform', 'class': 'WorkRequestErrorCollection'})
334
+ @cli_util.wrap_exceptions
335
+ def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_by, sort_order):
336
+
337
+ if all_pages and limit:
338
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
339
+
340
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
341
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
342
+
343
+ kwargs = {}
344
+ if page is not None:
345
+ kwargs['page'] = page
346
+ if limit is not None:
347
+ kwargs['limit'] = limit
348
+ if sort_by is not None:
349
+ kwargs['sort_by'] = sort_by
350
+ if sort_order is not None:
351
+ kwargs['sort_order'] = sort_order
352
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
353
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
354
+ if all_pages:
355
+ if page_size:
356
+ kwargs['limit'] = page_size
357
+
358
+ result = cli_util.list_call_get_all_results(
359
+ client.list_work_request_errors,
360
+ work_request_id=work_request_id,
361
+ **kwargs
362
+ )
363
+ elif limit is not None:
364
+ result = cli_util.list_call_get_up_to_limit(
365
+ client.list_work_request_errors,
366
+ limit,
367
+ page_size,
368
+ work_request_id=work_request_id,
369
+ **kwargs
370
+ )
371
+ else:
372
+ result = client.list_work_request_errors(
373
+ work_request_id=work_request_id,
374
+ **kwargs
375
+ )
376
+ cli_util.render_response(result, ctx)
377
+
378
+
379
+ @work_request_log_entry_group.command(name=cli_util.override('api_platform.list_work_request_logs.command_name', 'list-work-request-logs'), help=u"""Lists the logs for a work request. \n[Command Reference](listWorkRequestLogs)""")
380
+ @cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
381
+ @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].""")
382
+ @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].""")
383
+ @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.""")
384
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
385
+ @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.""")
386
+ @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.""")
387
+ @json_skeleton_utils.get_cli_json_input_option({})
388
+ @cli_util.help_option
389
+ @click.pass_context
390
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'api_platform', 'class': 'WorkRequestLogEntryCollection'})
391
+ @cli_util.wrap_exceptions
392
+ def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_by, sort_order):
393
+
394
+ if all_pages and limit:
395
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
396
+
397
+ if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
398
+ raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
399
+
400
+ kwargs = {}
401
+ if page is not None:
402
+ kwargs['page'] = page
403
+ if limit is not None:
404
+ kwargs['limit'] = limit
405
+ if sort_by is not None:
406
+ kwargs['sort_by'] = sort_by
407
+ if sort_order is not None:
408
+ kwargs['sort_order'] = sort_order
409
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
410
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
411
+ if all_pages:
412
+ if page_size:
413
+ kwargs['limit'] = page_size
414
+
415
+ result = cli_util.list_call_get_all_results(
416
+ client.list_work_request_logs,
417
+ work_request_id=work_request_id,
418
+ **kwargs
419
+ )
420
+ elif limit is not None:
421
+ result = cli_util.list_call_get_up_to_limit(
422
+ client.list_work_request_logs,
423
+ limit,
424
+ page_size,
425
+ work_request_id=work_request_id,
426
+ **kwargs
427
+ )
428
+ else:
429
+ result = client.list_work_request_logs(
430
+ work_request_id=work_request_id,
431
+ **kwargs
432
+ )
433
+ cli_util.render_response(result, ctx)
434
+
435
+
436
+ @work_request_group.command(name=cli_util.override('api_platform.list_work_requests.command_name', 'list'), help=u"""Lists the work requests in a compartment. \n[Command Reference](listWorkRequests)""")
437
+ @cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""")
438
+ @cli_util.option('--work-request-id', help=u"""The [OCID] of the asynchronous work request.""")
439
+ @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.""")
440
+ @cli_util.option('--resource-id', help=u"""The [OCID] of the resource affected by the work request.""")
441
+ @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].""")
442
+ @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].""")
443
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
444
+ @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.""")
445
+ @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.""")
446
+ @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.""")
447
+ @json_skeleton_utils.get_cli_json_input_option({})
448
+ @cli_util.help_option
449
+ @click.pass_context
450
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'api_platform', 'class': 'WorkRequestSummaryCollection'})
451
+ @cli_util.wrap_exceptions
452
+ 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):
453
+
454
+ if all_pages and limit:
455
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
456
+
457
+ kwargs = {}
458
+ if compartment_id is not None:
459
+ kwargs['compartment_id'] = compartment_id
460
+ if work_request_id is not None:
461
+ kwargs['work_request_id'] = work_request_id
462
+ if status is not None:
463
+ kwargs['status'] = status
464
+ if resource_id is not None:
465
+ kwargs['resource_id'] = resource_id
466
+ if page is not None:
467
+ kwargs['page'] = page
468
+ if limit is not None:
469
+ kwargs['limit'] = limit
470
+ if sort_order is not None:
471
+ kwargs['sort_order'] = sort_order
472
+ if sort_by is not None:
473
+ kwargs['sort_by'] = sort_by
474
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
475
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
476
+ if all_pages:
477
+ if page_size:
478
+ kwargs['limit'] = page_size
479
+
480
+ result = cli_util.list_call_get_all_results(
481
+ client.list_work_requests,
482
+ **kwargs
483
+ )
484
+ elif limit is not None:
485
+ result = cli_util.list_call_get_up_to_limit(
486
+ client.list_work_requests,
487
+ limit,
488
+ page_size,
489
+ **kwargs
490
+ )
491
+ else:
492
+ result = client.list_work_requests(
493
+ **kwargs
494
+ )
495
+ cli_util.render_response(result, ctx)
496
+
497
+
498
+ @api_platform_instance_group.command(name=cli_util.override('api_platform.update_api_platform_instance.command_name', 'update'), help=u"""Updates an API Platform Instance \n[Command Reference](updateApiPlatformInstance)""")
499
+ @cli_util.option('--api-platform-instance-id', required=True, help=u"""The [OCID] of the instance""")
500
+ @cli_util.option('--description', help=u"""User-provided changeable and non-unique description of the instance""")
501
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
502
+ @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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
503
+ @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.""")
504
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
505
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
506
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
507
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
508
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'api_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'api_platform', 'class': 'dict(str, dict(str, object))'}})
509
+ @cli_util.help_option
510
+ @click.pass_context
511
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'api_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'api_platform', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'api_platform', 'class': 'ApiPlatformInstance'})
512
+ @cli_util.wrap_exceptions
513
+ def update_api_platform_instance(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, api_platform_instance_id, description, freeform_tags, defined_tags, if_match):
514
+
515
+ if isinstance(api_platform_instance_id, six.string_types) and len(api_platform_instance_id.strip()) == 0:
516
+ raise click.UsageError('Parameter --api-platform-instance-id cannot be whitespace or empty string')
517
+ if not force:
518
+ if freeform_tags or defined_tags:
519
+ if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
520
+ ctx.abort()
521
+
522
+ kwargs = {}
523
+ if if_match is not None:
524
+ kwargs['if_match'] = if_match
525
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
526
+
527
+ _details = {}
528
+
529
+ if description is not None:
530
+ _details['description'] = description
531
+
532
+ if freeform_tags is not None:
533
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
534
+
535
+ if defined_tags is not None:
536
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
537
+
538
+ client = cli_util.build_client('api_platform', 'api_platform', ctx)
539
+ result = client.update_api_platform_instance(
540
+ api_platform_instance_id=api_platform_instance_id,
541
+ update_api_platform_instance_details=_details,
542
+ **kwargs
543
+ )
544
+ if wait_for_state:
545
+
546
+ if hasattr(client, 'get_api_platform_instance') and callable(getattr(client, 'get_api_platform_instance')):
547
+ try:
548
+ wait_period_kwargs = {}
549
+ if max_wait_seconds is not None:
550
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
551
+ if wait_interval_seconds is not None:
552
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
553
+
554
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
555
+ result = oci.wait_until(client, client.get_api_platform_instance(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
556
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
557
+ # If we fail, we should show an error, but we should still provide the information to the customer
558
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
559
+ cli_util.render_response(result, ctx)
560
+ sys.exit(2)
561
+ except Exception:
562
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
563
+ cli_util.render_response(result, ctx)
564
+ raise
565
+ else:
566
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
567
+ cli_util.render_response(result, ctx)