oci-cli 3.66.0__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.
- common_util/ignored_commands.py +2 -1
- oci_cli/bin/jms.psm1 +74 -6
- oci_cli/bin/marketplace.psm1 +7 -1
- oci_cli/cli_root.py +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/ai-data-platform/change-compartment.txt +133 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/ai-data-platform/create.txt +185 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/ai-data-platform/delete.txt +135 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/ai-data-platform/get.txt +93 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/ai-data-platform/update.txt +195 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/ai-data-platform-collection/list-ai-data-platforms.txt +155 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/ai-data-platform-collection.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/ai-data-platform.txt +28 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/work-request/cancel.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/work-request/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/work-request/list.txt +140 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/work-request-error/list.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/work-request-error.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/work-request-log-entry/list-work-request-logs.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/work-request-log-entry.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform/work-request.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ai-data-platform.txt +44 -0
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/discovery-job/list-discovery-job-results.txt +13 -1
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-error-summary/list-masking-errors.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-policy/list-masking-reports.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-policy/mask-data.txt +6 -0
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/security-assessment/list-findings.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/sensitive-column/list.txt +22 -1
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/service/get.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-refreshable-clone.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/configure-exascale.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/create.txt +2 -1
- oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra.txt +2 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-vm-cluster/create.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/create.txt +3 -2
- oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/list.txt +23 -1
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/change-cloud-db-system-subscription.txt +134 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-backup.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-database.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-db-system.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/update.txt +6 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system.txt +2 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fs/mount-target/create.txt +6 -12
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-error/{list-errors.txt → list.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-error.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-log-entry/{list-logs.txt → list-work-request-logs.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-log-entry.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/jms/agent-installer-summary/generate-agent-installer-configuration.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/blocklist/create.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms/blocklist/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms/container-summary/list-containers.txt +338 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/container-summary.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/export-setting/update.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/fleet-agent-configuration/update.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/installation-usage/summarize.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms/jms-plugin/create.txt +12 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms/jms-plugin/list.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-application-usage-summary/list-library-application-usage.txt +332 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-application-usage-summary.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-inventory/summarize.txt +284 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-inventory.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-managed-instance-usage-summary/list-library-managed-instance-usage.txt +332 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-managed-instance-usage-summary.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-usage/scan.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-usage/summarize.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms/managed-instance-usage/summarize.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-add-installation-site-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-crypto-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-deployed-application-migration-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-java-migration-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-jfr-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-performance-tuning-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-remove-installation-site-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-scan-java-server-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-scan-library-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create.txt +150 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/delete.txt +146 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/get.txt +108 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/list.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-add-installation-site-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-crypto-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-deployed-application-migration-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-java-migration-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-jfr-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-performance-tuning-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-remove-installation-site-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-scan-java-server-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-scan-library-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update.txt +171 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule.txt +58 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-application-usage-summary/list-uncorrelated-package-application-usage.txt +324 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-application-usage-summary.txt +16 -0
- 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
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-managed-instance-usage-summary.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-usage-summary/list-uncorrelated-package-usage.txt +323 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-usage-summary.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/work-request/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license/get.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license-acceptance-record/create.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license-acceptance-record/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads.txt +1 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration/get.txt +83 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration/update.txt +99 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/delete.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/list.txt +128 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/request.txt +172 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/delete.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/list.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/request.txt +172 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration/get.txt +83 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration/update.txt +95 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-item-summary/list-work-items.txt +110 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-item-summary.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/cancel.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/list.txt +137 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-error/list.txt +128 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-error.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-log-entry/list-work-request-logs.txt +128 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-log-entry.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils.txt +65 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms.txt +76 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace/create-marketplace-external-attested-metadata-details/create-marketplace-external-attested-metadata.txt +96 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace/create-marketplace-external-attested-metadata-details.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace/marketplace-metadata-public-key-summary/list-marketplace-metadata-public-keys.txt +121 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace/marketplace-metadata-public-key-summary.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/create.txt +127 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/delete.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/get.txt +98 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/list.txt +137 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/change-compartment.txt +135 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/create.txt +204 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/delete.txt +133 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/disable-oac.txt +129 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/enable-oac.txt +154 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/get.txt +95 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/list.txt +142 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/update.txt +179 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance.txt +34 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/create.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/delete.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/get.txt +98 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/list.txt +137 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/update.txt +137 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment.txt +29 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/cancel.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/list.txt +140 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-error/list.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-error.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-log-entry/list.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-log-entry.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics.txt +68 -0
- oci_cli/help_text_producer/data_files/text/cmdref/session/authenticate.txt +7 -7
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +6 -6
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
- oci_cli/help_text_producer/data_files/text/index.txt +8 -2
- oci_cli/help_text_producer/data_files/text/oci.txt +1 -1
- oci_cli/service_mapping.py +16 -1
- oci_cli/version.py +1 -1
- {oci_cli-3.66.0.dist-info → oci_cli-3.66.2.dist-info}/METADATA +2 -2
- {oci_cli-3.66.0.dist-info → oci_cli-3.66.2.dist-info}/RECORD +228 -75
- services/ai_data_platform/__init__.py +4 -0
- services/ai_data_platform/src/__init__.py +4 -0
- services/ai_data_platform/src/oci_cli_ai_data_platform/__init__.py +4 -0
- services/ai_data_platform/src/oci_cli_ai_data_platform/generated/__init__.py +4 -0
- services/ai_data_platform/src/oci_cli_ai_data_platform/generated/ai_data_platform_service_cli.py +14 -0
- services/ai_data_platform/src/oci_cli_ai_data_platform/generated/aidataplatform_cli.py +676 -0
- services/ai_data_platform/src/oci_cli_ai_data_platform/generated/client_mappings.py +14 -0
- services/ai_data_platform/tests/__init__.py +4 -0
- services/data_safe/src/oci_cli_data_safe/generated/datasafe_cli.py +28 -9
- services/database/src/oci_cli_database/database_cli_extended.py +46 -3
- services/database/src/oci_cli_database/generated/database_cli.py +217 -11
- services/file_storage/src/oci_cli_file_storage/generated/filestorage_cli.py +1 -5
- services/jms/src/oci_cli_java_management_service/generated/javamanagementservice_cli.py +4359 -2378
- services/jms_java_downloads/src/oci_cli_java_download/generated/javadownload_cli.py +5 -5
- services/jms_utils/__init__.py +4 -0
- services/jms_utils/src/__init__.py +4 -0
- services/jms_utils/src/oci_cli_jms_utils/__init__.py +4 -0
- services/jms_utils/src/oci_cli_jms_utils/generated/__init__.py +4 -0
- services/jms_utils/src/oci_cli_jms_utils/generated/client_mappings.py +14 -0
- services/jms_utils/src/oci_cli_jms_utils/generated/jmsutils_cli.py +812 -0
- services/jms_utils/tests/__init__.py +4 -0
- services/marketplace/src/oci_cli_marketplace/generated/marketplace_cli.py +94 -0
- services/resource_analytics/__init__.py +4 -0
- services/resource_analytics/src/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_monitored_region/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_monitored_region/generated/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_monitored_region/generated/client_mappings.py +14 -0
- services/resource_analytics/src/oci_cli_monitored_region/generated/monitoredregion_cli.py +233 -0
- services/resource_analytics/src/oci_cli_monitored_region/monitored_region_cli_extended.py +39 -0
- services/resource_analytics/src/oci_cli_resource_analytics/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_resource_analytics/generated/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_resource_analytics/generated/resource_analytics_service_cli.py +14 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/client_mappings.py +14 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/resourceanalyticsinstance_cli.py +968 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/resource_analytics_instance_cli_extended.py +40 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/generated/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/generated/client_mappings.py +14 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/generated/tenancyattachment_cli.py +298 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/tenancy_attachment_cli_extended.py +39 -0
- services/resource_analytics/tests/__init__.py +4 -0
- {oci_cli-3.66.0.dist-info → oci_cli-3.66.2.dist-info}/LICENSE.txt +0 -0
- {oci_cli-3.66.0.dist-info → oci_cli-3.66.2.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
- {oci_cli-3.66.0.dist-info → oci_cli-3.66.2.dist-info}/WHEEL +0 -0
- {oci_cli-3.66.0.dist-info → oci_cli-3.66.2.dist-info}/entry_points.txt +0 -0
- {oci_cli-3.66.0.dist-info → oci_cli-3.66.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,676 @@
|
|
|
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: 20240831
|
|
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.ai_data_platform.src.oci_cli_ai_data_platform.generated import ai_data_platform_service_cli
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@click.command(cli_util.override('ai_data_platform.ai_data_platform_root_group.command_name', 'ai-data-platform'), cls=CommandGroupWithAlias, help=cli_util.override('ai_data_platform.ai_data_platform_root_group.help', """Use the AiDataPlatform Control Plane API to manage Data Lakes."""), short_help=cli_util.override('ai_data_platform.ai_data_platform_root_group.short_help', """AiDataPlatform Control Plane API"""))
|
|
20
|
+
@cli_util.help_option_group
|
|
21
|
+
def ai_data_platform_root_group():
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@click.command(cli_util.override('ai_data_platform.ai_data_platform_collection_group.command_name', 'ai-data-platform-collection'), cls=CommandGroupWithAlias, help="""Results of a AiDataPlatform search. Contains both AiDataPlatformSummary items and other information, such as metadata.""")
|
|
26
|
+
@cli_util.help_option_group
|
|
27
|
+
def ai_data_platform_collection_group():
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@click.command(cli_util.override('ai_data_platform.ai_data_platform_group.command_name', 'ai-data-platform'), cls=CommandGroupWithAlias, help="""An AiDataPlatform is a unified platform for lifecycle management and governance of data and AI objects.
|
|
32
|
+
|
|
33
|
+
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].""")
|
|
34
|
+
@cli_util.help_option_group
|
|
35
|
+
def ai_data_platform_group():
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@click.command(cli_util.override('ai_data_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.""")
|
|
40
|
+
@cli_util.help_option_group
|
|
41
|
+
def work_request_error_group():
|
|
42
|
+
pass
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@click.command(cli_util.override('ai_data_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.""")
|
|
46
|
+
@cli_util.help_option_group
|
|
47
|
+
def work_request_log_entry_group():
|
|
48
|
+
pass
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@click.command(cli_util.override('ai_data_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.""")
|
|
52
|
+
@cli_util.help_option_group
|
|
53
|
+
def work_request_group():
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
ai_data_platform_service_cli.ai_data_platform_service_group.add_command(ai_data_platform_root_group)
|
|
58
|
+
ai_data_platform_root_group.add_command(ai_data_platform_collection_group)
|
|
59
|
+
ai_data_platform_root_group.add_command(ai_data_platform_group)
|
|
60
|
+
ai_data_platform_root_group.add_command(work_request_error_group)
|
|
61
|
+
ai_data_platform_root_group.add_command(work_request_log_entry_group)
|
|
62
|
+
ai_data_platform_root_group.add_command(work_request_group)
|
|
63
|
+
# oci ai_data_platform ai_data_platform --> oci ai_data_platform
|
|
64
|
+
ai_data_platform_service_cli.ai_data_platform_service_group.commands.pop(ai_data_platform_root_group.name)
|
|
65
|
+
ai_data_platform_service_cli.ai_data_platform_service_group.add_command(ai_data_platform_collection_group)
|
|
66
|
+
ai_data_platform_service_cli.ai_data_platform_service_group.add_command(ai_data_platform_group)
|
|
67
|
+
ai_data_platform_service_cli.ai_data_platform_service_group.add_command(work_request_error_group)
|
|
68
|
+
ai_data_platform_service_cli.ai_data_platform_service_group.add_command(work_request_log_entry_group)
|
|
69
|
+
ai_data_platform_service_cli.ai_data_platform_service_group.add_command(work_request_group)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@work_request_group.command(name=cli_util.override('ai_data_platform.cancel_work_request.command_name', 'cancel'), help=u"""Cancels a work request. \n[Command Reference](cancelWorkRequest)""")
|
|
73
|
+
@cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
|
|
74
|
+
@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.""")
|
|
75
|
+
@cli_util.confirm_delete_option
|
|
76
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
77
|
+
@cli_util.help_option
|
|
78
|
+
@click.pass_context
|
|
79
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
80
|
+
@cli_util.wrap_exceptions
|
|
81
|
+
def cancel_work_request(ctx, from_json, work_request_id, if_match):
|
|
82
|
+
|
|
83
|
+
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
|
|
84
|
+
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
|
|
85
|
+
|
|
86
|
+
kwargs = {}
|
|
87
|
+
if if_match is not None:
|
|
88
|
+
kwargs['if_match'] = if_match
|
|
89
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
90
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
91
|
+
result = client.cancel_work_request(
|
|
92
|
+
work_request_id=work_request_id,
|
|
93
|
+
**kwargs
|
|
94
|
+
)
|
|
95
|
+
cli_util.render_response(result, ctx)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
@ai_data_platform_group.command(name=cli_util.override('ai_data_platform.change_ai_data_platform_compartment.command_name', 'change-compartment'), help=u"""Moves a AiDataPlatform 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](changeAiDataPlatformCompartment)""")
|
|
99
|
+
@cli_util.option('--ai-data-platform-id', required=True, help=u"""The [OCID] of the AiDataPlatform.""")
|
|
100
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the AiDataPlatform to.""")
|
|
101
|
+
@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.""")
|
|
102
|
+
@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.""")
|
|
103
|
+
@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.""")
|
|
104
|
+
@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.""")
|
|
105
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
106
|
+
@cli_util.help_option
|
|
107
|
+
@click.pass_context
|
|
108
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
109
|
+
@cli_util.wrap_exceptions
|
|
110
|
+
def change_ai_data_platform_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ai_data_platform_id, compartment_id, if_match):
|
|
111
|
+
|
|
112
|
+
if isinstance(ai_data_platform_id, six.string_types) and len(ai_data_platform_id.strip()) == 0:
|
|
113
|
+
raise click.UsageError('Parameter --ai-data-platform-id cannot be whitespace or empty string')
|
|
114
|
+
|
|
115
|
+
kwargs = {}
|
|
116
|
+
if if_match is not None:
|
|
117
|
+
kwargs['if_match'] = if_match
|
|
118
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
119
|
+
|
|
120
|
+
_details = {}
|
|
121
|
+
_details['compartmentId'] = compartment_id
|
|
122
|
+
|
|
123
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
124
|
+
result = client.change_ai_data_platform_compartment(
|
|
125
|
+
ai_data_platform_id=ai_data_platform_id,
|
|
126
|
+
change_ai_data_platform_compartment_details=_details,
|
|
127
|
+
**kwargs
|
|
128
|
+
)
|
|
129
|
+
if wait_for_state:
|
|
130
|
+
|
|
131
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
132
|
+
try:
|
|
133
|
+
wait_period_kwargs = {}
|
|
134
|
+
if max_wait_seconds is not None:
|
|
135
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
136
|
+
if wait_interval_seconds is not None:
|
|
137
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
138
|
+
if 'opc-work-request-id' not in result.headers:
|
|
139
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
140
|
+
cli_util.render_response(result, ctx)
|
|
141
|
+
return
|
|
142
|
+
|
|
143
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
144
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
145
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
146
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
147
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
148
|
+
cli_util.render_response(result, ctx)
|
|
149
|
+
sys.exit(2)
|
|
150
|
+
except Exception:
|
|
151
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
152
|
+
cli_util.render_response(result, ctx)
|
|
153
|
+
raise
|
|
154
|
+
else:
|
|
155
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
156
|
+
cli_util.render_response(result, ctx)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
@ai_data_platform_group.command(name=cli_util.override('ai_data_platform.create_ai_data_platform.command_name', 'create'), help=u"""Creates a AiDataPlatform. \n[Command Reference](createAiDataPlatform)""")
|
|
160
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to create the AiDataPlatform in.""")
|
|
161
|
+
@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.""")
|
|
162
|
+
@cli_util.option('--ai-data-platform-type', help=u"""The AiDataPlatform type.""")
|
|
163
|
+
@cli_util.option('--default-workspace-name', help=u"""The name for the default workspace for the AiDataPlatform""")
|
|
164
|
+
@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].
|
|
165
|
+
|
|
166
|
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
167
|
+
@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].
|
|
168
|
+
|
|
169
|
+
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
170
|
+
@cli_util.option('--system-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""System tags for this resource. Each key is predefined and scoped to a namespace.
|
|
171
|
+
|
|
172
|
+
Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
173
|
+
@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.""")
|
|
174
|
+
@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.""")
|
|
175
|
+
@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.""")
|
|
176
|
+
@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_data_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}})
|
|
177
|
+
@cli_util.help_option
|
|
178
|
+
@click.pass_context
|
|
179
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_data_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'ai_data_platform', 'class': 'AiDataPlatform'})
|
|
180
|
+
@cli_util.wrap_exceptions
|
|
181
|
+
def create_ai_data_platform(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, display_name, ai_data_platform_type, default_workspace_name, freeform_tags, defined_tags, system_tags):
|
|
182
|
+
|
|
183
|
+
kwargs = {}
|
|
184
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
185
|
+
|
|
186
|
+
_details = {}
|
|
187
|
+
_details['compartmentId'] = compartment_id
|
|
188
|
+
|
|
189
|
+
if display_name is not None:
|
|
190
|
+
_details['displayName'] = display_name
|
|
191
|
+
|
|
192
|
+
if ai_data_platform_type is not None:
|
|
193
|
+
_details['aiDataPlatformType'] = ai_data_platform_type
|
|
194
|
+
|
|
195
|
+
if default_workspace_name is not None:
|
|
196
|
+
_details['defaultWorkspaceName'] = default_workspace_name
|
|
197
|
+
|
|
198
|
+
if freeform_tags is not None:
|
|
199
|
+
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
200
|
+
|
|
201
|
+
if defined_tags is not None:
|
|
202
|
+
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
203
|
+
|
|
204
|
+
if system_tags is not None:
|
|
205
|
+
_details['systemTags'] = cli_util.parse_json_parameter("system_tags", system_tags)
|
|
206
|
+
|
|
207
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
208
|
+
result = client.create_ai_data_platform(
|
|
209
|
+
create_ai_data_platform_details=_details,
|
|
210
|
+
**kwargs
|
|
211
|
+
)
|
|
212
|
+
if wait_for_state:
|
|
213
|
+
|
|
214
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
215
|
+
try:
|
|
216
|
+
wait_period_kwargs = {}
|
|
217
|
+
if max_wait_seconds is not None:
|
|
218
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
219
|
+
if wait_interval_seconds is not None:
|
|
220
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
221
|
+
if 'opc-work-request-id' not in result.headers:
|
|
222
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
223
|
+
cli_util.render_response(result, ctx)
|
|
224
|
+
return
|
|
225
|
+
|
|
226
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
227
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
228
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
229
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
230
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
231
|
+
cli_util.render_response(result, ctx)
|
|
232
|
+
sys.exit(2)
|
|
233
|
+
except Exception:
|
|
234
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
235
|
+
cli_util.render_response(result, ctx)
|
|
236
|
+
raise
|
|
237
|
+
else:
|
|
238
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
239
|
+
cli_util.render_response(result, ctx)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
@ai_data_platform_group.command(name=cli_util.override('ai_data_platform.delete_ai_data_platform.command_name', 'delete'), help=u"""Deletes a AiDataPlatform. \n[Command Reference](deleteAiDataPlatform)""")
|
|
243
|
+
@cli_util.option('--ai-data-platform-id', required=True, help=u"""The [OCID] of the AiDataPlatform.""")
|
|
244
|
+
@cli_util.option('--is-force-delete', type=click.BOOL, help=u"""A flag to enable force deletion of the AiDataPlatform.""")
|
|
245
|
+
@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.""")
|
|
246
|
+
@cli_util.confirm_delete_option
|
|
247
|
+
@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.""")
|
|
248
|
+
@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.""")
|
|
249
|
+
@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.""")
|
|
250
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
251
|
+
@cli_util.help_option
|
|
252
|
+
@click.pass_context
|
|
253
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
254
|
+
@cli_util.wrap_exceptions
|
|
255
|
+
def delete_ai_data_platform(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ai_data_platform_id, is_force_delete, if_match):
|
|
256
|
+
|
|
257
|
+
if isinstance(ai_data_platform_id, six.string_types) and len(ai_data_platform_id.strip()) == 0:
|
|
258
|
+
raise click.UsageError('Parameter --ai-data-platform-id cannot be whitespace or empty string')
|
|
259
|
+
|
|
260
|
+
kwargs = {}
|
|
261
|
+
if is_force_delete is not None:
|
|
262
|
+
kwargs['is_force_delete'] = is_force_delete
|
|
263
|
+
if if_match is not None:
|
|
264
|
+
kwargs['if_match'] = if_match
|
|
265
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
266
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
267
|
+
result = client.delete_ai_data_platform(
|
|
268
|
+
ai_data_platform_id=ai_data_platform_id,
|
|
269
|
+
**kwargs
|
|
270
|
+
)
|
|
271
|
+
if wait_for_state:
|
|
272
|
+
|
|
273
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
274
|
+
try:
|
|
275
|
+
wait_period_kwargs = {}
|
|
276
|
+
if max_wait_seconds is not None:
|
|
277
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
278
|
+
if wait_interval_seconds is not None:
|
|
279
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
280
|
+
if 'opc-work-request-id' not in result.headers:
|
|
281
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
282
|
+
cli_util.render_response(result, ctx)
|
|
283
|
+
return
|
|
284
|
+
|
|
285
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
286
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
287
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
288
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
289
|
+
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)
|
|
290
|
+
cli_util.render_response(result, ctx)
|
|
291
|
+
sys.exit(2)
|
|
292
|
+
except Exception:
|
|
293
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
294
|
+
cli_util.render_response(result, ctx)
|
|
295
|
+
raise
|
|
296
|
+
else:
|
|
297
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
298
|
+
cli_util.render_response(result, ctx)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
@ai_data_platform_group.command(name=cli_util.override('ai_data_platform.get_ai_data_platform.command_name', 'get'), help=u"""Gets information about a AiDataPlatform. \n[Command Reference](getAiDataPlatform)""")
|
|
302
|
+
@cli_util.option('--ai-data-platform-id', required=True, help=u"""The [OCID] of the AiDataPlatform.""")
|
|
303
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
304
|
+
@cli_util.help_option
|
|
305
|
+
@click.pass_context
|
|
306
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_data_platform', 'class': 'AiDataPlatform'})
|
|
307
|
+
@cli_util.wrap_exceptions
|
|
308
|
+
def get_ai_data_platform(ctx, from_json, ai_data_platform_id):
|
|
309
|
+
|
|
310
|
+
if isinstance(ai_data_platform_id, six.string_types) and len(ai_data_platform_id.strip()) == 0:
|
|
311
|
+
raise click.UsageError('Parameter --ai-data-platform-id cannot be whitespace or empty string')
|
|
312
|
+
|
|
313
|
+
kwargs = {}
|
|
314
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
315
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
316
|
+
result = client.get_ai_data_platform(
|
|
317
|
+
ai_data_platform_id=ai_data_platform_id,
|
|
318
|
+
**kwargs
|
|
319
|
+
)
|
|
320
|
+
cli_util.render_response(result, ctx)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
@work_request_group.command(name=cli_util.override('ai_data_platform.get_work_request.command_name', 'get'), help=u"""Gets the details of a work request. \n[Command Reference](getWorkRequest)""")
|
|
324
|
+
@cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
|
|
325
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
326
|
+
@cli_util.help_option
|
|
327
|
+
@click.pass_context
|
|
328
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_data_platform', 'class': 'WorkRequest'})
|
|
329
|
+
@cli_util.wrap_exceptions
|
|
330
|
+
def get_work_request(ctx, from_json, work_request_id):
|
|
331
|
+
|
|
332
|
+
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
|
|
333
|
+
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
|
|
334
|
+
|
|
335
|
+
kwargs = {}
|
|
336
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
337
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
338
|
+
result = client.get_work_request(
|
|
339
|
+
work_request_id=work_request_id,
|
|
340
|
+
**kwargs
|
|
341
|
+
)
|
|
342
|
+
cli_util.render_response(result, ctx)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
@ai_data_platform_collection_group.command(name=cli_util.override('ai_data_platform.list_ai_data_platforms.command_name', 'list-ai-data-platforms'), help=u"""Gets a list of AiDataPlatforms. \n[Command Reference](listAiDataPlatforms)""")
|
|
346
|
+
@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
347
|
+
@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.""")
|
|
348
|
+
@cli_util.option('--exclude-lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to exclude resources that match the given lifecycle state. The state value is case-insensitive.""")
|
|
349
|
+
@cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""")
|
|
350
|
+
@cli_util.option('--id', help=u"""The [OCID] of the AiDataPlatform.""")
|
|
351
|
+
@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].""")
|
|
352
|
+
@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].""")
|
|
353
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
|
|
354
|
+
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending. Default order for `displayName` is ascending.""")
|
|
355
|
+
@cli_util.option('--include-legacy', help=u"""This flag will determine if legacy instances will be returned.""")
|
|
356
|
+
@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.""")
|
|
357
|
+
@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.""")
|
|
358
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
359
|
+
@cli_util.help_option
|
|
360
|
+
@click.pass_context
|
|
361
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_data_platform', 'class': 'AiDataPlatformCollection'})
|
|
362
|
+
@cli_util.wrap_exceptions
|
|
363
|
+
def list_ai_data_platforms(ctx, from_json, all_pages, page_size, compartment_id, lifecycle_state, exclude_lifecycle_state, display_name, id, limit, page, sort_order, sort_by, include_legacy):
|
|
364
|
+
|
|
365
|
+
if all_pages and limit:
|
|
366
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
367
|
+
|
|
368
|
+
kwargs = {}
|
|
369
|
+
if compartment_id is not None:
|
|
370
|
+
kwargs['compartment_id'] = compartment_id
|
|
371
|
+
if lifecycle_state is not None:
|
|
372
|
+
kwargs['lifecycle_state'] = lifecycle_state
|
|
373
|
+
if exclude_lifecycle_state is not None:
|
|
374
|
+
kwargs['exclude_lifecycle_state'] = exclude_lifecycle_state
|
|
375
|
+
if display_name is not None:
|
|
376
|
+
kwargs['display_name'] = display_name
|
|
377
|
+
if id is not None:
|
|
378
|
+
kwargs['id'] = id
|
|
379
|
+
if limit is not None:
|
|
380
|
+
kwargs['limit'] = limit
|
|
381
|
+
if page is not None:
|
|
382
|
+
kwargs['page'] = page
|
|
383
|
+
if sort_order is not None:
|
|
384
|
+
kwargs['sort_order'] = sort_order
|
|
385
|
+
if sort_by is not None:
|
|
386
|
+
kwargs['sort_by'] = sort_by
|
|
387
|
+
if include_legacy is not None:
|
|
388
|
+
kwargs['include_legacy'] = include_legacy
|
|
389
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
390
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
391
|
+
if all_pages:
|
|
392
|
+
if page_size:
|
|
393
|
+
kwargs['limit'] = page_size
|
|
394
|
+
|
|
395
|
+
result = cli_util.list_call_get_all_results(
|
|
396
|
+
client.list_ai_data_platforms,
|
|
397
|
+
**kwargs
|
|
398
|
+
)
|
|
399
|
+
elif limit is not None:
|
|
400
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
401
|
+
client.list_ai_data_platforms,
|
|
402
|
+
limit,
|
|
403
|
+
page_size,
|
|
404
|
+
**kwargs
|
|
405
|
+
)
|
|
406
|
+
else:
|
|
407
|
+
result = client.list_ai_data_platforms(
|
|
408
|
+
**kwargs
|
|
409
|
+
)
|
|
410
|
+
cli_util.render_response(result, ctx)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
@work_request_error_group.command(name=cli_util.override('ai_data_platform.list_work_request_errors.command_name', 'list'), help=u"""Lists the errors for a work request. \n[Command Reference](listWorkRequestErrors)""")
|
|
414
|
+
@cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
|
|
415
|
+
@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].""")
|
|
416
|
+
@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].""")
|
|
417
|
+
@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.""")
|
|
418
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
|
|
419
|
+
@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.""")
|
|
420
|
+
@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.""")
|
|
421
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
422
|
+
@cli_util.help_option
|
|
423
|
+
@click.pass_context
|
|
424
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_data_platform', 'class': 'WorkRequestErrorCollection'})
|
|
425
|
+
@cli_util.wrap_exceptions
|
|
426
|
+
def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_by, sort_order):
|
|
427
|
+
|
|
428
|
+
if all_pages and limit:
|
|
429
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
430
|
+
|
|
431
|
+
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
|
|
432
|
+
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
|
|
433
|
+
|
|
434
|
+
kwargs = {}
|
|
435
|
+
if page is not None:
|
|
436
|
+
kwargs['page'] = page
|
|
437
|
+
if limit is not None:
|
|
438
|
+
kwargs['limit'] = limit
|
|
439
|
+
if sort_by is not None:
|
|
440
|
+
kwargs['sort_by'] = sort_by
|
|
441
|
+
if sort_order is not None:
|
|
442
|
+
kwargs['sort_order'] = sort_order
|
|
443
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
444
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
445
|
+
if all_pages:
|
|
446
|
+
if page_size:
|
|
447
|
+
kwargs['limit'] = page_size
|
|
448
|
+
|
|
449
|
+
result = cli_util.list_call_get_all_results(
|
|
450
|
+
client.list_work_request_errors,
|
|
451
|
+
work_request_id=work_request_id,
|
|
452
|
+
**kwargs
|
|
453
|
+
)
|
|
454
|
+
elif limit is not None:
|
|
455
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
456
|
+
client.list_work_request_errors,
|
|
457
|
+
limit,
|
|
458
|
+
page_size,
|
|
459
|
+
work_request_id=work_request_id,
|
|
460
|
+
**kwargs
|
|
461
|
+
)
|
|
462
|
+
else:
|
|
463
|
+
result = client.list_work_request_errors(
|
|
464
|
+
work_request_id=work_request_id,
|
|
465
|
+
**kwargs
|
|
466
|
+
)
|
|
467
|
+
cli_util.render_response(result, ctx)
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
@work_request_log_entry_group.command(name=cli_util.override('ai_data_platform.list_work_request_logs.command_name', 'list-work-request-logs'), help=u"""Lists the logs for a work request. \n[Command Reference](listWorkRequestLogs)""")
|
|
471
|
+
@cli_util.option('--work-request-id', required=True, help=u"""The [OCID] of the asynchronous work request.""")
|
|
472
|
+
@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].""")
|
|
473
|
+
@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].""")
|
|
474
|
+
@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.""")
|
|
475
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
|
|
476
|
+
@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.""")
|
|
477
|
+
@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.""")
|
|
478
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
479
|
+
@cli_util.help_option
|
|
480
|
+
@click.pass_context
|
|
481
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_data_platform', 'class': 'WorkRequestLogEntryCollection'})
|
|
482
|
+
@cli_util.wrap_exceptions
|
|
483
|
+
def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_by, sort_order):
|
|
484
|
+
|
|
485
|
+
if all_pages and limit:
|
|
486
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
487
|
+
|
|
488
|
+
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
|
|
489
|
+
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
|
|
490
|
+
|
|
491
|
+
kwargs = {}
|
|
492
|
+
if page is not None:
|
|
493
|
+
kwargs['page'] = page
|
|
494
|
+
if limit is not None:
|
|
495
|
+
kwargs['limit'] = limit
|
|
496
|
+
if sort_by is not None:
|
|
497
|
+
kwargs['sort_by'] = sort_by
|
|
498
|
+
if sort_order is not None:
|
|
499
|
+
kwargs['sort_order'] = sort_order
|
|
500
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
501
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
502
|
+
if all_pages:
|
|
503
|
+
if page_size:
|
|
504
|
+
kwargs['limit'] = page_size
|
|
505
|
+
|
|
506
|
+
result = cli_util.list_call_get_all_results(
|
|
507
|
+
client.list_work_request_logs,
|
|
508
|
+
work_request_id=work_request_id,
|
|
509
|
+
**kwargs
|
|
510
|
+
)
|
|
511
|
+
elif limit is not None:
|
|
512
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
513
|
+
client.list_work_request_logs,
|
|
514
|
+
limit,
|
|
515
|
+
page_size,
|
|
516
|
+
work_request_id=work_request_id,
|
|
517
|
+
**kwargs
|
|
518
|
+
)
|
|
519
|
+
else:
|
|
520
|
+
result = client.list_work_request_logs(
|
|
521
|
+
work_request_id=work_request_id,
|
|
522
|
+
**kwargs
|
|
523
|
+
)
|
|
524
|
+
cli_util.render_response(result, ctx)
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
@work_request_group.command(name=cli_util.override('ai_data_platform.list_work_requests.command_name', 'list'), help=u"""Lists the work requests in a compartment. \n[Command Reference](listWorkRequests)""")
|
|
528
|
+
@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
529
|
+
@cli_util.option('--work-request-id', help=u"""The [OCID] of the asynchronous work request.""")
|
|
530
|
+
@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.""")
|
|
531
|
+
@cli_util.option('--resource-id', help=u"""The [OCID] of the resource affected by the work request.""")
|
|
532
|
+
@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].""")
|
|
533
|
+
@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].""")
|
|
534
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
|
|
535
|
+
@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.""")
|
|
536
|
+
@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.""")
|
|
537
|
+
@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.""")
|
|
538
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
539
|
+
@cli_util.help_option
|
|
540
|
+
@click.pass_context
|
|
541
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_data_platform', 'class': 'WorkRequestSummaryCollection'})
|
|
542
|
+
@cli_util.wrap_exceptions
|
|
543
|
+
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):
|
|
544
|
+
|
|
545
|
+
if all_pages and limit:
|
|
546
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
547
|
+
|
|
548
|
+
kwargs = {}
|
|
549
|
+
if compartment_id is not None:
|
|
550
|
+
kwargs['compartment_id'] = compartment_id
|
|
551
|
+
if work_request_id is not None:
|
|
552
|
+
kwargs['work_request_id'] = work_request_id
|
|
553
|
+
if status is not None:
|
|
554
|
+
kwargs['status'] = status
|
|
555
|
+
if resource_id is not None:
|
|
556
|
+
kwargs['resource_id'] = resource_id
|
|
557
|
+
if page is not None:
|
|
558
|
+
kwargs['page'] = page
|
|
559
|
+
if limit is not None:
|
|
560
|
+
kwargs['limit'] = limit
|
|
561
|
+
if sort_order is not None:
|
|
562
|
+
kwargs['sort_order'] = sort_order
|
|
563
|
+
if sort_by is not None:
|
|
564
|
+
kwargs['sort_by'] = sort_by
|
|
565
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
566
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
567
|
+
if all_pages:
|
|
568
|
+
if page_size:
|
|
569
|
+
kwargs['limit'] = page_size
|
|
570
|
+
|
|
571
|
+
result = cli_util.list_call_get_all_results(
|
|
572
|
+
client.list_work_requests,
|
|
573
|
+
**kwargs
|
|
574
|
+
)
|
|
575
|
+
elif limit is not None:
|
|
576
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
577
|
+
client.list_work_requests,
|
|
578
|
+
limit,
|
|
579
|
+
page_size,
|
|
580
|
+
**kwargs
|
|
581
|
+
)
|
|
582
|
+
else:
|
|
583
|
+
result = client.list_work_requests(
|
|
584
|
+
**kwargs
|
|
585
|
+
)
|
|
586
|
+
cli_util.render_response(result, ctx)
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
@ai_data_platform_group.command(name=cli_util.override('ai_data_platform.update_ai_data_platform.command_name', 'update'), help=u"""Updates a AiDataPlatform. \n[Command Reference](updateAiDataPlatform)""")
|
|
590
|
+
@cli_util.option('--ai-data-platform-id', required=True, help=u"""The [OCID] of the AiDataPlatform.""")
|
|
591
|
+
@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.""")
|
|
592
|
+
@cli_util.option('--ai-data-platform-type', help=u"""The AiDataPlatform type.""")
|
|
593
|
+
@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].
|
|
594
|
+
|
|
595
|
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
596
|
+
@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].
|
|
597
|
+
|
|
598
|
+
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
599
|
+
@cli_util.option('--system-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""System tags for this resource. Each key is predefined and scoped to a namespace.
|
|
600
|
+
|
|
601
|
+
Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
602
|
+
@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.""")
|
|
603
|
+
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
604
|
+
@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.""")
|
|
605
|
+
@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.""")
|
|
606
|
+
@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.""")
|
|
607
|
+
@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ai_data_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}})
|
|
608
|
+
@cli_util.help_option
|
|
609
|
+
@click.pass_context
|
|
610
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ai_data_platform', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}, 'system-tags': {'module': 'ai_data_platform', 'class': 'dict(str, dict(str, object))'}})
|
|
611
|
+
@cli_util.wrap_exceptions
|
|
612
|
+
def update_ai_data_platform(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, ai_data_platform_id, display_name, ai_data_platform_type, freeform_tags, defined_tags, system_tags, if_match):
|
|
613
|
+
|
|
614
|
+
if isinstance(ai_data_platform_id, six.string_types) and len(ai_data_platform_id.strip()) == 0:
|
|
615
|
+
raise click.UsageError('Parameter --ai-data-platform-id cannot be whitespace or empty string')
|
|
616
|
+
if not force:
|
|
617
|
+
if freeform_tags or defined_tags or system_tags:
|
|
618
|
+
if not click.confirm("WARNING: Updates to freeform-tags and defined-tags and system-tags will replace any existing values. Are you sure you want to continue?"):
|
|
619
|
+
ctx.abort()
|
|
620
|
+
|
|
621
|
+
kwargs = {}
|
|
622
|
+
if if_match is not None:
|
|
623
|
+
kwargs['if_match'] = if_match
|
|
624
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
625
|
+
|
|
626
|
+
_details = {}
|
|
627
|
+
|
|
628
|
+
if display_name is not None:
|
|
629
|
+
_details['displayName'] = display_name
|
|
630
|
+
|
|
631
|
+
if ai_data_platform_type is not None:
|
|
632
|
+
_details['aiDataPlatformType'] = ai_data_platform_type
|
|
633
|
+
|
|
634
|
+
if freeform_tags is not None:
|
|
635
|
+
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
636
|
+
|
|
637
|
+
if defined_tags is not None:
|
|
638
|
+
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
639
|
+
|
|
640
|
+
if system_tags is not None:
|
|
641
|
+
_details['systemTags'] = cli_util.parse_json_parameter("system_tags", system_tags)
|
|
642
|
+
|
|
643
|
+
client = cli_util.build_client('ai_data_platform', 'ai_data_platform', ctx)
|
|
644
|
+
result = client.update_ai_data_platform(
|
|
645
|
+
ai_data_platform_id=ai_data_platform_id,
|
|
646
|
+
update_ai_data_platform_details=_details,
|
|
647
|
+
**kwargs
|
|
648
|
+
)
|
|
649
|
+
if wait_for_state:
|
|
650
|
+
|
|
651
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
652
|
+
try:
|
|
653
|
+
wait_period_kwargs = {}
|
|
654
|
+
if max_wait_seconds is not None:
|
|
655
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
656
|
+
if wait_interval_seconds is not None:
|
|
657
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
658
|
+
if 'opc-work-request-id' not in result.headers:
|
|
659
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
660
|
+
cli_util.render_response(result, ctx)
|
|
661
|
+
return
|
|
662
|
+
|
|
663
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
664
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
665
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
666
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
667
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
668
|
+
cli_util.render_response(result, ctx)
|
|
669
|
+
sys.exit(2)
|
|
670
|
+
except Exception:
|
|
671
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
672
|
+
cli_util.render_response(result, ctx)
|
|
673
|
+
raise
|
|
674
|
+
else:
|
|
675
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
676
|
+
cli_util.render_response(result, ctx)
|