oci-cli 3.63.1__py3-none-any.whl → 3.63.3__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.
- oci_cli/bin/multicloud.psm1 +53 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-standby-database.txt +114 -1
- oci_cli/help_text_producer/data_files/text/cmdref/email-data-plane/email-raw-submitted-response/submit-raw-email.txt +128 -0
- oci_cli/help_text_producer/data_files/text/cmdref/email-data-plane/email-raw-submitted-response.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/email-data-plane.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log-entry/list-logs.txt → work-request-log/list.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/metadata/external-location-mapping-metadatum-summary-collection/list-external-location-mapping-metadata.txt +167 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/metadata/external-location-mapping-metadatum-summary-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/metadata/external-location-summaries-metadatum-summary-collection/list-external-location-summaries-metadata.txt +162 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/metadata/external-location-summaries-metadatum-summary-collection.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/metadata/external-locations-metadatum-collection/list-external-location-details-metadata.txt +216 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/metadata/external-locations-metadatum-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/metadata.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/multi-clouds-metadata/multi-cloud-metadata/get.txt +96 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/multi-clouds-metadata/multi-cloud-metadata-collection/list-multi-cloud-metadata.txt +133 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/multi-clouds-metadata/multi-cloud-metadata-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/multi-clouds-metadata/multi-cloud-metadata.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/multi-clouds-metadata.txt +22 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-network-anchor/network-anchor/get.txt +111 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-network-anchor/network-anchor-collection/list-network-anchors.txt +180 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-network-anchor/network-anchor-collection.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-network-anchor/network-anchor.txt +19 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-network-anchor.txt +22 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-resource-anchor/resource-anchor/get.txt +106 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-resource-anchor/resource-anchor-collection/list-resource-anchors.txt +172 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-resource-anchor/resource-anchor-collection.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-resource-anchor/resource-anchor.txt +19 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud/omhub-resource-anchor.txt +22 -0
- oci_cli/help_text_producer/data_files/text/cmdref/multicloud.txt +58 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error/{list-errors.txt → list.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list-errors.txt → list.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/organizations/{work-request-log → work-request-log-entry}/list.txt +1 -19
- oci_cli/help_text_producer/data_files/text/cmdref/{governance-rules-control-plane/work-request → organizations}/work-request-log-entry.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/session/authenticate.txt +3 -3
- oci_cli/help_text_producer/data_files/text/index.txt +2 -0
- oci_cli/service_mapping.py +5 -0
- oci_cli/version.py +1 -1
- {oci_cli-3.63.1.dist-info → oci_cli-3.63.3.dist-info}/METADATA +2 -2
- {oci_cli-3.63.1.dist-info → oci_cli-3.63.3.dist-info}/RECORD +75 -27
- services/database/src/oci_cli_database/database_cli_extended.py +16 -1
- services/email_data_plane/src/oci_cli_email_dp/generated/emaildp_cli.py +41 -0
- services/multicloud/__init__.py +4 -0
- services/multicloud/src/__init__.py +4 -0
- services/multicloud/src/oci_cli_metadata/__init__.py +4 -0
- services/multicloud/src/oci_cli_metadata/generated/__init__.py +4 -0
- services/multicloud/src/oci_cli_metadata/generated/client_mappings.py +14 -0
- services/multicloud/src/oci_cli_metadata/generated/metadata_cli.py +239 -0
- services/multicloud/src/oci_cli_multi_clouds_metadata/__init__.py +4 -0
- services/multicloud/src/oci_cli_multi_clouds_metadata/generated/__init__.py +4 -0
- services/multicloud/src/oci_cli_multi_clouds_metadata/generated/client_mappings.py +14 -0
- services/multicloud/src/oci_cli_multi_clouds_metadata/generated/multicloudsmetadata_cli.py +117 -0
- services/multicloud/src/oci_cli_multicloud/__init__.py +4 -0
- services/multicloud/src/oci_cli_multicloud/generated/__init__.py +4 -0
- services/multicloud/src/oci_cli_multicloud/generated/multicloud_service_cli.py +14 -0
- services/multicloud/src/oci_cli_omhub_network_anchor/__init__.py +4 -0
- services/multicloud/src/oci_cli_omhub_network_anchor/generated/__init__.py +4 -0
- services/multicloud/src/oci_cli_omhub_network_anchor/generated/client_mappings.py +14 -0
- services/multicloud/src/oci_cli_omhub_network_anchor/generated/omhubnetworkanchor_cli.py +150 -0
- services/multicloud/src/oci_cli_omhub_resource_anchor/__init__.py +4 -0
- services/multicloud/src/oci_cli_omhub_resource_anchor/generated/__init__.py +4 -0
- services/multicloud/src/oci_cli_omhub_resource_anchor/generated/client_mappings.py +14 -0
- services/multicloud/src/oci_cli_omhub_resource_anchor/generated/omhubresourceanchor_cli.py +143 -0
- services/multicloud/tests/__init__.py +4 -0
- /oci_cli/help_text_producer/data_files/text/cmdref/{organizations → governance-rules-control-plane/work-request}/work-request-log.txt +0 -0
- {oci_cli-3.63.1.dist-info → oci_cli-3.63.3.dist-info}/LICENSE.txt +0 -0
- {oci_cli-3.63.1.dist-info → oci_cli-3.63.3.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
- {oci_cli-3.63.1.dist-info → oci_cli-3.63.3.dist-info}/WHEEL +0 -0
- {oci_cli-3.63.1.dist-info → oci_cli-3.63.3.dist-info}/entry_points.txt +0 -0
- {oci_cli-3.63.1.dist-info → oci_cli-3.63.3.dist-info}/top_level.txt +0 -0
|
@@ -881,6 +881,12 @@ def create_database_from_backup(ctx, wait_for_state, max_wait_seconds, wait_inte
|
|
|
881
881
|
if 'sid_prefix' in kwargs and kwargs['sid_prefix']:
|
|
882
882
|
create_database_details.sid_prefix = kwargs['sid_prefix']
|
|
883
883
|
|
|
884
|
+
if 'freeform_tags' in kwargs and kwargs['freeform_tags']:
|
|
885
|
+
create_database_details.freeform_tags = cli_util.parse_json_parameter('freeform_tags', kwargs['freeform_tags'])
|
|
886
|
+
|
|
887
|
+
if 'defined_tags' in kwargs and kwargs['defined_tags']:
|
|
888
|
+
create_database_details.defined_tags = cli_util.parse_json_parameter('defined_tags', kwargs['defined_tags'])
|
|
889
|
+
|
|
884
890
|
if 'database_software_image_id' in kwargs and kwargs['database_software_image_id']:
|
|
885
891
|
create_db_home_with_system_details.database_software_image_id = kwargs['database_software_image_id']
|
|
886
892
|
|
|
@@ -4058,7 +4064,7 @@ cli_util.rename_command(database_cli, database_cli.database_group, database_cli.
|
|
|
4058
4064
|
# database_cli.database_group.commands.pop(database_cli.create_database_create_stand_by_database_details.name)
|
|
4059
4065
|
|
|
4060
4066
|
|
|
4061
|
-
|
|
4067
|
+
@cli_util.copy_params_from_generated_command(database_cli.create_database_create_stand_by_database_details, params_to_exclude=['database'])
|
|
4062
4068
|
@database_cli.database_group.command(name='create-standby-database', help="""Creates a new standby database for the given source database id.""")
|
|
4063
4069
|
@cli_util.option('--database-admin-password', required=True, help=u"""The administrator password of the primary database in this Data Guard association.
|
|
4064
4070
|
|
|
@@ -4076,8 +4082,11 @@ For more information, see [Redo Transport Services] in the Oracle Data Guard doc
|
|
|
4076
4082
|
@cli_util.option('--source-database-id', required=True, help=u"""The [OCID] of the source (primary) database for the Data Guard group.""")
|
|
4077
4083
|
@cli_util.option('--source-tde-wallet-password', help=u"""The existing TDE wallet password of the source (primary) database.""")
|
|
4078
4084
|
@cli_util.option('--sid-prefix', help=u"""Specifies a prefix for the `Oracle SID` of the standby database to be created.""")
|
|
4085
|
+
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].\n\nExample: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
4086
|
+
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
4079
4087
|
@cli_util.help_option
|
|
4080
4088
|
@click.pass_context
|
|
4089
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'database', 'class': 'DatabaseSummary'})
|
|
4081
4090
|
@cli_util.wrap_exceptions
|
|
4082
4091
|
def create_standby_database_for_multiple_standby(ctx, wait_for_state, max_wait_seconds, wait_interval_seconds, **kwargs):
|
|
4083
4092
|
|
|
@@ -4112,6 +4121,12 @@ def create_standby_database_for_multiple_standby(ctx, wait_for_state, max_wait_s
|
|
|
4112
4121
|
if 'sid_prefix' in kwargs and kwargs['sid_prefix']:
|
|
4113
4122
|
create_standby_details.sid_prefix = kwargs['sid_prefix']
|
|
4114
4123
|
|
|
4124
|
+
if 'freeform_tags' in kwargs and kwargs['freeform_tags']:
|
|
4125
|
+
create_standby_details.freeform_tags = cli_util.parse_json_parameter('freeform_tags', kwargs['freeform_tags'])
|
|
4126
|
+
|
|
4127
|
+
if 'defined_tags' in kwargs and kwargs['defined_tags']:
|
|
4128
|
+
create_standby_details.defined_tags = cli_util.parse_json_parameter('defined_tags', kwargs['defined_tags'])
|
|
4129
|
+
|
|
4115
4130
|
_details['database'] = create_standby_details
|
|
4116
4131
|
|
|
4117
4132
|
if 'db_version' in kwargs and kwargs['db_version']:
|
|
@@ -29,7 +29,14 @@ def email_submitted_response_group():
|
|
|
29
29
|
pass
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
@click.command(cli_util.override('email_data_plane.email_raw_submitted_response_group.command_name', 'email-raw-submitted-response'), cls=CommandGroupWithAlias, help="""Response object that is returned to sender upon successfully submitting the email request.""")
|
|
33
|
+
@cli_util.help_option_group
|
|
34
|
+
def email_raw_submitted_response_group():
|
|
35
|
+
pass
|
|
36
|
+
|
|
37
|
+
|
|
32
38
|
email_data_plane_root_group.add_command(email_submitted_response_group)
|
|
39
|
+
email_data_plane_root_group.add_command(email_raw_submitted_response_group)
|
|
33
40
|
|
|
34
41
|
|
|
35
42
|
@email_submitted_response_group.command(name=cli_util.override('email_data_plane.submit_email.command_name', 'submit-email'), help=u"""Submits a formatted email. \n[Command Reference](submitEmail)""")
|
|
@@ -79,3 +86,37 @@ def submit_email(ctx, from_json, sender, recipients, subject, message_id, body_h
|
|
|
79
86
|
**kwargs
|
|
80
87
|
)
|
|
81
88
|
cli_util.render_response(result, ctx)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@email_raw_submitted_response_group.command(name=cli_util.override('email_data_plane.submit_raw_email.command_name', 'submit-raw-email'), help=u"""Submits a raw email. \n[Command Reference](submitRawEmail)""")
|
|
92
|
+
@cli_util.option('--content-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["message/rfc822", "message/global"]), help=u"""The media type of the body.""")
|
|
93
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment that contains the approved sender resource.""")
|
|
94
|
+
@cli_util.option('--sender', required=True, help=u"""The envelope and the header from email address, that is sending the email. Email address must be an approved sender.""")
|
|
95
|
+
@cli_util.option('--recipients', required=True, multiple=True, help=u"""The destination for the email, all recipients including to, cc and bcc addresses.""")
|
|
96
|
+
@cli_util.option('--raw-message', required=True, help=u"""This should be formatted in valid MIME format. Message can include attachments. MIME libraries should be used to convert the content into the appropriate format.""")
|
|
97
|
+
@cli_util.option('--content-length', type=click.INT, help=u"""The content length of the body.""")
|
|
98
|
+
@json_skeleton_utils.get_cli_json_input_option({'recipients': {'module': 'email_data_plane', 'class': ''}})
|
|
99
|
+
@cli_util.help_option
|
|
100
|
+
@click.pass_context
|
|
101
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'recipients': {'module': 'email_data_plane', 'class': ''}}, output_type={'module': 'email_data_plane', 'class': 'EmailRawSubmittedResponse'})
|
|
102
|
+
@cli_util.wrap_exceptions
|
|
103
|
+
def submit_raw_email(ctx, from_json, content_type, compartment_id, sender, recipients, raw_message, content_length):
|
|
104
|
+
|
|
105
|
+
kwargs = {}
|
|
106
|
+
if content_length is not None:
|
|
107
|
+
kwargs['content_length'] = content_length
|
|
108
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
109
|
+
|
|
110
|
+
# do not automatically retry operations with binary inputs
|
|
111
|
+
kwargs['retry_strategy'] = oci.retry.NoneRetryStrategy()
|
|
112
|
+
|
|
113
|
+
client = cli_util.build_client('email_data_plane', 'email_dp', ctx)
|
|
114
|
+
result = client.submit_raw_email(
|
|
115
|
+
content_type=content_type,
|
|
116
|
+
compartment_id=compartment_id,
|
|
117
|
+
sender=sender,
|
|
118
|
+
recipients=recipients,
|
|
119
|
+
raw_message=raw_message,
|
|
120
|
+
**kwargs
|
|
121
|
+
)
|
|
122
|
+
cli_util.render_response(result, ctx)
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
5
|
+
|
|
6
|
+
import oci
|
|
7
|
+
from oci_cli.cli_clients import CLIENT_MAP
|
|
8
|
+
from oci_cli.cli_clients import MODULE_TO_TYPE_MAPPINGS
|
|
9
|
+
from oci.multicloud import MetadataClient
|
|
10
|
+
|
|
11
|
+
MODULE_TO_TYPE_MAPPINGS["multicloud"] = oci.multicloud.models.multicloud_type_mapping
|
|
12
|
+
if CLIENT_MAP.get("multicloud") is None:
|
|
13
|
+
CLIENT_MAP["multicloud"] = {}
|
|
14
|
+
CLIENT_MAP["multicloud"]["metadata"] = MetadataClient
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
5
|
+
|
|
6
|
+
from __future__ import print_function
|
|
7
|
+
import click
|
|
8
|
+
import oci # noqa: F401
|
|
9
|
+
import six # noqa: F401
|
|
10
|
+
import sys # noqa: F401
|
|
11
|
+
from oci_cli import cli_constants # noqa: F401
|
|
12
|
+
from oci_cli import cli_util
|
|
13
|
+
from oci_cli import json_skeleton_utils
|
|
14
|
+
from oci_cli import custom_types # noqa: F401
|
|
15
|
+
from oci_cli.aliasing import CommandGroupWithAlias
|
|
16
|
+
from services.multicloud.src.oci_cli_multicloud.generated import multicloud_service_cli
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@click.command(cli_util.override('metadata.metadata_root_group.command_name', 'metadata'), cls=CommandGroupWithAlias, help=cli_util.override('metadata.metadata_root_group.help', """Use the Oracle Multicloud API to retrieve resource anchors and network anchors, and the metadata mappings related a Cloud Service Provider. For more information, see <link to docs>."""), short_help=cli_util.override('metadata.metadata_root_group.short_help', """Oracle Multicloud API"""))
|
|
20
|
+
@cli_util.help_option_group
|
|
21
|
+
def metadata_root_group():
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@click.command(cli_util.override('metadata.external_location_summaries_metadatum_summary_collection_group.command_name', 'external-location-summaries-metadatum-summary-collection'), cls=CommandGroupWithAlias, help="""External location summary information from OCI primitives to any CSP across all regions""")
|
|
26
|
+
@cli_util.help_option_group
|
|
27
|
+
def external_location_summaries_metadatum_summary_collection_group():
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@click.command(cli_util.override('metadata.external_location_mapping_metadatum_summary_collection_group.command_name', 'external-location-mapping-metadatum-summary-collection'), cls=CommandGroupWithAlias, help="""External location information from OCI primitives to a CSP""")
|
|
32
|
+
@cli_util.help_option_group
|
|
33
|
+
def external_location_mapping_metadatum_summary_collection_group():
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@click.command(cli_util.override('metadata.external_locations_metadatum_collection_group.command_name', 'external-locations-metadatum-collection'), cls=CommandGroupWithAlias, help="""External location information from OCI primitives to any CSP""")
|
|
38
|
+
@cli_util.help_option_group
|
|
39
|
+
def external_locations_metadatum_collection_group():
|
|
40
|
+
pass
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
multicloud_service_cli.multicloud_service_group.add_command(metadata_root_group)
|
|
44
|
+
metadata_root_group.add_command(external_location_summaries_metadatum_summary_collection_group)
|
|
45
|
+
metadata_root_group.add_command(external_location_mapping_metadatum_summary_collection_group)
|
|
46
|
+
metadata_root_group.add_command(external_locations_metadatum_collection_group)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@external_locations_metadatum_collection_group.command(name=cli_util.override('metadata.list_external_location_details_metadata.command_name', 'list-external-location-details-metadata'), help=u"""List externalLocationDetail metadata from OCI to Cloud Service Provider for regions, Availability Zones, and Cluster Placement Group ID. examples: application-json: | [ { \"externalLocation\": { \"cspRegion\": \"East US\", \"cspPhysicalAz\": \"az1-xyz\", \"cspPhysicalAzDisplayName\": \"(US) East US 2\", \"cspLogicalAz\": \"az1\", \"serviceName\": \"ORACLEDBATAZURE\", \"cspZoneKeyReferenceId\": { \"keyName\": \"AzureSubscriptionId or AwsAccountId, GcpProjectName\", \"keyValue\": \"azure-subscriptionId-1 or aws-account-id-1, gcp-project-id-1\" } }, \"ociPhysicalAd\": \"ad1-xyb\", \"ociLogicalAd\": \"ad2\", \"ociRegion\": \"us-ashburn-1\", \"cpgId\": \"cpg-1\" }, { \"externalLocation\": { \"cspRegion\": \"East US\", \"cspPhysicalAz\": \"az2-abc\", \"cspPhysicalAzDisplayName\": \"(US) East US 2\", \"cspLogicalAz\": \"az2\", \"serviceName\": \"ORACLEDBATAZURE\", \"cspZoneKeyReferenceId\": { \"keyName\": \"AzureSubscriptionId or AwsAccountId, GcpProjectName\", \"keyValue\": \"azure-subscriptionId-2 or aws-account-id-2, gcp-project-id-2\" } }, \"ociPhysicalAd\": \"ad2-xby\", \"ociLogicalAd\": \"ad1\", \"ociRegion\": \"us-ashburn-1\", \"cpgId\": \"cpg-2\" }, { \"externalLocation\": { \"cspRegion\": \"East US\", \"cspPhysicalAz\": \"az3-abz\", \"cspPhysicalAzDisplayName\": \"(US) East US 2\", \"cspLogicalAz\": \"az3\", \"serviceName\": \"ORACLEDBATAZURE\", \"cspZoneKeyReferenceId\": { \"keyName\": \"AzureSubscriptionId or AwsAccountId, GcpProjectName\", \"keyValue\": \"azure-subscriptionId-3 or aws-account-id-3, gcp-project-id-3\" } }, \"ociPhysicalAd\": \"ad3-cde\", \"ociLogicalAd\": \"ad3\", \"ociRegion\": \"us-ashburn-1\", \"cpgId\": \"cpg-3\" }, { \"externalLocation\": { \"cspRegion\": \"East US 2\", \"cspPhysicalAz\": \"az1-def\", \"cspPhysicalAzDisplayName\": \"(US) East US 2\", \"cspLogicalAz\": \"az1\", \"serviceName\": \"ORACLEDBATAZURE\", \"cspZoneKeyReferenceId\": { \"keyName\": \"AzureSubscriptionId or AwsAccountId, GcpProjectName\", \"keyValue\": \"azure-subscriptionId-4 or aws-account-id-4, gcp-project-id-4\" } }, \"ociPhysicalAd\": \"ad1-bce\", \"ociLogicalAd\": \"ad2\", \"ociRegion\": \"us-ashburn-1\", \"cpgId\": \"cpg-4\" }, { \"externalLocation\": { \"cspRegion\": \"East US 2\", \"cspPhysicalAz\": \"az2-uvw\", \"cspPhysicalAzDisplayName\": \"(US) East US 2\", \"cspLogicalAz\": \"az2\", \"serviceName\": \"ORACLEDBATAZURE\", \"cspZoneKeyReferenceId\": { \"keyName\": \"AzureSubscriptionId or AwsAccountId, GcpProjectName\", \"keyValue\": \"azure-subscriptionId-3 or aws-account-id-3, gcp-project-id-3\" } }, \"ociPhysicalAd\": \"ad2-ftc\", \"ociLogicalAd\": \"ad1\", \"ociRegion\": \"us-ashburn-1\", \"cpgId\": \"cpg-5\" }, { \"externalLocation\": { \"cspRegion\": \"East US 2\", \"cspPhysicalAz\": \"az3-uvw\", \"cspPhysicalAzDisplayName\": \"(US) East US 2\", \"cspLogicalAz\": \"az3\", \"serviceName\": \"ORACLEDBATAZURE\", \"cspZoneKeyReferenceId\": { \"keyName\": \"AzureSubscriptionId or AwsAccountId, GcpProjectName\", \"keyValue\": \"azure-subscriptionId-3 or aws-account-id-3, gcp-project-id-3\" } }, \"ociPhysicalAd\": \"ad3-stc\", \"ociLogicalAd\": \"ad3\", \"ociRegion\": \"us-ashburn-1\", \"cpgId\": \"cpg-6\" } ] \n[Command Reference](listExternalLocationDetailsMetadata)""")
|
|
50
|
+
@cli_util.option('--subscription-id', required=True, help=u"""The [OCID] of the subscription in which to list resources.""")
|
|
51
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
52
|
+
@cli_util.option('--subscription-service-name', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLEDBATAZURE", "ORACLEDBATGOOGLE", "ORACLEDBATAWS"]), help=u"""The subscription service name values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]""")
|
|
53
|
+
@cli_util.option('--entity-type', type=custom_types.CliCaseInsensitiveChoice(["dbsystem"]), help=u"""The resource type query (i.e. dbsystem, instance etc.)""")
|
|
54
|
+
@cli_util.option('--linked-compartment-id', help=u"""The [OCID] of the compartment in which linked to Resource.""")
|
|
55
|
+
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
56
|
+
@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
57
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
|
|
58
|
+
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending. Default order for `displayName` is ascending.""")
|
|
59
|
+
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
|
|
60
|
+
@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
|
|
61
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
62
|
+
@cli_util.help_option
|
|
63
|
+
@click.pass_context
|
|
64
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'multicloud', 'class': 'ExternalLocationsMetadatumCollection'})
|
|
65
|
+
@cli_util.wrap_exceptions
|
|
66
|
+
def list_external_location_details_metadata(ctx, from_json, all_pages, page_size, subscription_id, compartment_id, subscription_service_name, entity_type, linked_compartment_id, limit, page, sort_order, sort_by):
|
|
67
|
+
|
|
68
|
+
if all_pages and limit:
|
|
69
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
70
|
+
|
|
71
|
+
kwargs = {}
|
|
72
|
+
if entity_type is not None:
|
|
73
|
+
kwargs['entity_type'] = entity_type
|
|
74
|
+
if linked_compartment_id is not None:
|
|
75
|
+
kwargs['linked_compartment_id'] = linked_compartment_id
|
|
76
|
+
if limit is not None:
|
|
77
|
+
kwargs['limit'] = limit
|
|
78
|
+
if page is not None:
|
|
79
|
+
kwargs['page'] = page
|
|
80
|
+
if sort_order is not None:
|
|
81
|
+
kwargs['sort_order'] = sort_order
|
|
82
|
+
if sort_by is not None:
|
|
83
|
+
kwargs['sort_by'] = sort_by
|
|
84
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
85
|
+
client = cli_util.build_client('multicloud', 'metadata', ctx)
|
|
86
|
+
if all_pages:
|
|
87
|
+
if page_size:
|
|
88
|
+
kwargs['limit'] = page_size
|
|
89
|
+
|
|
90
|
+
result = cli_util.list_call_get_all_results(
|
|
91
|
+
client.list_external_location_details_metadata,
|
|
92
|
+
subscription_id=subscription_id,
|
|
93
|
+
compartment_id=compartment_id,
|
|
94
|
+
subscription_service_name=subscription_service_name,
|
|
95
|
+
**kwargs
|
|
96
|
+
)
|
|
97
|
+
elif limit is not None:
|
|
98
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
99
|
+
client.list_external_location_details_metadata,
|
|
100
|
+
limit,
|
|
101
|
+
page_size,
|
|
102
|
+
subscription_id=subscription_id,
|
|
103
|
+
compartment_id=compartment_id,
|
|
104
|
+
subscription_service_name=subscription_service_name,
|
|
105
|
+
**kwargs
|
|
106
|
+
)
|
|
107
|
+
else:
|
|
108
|
+
result = client.list_external_location_details_metadata(
|
|
109
|
+
subscription_id=subscription_id,
|
|
110
|
+
compartment_id=compartment_id,
|
|
111
|
+
subscription_service_name=subscription_service_name,
|
|
112
|
+
**kwargs
|
|
113
|
+
)
|
|
114
|
+
cli_util.render_response(result, ctx)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@external_location_mapping_metadatum_summary_collection_group.command(name=cli_util.override('metadata.list_external_location_mapping_metadata.command_name', 'list-external-location-mapping-metadata'), help=u"""List externalLocation metadata from OCI to the Cloud Service Provider for regions, Physical Availability Zones. examples: application-json: | [ { \"externalLocation\": { \"cspRegion\": \"eastus\", \"cspPhysicalAz\": \"eastus-az1\", \"cspPhysicalAzDisplayName\": \"(US) East US 1\", \"serviceName\": \"ORACLEDBATAZURE\" }, \"ociPhysicalAd\": \"iad-ad-1\", \"ociLogicalAd\": \"ad1\", \"ociRegion\": \"us-ashburn-1\" }, { \"externalLocation\": { \"cspRegion\": \"eastus\", \"cspPhysicalAz\": \"eastus-az1\", \"cspPhysicalAzDisplayName\": \"(US) East US 1\", \"serviceName\": \"ORACLEDBATAZURE\" }, \"ociPhysicalAd\": \"iad-ad-1\", \"ociLogicalAd\": \"ad1\", \"ociRegion\": \"us-ashburn-1\" }, { \"externalLocation\": { \"cspRegion\": \"eastus2\", \"cspPhysicalAz\": \"eastus2-az3\", \"cspPhysicalAzDisplayName\": \"(US) East US 1\", \"serviceName\": \"ORACLEDBATAZURE\" }, \"ociPhysicalAd\": \"iad-ad-2\", \"ociLogicalAd\": \"ad1\", \"ociRegion\": \"us-ashburn-1\" }, { \"externalLocation\": { \"cspRegion\": \"eastus\", \"cspPhysicalAz\": \"eastus-az3\" \"cspPhysicalAzDisplayName\": \"(US) East US 1\", \"serviceName\": \"ORACLEDBATAZURE\" }, \"ociPhysicalAd\": \"iad-ad-333\", \"ociLogicalAd\": \"ad1\", \"ociRegion\": \"us-ashburn-1\" } ] \n[Command Reference](listExternalLocationMappingMetadata)""")
|
|
118
|
+
@cli_util.option('--subscription-service-name', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLEDBATAZURE", "ORACLEDBATGOOGLE", "ORACLEDBATAWS"]), multiple=True, help=u"""The subscription type values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]""")
|
|
119
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
120
|
+
@cli_util.option('--subscription-id', help=u"""The [OCID] of the subscription in which to list resources.""")
|
|
121
|
+
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
122
|
+
@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
123
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
|
|
124
|
+
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending. Default order for `displayName` is ascending.""")
|
|
125
|
+
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
|
|
126
|
+
@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
|
|
127
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
128
|
+
@cli_util.help_option
|
|
129
|
+
@click.pass_context
|
|
130
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'multicloud', 'class': 'ExternalLocationMappingMetadatumSummaryCollection'})
|
|
131
|
+
@cli_util.wrap_exceptions
|
|
132
|
+
def list_external_location_mapping_metadata(ctx, from_json, all_pages, page_size, subscription_service_name, compartment_id, subscription_id, limit, page, sort_order, sort_by):
|
|
133
|
+
|
|
134
|
+
if all_pages and limit:
|
|
135
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
136
|
+
|
|
137
|
+
kwargs = {}
|
|
138
|
+
if subscription_id is not None:
|
|
139
|
+
kwargs['subscription_id'] = subscription_id
|
|
140
|
+
if limit is not None:
|
|
141
|
+
kwargs['limit'] = limit
|
|
142
|
+
if page is not None:
|
|
143
|
+
kwargs['page'] = page
|
|
144
|
+
if sort_order is not None:
|
|
145
|
+
kwargs['sort_order'] = sort_order
|
|
146
|
+
if sort_by is not None:
|
|
147
|
+
kwargs['sort_by'] = sort_by
|
|
148
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
149
|
+
client = cli_util.build_client('multicloud', 'metadata', ctx)
|
|
150
|
+
if all_pages:
|
|
151
|
+
if page_size:
|
|
152
|
+
kwargs['limit'] = page_size
|
|
153
|
+
|
|
154
|
+
result = cli_util.list_call_get_all_results(
|
|
155
|
+
client.list_external_location_mapping_metadata,
|
|
156
|
+
subscription_service_name=subscription_service_name,
|
|
157
|
+
compartment_id=compartment_id,
|
|
158
|
+
**kwargs
|
|
159
|
+
)
|
|
160
|
+
elif limit is not None:
|
|
161
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
162
|
+
client.list_external_location_mapping_metadata,
|
|
163
|
+
limit,
|
|
164
|
+
page_size,
|
|
165
|
+
subscription_service_name=subscription_service_name,
|
|
166
|
+
compartment_id=compartment_id,
|
|
167
|
+
**kwargs
|
|
168
|
+
)
|
|
169
|
+
else:
|
|
170
|
+
result = client.list_external_location_mapping_metadata(
|
|
171
|
+
subscription_service_name=subscription_service_name,
|
|
172
|
+
compartment_id=compartment_id,
|
|
173
|
+
**kwargs
|
|
174
|
+
)
|
|
175
|
+
cli_util.render_response(result, ctx)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
@external_location_summaries_metadatum_summary_collection_group.command(name=cli_util.override('metadata.list_external_location_summaries_metadata.command_name', 'list-external-location-summaries-metadata'), help=u"""List externalLocationSummary metadata from OCI Region to the Cloud Service Provider region across all regions. examples: application-json: | [ { \"externalLocation\": { \"cspRegion\": \"East US\" }, \"ociRegion\": \"us-ashburn-1\" }, { \"externalLocation\": { \"cspRegion\": \"East US 2\" }, \"ociRegion\": \"us-ashburn-1\" }, { \"externalLocation\": { \"cspRegion\": \"Germany West Central\" }, \"ociRegion\": \"eu-frankfurt-1\", } ] \n[Command Reference](listExternalLocationSummariesMetadata)""")
|
|
179
|
+
@cli_util.option('--subscription-service-name', required=True, type=custom_types.CliCaseInsensitiveChoice(["ORACLEDBATAZURE", "ORACLEDBATGOOGLE", "ORACLEDBATAWS"]), help=u"""The subscription service name values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]""")
|
|
180
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
181
|
+
@cli_util.option('--subscription-id', help=u"""The [OCID] of the subscription in which to list resources.""")
|
|
182
|
+
@cli_util.option('--entity-type', type=custom_types.CliCaseInsensitiveChoice(["dbsystem"]), help=u"""The resource type query (i.e. dbsystem, instance etc.)""")
|
|
183
|
+
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
184
|
+
@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
185
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
|
|
186
|
+
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending. Default order for `displayName` is ascending.""")
|
|
187
|
+
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
|
|
188
|
+
@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
|
|
189
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
190
|
+
@cli_util.help_option
|
|
191
|
+
@click.pass_context
|
|
192
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'multicloud', 'class': 'ExternalLocationSummariesMetadatumSummaryCollection'})
|
|
193
|
+
@cli_util.wrap_exceptions
|
|
194
|
+
def list_external_location_summaries_metadata(ctx, from_json, all_pages, page_size, subscription_service_name, compartment_id, subscription_id, entity_type, limit, page, sort_order, sort_by):
|
|
195
|
+
|
|
196
|
+
if all_pages and limit:
|
|
197
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
198
|
+
|
|
199
|
+
kwargs = {}
|
|
200
|
+
if subscription_id is not None:
|
|
201
|
+
kwargs['subscription_id'] = subscription_id
|
|
202
|
+
if entity_type is not None:
|
|
203
|
+
kwargs['entity_type'] = entity_type
|
|
204
|
+
if limit is not None:
|
|
205
|
+
kwargs['limit'] = limit
|
|
206
|
+
if page is not None:
|
|
207
|
+
kwargs['page'] = page
|
|
208
|
+
if sort_order is not None:
|
|
209
|
+
kwargs['sort_order'] = sort_order
|
|
210
|
+
if sort_by is not None:
|
|
211
|
+
kwargs['sort_by'] = sort_by
|
|
212
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
213
|
+
client = cli_util.build_client('multicloud', 'metadata', ctx)
|
|
214
|
+
if all_pages:
|
|
215
|
+
if page_size:
|
|
216
|
+
kwargs['limit'] = page_size
|
|
217
|
+
|
|
218
|
+
result = cli_util.list_call_get_all_results(
|
|
219
|
+
client.list_external_location_summaries_metadata,
|
|
220
|
+
subscription_service_name=subscription_service_name,
|
|
221
|
+
compartment_id=compartment_id,
|
|
222
|
+
**kwargs
|
|
223
|
+
)
|
|
224
|
+
elif limit is not None:
|
|
225
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
226
|
+
client.list_external_location_summaries_metadata,
|
|
227
|
+
limit,
|
|
228
|
+
page_size,
|
|
229
|
+
subscription_service_name=subscription_service_name,
|
|
230
|
+
compartment_id=compartment_id,
|
|
231
|
+
**kwargs
|
|
232
|
+
)
|
|
233
|
+
else:
|
|
234
|
+
result = client.list_external_location_summaries_metadata(
|
|
235
|
+
subscription_service_name=subscription_service_name,
|
|
236
|
+
compartment_id=compartment_id,
|
|
237
|
+
**kwargs
|
|
238
|
+
)
|
|
239
|
+
cli_util.render_response(result, ctx)
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
5
|
+
|
|
6
|
+
import oci
|
|
7
|
+
from oci_cli.cli_clients import CLIENT_MAP
|
|
8
|
+
from oci_cli.cli_clients import MODULE_TO_TYPE_MAPPINGS
|
|
9
|
+
from oci.multicloud import MultiCloudsMetadataClient
|
|
10
|
+
|
|
11
|
+
MODULE_TO_TYPE_MAPPINGS["multicloud"] = oci.multicloud.models.multicloud_type_mapping
|
|
12
|
+
if CLIENT_MAP.get("multicloud") is None:
|
|
13
|
+
CLIENT_MAP["multicloud"] = {}
|
|
14
|
+
CLIENT_MAP["multicloud"]["multi_clouds_metadata"] = MultiCloudsMetadataClient
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
5
|
+
|
|
6
|
+
from __future__ import print_function
|
|
7
|
+
import click
|
|
8
|
+
import oci # noqa: F401
|
|
9
|
+
import six # noqa: F401
|
|
10
|
+
import sys # noqa: F401
|
|
11
|
+
from oci_cli import cli_constants # noqa: F401
|
|
12
|
+
from oci_cli import cli_util
|
|
13
|
+
from oci_cli import json_skeleton_utils
|
|
14
|
+
from oci_cli import custom_types # noqa: F401
|
|
15
|
+
from oci_cli.aliasing import CommandGroupWithAlias
|
|
16
|
+
from services.multicloud.src.oci_cli_multicloud.generated import multicloud_service_cli
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@click.command(cli_util.override('multi_clouds_metadata.multi_clouds_metadata_root_group.command_name', 'multi-clouds-metadata'), cls=CommandGroupWithAlias, help=cli_util.override('multi_clouds_metadata.multi_clouds_metadata_root_group.help', """Use the Oracle Multicloud API to retrieve resource anchors and network anchors, and the metadata mappings related a Cloud Service Provider. For more information, see <link to docs>."""), short_help=cli_util.override('multi_clouds_metadata.multi_clouds_metadata_root_group.short_help', """Oracle Multicloud API"""))
|
|
20
|
+
@cli_util.help_option_group
|
|
21
|
+
def multi_clouds_metadata_root_group():
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@click.command(cli_util.override('multi_clouds_metadata.multi_cloud_metadata_collection_group.command_name', 'multi-cloud-metadata-collection'), cls=CommandGroupWithAlias, help="""Multicloud metadata information across clouds.""")
|
|
26
|
+
@cli_util.help_option_group
|
|
27
|
+
def multi_cloud_metadata_collection_group():
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@click.command(cli_util.override('multi_clouds_metadata.multi_cloud_metadata_group.command_name', 'multi-cloud-metadata'), cls=CommandGroupWithAlias, help="""Multicloud metadata information including base multicloud compartments information.""")
|
|
32
|
+
@cli_util.help_option_group
|
|
33
|
+
def multi_cloud_metadata_group():
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
multicloud_service_cli.multicloud_service_group.add_command(multi_clouds_metadata_root_group)
|
|
38
|
+
multi_clouds_metadata_root_group.add_command(multi_cloud_metadata_collection_group)
|
|
39
|
+
multi_clouds_metadata_root_group.add_command(multi_cloud_metadata_group)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@multi_cloud_metadata_group.command(name=cli_util.override('multi_clouds_metadata.get_multi_cloud_metadata.command_name', 'get'), help=u"""Gets information about multicloud base compartment \n[Command Reference](getMultiCloudMetadata)""")
|
|
43
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
44
|
+
@cli_util.option('--subscription-id', required=True, help=u"""The [OCID] of the OCI subscription.""")
|
|
45
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
46
|
+
@cli_util.help_option
|
|
47
|
+
@click.pass_context
|
|
48
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'multicloud', 'class': 'MultiCloudMetadata'})
|
|
49
|
+
@cli_util.wrap_exceptions
|
|
50
|
+
def get_multi_cloud_metadata(ctx, from_json, compartment_id, subscription_id):
|
|
51
|
+
|
|
52
|
+
if isinstance(subscription_id, six.string_types) and len(subscription_id.strip()) == 0:
|
|
53
|
+
raise click.UsageError('Parameter --subscription-id cannot be whitespace or empty string')
|
|
54
|
+
|
|
55
|
+
kwargs = {}
|
|
56
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
57
|
+
client = cli_util.build_client('multicloud', 'multi_clouds_metadata', ctx)
|
|
58
|
+
result = client.get_multi_cloud_metadata(
|
|
59
|
+
compartment_id=compartment_id,
|
|
60
|
+
subscription_id=subscription_id,
|
|
61
|
+
**kwargs
|
|
62
|
+
)
|
|
63
|
+
cli_util.render_response(result, ctx)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@multi_cloud_metadata_collection_group.command(name=cli_util.override('multi_clouds_metadata.list_multi_cloud_metadata.command_name', 'list-multi-cloud-metadata'), help=u"""Gets a list of multicloud metadata with multicloud base compartment and subscription across Cloud Service Providers. \n[Command Reference](listMultiCloudMetadata)""")
|
|
67
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
68
|
+
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
69
|
+
@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
70
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
|
|
71
|
+
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending. Default order for `displayName` is ascending.""")
|
|
72
|
+
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
|
|
73
|
+
@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
|
|
74
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
75
|
+
@cli_util.help_option
|
|
76
|
+
@click.pass_context
|
|
77
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'multicloud', 'class': 'MultiCloudMetadataCollection'})
|
|
78
|
+
@cli_util.wrap_exceptions
|
|
79
|
+
def list_multi_cloud_metadata(ctx, from_json, all_pages, page_size, compartment_id, limit, page, sort_order, sort_by):
|
|
80
|
+
|
|
81
|
+
if all_pages and limit:
|
|
82
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
83
|
+
|
|
84
|
+
kwargs = {}
|
|
85
|
+
if limit is not None:
|
|
86
|
+
kwargs['limit'] = limit
|
|
87
|
+
if page is not None:
|
|
88
|
+
kwargs['page'] = page
|
|
89
|
+
if sort_order is not None:
|
|
90
|
+
kwargs['sort_order'] = sort_order
|
|
91
|
+
if sort_by is not None:
|
|
92
|
+
kwargs['sort_by'] = sort_by
|
|
93
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
94
|
+
client = cli_util.build_client('multicloud', 'multi_clouds_metadata', ctx)
|
|
95
|
+
if all_pages:
|
|
96
|
+
if page_size:
|
|
97
|
+
kwargs['limit'] = page_size
|
|
98
|
+
|
|
99
|
+
result = cli_util.list_call_get_all_results(
|
|
100
|
+
client.list_multi_cloud_metadata,
|
|
101
|
+
compartment_id=compartment_id,
|
|
102
|
+
**kwargs
|
|
103
|
+
)
|
|
104
|
+
elif limit is not None:
|
|
105
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
106
|
+
client.list_multi_cloud_metadata,
|
|
107
|
+
limit,
|
|
108
|
+
page_size,
|
|
109
|
+
compartment_id=compartment_id,
|
|
110
|
+
**kwargs
|
|
111
|
+
)
|
|
112
|
+
else:
|
|
113
|
+
result = client.list_multi_cloud_metadata(
|
|
114
|
+
compartment_id=compartment_id,
|
|
115
|
+
**kwargs
|
|
116
|
+
)
|
|
117
|
+
cli_util.render_response(result, ctx)
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
5
|
+
|
|
6
|
+
from oci_cli.cli_root import cli
|
|
7
|
+
from oci_cli import cli_util
|
|
8
|
+
from oci_cli.aliasing import CommandGroupWithAlias
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@cli.command(cli_util.override('omhub_resource_anchor.multicloud_service_group.command_name', 'multicloud'), cls=CommandGroupWithAlias, help=cli_util.override('omhub_resource_anchor.multicloud_service_group.help', """Use the Oracle Multicloud API to retrieve resource anchors and network anchors, and the metadata mappings related a Cloud Service Provider. For more information, see <link to docs>."""), short_help=cli_util.override('omhub_resource_anchor.multicloud_service_group.short_help', """Oracle Multicloud API"""))
|
|
12
|
+
@cli_util.help_option_group
|
|
13
|
+
def multicloud_service_group():
|
|
14
|
+
pass
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180828
|
|
5
|
+
|
|
6
|
+
import oci
|
|
7
|
+
from oci_cli.cli_clients import CLIENT_MAP
|
|
8
|
+
from oci_cli.cli_clients import MODULE_TO_TYPE_MAPPINGS
|
|
9
|
+
from oci.multicloud import OmhubNetworkAnchorClient
|
|
10
|
+
|
|
11
|
+
MODULE_TO_TYPE_MAPPINGS["multicloud"] = oci.multicloud.models.multicloud_type_mapping
|
|
12
|
+
if CLIENT_MAP.get("multicloud") is None:
|
|
13
|
+
CLIENT_MAP["multicloud"] = {}
|
|
14
|
+
CLIENT_MAP["multicloud"]["omhub_network_anchor"] = OmhubNetworkAnchorClient
|