oci-cli 3.65.0__py3-none-any.whl → 3.66.0__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 (161) hide show
  1. oci_cli/bin/dbmulticloud.psm1 +39 -4
  2. oci_cli/bin/email.psm1 +23 -11
  3. oci_cli/bin/mysql.psm1 +4 -2
  4. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/condition-metadata-type/get.txt +1 -1
  5. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/detector-recipe/create.txt +1 -1
  6. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/managed-list/create.txt +5 -1
  7. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/managed-list/list.txt +1 -1
  8. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/managed-list/update.txt +4 -0
  9. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/problem/list.txt +1 -1
  10. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/problem-aggregation/request-summarized-problems.txt +1 -1
  11. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/resource/list.txt +1 -1
  12. oci_cli/help_text_producer/data_files/text/cmdref/cloud-guard/resource-type-summary/list-resource-types.txt +1 -1
  13. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/delete.txt +5 -0
  14. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-backup/list.txt +18 -0
  15. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-vm-cluster/register-cloud-vm-cluster-pkcs.txt +1 -1
  16. oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-vm-cluster/unregister-cloud-vm-cluster-pkcs.txt +1 -1
  17. oci_cli/help_text_producer/data_files/text/cmdref/db/data-guard-association/create-data-guard-association-google-cloud-provider-encryption-key-details.txt +206 -0
  18. oci_cli/help_text_producer/data_files/text/cmdref/db/data-guard-association.txt +3 -0
  19. oci_cli/help_text_producer/data_files/text/cmdref/db/database/change-encryption-key-location-google-cloud-provider-encryption-key-details.txt +136 -0
  20. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-database-create-stand-by-database-details.txt +6 -0
  21. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-database-from-backup.txt +6 -0
  22. oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-standby-database.txt +6 -0
  23. oci_cli/help_text_producer/data_files/text/cmdref/db/database.txt +3 -0
  24. oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/create.txt +10 -0
  25. oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/update.txt +10 -0
  26. oci_cli/help_text_producer/data_files/text/cmdref/db/system/list-db-system-storage-performances.txt +3 -3
  27. oci_cli/help_text_producer/data_files/text/cmdref/db.txt +6 -0
  28. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/multi-cloud-resource-discovery/change-compartment.txt +6 -6
  29. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/multi-cloud-resource-discovery/create.txt +24 -4
  30. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/multi-cloud-resource-discovery/delete.txt +3 -2
  31. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/multi-cloud-resource-discovery/get.txt +3 -3
  32. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/multi-cloud-resource-discovery/list.txt +14 -7
  33. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/multi-cloud-resource-discovery/update.txt +7 -6
  34. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/multi-cloud-resource-discovery.txt +57 -12
  35. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-container/change-compartment.txt +3 -3
  36. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-container/create.txt +6 -8
  37. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-container/delete.txt +2 -2
  38. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-container/get.txt +3 -3
  39. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-container/list.txt +9 -5
  40. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-container/update.txt +8 -8
  41. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-container.txt +57 -12
  42. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-mount/change-compartment.txt +2 -2
  43. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-mount/create.txt +8 -8
  44. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-mount/delete.txt +4 -3
  45. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-mount/get.txt +3 -3
  46. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-mount/list.txt +7 -5
  47. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-mount/update.txt +8 -6
  48. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-blob-mount.txt +57 -12
  49. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-connector/change-compartment.txt +4 -4
  50. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-connector/create.txt +11 -12
  51. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-connector/delete.txt +2 -3
  52. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-connector/get.txt +3 -2
  53. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-connector/list.txt +6 -5
  54. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-connector/patch.txt +2 -2
  55. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-connector/update.txt +12 -13
  56. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-connector.txt +61 -16
  57. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-key/get.txt +3 -3
  58. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-key/list.txt +7 -4
  59. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-key.txt +57 -12
  60. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault/change-compartment.txt +3 -3
  61. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault/create.txt +10 -10
  62. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault/delete.txt +2 -2
  63. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault/get.txt +5 -3
  64. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault/list.txt +8 -5
  65. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault/refresh.txt +6 -2
  66. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault/update.txt +17 -12
  67. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault-association/cascading-delete.txt +2 -2
  68. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault-association/change-compartment.txt +2 -2
  69. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault-association/create.txt +7 -6
  70. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault-association/delete.txt +2 -2
  71. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault-association/get.txt +3 -3
  72. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault-association/list.txt +9 -5
  73. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault-association/update.txt +9 -7
  74. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault-association.txt +61 -16
  75. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-azure-vault.txt +61 -16
  76. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-identity-connector/change-compartment.txt +132 -0
  77. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-identity-connector/create.txt +195 -0
  78. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-identity-connector/delete.txt +130 -0
  79. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-identity-connector/get.txt +92 -0
  80. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-identity-connector/list.txt +148 -0
  81. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-identity-connector/refresh.txt +125 -0
  82. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-identity-connector/update.txt +199 -0
  83. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-identity-connector.txt +29 -0
  84. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key/get.txt +92 -0
  85. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key/list.txt +150 -0
  86. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key-ring/change-compartment.txt +135 -0
  87. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key-ring/create.txt +199 -0
  88. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key-ring/delete.txt +133 -0
  89. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key-ring/get.txt +113 -0
  90. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key-ring/list.txt +151 -0
  91. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key-ring/refresh.txt +133 -0
  92. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key-ring/update.txt +174 -0
  93. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key-ring.txt +26 -0
  94. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/oracle-db-gcp-key.txt +16 -0
  95. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud/work-request.txt +61 -16
  96. oci_cli/help_text_producer/data_files/text/cmdref/dbmulticloud.txt +95 -12
  97. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/{work-request-log-entry/list-logs.txt → work-request-log/list.txt} +5 -5
  98. oci_cli/help_text_producer/data_files/text/cmdref/{organizations/work-request-log-entry.txt → delegate-access-control/work-request/work-request-log.txt} +2 -2
  99. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +2 -2
  100. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +2 -2
  101. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/add.txt +148 -0
  102. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/change-compartment.txt +4 -0
  103. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/delete.txt +4 -0
  104. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/remove.txt +138 -0
  105. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/update.txt +4 -0
  106. oci_cli/help_text_producer/data_files/text/cmdref/email/domain.txt +4 -0
  107. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path/add.txt +150 -0
  108. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path/delete.txt +4 -0
  109. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path/remove.txt +140 -0
  110. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path/update.txt +4 -0
  111. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path.txt +4 -0
  112. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/add.txt +151 -0
  113. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/change-compartment.txt +4 -0
  114. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/delete.txt +4 -0
  115. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/remove.txt +141 -0
  116. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/update.txt +4 -0
  117. oci_cli/help_text_producer/data_files/text/cmdref/email/sender.txt +4 -0
  118. oci_cli/help_text_producer/data_files/text/cmdref/email.txt +12 -0
  119. oci_cli/help_text_producer/data_files/text/cmdref/fs/mount-target/create.txt +12 -5
  120. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/dedicated-ai-cluster/create.txt +2 -1
  121. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/endpoint-collection/list-endpoints.txt +4 -0
  122. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-inference/chat-result/chat-generic-chat-request.txt +11 -0
  123. oci_cli/help_text_producer/data_files/text/cmdref/mysql/backup/list.txt +16 -0
  124. oci_cli/help_text_producer/data_files/text/cmdref/mysql/backup/validate.txt +141 -0
  125. oci_cli/help_text_producer/data_files/text/cmdref/mysql/backup.txt +2 -0
  126. oci_cli/help_text_producer/data_files/text/cmdref/mysql.txt +2 -0
  127. oci_cli/help_text_producer/data_files/text/cmdref/organizations/{work-request-log-entry → work-request-log}/list.txt +19 -1
  128. oci_cli/help_text_producer/data_files/text/cmdref/{delegate-access-control/work-request/work-request-log-entry.txt → organizations/work-request-log.txt} +3 -3
  129. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +1 -1
  130. oci_cli/help_text_producer/data_files/text/index.txt +1 -1
  131. oci_cli/service_mapping.py +1 -1
  132. oci_cli/version.py +1 -1
  133. {oci_cli-3.65.0.dist-info → oci_cli-3.66.0.dist-info}/METADATA +2 -2
  134. {oci_cli-3.65.0.dist-info → oci_cli-3.66.0.dist-info}/RECORD +161 -128
  135. services/cloud_guard/src/oci_cli_cloud_guard/generated/cloudguard_cli.py +18 -10
  136. services/database/src/oci_cli_database/database_cli_extended.py +11 -2
  137. services/database/src/oci_cli_database/generated/database_cli.py +223 -12
  138. services/dbmulticloud/src/oci_cli_db_multicloud_gcp_provider/__init__.py +4 -0
  139. services/dbmulticloud/src/oci_cli_db_multicloud_gcp_provider/dbmulticloudgcpprovider_cli_extended.py +18 -0
  140. services/dbmulticloud/src/oci_cli_db_multicloud_gcp_provider/generated/__init__.py +4 -0
  141. services/dbmulticloud/src/oci_cli_db_multicloud_gcp_provider/generated/client_mappings.py +14 -0
  142. services/dbmulticloud/src/oci_cli_db_multicloud_gcp_provider/generated/dbmulticloudgcpprovider_cli.py +1057 -0
  143. services/dbmulticloud/src/oci_cli_dbmulticloud/generated/dbmulticloud_service_cli.py +27 -8
  144. services/dbmulticloud/src/oci_cli_multi_cloud_resource_discovery/generated/multicloudresourcediscovery_cli.py +63 -37
  145. services/dbmulticloud/src/oci_cli_oracle_db_azure_blob_container/generated/oracledbazureblobcontainer_cli.py +52 -33
  146. services/dbmulticloud/src/oci_cli_oracle_db_azure_blob_mount/generated/oracledbazureblobmount_cli.py +49 -30
  147. services/dbmulticloud/src/oci_cli_oracle_db_azure_connector/generated/oracledbazureconnector_cli.py +113 -39
  148. services/dbmulticloud/src/oci_cli_oracle_db_azure_key/generated/oracledbazurekey_cli.py +34 -15
  149. services/dbmulticloud/src/oci_cli_oracle_db_azure_vault/generated/oracledbazurevault_cli.py +69 -42
  150. services/dbmulticloud/src/oci_cli_oracle_db_azure_vault_association/generated/oracledbazurevaultassociation_cli.py +52 -33
  151. services/dbmulticloud/src/oci_cli_work_request/generated/workrequest_cli.py +27 -8
  152. services/email/src/oci_cli_email/generated/email_cli.py +422 -8
  153. services/file_storage/src/oci_cli_file_storage/generated/filestorage_cli.py +5 -1
  154. services/generative_ai/src/oci_cli_generative_ai/generated/generativeai_cli.py +5 -2
  155. services/generative_ai_inference/src/oci_cli_generative_ai_inference/generated/generativeaiinference_cli.py +7 -3
  156. services/mysql/src/oci_cli_db_backups/generated/dbbackups_cli.py +70 -1
  157. {oci_cli-3.65.0.dist-info → oci_cli-3.66.0.dist-info}/LICENSE.txt +0 -0
  158. {oci_cli-3.65.0.dist-info → oci_cli-3.66.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  159. {oci_cli-3.65.0.dist-info → oci_cli-3.66.0.dist-info}/WHEEL +0 -0
  160. {oci_cli-3.65.0.dist-info → oci_cli-3.66.0.dist-info}/entry_points.txt +0 -0
  161. {oci_cli-3.65.0.dist-info → oci_cli-3.66.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1057 @@
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: 20240501
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.dbmulticloud.src.oci_cli_dbmulticloud.generated import dbmulticloud_service_cli
17
+
18
+
19
+ @click.command(cli_util.override('db_multicloud_gcp_provider.db_multicloud_gcp_provider_root_group.command_name', 'db-multicloud-gcp-provider'), cls=CommandGroupWithAlias, help=cli_util.override('db_multicloud_gcp_provider.db_multicloud_gcp_provider_root_group.help', """<b>Microsoft Azure:</b> <br>
20
+ <b>Oracle Azure Connector Resource:</b>:&nbsp;&nbsp;The Oracle Azure Connector Resource is used to install the Azure Arc Server on an Exadata VM cluster in Oracle Exadata Database Service on Dedicated Infrastructure (ExaDB-D).
21
+ The supported method to install the Azure Arc Server (Azure Identity) on the Exadata VM cluster:
22
+ <ul>
23
+ <li>Using a Bearer Access Token</li>
24
+ </ul>
25
+
26
+ <b>Oracle Azure Blob Container Resource:</b>&nbsp;&nbsp;The Oracle Azure Blob Container Resource is used to capture the details of an Azure Blob Container.
27
+ This resource can then be reused across multiple Exadata VM clusters in Oracle Exadata Database Service on Dedicated Infrastructure (ExaDB-D) to mount the Azure container.
28
+
29
+ <b>Oracle Azure Blob Mount Resource:</b>&nbsp;&nbsp;The Oracle Azure Blob Mount Resource is used to mount an Azure Blob Container on an Exadata VM cluster in Oracle Exadata Database Service on Dedicated Infrastructure (ExaDB-D).
30
+ It relies on both the Oracle Azure Connector and the Oracle Azure Blob Container Resource to perform the mount operation.
31
+
32
+ <b>Discover Azure Vaults and Keys Resource:</b>&nbsp;&nbsp;The Discover Oracle Azure Vaults and Azure Keys Resource is used to discover Azure Vaults and the associated encryption keys available in your Azure project.
33
+
34
+ <b>Oracle Azure Vault:</b>&nbsp;&nbsp;The Oracle Azure Vault Resource is used to manage Azure Vaults within Oracle Cloud Infrastructure (OCI) for use with services such as Oracle Exadata Database Service on Dedicated Infrastructure.
35
+
36
+ <b>Oracle Azure Key:</b>&nbsp;&nbsp;Oracle Azure Key Resource is used to register and manage a Oracle Azure Key Key within Oracle Cloud Infrastructure (OCI) under an associated Azure Vault.
37
+
38
+ <br>
39
+
40
+ <b>Google Cloud:</b><br>
41
+ <b>Oracle Google Cloud Connector Resource:</b>&nbsp;&nbsp;The Oracle Google Cloud Connector Resource is used to install the Google Cloud Identity Connector on an Exadata VM cluster in Oracle Exadata Database Service on Dedicated Infrastructure (ExaDB-D).
42
+
43
+ <b>Discover Google Key Rings and Keys Resource:</b>&nbsp;&nbsp;The Discover Google Key Rings and Keys Resource is used to discover Google Cloud Key Rings and the associated encryption keys available in your Google Cloud project.
44
+
45
+ <b>Google Key Rings Resource:</b>&nbsp;&nbsp;The Google Key Rings Resource is used to register and manage Google Cloud Key Rings within Oracle Cloud Infrastructure (OCI) for use with services such as Oracle Exadata Database Service on Dedicated Infrastructure.
46
+
47
+ <b>Google Key Resource:</b>&nbsp;&nbsp;The Google Key Resource is used to register and manage a Google Cloud Key within Oracle Cloud Infrastructure (OCI) under an associated Google Key Ring."""), short_help=cli_util.override('db_multicloud_gcp_provider.db_multicloud_gcp_provider_root_group.short_help', """Oracle Database MultiCloud Data Plane Integration"""))
48
+ @cli_util.help_option_group
49
+ def db_multicloud_gcp_provider_root_group():
50
+ pass
51
+
52
+
53
+ @click.command(cli_util.override('db_multicloud_gcp_provider.oracle_db_gcp_identity_connector_group.command_name', 'oracle-db-gcp-identity-connector'), cls=CommandGroupWithAlias, help="""This resource is used to create and manage a GCP Identity Connector for Oracle Database running on Oracle Exadata Database Service on Dedicated Infrastructure (ExaDB-D). The Identity Connector enables secure communication between Oracle Cloud and Google Cloud services.""")
54
+ @cli_util.help_option_group
55
+ def oracle_db_gcp_identity_connector_group():
56
+ pass
57
+
58
+
59
+ @click.command(cli_util.override('db_multicloud_gcp_provider.oracle_db_gcp_key_ring_group.command_name', 'oracle-db-gcp-key-ring'), cls=CommandGroupWithAlias, help="""Oracle DB GCP Key Ring resource object.""")
60
+ @cli_util.help_option_group
61
+ def oracle_db_gcp_key_ring_group():
62
+ pass
63
+
64
+
65
+ @click.command(cli_util.override('db_multicloud_gcp_provider.oracle_db_gcp_key_group.command_name', 'oracle-db-gcp-key'), cls=CommandGroupWithAlias, help="""Oracle DB Google Cloud Key resource.""")
66
+ @cli_util.help_option_group
67
+ def oracle_db_gcp_key_group():
68
+ pass
69
+
70
+
71
+ dbmulticloud_service_cli.dbmulticloud_service_group.add_command(db_multicloud_gcp_provider_root_group)
72
+ db_multicloud_gcp_provider_root_group.add_command(oracle_db_gcp_identity_connector_group)
73
+ db_multicloud_gcp_provider_root_group.add_command(oracle_db_gcp_key_ring_group)
74
+ db_multicloud_gcp_provider_root_group.add_command(oracle_db_gcp_key_group)
75
+
76
+
77
+ @oracle_db_gcp_identity_connector_group.command(name=cli_util.override('db_multicloud_gcp_provider.change_oracle_db_gcp_identity_connector_compartment.command_name', 'change-compartment'), help=u"""Moves the Oracle DB GCP Identity Connector resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. \n[Command Reference](changeOracleDbGcpIdentityConnectorCompartment)""")
78
+ @cli_util.option('--oracle-db-gcp-identity-connector-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Identity Configuration Resource.""")
79
+ @cli_util.option('--compartment-id', help=u"""The OCID of the compartment that contains the Oracle DB GCP Identity Connector resource.""")
80
+ @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.""")
81
+ @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.""")
82
+ @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.""")
83
+ @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.""")
84
+ @json_skeleton_utils.get_cli_json_input_option({})
85
+ @cli_util.help_option
86
+ @click.pass_context
87
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
88
+ @cli_util.wrap_exceptions
89
+ def change_oracle_db_gcp_identity_connector_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, oracle_db_gcp_identity_connector_id, compartment_id, if_match):
90
+
91
+ if isinstance(oracle_db_gcp_identity_connector_id, six.string_types) and len(oracle_db_gcp_identity_connector_id.strip()) == 0:
92
+ raise click.UsageError('Parameter --oracle-db-gcp-identity-connector-id cannot be whitespace or empty string')
93
+
94
+ kwargs = {}
95
+ if if_match is not None:
96
+ kwargs['if_match'] = if_match
97
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
98
+
99
+ _details = {}
100
+
101
+ if compartment_id is not None:
102
+ _details['compartmentId'] = compartment_id
103
+
104
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
105
+ result = client.change_oracle_db_gcp_identity_connector_compartment(
106
+ oracle_db_gcp_identity_connector_id=oracle_db_gcp_identity_connector_id,
107
+ change_oracle_db_gcp_identity_connector_compartment_details=_details,
108
+ **kwargs
109
+ )
110
+ if wait_for_state:
111
+
112
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
113
+ try:
114
+ wait_period_kwargs = {}
115
+ if max_wait_seconds is not None:
116
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
117
+ if wait_interval_seconds is not None:
118
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
119
+ if 'opc-work-request-id' not in result.headers:
120
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
121
+ cli_util.render_response(result, ctx)
122
+ return
123
+
124
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
125
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
126
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
127
+ # If we fail, we should show an error, but we should still provide the information to the customer
128
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
129
+ cli_util.render_response(result, ctx)
130
+ sys.exit(2)
131
+ except Exception:
132
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
133
+ cli_util.render_response(result, ctx)
134
+ raise
135
+ else:
136
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
137
+ cli_util.render_response(result, ctx)
138
+
139
+
140
+ @oracle_db_gcp_key_ring_group.command(name=cli_util.override('db_multicloud_gcp_provider.change_oracle_db_gcp_key_ring_compartment.command_name', 'change-compartment'), help=u"""Moves the GCP Key Ring resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. \n[Command Reference](changeOracleDbGcpKeyRingCompartment)""")
141
+ @cli_util.option('--oracle-db-gcp-key-ring-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Key-Ring resource.""")
142
+ @cli_util.option('--compartment-id', help=u"""The compartment [OCID] where the Oracle DB GCP Key Ring resource resides.""")
143
+ @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.""")
144
+ @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.""")
145
+ @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.""")
146
+ @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.""")
147
+ @json_skeleton_utils.get_cli_json_input_option({})
148
+ @cli_util.help_option
149
+ @click.pass_context
150
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
151
+ @cli_util.wrap_exceptions
152
+ def change_oracle_db_gcp_key_ring_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, oracle_db_gcp_key_ring_id, compartment_id, if_match):
153
+
154
+ if isinstance(oracle_db_gcp_key_ring_id, six.string_types) and len(oracle_db_gcp_key_ring_id.strip()) == 0:
155
+ raise click.UsageError('Parameter --oracle-db-gcp-key-ring-id cannot be whitespace or empty string')
156
+
157
+ kwargs = {}
158
+ if if_match is not None:
159
+ kwargs['if_match'] = if_match
160
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
161
+
162
+ _details = {}
163
+
164
+ if compartment_id is not None:
165
+ _details['compartmentId'] = compartment_id
166
+
167
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
168
+ result = client.change_oracle_db_gcp_key_ring_compartment(
169
+ oracle_db_gcp_key_ring_id=oracle_db_gcp_key_ring_id,
170
+ change_oracle_db_gcp_key_ring_compartment_details=_details,
171
+ **kwargs
172
+ )
173
+ if wait_for_state:
174
+
175
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
176
+ try:
177
+ wait_period_kwargs = {}
178
+ if max_wait_seconds is not None:
179
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
180
+ if wait_interval_seconds is not None:
181
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
182
+ if 'opc-work-request-id' not in result.headers:
183
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
184
+ cli_util.render_response(result, ctx)
185
+ return
186
+
187
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
188
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
189
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
190
+ # If we fail, we should show an error, but we should still provide the information to the customer
191
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
192
+ cli_util.render_response(result, ctx)
193
+ sys.exit(2)
194
+ except Exception:
195
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
196
+ cli_util.render_response(result, ctx)
197
+ raise
198
+ else:
199
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
200
+ cli_util.render_response(result, ctx)
201
+
202
+
203
+ @oracle_db_gcp_identity_connector_group.command(name=cli_util.override('db_multicloud_gcp_provider.create_oracle_db_gcp_identity_connector.command_name', 'create'), help=u"""Creates Oracle DB GCP Identity Connector resource. \n[Command Reference](createOracleDbGcpIdentityConnector)""")
204
+ @cli_util.option('--display-name', required=True, help=u"""Oracle DB Google GCP Identity Connector resource name.""")
205
+ @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment that contains the Oracle DB GCP Identity Connector resource.""")
206
+ @cli_util.option('--issuer-url', required=True, help=u"""OIDC token issuer Url""")
207
+ @cli_util.option('--project-id', required=True, help=u"""Project id of the customer project.""")
208
+ @cli_util.option('--resource-id', required=True, help=u"""The [OCID] of the GCP VM Cluster resource.""")
209
+ @cli_util.option('--gcp-location', required=True, help=u"""GCP Location.""")
210
+ @cli_util.option('--gcp-workload-identity-pool-id', required=True, help=u"""The ID of the cloud GCP Workload Identity Pool.""")
211
+ @cli_util.option('--gcp-workload-identity-provider-id', required=True, help=u"""The ID of the GCP Workload Identity Provider.""")
212
+ @cli_util.option('--gcp-resource-service-agent-id', required=True, help=u"""The ID of the GCP resource service agent.""")
213
+ @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].
214
+
215
+ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
216
+ @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].
217
+
218
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
219
+ @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.""")
220
+ @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.""")
221
+ @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.""")
222
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'dbmulticloud', 'class': 'dict(str, dict(str, object))'}})
223
+ @cli_util.help_option
224
+ @click.pass_context
225
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'dbmulticloud', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'dbmulticloud', 'class': 'OracleDbGcpIdentityConnector'})
226
+ @cli_util.wrap_exceptions
227
+ def create_oracle_db_gcp_identity_connector(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, issuer_url, project_id, resource_id, gcp_location, gcp_workload_identity_pool_id, gcp_workload_identity_provider_id, gcp_resource_service_agent_id, freeform_tags, defined_tags):
228
+
229
+ kwargs = {}
230
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
231
+
232
+ _details = {}
233
+ _details['displayName'] = display_name
234
+ _details['compartmentId'] = compartment_id
235
+ _details['issuerUrl'] = issuer_url
236
+ _details['projectId'] = project_id
237
+ _details['resourceId'] = resource_id
238
+ _details['gcpLocation'] = gcp_location
239
+ _details['gcpWorkloadIdentityPoolId'] = gcp_workload_identity_pool_id
240
+ _details['gcpWorkloadIdentityProviderId'] = gcp_workload_identity_provider_id
241
+ _details['gcpResourceServiceAgentId'] = gcp_resource_service_agent_id
242
+
243
+ if freeform_tags is not None:
244
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
245
+
246
+ if defined_tags is not None:
247
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
248
+
249
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
250
+ result = client.create_oracle_db_gcp_identity_connector(
251
+ create_oracle_db_gcp_identity_connector_details=_details,
252
+ **kwargs
253
+ )
254
+ if wait_for_state:
255
+
256
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
257
+ try:
258
+ wait_period_kwargs = {}
259
+ if max_wait_seconds is not None:
260
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
261
+ if wait_interval_seconds is not None:
262
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
263
+ if 'opc-work-request-id' not in result.headers:
264
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
265
+ cli_util.render_response(result, ctx)
266
+ return
267
+
268
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
269
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
270
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
271
+ # If we fail, we should show an error, but we should still provide the information to the customer
272
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
273
+ cli_util.render_response(result, ctx)
274
+ sys.exit(2)
275
+ except Exception:
276
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
277
+ cli_util.render_response(result, ctx)
278
+ raise
279
+ else:
280
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
281
+ cli_util.render_response(result, ctx)
282
+
283
+
284
+ @oracle_db_gcp_key_ring_group.command(name=cli_util.override('db_multicloud_gcp_provider.create_oracle_db_gcp_key_ring.command_name', 'create'), help=u"""Creates DB GCP Key Rings based on the provided information and retrieves the associated keys. \n[Command Reference](createOracleDbGcpKeyRing)""")
285
+ @cli_util.option('--compartment-id', required=True, help=u"""The compartment [OCID] where the Oracle DB GCP Key Ring resource resides.""")
286
+ @cli_util.option('--oracle-db-connector-id', required=True, help=u"""The [OCID] of the compartment where the Oracle DB GCP Identity Connector resource resides.""")
287
+ @cli_util.option('--display-name', required=True, help=u"""Display name of DB GCP Key Ring resource.""")
288
+ @cli_util.option('--gcp-key-ring-id', help=u"""GCP Key Ring ID.""")
289
+ @cli_util.option('--type', help=u"""Oracle DB GCP Key Ring resource Type.""")
290
+ @cli_util.option('--location', help=u"""Location of the GCP Key Ring resource.""")
291
+ @cli_util.option('--properties', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Oracle DB GCP Key Ring resource's properties.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
292
+ @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].
293
+
294
+ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
295
+ @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].
296
+
297
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
298
+ @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.""")
299
+ @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.""")
300
+ @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.""")
301
+ @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.""")
302
+ @json_skeleton_utils.get_cli_json_input_option({'properties': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'freeform-tags': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'dbmulticloud', 'class': 'dict(str, dict(str, object))'}})
303
+ @cli_util.help_option
304
+ @click.pass_context
305
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'properties': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'freeform-tags': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'dbmulticloud', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'dbmulticloud', 'class': 'OracleDbGcpKeyRing'})
306
+ @cli_util.wrap_exceptions
307
+ def create_oracle_db_gcp_key_ring(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, oracle_db_connector_id, display_name, gcp_key_ring_id, type, location, properties, freeform_tags, defined_tags, if_match):
308
+
309
+ kwargs = {}
310
+ if if_match is not None:
311
+ kwargs['if_match'] = if_match
312
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
313
+
314
+ _details = {}
315
+ _details['compartmentId'] = compartment_id
316
+ _details['oracleDbConnectorId'] = oracle_db_connector_id
317
+ _details['displayName'] = display_name
318
+
319
+ if gcp_key_ring_id is not None:
320
+ _details['gcpKeyRingId'] = gcp_key_ring_id
321
+
322
+ if type is not None:
323
+ _details['type'] = type
324
+
325
+ if location is not None:
326
+ _details['location'] = location
327
+
328
+ if properties is not None:
329
+ _details['properties'] = cli_util.parse_json_parameter("properties", properties)
330
+
331
+ if freeform_tags is not None:
332
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
333
+
334
+ if defined_tags is not None:
335
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
336
+
337
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
338
+ result = client.create_oracle_db_gcp_key_ring(
339
+ create_oracle_db_gcp_key_ring_details=_details,
340
+ **kwargs
341
+ )
342
+ if wait_for_state:
343
+
344
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
345
+ try:
346
+ wait_period_kwargs = {}
347
+ if max_wait_seconds is not None:
348
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
349
+ if wait_interval_seconds is not None:
350
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
351
+ if 'opc-work-request-id' not in result.headers:
352
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
353
+ cli_util.render_response(result, ctx)
354
+ return
355
+
356
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
357
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
358
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
359
+ # If we fail, we should show an error, but we should still provide the information to the customer
360
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
361
+ cli_util.render_response(result, ctx)
362
+ sys.exit(2)
363
+ except Exception:
364
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
365
+ cli_util.render_response(result, ctx)
366
+ raise
367
+ else:
368
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
369
+ cli_util.render_response(result, ctx)
370
+
371
+
372
+ @oracle_db_gcp_identity_connector_group.command(name=cli_util.override('db_multicloud_gcp_provider.delete_oracle_db_gcp_identity_connector.command_name', 'delete'), help=u"""Deletes the Oracle DB GCP Identity Connector resource and removes the associated connector from the database resource. \n[Command Reference](deleteOracleDbGcpIdentityConnector)""")
373
+ @cli_util.option('--oracle-db-gcp-identity-connector-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Identity Configuration Resource.""")
374
+ @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.""")
375
+ @cli_util.confirm_delete_option
376
+ @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.""")
377
+ @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.""")
378
+ @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.""")
379
+ @json_skeleton_utils.get_cli_json_input_option({})
380
+ @cli_util.help_option
381
+ @click.pass_context
382
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
383
+ @cli_util.wrap_exceptions
384
+ def delete_oracle_db_gcp_identity_connector(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, oracle_db_gcp_identity_connector_id, if_match):
385
+
386
+ if isinstance(oracle_db_gcp_identity_connector_id, six.string_types) and len(oracle_db_gcp_identity_connector_id.strip()) == 0:
387
+ raise click.UsageError('Parameter --oracle-db-gcp-identity-connector-id cannot be whitespace or empty string')
388
+
389
+ kwargs = {}
390
+ if if_match is not None:
391
+ kwargs['if_match'] = if_match
392
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
393
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
394
+ result = client.delete_oracle_db_gcp_identity_connector(
395
+ oracle_db_gcp_identity_connector_id=oracle_db_gcp_identity_connector_id,
396
+ **kwargs
397
+ )
398
+ if wait_for_state:
399
+
400
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
401
+ try:
402
+ wait_period_kwargs = {}
403
+ if max_wait_seconds is not None:
404
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
405
+ if wait_interval_seconds is not None:
406
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
407
+ if 'opc-work-request-id' not in result.headers:
408
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
409
+ cli_util.render_response(result, ctx)
410
+ return
411
+
412
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
413
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
414
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
415
+ # If we fail, we should show an error, but we should still provide the information to the customer
416
+ 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)
417
+ cli_util.render_response(result, ctx)
418
+ sys.exit(2)
419
+ except Exception:
420
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
421
+ cli_util.render_response(result, ctx)
422
+ raise
423
+ else:
424
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
425
+ cli_util.render_response(result, ctx)
426
+
427
+
428
+ @oracle_db_gcp_key_ring_group.command(name=cli_util.override('db_multicloud_gcp_provider.delete_oracle_db_gcp_key_ring.command_name', 'delete'), help=u"""Deletes the GCP Key Ring and its associated metadata. \n[Command Reference](deleteOracleDbGcpKeyRing)""")
429
+ @cli_util.option('--oracle-db-gcp-key-ring-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Key-Ring resource.""")
430
+ @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.""")
431
+ @cli_util.confirm_delete_option
432
+ @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.""")
433
+ @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.""")
434
+ @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.""")
435
+ @json_skeleton_utils.get_cli_json_input_option({})
436
+ @cli_util.help_option
437
+ @click.pass_context
438
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
439
+ @cli_util.wrap_exceptions
440
+ def delete_oracle_db_gcp_key_ring(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, oracle_db_gcp_key_ring_id, if_match):
441
+
442
+ if isinstance(oracle_db_gcp_key_ring_id, six.string_types) and len(oracle_db_gcp_key_ring_id.strip()) == 0:
443
+ raise click.UsageError('Parameter --oracle-db-gcp-key-ring-id cannot be whitespace or empty string')
444
+
445
+ kwargs = {}
446
+ if if_match is not None:
447
+ kwargs['if_match'] = if_match
448
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
449
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
450
+ result = client.delete_oracle_db_gcp_key_ring(
451
+ oracle_db_gcp_key_ring_id=oracle_db_gcp_key_ring_id,
452
+ **kwargs
453
+ )
454
+ if wait_for_state:
455
+
456
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
457
+ try:
458
+ wait_period_kwargs = {}
459
+ if max_wait_seconds is not None:
460
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
461
+ if wait_interval_seconds is not None:
462
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
463
+ if 'opc-work-request-id' not in result.headers:
464
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
465
+ cli_util.render_response(result, ctx)
466
+ return
467
+
468
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
469
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
470
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
471
+ # If we fail, we should show an error, but we should still provide the information to the customer
472
+ 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)
473
+ cli_util.render_response(result, ctx)
474
+ sys.exit(2)
475
+ except Exception:
476
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
477
+ cli_util.render_response(result, ctx)
478
+ raise
479
+ else:
480
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
481
+ cli_util.render_response(result, ctx)
482
+
483
+
484
+ @oracle_db_gcp_identity_connector_group.command(name=cli_util.override('db_multicloud_gcp_provider.get_oracle_db_gcp_identity_connector.command_name', 'get'), help=u"""Retrieves the Oracle DB GCP Identity Connector for a specified resource [OCID]. \n[Command Reference](getOracleDbGcpIdentityConnector)""")
485
+ @cli_util.option('--oracle-db-gcp-identity-connector-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Identity Configuration Resource.""")
486
+ @json_skeleton_utils.get_cli_json_input_option({})
487
+ @cli_util.help_option
488
+ @click.pass_context
489
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'dbmulticloud', 'class': 'OracleDbGcpIdentityConnector'})
490
+ @cli_util.wrap_exceptions
491
+ def get_oracle_db_gcp_identity_connector(ctx, from_json, oracle_db_gcp_identity_connector_id):
492
+
493
+ if isinstance(oracle_db_gcp_identity_connector_id, six.string_types) and len(oracle_db_gcp_identity_connector_id.strip()) == 0:
494
+ raise click.UsageError('Parameter --oracle-db-gcp-identity-connector-id cannot be whitespace or empty string')
495
+
496
+ kwargs = {}
497
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
498
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
499
+ result = client.get_oracle_db_gcp_identity_connector(
500
+ oracle_db_gcp_identity_connector_id=oracle_db_gcp_identity_connector_id,
501
+ **kwargs
502
+ )
503
+ cli_util.render_response(result, ctx)
504
+
505
+
506
+ @oracle_db_gcp_key_group.command(name=cli_util.override('db_multicloud_gcp_provider.get_oracle_db_gcp_key.command_name', 'get'), help=u"""Retrieves Oracle DB Google Cloud Key details using a specific resource [OCID]. \n[Command Reference](getOracleDbGcpKey)""")
507
+ @cli_util.option('--oracle-db-gcp-key-id', required=True, help=u"""The [OCID] of the Oracle DB Google Cloud Key resource.""")
508
+ @json_skeleton_utils.get_cli_json_input_option({})
509
+ @cli_util.help_option
510
+ @click.pass_context
511
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'dbmulticloud', 'class': 'OracleDbGcpKey'})
512
+ @cli_util.wrap_exceptions
513
+ def get_oracle_db_gcp_key(ctx, from_json, oracle_db_gcp_key_id):
514
+
515
+ if isinstance(oracle_db_gcp_key_id, six.string_types) and len(oracle_db_gcp_key_id.strip()) == 0:
516
+ raise click.UsageError('Parameter --oracle-db-gcp-key-id cannot be whitespace or empty string')
517
+
518
+ kwargs = {}
519
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
520
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
521
+ result = client.get_oracle_db_gcp_key(
522
+ oracle_db_gcp_key_id=oracle_db_gcp_key_id,
523
+ **kwargs
524
+ )
525
+ cli_util.render_response(result, ctx)
526
+
527
+
528
+ @oracle_db_gcp_key_ring_group.command(name=cli_util.override('db_multicloud_gcp_provider.get_oracle_db_gcp_key_ring.command_name', 'get'), help=u"""Retrieves the Oracle GCP Key Ring details using a specific Container resource [OCID]. \n[Command Reference](getOracleDbGcpKeyRing)""")
529
+ @cli_util.option('--oracle-db-gcp-key-ring-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Key-Ring resource.""")
530
+ @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
531
+ @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
532
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
533
+ @json_skeleton_utils.get_cli_json_input_option({})
534
+ @cli_util.help_option
535
+ @click.pass_context
536
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'dbmulticloud', 'class': 'OracleDbGcpKeyRing'})
537
+ @cli_util.wrap_exceptions
538
+ def get_oracle_db_gcp_key_ring(ctx, from_json, oracle_db_gcp_key_ring_id, limit, page, sort_order):
539
+
540
+ if isinstance(oracle_db_gcp_key_ring_id, six.string_types) and len(oracle_db_gcp_key_ring_id.strip()) == 0:
541
+ raise click.UsageError('Parameter --oracle-db-gcp-key-ring-id cannot be whitespace or empty string')
542
+
543
+ kwargs = {}
544
+ if limit is not None:
545
+ kwargs['limit'] = limit
546
+ if page is not None:
547
+ kwargs['page'] = page
548
+ if sort_order is not None:
549
+ kwargs['sort_order'] = sort_order
550
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
551
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
552
+ result = client.get_oracle_db_gcp_key_ring(
553
+ oracle_db_gcp_key_ring_id=oracle_db_gcp_key_ring_id,
554
+ **kwargs
555
+ )
556
+ cli_util.render_response(result, ctx)
557
+
558
+
559
+ @oracle_db_gcp_identity_connector_group.command(name=cli_util.override('db_multicloud_gcp_provider.list_oracle_db_gcp_identity_connectors.command_name', 'list'), help=u"""Lists all Oracle DB GCP Identity Connectors based on the specified filters. \n[Command Reference](listOracleDbGcpIdentityConnectors)""")
560
+ @cli_util.option('--compartment-id', required=True, help=u"""The [ID] of the compartment.""")
561
+ @cli_util.option('--display-name', help=u"""A filter to return Oracle DB GCP Identity Connector resources that match the specified display name.""")
562
+ @cli_util.option('--resource-id', help=u"""A filter to return Oracle DB GCP Identity Connector resource that match the given resource [OCID].""")
563
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the specified lifecycle state. The state value is case-insensitive.""")
564
+ @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
565
+ @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
566
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
567
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated.""")
568
+ @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.""")
569
+ @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.""")
570
+ @json_skeleton_utils.get_cli_json_input_option({})
571
+ @cli_util.help_option
572
+ @click.pass_context
573
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'dbmulticloud', 'class': 'OracleDbGcpIdentityConnectorSummaryCollection'})
574
+ @cli_util.wrap_exceptions
575
+ def list_oracle_db_gcp_identity_connectors(ctx, from_json, all_pages, page_size, compartment_id, display_name, resource_id, lifecycle_state, limit, page, sort_order, sort_by):
576
+
577
+ if all_pages and limit:
578
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
579
+
580
+ kwargs = {}
581
+ if display_name is not None:
582
+ kwargs['display_name'] = display_name
583
+ if resource_id is not None:
584
+ kwargs['resource_id'] = resource_id
585
+ if lifecycle_state is not None:
586
+ kwargs['lifecycle_state'] = lifecycle_state
587
+ if limit is not None:
588
+ kwargs['limit'] = limit
589
+ if page is not None:
590
+ kwargs['page'] = page
591
+ if sort_order is not None:
592
+ kwargs['sort_order'] = sort_order
593
+ if sort_by is not None:
594
+ kwargs['sort_by'] = sort_by
595
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
596
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
597
+ if all_pages:
598
+ if page_size:
599
+ kwargs['limit'] = page_size
600
+
601
+ result = cli_util.list_call_get_all_results(
602
+ client.list_oracle_db_gcp_identity_connectors,
603
+ compartment_id=compartment_id,
604
+ **kwargs
605
+ )
606
+ elif limit is not None:
607
+ result = cli_util.list_call_get_up_to_limit(
608
+ client.list_oracle_db_gcp_identity_connectors,
609
+ limit,
610
+ page_size,
611
+ compartment_id=compartment_id,
612
+ **kwargs
613
+ )
614
+ else:
615
+ result = client.list_oracle_db_gcp_identity_connectors(
616
+ compartment_id=compartment_id,
617
+ **kwargs
618
+ )
619
+ cli_util.render_response(result, ctx)
620
+
621
+
622
+ @oracle_db_gcp_key_ring_group.command(name=cli_util.override('db_multicloud_gcp_provider.list_oracle_db_gcp_key_rings.command_name', 'list'), help=u"""Lists the all DB GCP Key Rings based on filters. \n[Command Reference](listOracleDbGcpKeyRings)""")
623
+ @cli_util.option('--compartment-id', required=True, help=u"""The [ID] of the compartment.""")
624
+ @cli_util.option('--display-name', help=u"""A filter to return Oracle DB GCP Key Ring resources that match the specified display name.""")
625
+ @cli_util.option('--oracle-db-gcp-key-ring-id', help=u"""A filter to return Oracle DB GCP Key Rings.""")
626
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.""")
627
+ @cli_util.option('--oracle-db-gcp-connector-id', help=u"""A filter to return Oracle DB GCP Identity Connector resources that match the specified resource [OCID].""")
628
+ @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
629
+ @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
630
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
631
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated.""")
632
+ @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.""")
633
+ @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.""")
634
+ @json_skeleton_utils.get_cli_json_input_option({})
635
+ @cli_util.help_option
636
+ @click.pass_context
637
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'dbmulticloud', 'class': 'OracleDbGcpKeyRingSummaryCollection'})
638
+ @cli_util.wrap_exceptions
639
+ def list_oracle_db_gcp_key_rings(ctx, from_json, all_pages, page_size, compartment_id, display_name, oracle_db_gcp_key_ring_id, lifecycle_state, oracle_db_gcp_connector_id, limit, page, sort_order, sort_by):
640
+
641
+ if all_pages and limit:
642
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
643
+
644
+ kwargs = {}
645
+ if display_name is not None:
646
+ kwargs['display_name'] = display_name
647
+ if oracle_db_gcp_key_ring_id is not None:
648
+ kwargs['oracle_db_gcp_key_ring_id'] = oracle_db_gcp_key_ring_id
649
+ if lifecycle_state is not None:
650
+ kwargs['lifecycle_state'] = lifecycle_state
651
+ if oracle_db_gcp_connector_id is not None:
652
+ kwargs['oracle_db_gcp_connector_id'] = oracle_db_gcp_connector_id
653
+ if limit is not None:
654
+ kwargs['limit'] = limit
655
+ if page is not None:
656
+ kwargs['page'] = page
657
+ if sort_order is not None:
658
+ kwargs['sort_order'] = sort_order
659
+ if sort_by is not None:
660
+ kwargs['sort_by'] = sort_by
661
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
662
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
663
+ if all_pages:
664
+ if page_size:
665
+ kwargs['limit'] = page_size
666
+
667
+ result = cli_util.list_call_get_all_results(
668
+ client.list_oracle_db_gcp_key_rings,
669
+ compartment_id=compartment_id,
670
+ **kwargs
671
+ )
672
+ elif limit is not None:
673
+ result = cli_util.list_call_get_up_to_limit(
674
+ client.list_oracle_db_gcp_key_rings,
675
+ limit,
676
+ page_size,
677
+ compartment_id=compartment_id,
678
+ **kwargs
679
+ )
680
+ else:
681
+ result = client.list_oracle_db_gcp_key_rings(
682
+ compartment_id=compartment_id,
683
+ **kwargs
684
+ )
685
+ cli_util.render_response(result, ctx)
686
+
687
+
688
+ @oracle_db_gcp_key_group.command(name=cli_util.override('db_multicloud_gcp_provider.list_oracle_db_gcp_keys.command_name', 'list'), help=u"""Lists all Oracle DB Google Cloud Keys based on the specified filters. \n[Command Reference](listOracleDbGcpKeys)""")
689
+ @cli_util.option('--compartment-id', required=True, help=u"""The [ID] of the compartment.""")
690
+ @cli_util.option('--display-name', help=u"""A filter to return Oracle DB Google Cloud Key resources that match the specified display name.""")
691
+ @cli_util.option('--oracle-db-gcp-key-ring-id', help=u"""A filter to return Oracle DB GCP Key Rings.""")
692
+ @cli_util.option('--oracle-db-gcp-key-id', help=u"""A filter to return Oracle DB Google Cloud Key resources.""")
693
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the specified lifecycle state. The state value is case-insensitive.""")
694
+ @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
695
+ @cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""")
696
+ @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""")
697
+ @cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated.""")
698
+ @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.""")
699
+ @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.""")
700
+ @json_skeleton_utils.get_cli_json_input_option({})
701
+ @cli_util.help_option
702
+ @click.pass_context
703
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'dbmulticloud', 'class': 'OracleDbGcpKeySummaryCollection'})
704
+ @cli_util.wrap_exceptions
705
+ def list_oracle_db_gcp_keys(ctx, from_json, all_pages, page_size, compartment_id, display_name, oracle_db_gcp_key_ring_id, oracle_db_gcp_key_id, lifecycle_state, limit, page, sort_order, sort_by):
706
+
707
+ if all_pages and limit:
708
+ raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
709
+
710
+ kwargs = {}
711
+ if display_name is not None:
712
+ kwargs['display_name'] = display_name
713
+ if oracle_db_gcp_key_ring_id is not None:
714
+ kwargs['oracle_db_gcp_key_ring_id'] = oracle_db_gcp_key_ring_id
715
+ if oracle_db_gcp_key_id is not None:
716
+ kwargs['oracle_db_gcp_key_id'] = oracle_db_gcp_key_id
717
+ if lifecycle_state is not None:
718
+ kwargs['lifecycle_state'] = lifecycle_state
719
+ if limit is not None:
720
+ kwargs['limit'] = limit
721
+ if page is not None:
722
+ kwargs['page'] = page
723
+ if sort_order is not None:
724
+ kwargs['sort_order'] = sort_order
725
+ if sort_by is not None:
726
+ kwargs['sort_by'] = sort_by
727
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
728
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
729
+ if all_pages:
730
+ if page_size:
731
+ kwargs['limit'] = page_size
732
+
733
+ result = cli_util.list_call_get_all_results(
734
+ client.list_oracle_db_gcp_keys,
735
+ compartment_id=compartment_id,
736
+ **kwargs
737
+ )
738
+ elif limit is not None:
739
+ result = cli_util.list_call_get_up_to_limit(
740
+ client.list_oracle_db_gcp_keys,
741
+ limit,
742
+ page_size,
743
+ compartment_id=compartment_id,
744
+ **kwargs
745
+ )
746
+ else:
747
+ result = client.list_oracle_db_gcp_keys(
748
+ compartment_id=compartment_id,
749
+ **kwargs
750
+ )
751
+ cli_util.render_response(result, ctx)
752
+
753
+
754
+ @oracle_db_gcp_identity_connector_group.command(name=cli_util.override('db_multicloud_gcp_provider.refresh_oracle_db_gcp_identity_connector.command_name', 'refresh'), help=u"""Refreshes the Oracle DB GCP Connector resource. \n[Command Reference](refreshOracleDbGcpIdentityConnector)""")
755
+ @cli_util.option('--oracle-db-gcp-identity-connector-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Identity Configuration Resource.""")
756
+ @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.""")
757
+ @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.""")
758
+ @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.""")
759
+ @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.""")
760
+ @json_skeleton_utils.get_cli_json_input_option({})
761
+ @cli_util.help_option
762
+ @click.pass_context
763
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
764
+ @cli_util.wrap_exceptions
765
+ def refresh_oracle_db_gcp_identity_connector(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, oracle_db_gcp_identity_connector_id, if_match):
766
+
767
+ if isinstance(oracle_db_gcp_identity_connector_id, six.string_types) and len(oracle_db_gcp_identity_connector_id.strip()) == 0:
768
+ raise click.UsageError('Parameter --oracle-db-gcp-identity-connector-id cannot be whitespace or empty string')
769
+
770
+ kwargs = {}
771
+ if if_match is not None:
772
+ kwargs['if_match'] = if_match
773
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
774
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
775
+ result = client.refresh_oracle_db_gcp_identity_connector(
776
+ oracle_db_gcp_identity_connector_id=oracle_db_gcp_identity_connector_id,
777
+ **kwargs
778
+ )
779
+ if wait_for_state:
780
+
781
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
782
+ try:
783
+ wait_period_kwargs = {}
784
+ if max_wait_seconds is not None:
785
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
786
+ if wait_interval_seconds is not None:
787
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
788
+ if 'opc-work-request-id' not in result.headers:
789
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
790
+ cli_util.render_response(result, ctx)
791
+ return
792
+
793
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
794
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
795
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
796
+ # If we fail, we should show an error, but we should still provide the information to the customer
797
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
798
+ cli_util.render_response(result, ctx)
799
+ sys.exit(2)
800
+ except Exception:
801
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
802
+ cli_util.render_response(result, ctx)
803
+ raise
804
+ else:
805
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
806
+ cli_util.render_response(result, ctx)
807
+
808
+
809
+ @oracle_db_gcp_key_ring_group.command(name=cli_util.override('db_multicloud_gcp_provider.refresh_oracle_db_gcp_key_ring.command_name', 'refresh'), help=u"""Refreshes Oracle GCP Key Ring details from the backend. \n[Command Reference](refreshOracleDbGcpKeyRing)""")
810
+ @cli_util.option('--oracle-db-gcp-key-ring-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Key-Ring resource.""")
811
+ @cli_util.option('--oracle-db-gcp-connector-id', help=u"""The [OCID] of the Oracle DB GCP Connector resource.""")
812
+ @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.""")
813
+ @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.""")
814
+ @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.""")
815
+ @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.""")
816
+ @json_skeleton_utils.get_cli_json_input_option({})
817
+ @cli_util.help_option
818
+ @click.pass_context
819
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
820
+ @cli_util.wrap_exceptions
821
+ def refresh_oracle_db_gcp_key_ring(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, oracle_db_gcp_key_ring_id, oracle_db_gcp_connector_id, if_match):
822
+
823
+ if isinstance(oracle_db_gcp_key_ring_id, six.string_types) and len(oracle_db_gcp_key_ring_id.strip()) == 0:
824
+ raise click.UsageError('Parameter --oracle-db-gcp-key-ring-id cannot be whitespace or empty string')
825
+
826
+ kwargs = {}
827
+ if if_match is not None:
828
+ kwargs['if_match'] = if_match
829
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
830
+
831
+ _details = {}
832
+
833
+ if oracle_db_gcp_connector_id is not None:
834
+ _details['oracleDbGcpConnectorId'] = oracle_db_gcp_connector_id
835
+
836
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
837
+ result = client.refresh_oracle_db_gcp_key_ring(
838
+ oracle_db_gcp_key_ring_id=oracle_db_gcp_key_ring_id,
839
+ refresh_oracle_db_gcp_key_ring_details=_details,
840
+ **kwargs
841
+ )
842
+ if wait_for_state:
843
+
844
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
845
+ try:
846
+ wait_period_kwargs = {}
847
+ if max_wait_seconds is not None:
848
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
849
+ if wait_interval_seconds is not None:
850
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
851
+ if 'opc-work-request-id' not in result.headers:
852
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
853
+ cli_util.render_response(result, ctx)
854
+ return
855
+
856
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
857
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
858
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
859
+ # If we fail, we should show an error, but we should still provide the information to the customer
860
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
861
+ cli_util.render_response(result, ctx)
862
+ sys.exit(2)
863
+ except Exception:
864
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
865
+ cli_util.render_response(result, ctx)
866
+ raise
867
+ else:
868
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
869
+ cli_util.render_response(result, ctx)
870
+
871
+
872
+ @oracle_db_gcp_identity_connector_group.command(name=cli_util.override('db_multicloud_gcp_provider.update_oracle_db_gcp_identity_connector.command_name', 'update'), help=u"""Modifies the existing Oracle DB GCP Identity Connector resource for a given [OCID]. \n[Command Reference](updateOracleDbGcpIdentityConnector)""")
873
+ @cli_util.option('--oracle-db-gcp-identity-connector-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Identity Configuration Resource.""")
874
+ @cli_util.option('--display-name', help=u"""Oracle DB Google GCP Identity Connector resource name.""")
875
+ @cli_util.option('--issuer-url', help=u"""OIDC token issuer Url""")
876
+ @cli_util.option('--project-id', help=u"""Project ID of the customer project.""")
877
+ @cli_util.option('--resource-id', help=u"""The [OCID] of the GCP VM Cluster resource.""")
878
+ @cli_util.option('--gcp-location', help=u"""GCP Location.""")
879
+ @cli_util.option('--gcp-workload-identity-pool-id', help=u"""The ID of the cloud GCP Workload Identity Pool.""")
880
+ @cli_util.option('--gcp-workload-identity-provider-id', help=u"""The ID of the GCP Workload Identity Provider.""")
881
+ @cli_util.option('--gcp-resource-service-agent-id', help=u"""The ID of the GCP resource service agent.""")
882
+ @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].
883
+
884
+ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
885
+ @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].
886
+
887
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
888
+ @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.""")
889
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
890
+ @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.""")
891
+ @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.""")
892
+ @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.""")
893
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'dbmulticloud', 'class': 'dict(str, dict(str, object))'}})
894
+ @cli_util.help_option
895
+ @click.pass_context
896
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'dbmulticloud', 'class': 'dict(str, dict(str, object))'}})
897
+ @cli_util.wrap_exceptions
898
+ def update_oracle_db_gcp_identity_connector(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, oracle_db_gcp_identity_connector_id, display_name, issuer_url, project_id, resource_id, gcp_location, gcp_workload_identity_pool_id, gcp_workload_identity_provider_id, gcp_resource_service_agent_id, freeform_tags, defined_tags, if_match):
899
+
900
+ if isinstance(oracle_db_gcp_identity_connector_id, six.string_types) and len(oracle_db_gcp_identity_connector_id.strip()) == 0:
901
+ raise click.UsageError('Parameter --oracle-db-gcp-identity-connector-id cannot be whitespace or empty string')
902
+ if not force:
903
+ if freeform_tags or defined_tags:
904
+ if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
905
+ ctx.abort()
906
+
907
+ kwargs = {}
908
+ if if_match is not None:
909
+ kwargs['if_match'] = if_match
910
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
911
+
912
+ _details = {}
913
+
914
+ if display_name is not None:
915
+ _details['displayName'] = display_name
916
+
917
+ if issuer_url is not None:
918
+ _details['issuerUrl'] = issuer_url
919
+
920
+ if project_id is not None:
921
+ _details['projectId'] = project_id
922
+
923
+ if resource_id is not None:
924
+ _details['resourceId'] = resource_id
925
+
926
+ if gcp_location is not None:
927
+ _details['gcpLocation'] = gcp_location
928
+
929
+ if gcp_workload_identity_pool_id is not None:
930
+ _details['gcpWorkloadIdentityPoolId'] = gcp_workload_identity_pool_id
931
+
932
+ if gcp_workload_identity_provider_id is not None:
933
+ _details['gcpWorkloadIdentityProviderId'] = gcp_workload_identity_provider_id
934
+
935
+ if gcp_resource_service_agent_id is not None:
936
+ _details['gcpResourceServiceAgentId'] = gcp_resource_service_agent_id
937
+
938
+ if freeform_tags is not None:
939
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
940
+
941
+ if defined_tags is not None:
942
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
943
+
944
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
945
+ result = client.update_oracle_db_gcp_identity_connector(
946
+ oracle_db_gcp_identity_connector_id=oracle_db_gcp_identity_connector_id,
947
+ update_oracle_db_gcp_identity_connector_details=_details,
948
+ **kwargs
949
+ )
950
+ if wait_for_state:
951
+
952
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
953
+ try:
954
+ wait_period_kwargs = {}
955
+ if max_wait_seconds is not None:
956
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
957
+ if wait_interval_seconds is not None:
958
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
959
+ if 'opc-work-request-id' not in result.headers:
960
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
961
+ cli_util.render_response(result, ctx)
962
+ return
963
+
964
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
965
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
966
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
967
+ # If we fail, we should show an error, but we should still provide the information to the customer
968
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
969
+ cli_util.render_response(result, ctx)
970
+ sys.exit(2)
971
+ except Exception:
972
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
973
+ cli_util.render_response(result, ctx)
974
+ raise
975
+ else:
976
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
977
+ cli_util.render_response(result, ctx)
978
+
979
+
980
+ @oracle_db_gcp_key_ring_group.command(name=cli_util.override('db_multicloud_gcp_provider.update_oracle_db_gcp_key_ring.command_name', 'update'), help=u"""Modifies the existing Oracle GCP Key Ring Details for a given [OCID]. \n[Command Reference](updateOracleDbGcpKeyRing)""")
981
+ @cli_util.option('--oracle-db-gcp-key-ring-id', required=True, help=u"""The [OCID] of the Oracle DB GCP Key-Ring resource.""")
982
+ @cli_util.option('--display-name', help=u"""Display name of DB GCP Key Ring resource.""")
983
+ @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].
984
+
985
+ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
986
+ @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].
987
+
988
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
989
+ @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.""")
990
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
991
+ @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.""")
992
+ @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.""")
993
+ @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.""")
994
+ @json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'dbmulticloud', 'class': 'dict(str, dict(str, object))'}})
995
+ @cli_util.help_option
996
+ @click.pass_context
997
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'dbmulticloud', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'dbmulticloud', 'class': 'dict(str, dict(str, object))'}})
998
+ @cli_util.wrap_exceptions
999
+ def update_oracle_db_gcp_key_ring(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, oracle_db_gcp_key_ring_id, display_name, freeform_tags, defined_tags, if_match):
1000
+
1001
+ if isinstance(oracle_db_gcp_key_ring_id, six.string_types) and len(oracle_db_gcp_key_ring_id.strip()) == 0:
1002
+ raise click.UsageError('Parameter --oracle-db-gcp-key-ring-id cannot be whitespace or empty string')
1003
+ if not force:
1004
+ if freeform_tags or defined_tags:
1005
+ if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
1006
+ ctx.abort()
1007
+
1008
+ kwargs = {}
1009
+ if if_match is not None:
1010
+ kwargs['if_match'] = if_match
1011
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1012
+
1013
+ _details = {}
1014
+
1015
+ if display_name is not None:
1016
+ _details['displayName'] = display_name
1017
+
1018
+ if freeform_tags is not None:
1019
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
1020
+
1021
+ if defined_tags is not None:
1022
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
1023
+
1024
+ client = cli_util.build_client('dbmulticloud', 'db_multicloud_gcp_provider', ctx)
1025
+ result = client.update_oracle_db_gcp_key_ring(
1026
+ oracle_db_gcp_key_ring_id=oracle_db_gcp_key_ring_id,
1027
+ update_oracle_db_gcp_key_ring_details=_details,
1028
+ **kwargs
1029
+ )
1030
+ if wait_for_state:
1031
+
1032
+ if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1033
+ try:
1034
+ wait_period_kwargs = {}
1035
+ if max_wait_seconds is not None:
1036
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1037
+ if wait_interval_seconds is not None:
1038
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1039
+ if 'opc-work-request-id' not in result.headers:
1040
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
1041
+ cli_util.render_response(result, ctx)
1042
+ return
1043
+
1044
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1045
+ result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1046
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1047
+ # If we fail, we should show an error, but we should still provide the information to the customer
1048
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
1049
+ cli_util.render_response(result, ctx)
1050
+ sys.exit(2)
1051
+ except Exception:
1052
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1053
+ cli_util.render_response(result, ctx)
1054
+ raise
1055
+ else:
1056
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1057
+ cli_util.render_response(result, ctx)