oci-cli 3.72.1__py3-none-any.whl → 3.73.1__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 (134) hide show
  1. oci_cli/bin/dif.psm1 +3 -3
  2. oci_cli/bin/mysql.psm1 +6 -2
  3. oci_cli/bin/opensearch.psm1 +2 -2
  4. oci_cli/bin/queue.psm1 +23 -11
  5. oci_cli/help_text_producer/data_files/text/cmdref/certificates/ca-bundle/get.txt +1 -1
  6. oci_cli/help_text_producer/data_files/text/cmdref/certificates/certificate-authority-bundle/get.txt +5 -5
  7. oci_cli/help_text_producer/data_files/text/cmdref/certificates/certificate-authority-bundle-version/list.txt +1 -2
  8. oci_cli/help_text_producer/data_files/text/cmdref/certificates/certificate-bundle/get.txt +6 -5
  9. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/create-root-ca-by-generating-config-details.txt +12 -8
  10. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/create-root-ca-managed-externally.txt +206 -0
  11. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/create-subordinate-ca-issued-by-internal-ca.txt +12 -8
  12. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/create-subordinate-ca-managed-internally-issued-by-external-ca.txt +229 -0
  13. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/list.txt +1 -1
  14. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/update-root-ca-by-generating-config-details.txt +8 -2
  15. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/update-root-ca-managed-externally.txt +222 -0
  16. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/update-subordinate-ca-issued-by-internal-ca.txt +8 -2
  17. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/update-subordinate-ca-managed-internally-issued-by-external-ca.txt +233 -0
  18. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority.txt +8 -0
  19. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt.txt +8 -0
  20. oci_cli/help_text_producer/data_files/text/cmdref/compute/compute-host/apply-host-configuration.txt +0 -26
  21. oci_cli/help_text_producer/data_files/text/cmdref/compute/compute-host/attach.txt +0 -26
  22. oci_cli/help_text_producer/data_files/text/cmdref/compute/compute-host/check-host-configuration.txt +0 -26
  23. oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/create-dedicated-vm-host-compute-bare-metal-host-placement-constraint-details.txt +12 -0
  24. oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/create-dedicated-vm-host-host-group-placement-constraint-details.txt +12 -0
  25. oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/create.txt +12 -0
  26. oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/list.txt +5 -0
  27. oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host-instance/list.txt +5 -0
  28. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-configuration/launch-compute-instance.txt +4 -0
  29. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool/create.txt +5 -4
  30. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/restart.txt +4 -0
  31. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error/{list-errors.txt → list.txt} +5 -5
  32. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error.txt +1 -1
  33. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log/{list-logs.txt → list.txt} +5 -5
  34. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log.txt +1 -1
  35. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +2 -2
  36. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +2 -2
  37. oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/add.txt +51 -2
  38. oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/create.txt +50 -2
  39. oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/deploy-artifacts.txt +36 -4
  40. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/agent-endpoint/create.txt +11 -0
  41. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/agent-endpoint/update.txt +11 -0
  42. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/change-compartment.txt +136 -0
  43. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/create.txt +170 -0
  44. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/delete.txt +134 -0
  45. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/get.txt +96 -0
  46. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/list.txt +143 -0
  47. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/update.txt +184 -0
  48. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity.txt +31 -0
  49. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/tool/create-tool-rag-tool-config.txt +37 -0
  50. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/tool/create-tool-sql-tool-config.txt +4 -0
  51. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/tool/update-tool-rag-tool-config.txt +37 -0
  52. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/tool/update-tool-sql-tool-config.txt +4 -0
  53. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent.txt +14 -0
  54. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log-entry/list-work-request-logs.txt → work-request-log/list.txt} +5 -5
  55. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log-entry.txt → work-request-log.txt} +3 -3
  56. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request.txt +2 -2
  57. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane.txt +2 -2
  58. oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster/list-node-shapes.txt +129 -0
  59. oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster.txt +2 -0
  60. oci_cli/help_text_producer/data_files/text/cmdref/kafka.txt +2 -0
  61. oci_cli/help_text_producer/data_files/text/cmdref/mysql/backup/export.txt +154 -0
  62. oci_cli/help_text_producer/data_files/text/cmdref/mysql/backup.txt +2 -0
  63. oci_cli/help_text_producer/data_files/text/cmdref/mysql/work-request/cancel.txt +104 -0
  64. oci_cli/help_text_producer/data_files/text/cmdref/mysql/work-request.txt +2 -0
  65. oci_cli/help_text_producer/data_files/text/cmdref/mysql.txt +4 -0
  66. oci_cli/help_text_producer/data_files/text/cmdref/network/vcn/create.txt +1 -1
  67. oci_cli/help_text_producer/data_files/text/cmdref/network/vcn/update.txt +1 -1
  68. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/create.txt +205 -0
  69. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/delete.txt +146 -0
  70. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/get.txt +108 -0
  71. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/list.txt +160 -0
  72. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/update.txt +217 -0
  73. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance.txt +22 -0
  74. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance.txt +25 -0
  75. oci_cli/help_text_producer/data_files/text/cmdref/ocvs.txt +14 -0
  76. oci_cli/help_text_producer/data_files/text/cmdref/opensearch/cluster/create.txt +11 -0
  77. oci_cli/help_text_producer/data_files/text/cmdref/opensearch/cluster/update.txt +11 -0
  78. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list-errors.txt → list.txt} +5 -5
  79. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
  80. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +1 -1
  81. oci_cli/help_text_producer/data_files/text/cmdref/queue/channels/list-channels.txt +4 -0
  82. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/delete-message.txt +4 -0
  83. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/delete-messages.txt +4 -0
  84. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/get-messages.txt +4 -0
  85. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/get-stats.txt +4 -0
  86. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/update-message.txt +4 -0
  87. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/update-messages.txt +4 -0
  88. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group/create.txt +169 -0
  89. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group/delete.txt +135 -0
  90. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group/get.txt +97 -0
  91. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group/update.txt +185 -0
  92. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group-collection/list-consumer-groups.txt +142 -0
  93. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group-collection.txt +15 -0
  94. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group.txt +20 -0
  95. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/queue/create.txt +18 -2
  96. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/queue/purge.txt +19 -6
  97. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/queue/update.txt +16 -0
  98. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin.txt +14 -0
  99. oci_cli/help_text_producer/data_files/text/cmdref/queue.txt +14 -0
  100. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +6 -6
  101. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
  102. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
  103. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
  104. oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
  105. oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
  106. oci_cli/version.py +1 -1
  107. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/METADATA +2 -2
  108. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/RECORD +134 -102
  109. services/certificates/src/oci_cli_certificates/generated/certificates_cli.py +6 -6
  110. services/certificates_management/src/oci_cli_certificates_management/certificatesmanagement_cli_extended.py +126 -0
  111. services/certificates_management/src/oci_cli_certificates_management/generated/certificatesmanagement_cli.py +447 -25
  112. services/core/src/oci_cli_compute/generated/compute_cli.py +126 -174
  113. services/core/src/oci_cli_compute_management/generated/computemanagement_cli.py +13 -4
  114. services/core/src/oci_cli_virtual_network/generated/virtualnetwork_cli.py +2 -2
  115. services/database/src/oci_cli_database/generated/database_cli.py +4 -1
  116. services/dif/src/oci_cli_stack/generated/stack_cli.py +65 -17
  117. services/dif/src/oci_cli_stack/stack_cli_extended.py +9 -9
  118. services/generative_ai_agent/src/oci_cli_generative_ai_agent/generated/generativeaiagent_cli.py +435 -16
  119. services/managed_kafka/src/oci_cli_kafka_cluster/generated/kafkacluster_cli.py +56 -0
  120. services/mysql/src/oci_cli_db_backups/generated/dbbackups_cli.py +70 -0
  121. services/mysql/src/oci_cli_work_requests/generated/workrequests_cli.py +26 -0
  122. services/ocvp/src/oci_cli_management_appliance/__init__.py +4 -0
  123. services/ocvp/src/oci_cli_management_appliance/generated/__init__.py +4 -0
  124. services/ocvp/src/oci_cli_management_appliance/generated/client_mappings.py +14 -0
  125. services/ocvp/src/oci_cli_management_appliance/generated/managementappliance_cli.py +341 -0
  126. services/opensearch/src/oci_cli_opensearch_cluster/generated/opensearchcluster_cli.py +16 -8
  127. services/queue/src/oci_cli_queue/generated/queue_cli.py +28 -7
  128. services/queue/src/oci_cli_queue_admin/generated/queueadmin_cli.py +343 -10
  129. services/queue/src/oci_cli_queue_admin/queueadmin_cli_extended.py +54 -7
  130. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/LICENSE.txt +0 -0
  131. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  132. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/WHEEL +0 -0
  133. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/entry_points.txt +0 -0
  134. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/top_level.txt +0 -0
@@ -727,15 +727,16 @@ def create_certificate_create_certificate_by_importing_config_details(ctx, from_
727
727
  @cli_util.option('--name', required=True, help=u"""A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods.""")
728
728
  @cli_util.option('--compartment-id', required=True, help=u"""The compartment in which you want to create the CA.""")
729
729
  @cli_util.option('--certificate-authority-config', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
730
- @cli_util.option('--kms-key-id', required=True, help=u"""The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.""")
731
730
  @cli_util.option('--description', help=u"""A brief description of the CA.""")
732
731
  @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
733
732
 
734
733
  This option is a JSON list with items of type CertificateAuthorityRule. For documentation on CertificateAuthorityRule please see our API reference: https://docs.cloud.oracle.com/api/#/en/certificatesmanagement/20210224/datatypes/CertificateAuthorityRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
735
734
  @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
735
+ @cli_util.option('--kms-key-id', help=u"""The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.""")
736
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed private key. Avoid entering confidential information.""")
736
737
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
737
738
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
738
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
739
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
739
740
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
740
741
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
741
742
  @json_skeleton_utils.get_cli_json_input_option({'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-authority-config': {'module': 'certificates_management', 'class': 'CreateCertificateAuthorityConfigDetails'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}})
@@ -743,7 +744,7 @@ This option is a JSON list with items of type CertificateAuthorityRule. For doc
743
744
  @click.pass_context
744
745
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-authority-config': {'module': 'certificates_management', 'class': 'CreateCertificateAuthorityConfigDetails'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
745
746
  @cli_util.wrap_exceptions
746
- def create_certificate_authority(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, certificate_authority_config, kms_key_id, description, certificate_authority_rules, certificate_revocation_list_details, freeform_tags, defined_tags):
747
+ def create_certificate_authority(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, certificate_authority_config, description, certificate_authority_rules, certificate_revocation_list_details, kms_key_id, external_key_description, freeform_tags, defined_tags):
747
748
 
748
749
  kwargs = {}
749
750
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -752,7 +753,6 @@ def create_certificate_authority(ctx, from_json, wait_for_state, max_wait_second
752
753
  _details['name'] = name
753
754
  _details['compartmentId'] = compartment_id
754
755
  _details['certificateAuthorityConfig'] = cli_util.parse_json_parameter("certificate_authority_config", certificate_authority_config)
755
- _details['kmsKeyId'] = kms_key_id
756
756
 
757
757
  if description is not None:
758
758
  _details['description'] = description
@@ -763,6 +763,12 @@ def create_certificate_authority(ctx, from_json, wait_for_state, max_wait_second
763
763
  if certificate_revocation_list_details is not None:
764
764
  _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
765
765
 
766
+ if kms_key_id is not None:
767
+ _details['kmsKeyId'] = kms_key_id
768
+
769
+ if external_key_description is not None:
770
+ _details['externalKeyDescription'] = external_key_description
771
+
766
772
  if freeform_tags is not None:
767
773
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
768
774
 
@@ -803,19 +809,20 @@ def create_certificate_authority(ctx, from_json, wait_for_state, max_wait_second
803
809
  @certificate_authority_group.command(name=cli_util.override('certs_mgmt.create_certificate_authority_create_root_ca_by_generating_internally_config_details.command_name', 'create-certificate-authority-create-root-ca-by-generating-internally-config-details'), help=u"""Creates a new certificate authority (CA) according to the details of the request. \n[Command Reference](createCertificateAuthority)""")
804
810
  @cli_util.option('--name', required=True, help=u"""A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods.""")
805
811
  @cli_util.option('--compartment-id', required=True, help=u"""The compartment in which you want to create the CA.""")
806
- @cli_util.option('--kms-key-id', required=True, help=u"""The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.""")
807
812
  @cli_util.option('--certificate-authority-config-subject', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
808
813
  @cli_util.option('--description', help=u"""A brief description of the CA.""")
809
814
  @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
810
815
 
811
816
  This option is a JSON list with items of type CertificateAuthorityRule. For documentation on CertificateAuthorityRule please see our API reference: https://docs.cloud.oracle.com/api/#/en/certificatesmanagement/20210224/datatypes/CertificateAuthorityRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
812
817
  @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
818
+ @cli_util.option('--kms-key-id', help=u"""The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.""")
819
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed private key. Avoid entering confidential information.""")
813
820
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
814
821
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
815
822
  @cli_util.option('--certificate-authority-config-version-name', help=u"""The name of the CA version. When the value is not null, a name is unique across versions of a given CA.""")
816
823
  @cli_util.option('--certificate-authority-config-validity', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
817
824
  @cli_util.option('--certificate-authority-config-signing-algorithm', type=custom_types.CliCaseInsensitiveChoice(["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"]), help=u"""The algorithm used to sign public key certificates that the CA issues.""")
818
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
825
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
819
826
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
820
827
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
821
828
  @json_skeleton_utils.get_cli_json_input_option({'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-config-validity': {'module': 'certificates_management', 'class': 'Validity'}, 'certificate-authority-config-subject': {'module': 'certificates_management', 'class': 'CertificateSubject'}})
@@ -823,7 +830,7 @@ This option is a JSON list with items of type CertificateAuthorityRule. For doc
823
830
  @click.pass_context
824
831
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-config-validity': {'module': 'certificates_management', 'class': 'Validity'}, 'certificate-authority-config-subject': {'module': 'certificates_management', 'class': 'CertificateSubject'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
825
832
  @cli_util.wrap_exceptions
826
- def create_certificate_authority_create_root_ca_by_generating_internally_config_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, kms_key_id, certificate_authority_config_subject, description, certificate_authority_rules, certificate_revocation_list_details, freeform_tags, defined_tags, certificate_authority_config_version_name, certificate_authority_config_validity, certificate_authority_config_signing_algorithm):
833
+ def create_certificate_authority_create_root_ca_by_generating_internally_config_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, certificate_authority_config_subject, description, certificate_authority_rules, certificate_revocation_list_details, kms_key_id, external_key_description, freeform_tags, defined_tags, certificate_authority_config_version_name, certificate_authority_config_validity, certificate_authority_config_signing_algorithm):
827
834
 
828
835
  kwargs = {}
829
836
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -832,7 +839,6 @@ def create_certificate_authority_create_root_ca_by_generating_internally_config_
832
839
  _details['certificateAuthorityConfig'] = {}
833
840
  _details['name'] = name
834
841
  _details['compartmentId'] = compartment_id
835
- _details['kmsKeyId'] = kms_key_id
836
842
  _details['certificateAuthorityConfig']['subject'] = cli_util.parse_json_parameter("certificate_authority_config_subject", certificate_authority_config_subject)
837
843
 
838
844
  if description is not None:
@@ -844,6 +850,12 @@ def create_certificate_authority_create_root_ca_by_generating_internally_config_
844
850
  if certificate_revocation_list_details is not None:
845
851
  _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
846
852
 
853
+ if kms_key_id is not None:
854
+ _details['kmsKeyId'] = kms_key_id
855
+
856
+ if external_key_description is not None:
857
+ _details['externalKeyDescription'] = external_key_description
858
+
847
859
  if freeform_tags is not None:
848
860
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
849
861
 
@@ -895,7 +907,6 @@ def create_certificate_authority_create_root_ca_by_generating_internally_config_
895
907
  @certificate_authority_group.command(name=cli_util.override('certs_mgmt.create_certificate_authority_create_subordinate_ca_issued_by_internal_ca_config_details.command_name', 'create-certificate-authority-create-subordinate-ca-issued-by-internal-ca-config-details'), help=u"""Creates a new certificate authority (CA) according to the details of the request. \n[Command Reference](createCertificateAuthority)""")
896
908
  @cli_util.option('--name', required=True, help=u"""A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods.""")
897
909
  @cli_util.option('--compartment-id', required=True, help=u"""The compartment in which you want to create the CA.""")
898
- @cli_util.option('--kms-key-id', required=True, help=u"""The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.""")
899
910
  @cli_util.option('--certificate-authority-config-issuer-certificate-authority-id', required=True, help=u"""The OCID of the private CA.""")
900
911
  @cli_util.option('--certificate-authority-config-subject', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
901
912
  @cli_util.option('--description', help=u"""A brief description of the CA.""")
@@ -903,12 +914,14 @@ def create_certificate_authority_create_root_ca_by_generating_internally_config_
903
914
 
904
915
  This option is a JSON list with items of type CertificateAuthorityRule. For documentation on CertificateAuthorityRule please see our API reference: https://docs.cloud.oracle.com/api/#/en/certificatesmanagement/20210224/datatypes/CertificateAuthorityRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
905
916
  @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
917
+ @cli_util.option('--kms-key-id', help=u"""The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.""")
918
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed private key. Avoid entering confidential information.""")
906
919
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
907
920
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
908
921
  @cli_util.option('--certificate-authority-config-version-name', help=u"""The name of the CA version. When the value is not null, a name is unique across versions of a given CA.""")
909
922
  @cli_util.option('--certificate-authority-config-validity', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
910
923
  @cli_util.option('--certificate-authority-config-signing-algorithm', type=custom_types.CliCaseInsensitiveChoice(["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"]), help=u"""The algorithm used to sign public key certificates that the CA issues.""")
911
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
924
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
912
925
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
913
926
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
914
927
  @json_skeleton_utils.get_cli_json_input_option({'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-config-validity': {'module': 'certificates_management', 'class': 'Validity'}, 'certificate-authority-config-subject': {'module': 'certificates_management', 'class': 'CertificateSubject'}})
@@ -916,7 +929,7 @@ This option is a JSON list with items of type CertificateAuthorityRule. For doc
916
929
  @click.pass_context
917
930
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-config-validity': {'module': 'certificates_management', 'class': 'Validity'}, 'certificate-authority-config-subject': {'module': 'certificates_management', 'class': 'CertificateSubject'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
918
931
  @cli_util.wrap_exceptions
919
- def create_certificate_authority_create_subordinate_ca_issued_by_internal_ca_config_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, kms_key_id, certificate_authority_config_issuer_certificate_authority_id, certificate_authority_config_subject, description, certificate_authority_rules, certificate_revocation_list_details, freeform_tags, defined_tags, certificate_authority_config_version_name, certificate_authority_config_validity, certificate_authority_config_signing_algorithm):
932
+ def create_certificate_authority_create_subordinate_ca_issued_by_internal_ca_config_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, certificate_authority_config_issuer_certificate_authority_id, certificate_authority_config_subject, description, certificate_authority_rules, certificate_revocation_list_details, kms_key_id, external_key_description, freeform_tags, defined_tags, certificate_authority_config_version_name, certificate_authority_config_validity, certificate_authority_config_signing_algorithm):
920
933
 
921
934
  kwargs = {}
922
935
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -925,7 +938,6 @@ def create_certificate_authority_create_subordinate_ca_issued_by_internal_ca_con
925
938
  _details['certificateAuthorityConfig'] = {}
926
939
  _details['name'] = name
927
940
  _details['compartmentId'] = compartment_id
928
- _details['kmsKeyId'] = kms_key_id
929
941
  _details['certificateAuthorityConfig']['issuerCertificateAuthorityId'] = certificate_authority_config_issuer_certificate_authority_id
930
942
  _details['certificateAuthorityConfig']['subject'] = cli_util.parse_json_parameter("certificate_authority_config_subject", certificate_authority_config_subject)
931
943
 
@@ -938,6 +950,12 @@ def create_certificate_authority_create_subordinate_ca_issued_by_internal_ca_con
938
950
  if certificate_revocation_list_details is not None:
939
951
  _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
940
952
 
953
+ if kms_key_id is not None:
954
+ _details['kmsKeyId'] = kms_key_id
955
+
956
+ if external_key_description is not None:
957
+ _details['externalKeyDescription'] = external_key_description
958
+
941
959
  if freeform_tags is not None:
942
960
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
943
961
 
@@ -986,6 +1004,192 @@ def create_certificate_authority_create_subordinate_ca_issued_by_internal_ca_con
986
1004
  cli_util.render_response(result, ctx)
987
1005
 
988
1006
 
1007
+ @certificate_authority_group.command(name=cli_util.override('certs_mgmt.create_certificate_authority_create_root_ca_managed_externally_config_details.command_name', 'create-certificate-authority-create-root-ca-managed-externally-config-details'), help=u"""Creates a new certificate authority (CA) according to the details of the request. \n[Command Reference](createCertificateAuthority)""")
1008
+ @cli_util.option('--name', required=True, help=u"""A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods.""")
1009
+ @cli_util.option('--compartment-id', required=True, help=u"""The compartment in which you want to create the CA.""")
1010
+ @cli_util.option('--certificate-authority-config-certificate-pem', required=True, help=u"""The externally signed certificate (in PEM format) for the imported root CA.""")
1011
+ @cli_util.option('--description', help=u"""A brief description of the CA.""")
1012
+ @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
1013
+
1014
+ This option is a JSON list with items of type CertificateAuthorityRule. For documentation on CertificateAuthorityRule please see our API reference: https://docs.cloud.oracle.com/api/#/en/certificatesmanagement/20210224/datatypes/CertificateAuthorityRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1015
+ @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1016
+ @cli_util.option('--kms-key-id', help=u"""The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.""")
1017
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed private key. Avoid entering confidential information.""")
1018
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1019
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1020
+ @cli_util.option('--certificate-authority-config-version-name', help=u"""The name of the CA version. When the value is not null, a name is unique across versions of a given CA.""")
1021
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1022
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
1023
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
1024
+ @json_skeleton_utils.get_cli_json_input_option({'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}})
1025
+ @cli_util.help_option
1026
+ @click.pass_context
1027
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
1028
+ @cli_util.wrap_exceptions
1029
+ def create_certificate_authority_create_root_ca_managed_externally_config_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, certificate_authority_config_certificate_pem, description, certificate_authority_rules, certificate_revocation_list_details, kms_key_id, external_key_description, freeform_tags, defined_tags, certificate_authority_config_version_name):
1030
+
1031
+ kwargs = {}
1032
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1033
+
1034
+ _details = {}
1035
+ _details['certificateAuthorityConfig'] = {}
1036
+ _details['name'] = name
1037
+ _details['compartmentId'] = compartment_id
1038
+ _details['certificateAuthorityConfig']['certificatePem'] = certificate_authority_config_certificate_pem
1039
+
1040
+ if description is not None:
1041
+ _details['description'] = description
1042
+
1043
+ if certificate_authority_rules is not None:
1044
+ _details['certificateAuthorityRules'] = cli_util.parse_json_parameter("certificate_authority_rules", certificate_authority_rules)
1045
+
1046
+ if certificate_revocation_list_details is not None:
1047
+ _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
1048
+
1049
+ if kms_key_id is not None:
1050
+ _details['kmsKeyId'] = kms_key_id
1051
+
1052
+ if external_key_description is not None:
1053
+ _details['externalKeyDescription'] = external_key_description
1054
+
1055
+ if freeform_tags is not None:
1056
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
1057
+
1058
+ if defined_tags is not None:
1059
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
1060
+
1061
+ if certificate_authority_config_version_name is not None:
1062
+ _details['certificateAuthorityConfig']['versionName'] = certificate_authority_config_version_name
1063
+
1064
+ _details['certificateAuthorityConfig']['configType'] = 'ROOT_CA_MANAGED_EXTERNALLY'
1065
+
1066
+ client = cli_util.build_client('certificates_management', 'certificates_management', ctx)
1067
+ result = client.create_certificate_authority(
1068
+ create_certificate_authority_details=_details,
1069
+ **kwargs
1070
+ )
1071
+ if wait_for_state:
1072
+
1073
+ if hasattr(client, 'get_certificate_authority') and callable(getattr(client, 'get_certificate_authority')):
1074
+ try:
1075
+ wait_period_kwargs = {}
1076
+ if max_wait_seconds is not None:
1077
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1078
+ if wait_interval_seconds is not None:
1079
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1080
+
1081
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1082
+ result = oci.wait_until(client, client.get_certificate_authority(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1083
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1084
+ # If we fail, we should show an error, but we should still provide the information to the customer
1085
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1086
+ cli_util.render_response(result, ctx)
1087
+ sys.exit(2)
1088
+ except Exception:
1089
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1090
+ cli_util.render_response(result, ctx)
1091
+ raise
1092
+ else:
1093
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1094
+ cli_util.render_response(result, ctx)
1095
+
1096
+
1097
+ @certificate_authority_group.command(name=cli_util.override('certs_mgmt.create_certificate_authority_create_subordinate_ca_managed_internally_issued_by_external_ca_config_details.command_name', 'create-certificate-authority-create-subordinate-ca-managed-internally-issued-by-external-ca-config-details'), help=u"""Creates a new certificate authority (CA) according to the details of the request. \n[Command Reference](createCertificateAuthority)""")
1098
+ @cli_util.option('--name', required=True, help=u"""A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods.""")
1099
+ @cli_util.option('--compartment-id', required=True, help=u"""The compartment in which you want to create the CA.""")
1100
+ @cli_util.option('--certificate-authority-config-issuer-certificate-authority-id', required=True, help=u"""The OCID of the private, external issuer CA.""")
1101
+ @cli_util.option('--certificate-authority-config-subject', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1102
+ @cli_util.option('--description', help=u"""A brief description of the CA.""")
1103
+ @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
1104
+
1105
+ This option is a JSON list with items of type CertificateAuthorityRule. For documentation on CertificateAuthorityRule please see our API reference: https://docs.cloud.oracle.com/api/#/en/certificatesmanagement/20210224/datatypes/CertificateAuthorityRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1106
+ @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1107
+ @cli_util.option('--kms-key-id', help=u"""The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.""")
1108
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed private key. Avoid entering confidential information.""")
1109
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1110
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1111
+ @cli_util.option('--certificate-authority-config-version-name', help=u"""The name of the CA version. When the value is not null, a name is unique across versions of a given CA.""")
1112
+ @cli_util.option('--certificate-authority-config-signing-algorithm', type=custom_types.CliCaseInsensitiveChoice(["SHA256_WITH_RSA", "SHA384_WITH_RSA", "SHA512_WITH_RSA", "SHA256_WITH_ECDSA", "SHA384_WITH_ECDSA", "SHA512_WITH_ECDSA"]), help=u"""The algorithm used to sign public key certificates that the CA issues.""")
1113
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1114
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
1115
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
1116
+ @json_skeleton_utils.get_cli_json_input_option({'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-config-subject': {'module': 'certificates_management', 'class': 'CertificateSubject'}})
1117
+ @cli_util.help_option
1118
+ @click.pass_context
1119
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-config-subject': {'module': 'certificates_management', 'class': 'CertificateSubject'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
1120
+ @cli_util.wrap_exceptions
1121
+ def create_certificate_authority_create_subordinate_ca_managed_internally_issued_by_external_ca_config_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, compartment_id, certificate_authority_config_issuer_certificate_authority_id, certificate_authority_config_subject, description, certificate_authority_rules, certificate_revocation_list_details, kms_key_id, external_key_description, freeform_tags, defined_tags, certificate_authority_config_version_name, certificate_authority_config_signing_algorithm):
1122
+
1123
+ kwargs = {}
1124
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1125
+
1126
+ _details = {}
1127
+ _details['certificateAuthorityConfig'] = {}
1128
+ _details['name'] = name
1129
+ _details['compartmentId'] = compartment_id
1130
+ _details['certificateAuthorityConfig']['issuerCertificateAuthorityId'] = certificate_authority_config_issuer_certificate_authority_id
1131
+ _details['certificateAuthorityConfig']['subject'] = cli_util.parse_json_parameter("certificate_authority_config_subject", certificate_authority_config_subject)
1132
+
1133
+ if description is not None:
1134
+ _details['description'] = description
1135
+
1136
+ if certificate_authority_rules is not None:
1137
+ _details['certificateAuthorityRules'] = cli_util.parse_json_parameter("certificate_authority_rules", certificate_authority_rules)
1138
+
1139
+ if certificate_revocation_list_details is not None:
1140
+ _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
1141
+
1142
+ if kms_key_id is not None:
1143
+ _details['kmsKeyId'] = kms_key_id
1144
+
1145
+ if external_key_description is not None:
1146
+ _details['externalKeyDescription'] = external_key_description
1147
+
1148
+ if freeform_tags is not None:
1149
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
1150
+
1151
+ if defined_tags is not None:
1152
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
1153
+
1154
+ if certificate_authority_config_version_name is not None:
1155
+ _details['certificateAuthorityConfig']['versionName'] = certificate_authority_config_version_name
1156
+
1157
+ if certificate_authority_config_signing_algorithm is not None:
1158
+ _details['certificateAuthorityConfig']['signingAlgorithm'] = certificate_authority_config_signing_algorithm
1159
+
1160
+ _details['certificateAuthorityConfig']['configType'] = 'SUBORDINATE_CA_MANAGED_INTERNALLY_ISSUED_BY_EXTERNAL_CA'
1161
+
1162
+ client = cli_util.build_client('certificates_management', 'certificates_management', ctx)
1163
+ result = client.create_certificate_authority(
1164
+ create_certificate_authority_details=_details,
1165
+ **kwargs
1166
+ )
1167
+ if wait_for_state:
1168
+
1169
+ if hasattr(client, 'get_certificate_authority') and callable(getattr(client, 'get_certificate_authority')):
1170
+ try:
1171
+ wait_period_kwargs = {}
1172
+ if max_wait_seconds is not None:
1173
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1174
+ if wait_interval_seconds is not None:
1175
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1176
+
1177
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1178
+ result = oci.wait_until(client, client.get_certificate_authority(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1179
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1180
+ # If we fail, we should show an error, but we should still provide the information to the customer
1181
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1182
+ cli_util.render_response(result, ctx)
1183
+ sys.exit(2)
1184
+ except Exception:
1185
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1186
+ cli_util.render_response(result, ctx)
1187
+ raise
1188
+ else:
1189
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1190
+ cli_util.render_response(result, ctx)
1191
+
1192
+
989
1193
  @ca_bundle_group.command(name=cli_util.override('certs_mgmt.delete_ca_bundle.command_name', 'delete'), help=u"""Deletes the specified CA bundle. \n[Command Reference](deleteCaBundle)""")
990
1194
  @cli_util.option('--ca-bundle-id', required=True, help=u"""The OCID of the CA bundle.""")
991
1195
  @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.""")
@@ -1324,7 +1528,7 @@ def list_ca_bundles(ctx, from_json, all_pages, page_size, compartment_id, lifecy
1324
1528
 
1325
1529
  @certificate_authority_summary_group.command(name=cli_util.override('certs_mgmt.list_certificate_authorities.command_name', 'list-certificate-authorities'), help=u"""Lists all certificate authorities (CAs) in the specified compartment. Optionally, you can use the parameter `FilterByCertificateAuthorityIdQueryParam` to limit the results to a single item that matches the specified CA. \n[Command Reference](listCertificateAuthorities)""")
1326
1530
  @cli_util.option('--compartment-id', help=u"""A filter that returns only resources that match the given compartment OCID.""")
1327
- @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"]), help=u"""A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive.""")
1531
+ @cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), help=u"""A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive.""")
1328
1532
  @cli_util.option('--name', help=u"""A filter that returns only resources that match the specified name.""")
1329
1533
  @cli_util.option('--issuer-certificate-authority-id', help=u"""The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs.""")
1330
1534
  @cli_util.option('--certificate-authority-id', help=u"""The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs.""")
@@ -2255,10 +2459,11 @@ def update_certificate_update_certificate_managed_externally_issued_by_internal_
2255
2459
 
2256
2460
  @certificate_authority_group.command(name=cli_util.override('certs_mgmt.update_certificate_authority.command_name', 'update'), help=u"""Updates the properties of the specified certificate authority (CA). \n[Command Reference](updateCertificateAuthority)""")
2257
2461
  @cli_util.option('--certificate-authority-id', required=True, help=u"""The OCID of the certificate authority (CA).""")
2258
- @cli_util.option('--description', help=u"""A brief description of the CA.""")
2259
- @cli_util.option('--current-version-number', type=click.INT, help=u"""Makes this version the current version. This property cannot be updated in combination with any other properties.""")
2462
+ @cli_util.option('--description', help=u"""A brief description of the CA. Avoid entering confidential information.""")
2463
+ @cli_util.option('--current-version-number', type=click.INT, help=u"""Makes this version the current version. This property can't be updated in combination with any other properties.""")
2260
2464
  @cli_util.option('--certificate-authority-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2261
2465
  @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2466
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed key. Avoid entering confidential information.""")
2262
2467
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2263
2468
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2264
2469
  @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
@@ -2266,7 +2471,7 @@ def update_certificate_update_certificate_managed_externally_issued_by_internal_
2266
2471
  This option is a JSON list with items of type CertificateAuthorityRule. For documentation on CertificateAuthorityRule please see our API reference: https://docs.cloud.oracle.com/api/#/en/certificatesmanagement/20210224/datatypes/CertificateAuthorityRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2267
2472
  @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.""")
2268
2473
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2269
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2474
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2270
2475
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2271
2476
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
2272
2477
  @json_skeleton_utils.get_cli_json_input_option({'certificate-authority-config': {'module': 'certificates_management', 'class': 'UpdateCertificateAuthorityConfigDetails'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}})
@@ -2274,7 +2479,7 @@ This option is a JSON list with items of type CertificateAuthorityRule. For doc
2274
2479
  @click.pass_context
2275
2480
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-authority-config': {'module': 'certificates_management', 'class': 'UpdateCertificateAuthorityConfigDetails'}, 'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
2276
2481
  @cli_util.wrap_exceptions
2277
- def update_certificate_authority(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, certificate_authority_id, description, current_version_number, certificate_authority_config, certificate_revocation_list_details, freeform_tags, defined_tags, certificate_authority_rules, if_match):
2482
+ def update_certificate_authority(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, certificate_authority_id, description, current_version_number, certificate_authority_config, certificate_revocation_list_details, external_key_description, freeform_tags, defined_tags, certificate_authority_rules, if_match):
2278
2483
 
2279
2484
  if isinstance(certificate_authority_id, six.string_types) and len(certificate_authority_id.strip()) == 0:
2280
2485
  raise click.UsageError('Parameter --certificate-authority-id cannot be whitespace or empty string')
@@ -2302,6 +2507,9 @@ def update_certificate_authority(ctx, from_json, force, wait_for_state, max_wait
2302
2507
  if certificate_revocation_list_details is not None:
2303
2508
  _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
2304
2509
 
2510
+ if external_key_description is not None:
2511
+ _details['externalKeyDescription'] = external_key_description
2512
+
2305
2513
  if freeform_tags is not None:
2306
2514
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2307
2515
 
@@ -2343,11 +2551,115 @@ def update_certificate_authority(ctx, from_json, force, wait_for_state, max_wait
2343
2551
  cli_util.render_response(result, ctx)
2344
2552
 
2345
2553
 
2554
+ @certificate_authority_group.command(name=cli_util.override('certs_mgmt.update_certificate_authority_update_root_ca_managed_externally_config_details.command_name', 'update-certificate-authority-update-root-ca-managed-externally-config-details'), help=u"""Updates the properties of the specified certificate authority (CA). \n[Command Reference](updateCertificateAuthority)""")
2555
+ @cli_util.option('--certificate-authority-id', required=True, help=u"""The OCID of the certificate authority (CA).""")
2556
+ @cli_util.option('--certificate-authority-config-certificate-pem', required=True, help=u"""The externally signed certificate (in PEM format) for the CA.""")
2557
+ @cli_util.option('--description', help=u"""A brief description of the CA. Avoid entering confidential information.""")
2558
+ @cli_util.option('--current-version-number', type=click.INT, help=u"""Makes this version the current version. This property can't be updated in combination with any other properties.""")
2559
+ @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2560
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed key. Avoid entering confidential information.""")
2561
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2562
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2563
+ @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
2564
+
2565
+ This option is a JSON list with items of type CertificateAuthorityRule. For documentation on CertificateAuthorityRule please see our API reference: https://docs.cloud.oracle.com/api/#/en/certificatesmanagement/20210224/datatypes/CertificateAuthorityRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2566
+ @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.""")
2567
+ @cli_util.option('--certificate-authority-config-version-name', help=u"""The name of the CA version. When the value is not null, a name is unique across versions of a given CA.""")
2568
+ @cli_util.option('--certificate-authority-config-stage', type=custom_types.CliCaseInsensitiveChoice(["CURRENT", "PENDING"]), help=u"""The rotation state of the CA. The default is `PENDING`, meaning that the CA is staged and available for use. A CA version that you mark as `CURRENT` is currently in use, but you don't yet want to rotate it into current, active use. For example, you might create or update a CA and mark its rotation state as `PENDING` if you haven't yet updated the certificate on the target system.""")
2569
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2570
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2571
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2572
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
2573
+ @json_skeleton_utils.get_cli_json_input_option({'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}})
2574
+ @cli_util.help_option
2575
+ @click.pass_context
2576
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
2577
+ @cli_util.wrap_exceptions
2578
+ def update_certificate_authority_update_root_ca_managed_externally_config_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, certificate_authority_id, certificate_authority_config_certificate_pem, description, current_version_number, certificate_revocation_list_details, external_key_description, freeform_tags, defined_tags, certificate_authority_rules, if_match, certificate_authority_config_version_name, certificate_authority_config_stage):
2579
+
2580
+ if isinstance(certificate_authority_id, six.string_types) and len(certificate_authority_id.strip()) == 0:
2581
+ raise click.UsageError('Parameter --certificate-authority-id cannot be whitespace or empty string')
2582
+ if not force:
2583
+ if certificate_revocation_list_details or freeform_tags or defined_tags or certificate_authority_rules:
2584
+ if not click.confirm("WARNING: Updates to certificate-revocation-list-details and freeform-tags and defined-tags and certificate-authority-rules will replace any existing values. Are you sure you want to continue?"):
2585
+ ctx.abort()
2586
+
2587
+ kwargs = {}
2588
+ if if_match is not None:
2589
+ kwargs['if_match'] = if_match
2590
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2591
+
2592
+ _details = {}
2593
+ _details['certificateAuthorityConfig'] = {}
2594
+ _details['certificateAuthorityConfig']['certificatePem'] = certificate_authority_config_certificate_pem
2595
+
2596
+ if description is not None:
2597
+ _details['description'] = description
2598
+
2599
+ if current_version_number is not None:
2600
+ _details['currentVersionNumber'] = current_version_number
2601
+
2602
+ if certificate_revocation_list_details is not None:
2603
+ _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
2604
+
2605
+ if external_key_description is not None:
2606
+ _details['externalKeyDescription'] = external_key_description
2607
+
2608
+ if freeform_tags is not None:
2609
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2610
+
2611
+ if defined_tags is not None:
2612
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2613
+
2614
+ if certificate_authority_rules is not None:
2615
+ _details['certificateAuthorityRules'] = cli_util.parse_json_parameter("certificate_authority_rules", certificate_authority_rules)
2616
+
2617
+ if certificate_authority_config_version_name is not None:
2618
+ _details['certificateAuthorityConfig']['versionName'] = certificate_authority_config_version_name
2619
+
2620
+ if certificate_authority_config_stage is not None:
2621
+ _details['certificateAuthorityConfig']['stage'] = certificate_authority_config_stage
2622
+
2623
+ _details['certificateAuthorityConfig']['configType'] = 'ROOT_CA_MANAGED_EXTERNALLY'
2624
+
2625
+ client = cli_util.build_client('certificates_management', 'certificates_management', ctx)
2626
+ result = client.update_certificate_authority(
2627
+ certificate_authority_id=certificate_authority_id,
2628
+ update_certificate_authority_details=_details,
2629
+ **kwargs
2630
+ )
2631
+ if wait_for_state:
2632
+
2633
+ if hasattr(client, 'get_certificate_authority') and callable(getattr(client, 'get_certificate_authority')):
2634
+ try:
2635
+ wait_period_kwargs = {}
2636
+ if max_wait_seconds is not None:
2637
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2638
+ if wait_interval_seconds is not None:
2639
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2640
+
2641
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
2642
+ result = oci.wait_until(client, client.get_certificate_authority(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
2643
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
2644
+ # If we fail, we should show an error, but we should still provide the information to the customer
2645
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
2646
+ cli_util.render_response(result, ctx)
2647
+ sys.exit(2)
2648
+ except Exception:
2649
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
2650
+ cli_util.render_response(result, ctx)
2651
+ raise
2652
+ else:
2653
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
2654
+ cli_util.render_response(result, ctx)
2655
+
2656
+
2346
2657
  @certificate_authority_group.command(name=cli_util.override('certs_mgmt.update_certificate_authority_update_subordinate_ca_issued_by_internal_ca_config_details.command_name', 'update-certificate-authority-update-subordinate-ca-issued-by-internal-ca-config-details'), help=u"""Updates the properties of the specified certificate authority (CA). \n[Command Reference](updateCertificateAuthority)""")
2347
2658
  @cli_util.option('--certificate-authority-id', required=True, help=u"""The OCID of the certificate authority (CA).""")
2348
- @cli_util.option('--description', help=u"""A brief description of the CA.""")
2349
- @cli_util.option('--current-version-number', type=click.INT, help=u"""Makes this version the current version. This property cannot be updated in combination with any other properties.""")
2659
+ @cli_util.option('--description', help=u"""A brief description of the CA. Avoid entering confidential information.""")
2660
+ @cli_util.option('--current-version-number', type=click.INT, help=u"""Makes this version the current version. This property can't be updated in combination with any other properties.""")
2350
2661
  @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2662
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed key. Avoid entering confidential information.""")
2351
2663
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2352
2664
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2353
2665
  @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
@@ -2358,7 +2670,7 @@ This option is a JSON list with items of type CertificateAuthorityRule. For doc
2358
2670
  @cli_util.option('--certificate-authority-config-stage', type=custom_types.CliCaseInsensitiveChoice(["CURRENT", "PENDING"]), help=u"""The rotation state of the CA. The default is `PENDING`, meaning that the CA is staged and available for use. A CA version that you mark as `CURRENT` is currently in use, but you don't yet want to rotate it into current, active use. For example, you might create or update a CA and mark its rotation state as `PENDING` if you haven't yet updated the certificate on the target system.""")
2359
2671
  @cli_util.option('--certificate-authority-config-validity', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2360
2672
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2361
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2673
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2362
2674
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2363
2675
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
2364
2676
  @json_skeleton_utils.get_cli_json_input_option({'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-authority-config-validity': {'module': 'certificates_management', 'class': 'Validity'}})
@@ -2366,7 +2678,7 @@ This option is a JSON list with items of type CertificateAuthorityRule. For doc
2366
2678
  @click.pass_context
2367
2679
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-authority-config-validity': {'module': 'certificates_management', 'class': 'Validity'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
2368
2680
  @cli_util.wrap_exceptions
2369
- def update_certificate_authority_update_subordinate_ca_issued_by_internal_ca_config_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, certificate_authority_id, description, current_version_number, certificate_revocation_list_details, freeform_tags, defined_tags, certificate_authority_rules, if_match, certificate_authority_config_version_name, certificate_authority_config_stage, certificate_authority_config_validity):
2681
+ def update_certificate_authority_update_subordinate_ca_issued_by_internal_ca_config_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, certificate_authority_id, description, current_version_number, certificate_revocation_list_details, external_key_description, freeform_tags, defined_tags, certificate_authority_rules, if_match, certificate_authority_config_version_name, certificate_authority_config_stage, certificate_authority_config_validity):
2370
2682
 
2371
2683
  if isinstance(certificate_authority_id, six.string_types) and len(certificate_authority_id.strip()) == 0:
2372
2684
  raise click.UsageError('Parameter --certificate-authority-id cannot be whitespace or empty string')
@@ -2392,6 +2704,9 @@ def update_certificate_authority_update_subordinate_ca_issued_by_internal_ca_con
2392
2704
  if certificate_revocation_list_details is not None:
2393
2705
  _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
2394
2706
 
2707
+ if external_key_description is not None:
2708
+ _details['externalKeyDescription'] = external_key_description
2709
+
2395
2710
  if freeform_tags is not None:
2396
2711
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2397
2712
 
@@ -2446,9 +2761,10 @@ def update_certificate_authority_update_subordinate_ca_issued_by_internal_ca_con
2446
2761
 
2447
2762
  @certificate_authority_group.command(name=cli_util.override('certs_mgmt.update_certificate_authority_update_root_ca_by_generating_internally_config_details.command_name', 'update-certificate-authority-update-root-ca-by-generating-internally-config-details'), help=u"""Updates the properties of the specified certificate authority (CA). \n[Command Reference](updateCertificateAuthority)""")
2448
2763
  @cli_util.option('--certificate-authority-id', required=True, help=u"""The OCID of the certificate authority (CA).""")
2449
- @cli_util.option('--description', help=u"""A brief description of the CA.""")
2450
- @cli_util.option('--current-version-number', type=click.INT, help=u"""Makes this version the current version. This property cannot be updated in combination with any other properties.""")
2764
+ @cli_util.option('--description', help=u"""A brief description of the CA. Avoid entering confidential information.""")
2765
+ @cli_util.option('--current-version-number', type=click.INT, help=u"""Makes this version the current version. This property can't be updated in combination with any other properties.""")
2451
2766
  @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2767
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed key. Avoid entering confidential information.""")
2452
2768
  @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2453
2769
  @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2454
2770
  @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
@@ -2459,7 +2775,7 @@ This option is a JSON list with items of type CertificateAuthorityRule. For doc
2459
2775
  @cli_util.option('--certificate-authority-config-stage', type=custom_types.CliCaseInsensitiveChoice(["CURRENT", "PENDING"]), help=u"""The rotation state of the CA. The default is `PENDING`, meaning that the CA is staged and available for use. A CA version that you mark as `CURRENT` is currently in use, but you don't yet want to rotate it into current, active use. For example, you might create or update a CA and mark its rotation state as `PENDING` if you haven't yet updated the certificate on the target system.""")
2460
2776
  @cli_util.option('--certificate-authority-config-validity', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2461
2777
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2462
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2778
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2463
2779
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2464
2780
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
2465
2781
  @json_skeleton_utils.get_cli_json_input_option({'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-authority-config-validity': {'module': 'certificates_management', 'class': 'Validity'}})
@@ -2467,7 +2783,7 @@ This option is a JSON list with items of type CertificateAuthorityRule. For doc
2467
2783
  @click.pass_context
2468
2784
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-authority-config-validity': {'module': 'certificates_management', 'class': 'Validity'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
2469
2785
  @cli_util.wrap_exceptions
2470
- def update_certificate_authority_update_root_ca_by_generating_internally_config_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, certificate_authority_id, description, current_version_number, certificate_revocation_list_details, freeform_tags, defined_tags, certificate_authority_rules, if_match, certificate_authority_config_version_name, certificate_authority_config_stage, certificate_authority_config_validity):
2786
+ def update_certificate_authority_update_root_ca_by_generating_internally_config_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, certificate_authority_id, description, current_version_number, certificate_revocation_list_details, external_key_description, freeform_tags, defined_tags, certificate_authority_rules, if_match, certificate_authority_config_version_name, certificate_authority_config_stage, certificate_authority_config_validity):
2471
2787
 
2472
2788
  if isinstance(certificate_authority_id, six.string_types) and len(certificate_authority_id.strip()) == 0:
2473
2789
  raise click.UsageError('Parameter --certificate-authority-id cannot be whitespace or empty string')
@@ -2493,6 +2809,9 @@ def update_certificate_authority_update_root_ca_by_generating_internally_config_
2493
2809
  if certificate_revocation_list_details is not None:
2494
2810
  _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
2495
2811
 
2812
+ if external_key_description is not None:
2813
+ _details['externalKeyDescription'] = external_key_description
2814
+
2496
2815
  if freeform_tags is not None:
2497
2816
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2498
2817
 
@@ -2543,3 +2862,106 @@ def update_certificate_authority_update_root_ca_by_generating_internally_config_
2543
2862
  else:
2544
2863
  click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
2545
2864
  cli_util.render_response(result, ctx)
2865
+
2866
+
2867
+ @certificate_authority_group.command(name=cli_util.override('certs_mgmt.update_certificate_authority_update_subordinate_ca_managed_internally_issued_by_external_ca_config_details.command_name', 'update-certificate-authority-update-subordinate-ca-managed-internally-issued-by-external-ca-config-details'), help=u"""Updates the properties of the specified certificate authority (CA). \n[Command Reference](updateCertificateAuthority)""")
2868
+ @cli_util.option('--certificate-authority-id', required=True, help=u"""The OCID of the certificate authority (CA).""")
2869
+ @cli_util.option('--certificate-authority-config-action-details', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2870
+ @cli_util.option('--description', help=u"""A brief description of the CA. Avoid entering confidential information.""")
2871
+ @cli_util.option('--current-version-number', type=click.INT, help=u"""Makes this version the current version. This property can't be updated in combination with any other properties.""")
2872
+ @cli_util.option('--certificate-revocation-list-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2873
+ @cli_util.option('--external-key-description', help=u"""For externally managed CAs, a description of the externally managed key. Avoid entering confidential information.""")
2874
+ @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2875
+ @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2876
+ @cli_util.option('--certificate-authority-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of rules that control how the CA is used and managed.
2877
+
2878
+ This option is a JSON list with items of type CertificateAuthorityRule. For documentation on CertificateAuthorityRule please see our API reference: https://docs.cloud.oracle.com/api/#/en/certificatesmanagement/20210224/datatypes/CertificateAuthorityRule.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2879
+ @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.""")
2880
+ @cli_util.option('--certificate-authority-config-version-name', help=u"""The name of the CA version. When the value is not null, a name is unique across versions of a given CA.""")
2881
+ @cli_util.option('--certificate-authority-config-stage', type=custom_types.CliCaseInsensitiveChoice(["CURRENT", "PENDING"]), help=u"""The rotation state of the CA. The default is `PENDING`, meaning that the CA is staged and available for use. A CA version that you mark as `CURRENT` is currently in use, but you don't yet want to rotate it into current, active use. For example, you might create or update a CA and mark its rotation state as `PENDING` if you haven't yet updated the certificate on the target system.""")
2882
+ @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
2883
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", "PENDING_ACTIVATION"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
2884
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2885
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
2886
+ @json_skeleton_utils.get_cli_json_input_option({'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-authority-config-action-details': {'module': 'certificates_management', 'class': 'UpdateCertificateAuthorityActionDetails'}})
2887
+ @cli_util.help_option
2888
+ @click.pass_context
2889
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-revocation-list-details': {'module': 'certificates_management', 'class': 'CertificateRevocationListDetails'}, 'freeform-tags': {'module': 'certificates_management', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'certificates_management', 'class': 'dict(str, dict(str, object))'}, 'certificate-authority-rules': {'module': 'certificates_management', 'class': 'list[CertificateAuthorityRule]'}, 'certificate-authority-config-action-details': {'module': 'certificates_management', 'class': 'UpdateCertificateAuthorityActionDetails'}}, output_type={'module': 'certificates_management', 'class': 'CertificateAuthority'})
2890
+ @cli_util.wrap_exceptions
2891
+ def update_certificate_authority_update_subordinate_ca_managed_internally_issued_by_external_ca_config_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, certificate_authority_id, certificate_authority_config_action_details, description, current_version_number, certificate_revocation_list_details, external_key_description, freeform_tags, defined_tags, certificate_authority_rules, if_match, certificate_authority_config_version_name, certificate_authority_config_stage):
2892
+
2893
+ if isinstance(certificate_authority_id, six.string_types) and len(certificate_authority_id.strip()) == 0:
2894
+ raise click.UsageError('Parameter --certificate-authority-id cannot be whitespace or empty string')
2895
+ if not force:
2896
+ if certificate_revocation_list_details or freeform_tags or defined_tags or certificate_authority_rules:
2897
+ if not click.confirm("WARNING: Updates to certificate-revocation-list-details and freeform-tags and defined-tags and certificate-authority-rules will replace any existing values. Are you sure you want to continue?"):
2898
+ ctx.abort()
2899
+
2900
+ kwargs = {}
2901
+ if if_match is not None:
2902
+ kwargs['if_match'] = if_match
2903
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
2904
+
2905
+ _details = {}
2906
+ _details['certificateAuthorityConfig'] = {}
2907
+ _details['certificateAuthorityConfig']['actionDetails'] = cli_util.parse_json_parameter("certificate_authority_config_action_details", certificate_authority_config_action_details)
2908
+
2909
+ if description is not None:
2910
+ _details['description'] = description
2911
+
2912
+ if current_version_number is not None:
2913
+ _details['currentVersionNumber'] = current_version_number
2914
+
2915
+ if certificate_revocation_list_details is not None:
2916
+ _details['certificateRevocationListDetails'] = cli_util.parse_json_parameter("certificate_revocation_list_details", certificate_revocation_list_details)
2917
+
2918
+ if external_key_description is not None:
2919
+ _details['externalKeyDescription'] = external_key_description
2920
+
2921
+ if freeform_tags is not None:
2922
+ _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2923
+
2924
+ if defined_tags is not None:
2925
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
2926
+
2927
+ if certificate_authority_rules is not None:
2928
+ _details['certificateAuthorityRules'] = cli_util.parse_json_parameter("certificate_authority_rules", certificate_authority_rules)
2929
+
2930
+ if certificate_authority_config_version_name is not None:
2931
+ _details['certificateAuthorityConfig']['versionName'] = certificate_authority_config_version_name
2932
+
2933
+ if certificate_authority_config_stage is not None:
2934
+ _details['certificateAuthorityConfig']['stage'] = certificate_authority_config_stage
2935
+
2936
+ _details['certificateAuthorityConfig']['configType'] = 'SUBORDINATE_CA_MANAGED_INTERNALLY_ISSUED_BY_EXTERNAL_CA'
2937
+
2938
+ client = cli_util.build_client('certificates_management', 'certificates_management', ctx)
2939
+ result = client.update_certificate_authority(
2940
+ certificate_authority_id=certificate_authority_id,
2941
+ update_certificate_authority_details=_details,
2942
+ **kwargs
2943
+ )
2944
+ if wait_for_state:
2945
+
2946
+ if hasattr(client, 'get_certificate_authority') and callable(getattr(client, 'get_certificate_authority')):
2947
+ try:
2948
+ wait_period_kwargs = {}
2949
+ if max_wait_seconds is not None:
2950
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
2951
+ if wait_interval_seconds is not None:
2952
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
2953
+
2954
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
2955
+ result = oci.wait_until(client, client.get_certificate_authority(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
2956
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
2957
+ # If we fail, we should show an error, but we should still provide the information to the customer
2958
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
2959
+ cli_util.render_response(result, ctx)
2960
+ sys.exit(2)
2961
+ except Exception:
2962
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
2963
+ cli_util.render_response(result, ctx)
2964
+ raise
2965
+ else:
2966
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
2967
+ cli_util.render_response(result, ctx)