1# coding: utf-8
2# Copyright (c) 2016, 2021, 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
5from __future__ import absolute_import
6
7from oci._vendor import requests  # noqa: F401
8from oci._vendor import six
9
10from oci import retry, circuit_breaker  # noqa: F401
11from oci.base_client import BaseClient
12from oci.config import get_config_value_or_default, validate_config
13from oci.signer import Signer
14from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME
15from .models import core_type_mapping
16missing = Sentinel("Missing")
17
18
19class ComputeClient(object):
20    """
21    Use the Core Services API to manage resources such as virtual cloud networks (VCNs),
22    compute instances, and block storage volumes. For more information, see the console
23    documentation for the [Networking](/iaas/Content/Network/Concepts/overview.htm),
24    [Compute](/iaas/Content/Compute/Concepts/computeoverview.htm), and
25    [Block Volume](/iaas/Content/Block/Concepts/overview.htm) services.
26    """
27
28    def __init__(self, config, **kwargs):
29        """
30        Creates a new service client
31
32        :param dict config:
33            Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
34            The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config
35            the dict using :py:meth:`~oci.config.validate_config`
36
37        :param str service_endpoint: (optional)
38            The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
39            not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit
40            need to specify a service endpoint.
41
42        :param timeout: (optional)
43            The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided
44            as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If
45            a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
46        :type timeout: float or tuple(float, float)
47
48        :param signer: (optional)
49            The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
50            provided in the config parameter.
51
52            One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
53            by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
54        :type signer: :py:class:`~oci.signer.AbstractBaseSigner`
55
56        :param obj retry_strategy: (optional)
57            A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default.
58            Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
59            Any value provided at the operation level will override whatever is specified at the client level.
60
61            This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
62            is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
63
64        :param obj circuit_breaker_strategy: (optional)
65            A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
66            This client will not have circuit breakers enabled by default, users can use their own circuit breaker strategy or the convenient :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` provided by the SDK to enable it.
67            The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.
68
69        :param function circuit_breaker_callback: (optional)
70            Callback function to receive any exceptions triggerred by the circuit breaker.
71        """
72        validate_config(config, signer=kwargs.get('signer'))
73        if 'signer' in kwargs:
74            signer = kwargs['signer']
75
76        elif AUTHENTICATION_TYPE_FIELD_NAME in config:
77            signer = get_signer_from_authentication_type(config)
78
79        else:
80            signer = Signer(
81                tenancy=config["tenancy"],
82                user=config["user"],
83                fingerprint=config["fingerprint"],
84                private_key_file_location=config.get("key_file"),
85                pass_phrase=get_config_value_or_default(config, "pass_phrase"),
86                private_key_content=config.get("key_content")
87            )
88
89        base_client_init_kwargs = {
90            'regional_client': True,
91            'service_endpoint': kwargs.get('service_endpoint'),
92            'base_path': '/20160918',
93            'service_endpoint_template': 'https://iaas.{region}.{secondLevelDomain}',
94            'skip_deserialization': kwargs.get('skip_deserialization', False),
95            'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY)
96        }
97        if 'timeout' in kwargs:
98            base_client_init_kwargs['timeout'] = kwargs.get('timeout')
99        self.base_client = BaseClient("compute", config, signer, core_type_mapping, **base_client_init_kwargs)
100        self.retry_strategy = kwargs.get('retry_strategy')
101        self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback')
102        self._config = config
103        self._kwargs = kwargs
104
105    def accept_shielded_integrity_policy(self, instance_id, **kwargs):
106        """
107        Accept the changes to the PCR values in the measured boot report.
108
109
110        :param str instance_id: (required)
111            The `OCID`__ of the instance.
112
113            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
114
115        :param str opc_request_id: (optional)
116            Unique identifier for the request.
117            If you need to contact Oracle about a particular request, please provide the request ID.
118
119        :param str if_match: (optional)
120            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
121            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
122            will be updated or deleted only if the etag you provide matches the resource's current etag value.
123
124        :param str opc_retry_token: (optional)
125            A token that uniquely identifies a request so it can be retried in case of a timeout or
126            server error without risk of executing that same action again. Retry tokens expire after 24
127            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
128            has been deleted and purged from the system, then a retry of the original creation request
129            may be rejected).
130
131        :param obj retry_strategy: (optional)
132            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
133
134            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
135            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
136
137            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
138
139        :return: A :class:`~oci.response.Response` object with data of type None
140        :rtype: :class:`~oci.response.Response`
141
142        :example:
143        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/accept_shielded_integrity_policy.py.html>`__ to see an example of how to use accept_shielded_integrity_policy API.
144        """
145        resource_path = "/instances/{instanceId}/actions/acceptShieldedIntegrityPolicy"
146        method = "POST"
147
148        # Don't accept unknown kwargs
149        expected_kwargs = [
150            "retry_strategy",
151            "opc_request_id",
152            "if_match",
153            "opc_retry_token"
154        ]
155        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
156        if extra_kwargs:
157            raise ValueError(
158                "accept_shielded_integrity_policy got unknown kwargs: {!r}".format(extra_kwargs))
159
160        path_params = {
161            "instanceId": instance_id
162        }
163
164        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
165
166        for (k, v) in six.iteritems(path_params):
167            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
168                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
169
170        header_params = {
171            "accept": "application/json",
172            "content-type": "application/json",
173            "opc-request-id": kwargs.get("opc_request_id", missing),
174            "if-match": kwargs.get("if_match", missing),
175            "opc-retry-token": kwargs.get("opc_retry_token", missing)
176        }
177        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
178
179        retry_strategy = self.base_client.get_preferred_retry_strategy(
180            operation_retry_strategy=kwargs.get('retry_strategy'),
181            client_retry_strategy=self.retry_strategy
182        )
183
184        if retry_strategy:
185            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
186                self.base_client.add_opc_retry_token_if_needed(header_params)
187                self.base_client.add_opc_client_retries_header(header_params)
188                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
189            return retry_strategy.make_retrying_call(
190                self.base_client.call_api,
191                resource_path=resource_path,
192                method=method,
193                path_params=path_params,
194                header_params=header_params)
195        else:
196            return self.base_client.call_api(
197                resource_path=resource_path,
198                method=method,
199                path_params=path_params,
200                header_params=header_params)
201
202    def add_image_shape_compatibility_entry(self, image_id, shape_name, **kwargs):
203        """
204        Adds a shape to the compatible shapes list for the image.
205
206
207        :param str image_id: (required)
208            The `OCID`__ of the image.
209
210            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
211
212        :param str shape_name: (required)
213            Shape name.
214
215        :param oci.core.models.AddImageShapeCompatibilityEntryDetails add_image_shape_compatibility_entry_details: (optional)
216            Image shape compatibility details
217
218        :param obj retry_strategy: (optional)
219            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
220
221            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
222            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
223
224            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
225
226        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ImageShapeCompatibilityEntry`
227        :rtype: :class:`~oci.response.Response`
228
229        :example:
230        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/add_image_shape_compatibility_entry.py.html>`__ to see an example of how to use add_image_shape_compatibility_entry API.
231        """
232        resource_path = "/images/{imageId}/shapes/{shapeName}"
233        method = "PUT"
234
235        # Don't accept unknown kwargs
236        expected_kwargs = [
237            "retry_strategy",
238            "add_image_shape_compatibility_entry_details"
239        ]
240        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
241        if extra_kwargs:
242            raise ValueError(
243                "add_image_shape_compatibility_entry got unknown kwargs: {!r}".format(extra_kwargs))
244
245        path_params = {
246            "imageId": image_id,
247            "shapeName": shape_name
248        }
249
250        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
251
252        for (k, v) in six.iteritems(path_params):
253            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
254                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
255
256        header_params = {
257            "accept": "application/json",
258            "content-type": "application/json"
259        }
260
261        retry_strategy = self.base_client.get_preferred_retry_strategy(
262            operation_retry_strategy=kwargs.get('retry_strategy'),
263            client_retry_strategy=self.retry_strategy
264        )
265
266        if retry_strategy:
267            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
268                self.base_client.add_opc_client_retries_header(header_params)
269                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
270            return retry_strategy.make_retrying_call(
271                self.base_client.call_api,
272                resource_path=resource_path,
273                method=method,
274                path_params=path_params,
275                header_params=header_params,
276                body=kwargs.get('add_image_shape_compatibility_entry_details'),
277                response_type="ImageShapeCompatibilityEntry")
278        else:
279            return self.base_client.call_api(
280                resource_path=resource_path,
281                method=method,
282                path_params=path_params,
283                header_params=header_params,
284                body=kwargs.get('add_image_shape_compatibility_entry_details'),
285                response_type="ImageShapeCompatibilityEntry")
286
287    def attach_boot_volume(self, attach_boot_volume_details, **kwargs):
288        """
289        Attaches the specified boot volume to the specified instance.
290
291
292        :param oci.core.models.AttachBootVolumeDetails attach_boot_volume_details: (required)
293            Attach boot volume request
294
295        :param str opc_retry_token: (optional)
296            A token that uniquely identifies a request so it can be retried in case of a timeout or
297            server error without risk of executing that same action again. Retry tokens expire after 24
298            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
299            has been deleted and purged from the system, then a retry of the original creation request
300            may be rejected).
301
302        :param obj retry_strategy: (optional)
303            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
304
305            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
306            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
307
308            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
309
310        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.BootVolumeAttachment`
311        :rtype: :class:`~oci.response.Response`
312
313        :example:
314        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/attach_boot_volume.py.html>`__ to see an example of how to use attach_boot_volume API.
315        """
316        resource_path = "/bootVolumeAttachments"
317        method = "POST"
318
319        # Don't accept unknown kwargs
320        expected_kwargs = [
321            "retry_strategy",
322            "opc_retry_token"
323        ]
324        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
325        if extra_kwargs:
326            raise ValueError(
327                "attach_boot_volume got unknown kwargs: {!r}".format(extra_kwargs))
328
329        header_params = {
330            "accept": "application/json",
331            "content-type": "application/json",
332            "opc-retry-token": kwargs.get("opc_retry_token", missing)
333        }
334        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
335
336        retry_strategy = self.base_client.get_preferred_retry_strategy(
337            operation_retry_strategy=kwargs.get('retry_strategy'),
338            client_retry_strategy=self.retry_strategy
339        )
340
341        if retry_strategy:
342            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
343                self.base_client.add_opc_retry_token_if_needed(header_params)
344                self.base_client.add_opc_client_retries_header(header_params)
345                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
346            return retry_strategy.make_retrying_call(
347                self.base_client.call_api,
348                resource_path=resource_path,
349                method=method,
350                header_params=header_params,
351                body=attach_boot_volume_details,
352                response_type="BootVolumeAttachment")
353        else:
354            return self.base_client.call_api(
355                resource_path=resource_path,
356                method=method,
357                header_params=header_params,
358                body=attach_boot_volume_details,
359                response_type="BootVolumeAttachment")
360
361    def attach_vnic(self, attach_vnic_details, **kwargs):
362        """
363        Creates a secondary VNIC and attaches it to the specified instance.
364        For more information about secondary VNICs, see
365        `Virtual Network Interface Cards (VNICs)`__.
366
367        __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm
368
369
370        :param oci.core.models.AttachVnicDetails attach_vnic_details: (required)
371            Attach VNIC details.
372
373        :param str opc_retry_token: (optional)
374            A token that uniquely identifies a request so it can be retried in case of a timeout or
375            server error without risk of executing that same action again. Retry tokens expire after 24
376            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
377            has been deleted and purged from the system, then a retry of the original creation request
378            may be rejected).
379
380        :param obj retry_strategy: (optional)
381            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
382
383            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
384            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
385
386            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
387
388        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VnicAttachment`
389        :rtype: :class:`~oci.response.Response`
390
391        :example:
392        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/attach_vnic.py.html>`__ to see an example of how to use attach_vnic API.
393        """
394        resource_path = "/vnicAttachments"
395        method = "POST"
396
397        # Don't accept unknown kwargs
398        expected_kwargs = [
399            "retry_strategy",
400            "opc_retry_token"
401        ]
402        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
403        if extra_kwargs:
404            raise ValueError(
405                "attach_vnic got unknown kwargs: {!r}".format(extra_kwargs))
406
407        header_params = {
408            "accept": "application/json",
409            "content-type": "application/json",
410            "opc-retry-token": kwargs.get("opc_retry_token", missing)
411        }
412        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
413
414        retry_strategy = self.base_client.get_preferred_retry_strategy(
415            operation_retry_strategy=kwargs.get('retry_strategy'),
416            client_retry_strategy=self.retry_strategy
417        )
418
419        if retry_strategy:
420            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
421                self.base_client.add_opc_retry_token_if_needed(header_params)
422                self.base_client.add_opc_client_retries_header(header_params)
423                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
424            return retry_strategy.make_retrying_call(
425                self.base_client.call_api,
426                resource_path=resource_path,
427                method=method,
428                header_params=header_params,
429                body=attach_vnic_details,
430                response_type="VnicAttachment")
431        else:
432            return self.base_client.call_api(
433                resource_path=resource_path,
434                method=method,
435                header_params=header_params,
436                body=attach_vnic_details,
437                response_type="VnicAttachment")
438
439    def attach_volume(self, attach_volume_details, **kwargs):
440        """
441        Attaches the specified storage volume to the specified instance.
442
443
444        :param oci.core.models.AttachVolumeDetails attach_volume_details: (required)
445            Attach volume request
446
447        :param str opc_retry_token: (optional)
448            A token that uniquely identifies a request so it can be retried in case of a timeout or
449            server error without risk of executing that same action again. Retry tokens expire after 24
450            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
451            has been deleted and purged from the system, then a retry of the original creation request
452            may be rejected).
453
454        :param obj retry_strategy: (optional)
455            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
456
457            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
458            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
459
460            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
461
462        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VolumeAttachment`
463        :rtype: :class:`~oci.response.Response`
464
465        :example:
466        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/attach_volume.py.html>`__ to see an example of how to use attach_volume API.
467        """
468        resource_path = "/volumeAttachments"
469        method = "POST"
470
471        # Don't accept unknown kwargs
472        expected_kwargs = [
473            "retry_strategy",
474            "opc_retry_token"
475        ]
476        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
477        if extra_kwargs:
478            raise ValueError(
479                "attach_volume got unknown kwargs: {!r}".format(extra_kwargs))
480
481        header_params = {
482            "accept": "application/json",
483            "content-type": "application/json",
484            "opc-retry-token": kwargs.get("opc_retry_token", missing)
485        }
486        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
487
488        retry_strategy = self.base_client.get_preferred_retry_strategy(
489            operation_retry_strategy=kwargs.get('retry_strategy'),
490            client_retry_strategy=self.retry_strategy
491        )
492
493        if retry_strategy:
494            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
495                self.base_client.add_opc_retry_token_if_needed(header_params)
496                self.base_client.add_opc_client_retries_header(header_params)
497                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
498            return retry_strategy.make_retrying_call(
499                self.base_client.call_api,
500                resource_path=resource_path,
501                method=method,
502                header_params=header_params,
503                body=attach_volume_details,
504                response_type="VolumeAttachment")
505        else:
506            return self.base_client.call_api(
507                resource_path=resource_path,
508                method=method,
509                header_params=header_params,
510                body=attach_volume_details,
511                response_type="VolumeAttachment")
512
513    def capture_console_history(self, capture_console_history_details, **kwargs):
514        """
515        Captures the most recent serial console data (up to a megabyte) for the
516        specified instance.
517
518        The `CaptureConsoleHistory` operation works with the other console history operations
519        as described below.
520
521        1. Use `CaptureConsoleHistory` to request the capture of up to a megabyte of the
522        most recent console history. This call returns a `ConsoleHistory`
523        object. The object will have a state of REQUESTED.
524        2. Wait for the capture operation to succeed by polling `GetConsoleHistory` with
525        the identifier of the console history metadata. The state of the
526        `ConsoleHistory` object will go from REQUESTED to GETTING-HISTORY and
527        then SUCCEEDED (or FAILED).
528        3. Use `GetConsoleHistoryContent` to get the actual console history data (not the
529        metadata).
530        4. Optionally, use `DeleteConsoleHistory` to delete the console history metadata
531        and the console history data.
532
533
534        :param oci.core.models.CaptureConsoleHistoryDetails capture_console_history_details: (required)
535            Console history details
536
537        :param str opc_retry_token: (optional)
538            A token that uniquely identifies a request so it can be retried in case of a timeout or
539            server error without risk of executing that same action again. Retry tokens expire after 24
540            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
541            has been deleted and purged from the system, then a retry of the original creation request
542            may be rejected).
543
544        :param obj retry_strategy: (optional)
545            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
546
547            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
548            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
549
550            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
551
552        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ConsoleHistory`
553        :rtype: :class:`~oci.response.Response`
554
555        :example:
556        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/capture_console_history.py.html>`__ to see an example of how to use capture_console_history API.
557        """
558        resource_path = "/instanceConsoleHistories"
559        method = "POST"
560
561        # Don't accept unknown kwargs
562        expected_kwargs = [
563            "retry_strategy",
564            "opc_retry_token"
565        ]
566        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
567        if extra_kwargs:
568            raise ValueError(
569                "capture_console_history got unknown kwargs: {!r}".format(extra_kwargs))
570
571        header_params = {
572            "accept": "application/json",
573            "content-type": "application/json",
574            "opc-retry-token": kwargs.get("opc_retry_token", missing)
575        }
576        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
577
578        retry_strategy = self.base_client.get_preferred_retry_strategy(
579            operation_retry_strategy=kwargs.get('retry_strategy'),
580            client_retry_strategy=self.retry_strategy
581        )
582
583        if retry_strategy:
584            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
585                self.base_client.add_opc_retry_token_if_needed(header_params)
586                self.base_client.add_opc_client_retries_header(header_params)
587                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
588            return retry_strategy.make_retrying_call(
589                self.base_client.call_api,
590                resource_path=resource_path,
591                method=method,
592                header_params=header_params,
593                body=capture_console_history_details,
594                response_type="ConsoleHistory")
595        else:
596            return self.base_client.call_api(
597                resource_path=resource_path,
598                method=method,
599                header_params=header_params,
600                body=capture_console_history_details,
601                response_type="ConsoleHistory")
602
603    def change_compute_capacity_reservation_compartment(self, capacity_reservation_id, change_compute_capacity_reservation_compartment_details, **kwargs):
604        """
605        Moves a compute capacity reservation into a different compartment. For information about
606        moving resources between compartments, see
607        `Moving Resources to a Different Compartment`__.
608
609        __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
610
611
612        :param str capacity_reservation_id: (required)
613            The OCID of the compute capacity reservation.
614
615        :param oci.core.models.ChangeComputeCapacityReservationCompartmentDetails change_compute_capacity_reservation_compartment_details: (required)
616            The configuration details for the move operation.
617
618        :param str if_match: (optional)
619            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
620            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
621            will be updated or deleted only if the etag you provide matches the resource's current etag value.
622
623        :param str opc_request_id: (optional)
624            Unique identifier for the request.
625            If you need to contact Oracle about a particular request, please provide the request ID.
626
627        :param str opc_retry_token: (optional)
628            A token that uniquely identifies a request so it can be retried in case of a timeout or
629            server error without risk of executing that same action again. Retry tokens expire after 24
630            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
631            has been deleted and purged from the system, then a retry of the original creation request
632            may be rejected).
633
634        :param obj retry_strategy: (optional)
635            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
636
637            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
638            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
639
640            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
641
642        :return: A :class:`~oci.response.Response` object with data of type None
643        :rtype: :class:`~oci.response.Response`
644
645        :example:
646        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_compute_capacity_reservation_compartment.py.html>`__ to see an example of how to use change_compute_capacity_reservation_compartment API.
647        """
648        resource_path = "/computeCapacityReservations/{capacityReservationId}/actions/changeCompartment"
649        method = "POST"
650
651        # Don't accept unknown kwargs
652        expected_kwargs = [
653            "retry_strategy",
654            "if_match",
655            "opc_request_id",
656            "opc_retry_token"
657        ]
658        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
659        if extra_kwargs:
660            raise ValueError(
661                "change_compute_capacity_reservation_compartment got unknown kwargs: {!r}".format(extra_kwargs))
662
663        path_params = {
664            "capacityReservationId": capacity_reservation_id
665        }
666
667        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
668
669        for (k, v) in six.iteritems(path_params):
670            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
671                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
672
673        header_params = {
674            "accept": "application/json",
675            "content-type": "application/json",
676            "if-match": kwargs.get("if_match", missing),
677            "opc-request-id": kwargs.get("opc_request_id", missing),
678            "opc-retry-token": kwargs.get("opc_retry_token", missing)
679        }
680        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
681
682        retry_strategy = self.base_client.get_preferred_retry_strategy(
683            operation_retry_strategy=kwargs.get('retry_strategy'),
684            client_retry_strategy=self.retry_strategy
685        )
686
687        if retry_strategy:
688            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
689                self.base_client.add_opc_retry_token_if_needed(header_params)
690                self.base_client.add_opc_client_retries_header(header_params)
691                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
692            return retry_strategy.make_retrying_call(
693                self.base_client.call_api,
694                resource_path=resource_path,
695                method=method,
696                path_params=path_params,
697                header_params=header_params,
698                body=change_compute_capacity_reservation_compartment_details)
699        else:
700            return self.base_client.call_api(
701                resource_path=resource_path,
702                method=method,
703                path_params=path_params,
704                header_params=header_params,
705                body=change_compute_capacity_reservation_compartment_details)
706
707    def change_compute_image_capability_schema_compartment(self, compute_image_capability_schema_id, change_compute_image_capability_schema_compartment_details, **kwargs):
708        """
709        Moves a compute image capability schema into a different compartment within the same tenancy.
710        For information about moving resources between compartments, see
711                `Moving Resources to a Different Compartment`__.
712
713        __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
714
715
716        :param str compute_image_capability_schema_id: (required)
717            The id of the compute image capability schema or the image ocid
718
719        :param oci.core.models.ChangeComputeImageCapabilitySchemaCompartmentDetails change_compute_image_capability_schema_compartment_details: (required)
720            Compute Image Capability Schema change compartment details
721
722        :param str if_match: (optional)
723            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
724            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
725            will be updated or deleted only if the etag you provide matches the resource's current etag value.
726
727        :param str opc_request_id: (optional)
728            Unique identifier for the request.
729            If you need to contact Oracle about a particular request, please provide the request ID.
730
731        :param str opc_retry_token: (optional)
732            A token that uniquely identifies a request so it can be retried in case of a timeout or
733            server error without risk of executing that same action again. Retry tokens expire after 24
734            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
735            has been deleted and purged from the system, then a retry of the original creation request
736            may be rejected).
737
738        :param obj retry_strategy: (optional)
739            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
740
741            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
742            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
743
744            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
745
746        :return: A :class:`~oci.response.Response` object with data of type None
747        :rtype: :class:`~oci.response.Response`
748
749        :example:
750        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_compute_image_capability_schema_compartment.py.html>`__ to see an example of how to use change_compute_image_capability_schema_compartment API.
751        """
752        resource_path = "/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}/actions/changeCompartment"
753        method = "POST"
754
755        # Don't accept unknown kwargs
756        expected_kwargs = [
757            "retry_strategy",
758            "if_match",
759            "opc_request_id",
760            "opc_retry_token"
761        ]
762        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
763        if extra_kwargs:
764            raise ValueError(
765                "change_compute_image_capability_schema_compartment got unknown kwargs: {!r}".format(extra_kwargs))
766
767        path_params = {
768            "computeImageCapabilitySchemaId": compute_image_capability_schema_id
769        }
770
771        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
772
773        for (k, v) in six.iteritems(path_params):
774            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
775                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
776
777        header_params = {
778            "accept": "application/json",
779            "content-type": "application/json",
780            "if-match": kwargs.get("if_match", missing),
781            "opc-request-id": kwargs.get("opc_request_id", missing),
782            "opc-retry-token": kwargs.get("opc_retry_token", missing)
783        }
784        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
785
786        retry_strategy = self.base_client.get_preferred_retry_strategy(
787            operation_retry_strategy=kwargs.get('retry_strategy'),
788            client_retry_strategy=self.retry_strategy
789        )
790
791        if retry_strategy:
792            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
793                self.base_client.add_opc_retry_token_if_needed(header_params)
794                self.base_client.add_opc_client_retries_header(header_params)
795                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
796            return retry_strategy.make_retrying_call(
797                self.base_client.call_api,
798                resource_path=resource_path,
799                method=method,
800                path_params=path_params,
801                header_params=header_params,
802                body=change_compute_image_capability_schema_compartment_details)
803        else:
804            return self.base_client.call_api(
805                resource_path=resource_path,
806                method=method,
807                path_params=path_params,
808                header_params=header_params,
809                body=change_compute_image_capability_schema_compartment_details)
810
811    def change_dedicated_vm_host_compartment(self, dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, **kwargs):
812        """
813        Moves a dedicated virtual machine host from one compartment to another.
814
815
816        :param str dedicated_vm_host_id: (required)
817            The OCID of the dedicated VM host.
818
819        :param oci.core.models.ChangeDedicatedVmHostCompartmentDetails change_dedicated_vm_host_compartment_details: (required)
820            The request to move the dedicated virtual machine host to a different compartment.
821
822        :param str if_match: (optional)
823            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
824            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
825            will be updated or deleted only if the etag you provide matches the resource's current etag value.
826
827        :param str opc_request_id: (optional)
828            Unique identifier for the request.
829            If you need to contact Oracle about a particular request, please provide the request ID.
830
831        :param str opc_retry_token: (optional)
832            A token that uniquely identifies a request so it can be retried in case of a timeout or
833            server error without risk of executing that same action again. Retry tokens expire after 24
834            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
835            has been deleted and purged from the system, then a retry of the original creation request
836            may be rejected).
837
838        :param obj retry_strategy: (optional)
839            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
840
841            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
842            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
843
844            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
845
846        :return: A :class:`~oci.response.Response` object with data of type None
847        :rtype: :class:`~oci.response.Response`
848
849        :example:
850        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_dedicated_vm_host_compartment.py.html>`__ to see an example of how to use change_dedicated_vm_host_compartment API.
851        """
852        resource_path = "/dedicatedVmHosts/{dedicatedVmHostId}/actions/changeCompartment"
853        method = "POST"
854
855        # Don't accept unknown kwargs
856        expected_kwargs = [
857            "retry_strategy",
858            "if_match",
859            "opc_request_id",
860            "opc_retry_token"
861        ]
862        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
863        if extra_kwargs:
864            raise ValueError(
865                "change_dedicated_vm_host_compartment got unknown kwargs: {!r}".format(extra_kwargs))
866
867        path_params = {
868            "dedicatedVmHostId": dedicated_vm_host_id
869        }
870
871        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
872
873        for (k, v) in six.iteritems(path_params):
874            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
875                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
876
877        header_params = {
878            "accept": "application/json",
879            "content-type": "application/json",
880            "if-match": kwargs.get("if_match", missing),
881            "opc-request-id": kwargs.get("opc_request_id", missing),
882            "opc-retry-token": kwargs.get("opc_retry_token", missing)
883        }
884        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
885
886        retry_strategy = self.base_client.get_preferred_retry_strategy(
887            operation_retry_strategy=kwargs.get('retry_strategy'),
888            client_retry_strategy=self.retry_strategy
889        )
890
891        if retry_strategy:
892            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
893                self.base_client.add_opc_retry_token_if_needed(header_params)
894                self.base_client.add_opc_client_retries_header(header_params)
895                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
896            return retry_strategy.make_retrying_call(
897                self.base_client.call_api,
898                resource_path=resource_path,
899                method=method,
900                path_params=path_params,
901                header_params=header_params,
902                body=change_dedicated_vm_host_compartment_details)
903        else:
904            return self.base_client.call_api(
905                resource_path=resource_path,
906                method=method,
907                path_params=path_params,
908                header_params=header_params,
909                body=change_dedicated_vm_host_compartment_details)
910
911    def change_image_compartment(self, image_id, change_image_compartment_details, **kwargs):
912        """
913        Moves an image into a different compartment within the same tenancy. For information about moving
914        resources between compartments, see
915        `Moving Resources to a Different Compartment`__.
916
917        __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
918
919
920        :param str image_id: (required)
921            The `OCID`__ of the image.
922
923            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
924
925        :param oci.core.models.ChangeImageCompartmentDetails change_image_compartment_details: (required)
926            Request to change the compartment of a given image.
927
928        :param str if_match: (optional)
929            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
930            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
931            will be updated or deleted only if the etag you provide matches the resource's current etag value.
932
933        :param str opc_request_id: (optional)
934            Unique identifier for the request.
935            If you need to contact Oracle about a particular request, please provide the request ID.
936
937        :param str opc_retry_token: (optional)
938            A token that uniquely identifies a request so it can be retried in case of a timeout or
939            server error without risk of executing that same action again. Retry tokens expire after 24
940            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
941            has been deleted and purged from the system, then a retry of the original creation request
942            may be rejected).
943
944        :param obj retry_strategy: (optional)
945            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
946
947            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
948            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
949
950            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
951
952        :return: A :class:`~oci.response.Response` object with data of type None
953        :rtype: :class:`~oci.response.Response`
954
955        :example:
956        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_image_compartment.py.html>`__ to see an example of how to use change_image_compartment API.
957        """
958        resource_path = "/images/{imageId}/actions/changeCompartment"
959        method = "POST"
960
961        # Don't accept unknown kwargs
962        expected_kwargs = [
963            "retry_strategy",
964            "if_match",
965            "opc_request_id",
966            "opc_retry_token"
967        ]
968        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
969        if extra_kwargs:
970            raise ValueError(
971                "change_image_compartment got unknown kwargs: {!r}".format(extra_kwargs))
972
973        path_params = {
974            "imageId": image_id
975        }
976
977        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
978
979        for (k, v) in six.iteritems(path_params):
980            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
981                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
982
983        header_params = {
984            "accept": "application/json",
985            "content-type": "application/json",
986            "if-match": kwargs.get("if_match", missing),
987            "opc-request-id": kwargs.get("opc_request_id", missing),
988            "opc-retry-token": kwargs.get("opc_retry_token", missing)
989        }
990        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
991
992        retry_strategy = self.base_client.get_preferred_retry_strategy(
993            operation_retry_strategy=kwargs.get('retry_strategy'),
994            client_retry_strategy=self.retry_strategy
995        )
996
997        if retry_strategy:
998            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
999                self.base_client.add_opc_retry_token_if_needed(header_params)
1000                self.base_client.add_opc_client_retries_header(header_params)
1001                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1002            return retry_strategy.make_retrying_call(
1003                self.base_client.call_api,
1004                resource_path=resource_path,
1005                method=method,
1006                path_params=path_params,
1007                header_params=header_params,
1008                body=change_image_compartment_details)
1009        else:
1010            return self.base_client.call_api(
1011                resource_path=resource_path,
1012                method=method,
1013                path_params=path_params,
1014                header_params=header_params,
1015                body=change_image_compartment_details)
1016
1017    def change_instance_compartment(self, instance_id, change_instance_compartment_details, **kwargs):
1018        """
1019        Moves an instance into a different compartment within the same tenancy. For information about
1020        moving resources between compartments, see
1021        `Moving Resources to a Different Compartment`__.
1022
1023        When you move an instance to a different compartment, associated resources such as boot volumes and VNICs
1024        are not moved.
1025
1026        __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
1027
1028
1029        :param str instance_id: (required)
1030            The `OCID`__ of the instance.
1031
1032            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1033
1034        :param oci.core.models.ChangeInstanceCompartmentDetails change_instance_compartment_details: (required)
1035            Request to change the compartment of a given instance.
1036
1037        :param str if_match: (optional)
1038            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1039            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1040            will be updated or deleted only if the etag you provide matches the resource's current etag value.
1041
1042        :param str opc_request_id: (optional)
1043            Unique identifier for the request.
1044            If you need to contact Oracle about a particular request, please provide the request ID.
1045
1046        :param str opc_retry_token: (optional)
1047            A token that uniquely identifies a request so it can be retried in case of a timeout or
1048            server error without risk of executing that same action again. Retry tokens expire after 24
1049            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
1050            has been deleted and purged from the system, then a retry of the original creation request
1051            may be rejected).
1052
1053        :param obj retry_strategy: (optional)
1054            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1055
1056            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1057            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1058
1059            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1060
1061        :return: A :class:`~oci.response.Response` object with data of type None
1062        :rtype: :class:`~oci.response.Response`
1063
1064        :example:
1065        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/change_instance_compartment.py.html>`__ to see an example of how to use change_instance_compartment API.
1066        """
1067        resource_path = "/instances/{instanceId}/actions/changeCompartment"
1068        method = "POST"
1069
1070        # Don't accept unknown kwargs
1071        expected_kwargs = [
1072            "retry_strategy",
1073            "if_match",
1074            "opc_request_id",
1075            "opc_retry_token"
1076        ]
1077        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1078        if extra_kwargs:
1079            raise ValueError(
1080                "change_instance_compartment got unknown kwargs: {!r}".format(extra_kwargs))
1081
1082        path_params = {
1083            "instanceId": instance_id
1084        }
1085
1086        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1087
1088        for (k, v) in six.iteritems(path_params):
1089            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1090                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1091
1092        header_params = {
1093            "accept": "application/json",
1094            "content-type": "application/json",
1095            "if-match": kwargs.get("if_match", missing),
1096            "opc-request-id": kwargs.get("opc_request_id", missing),
1097            "opc-retry-token": kwargs.get("opc_retry_token", missing)
1098        }
1099        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1100
1101        retry_strategy = self.base_client.get_preferred_retry_strategy(
1102            operation_retry_strategy=kwargs.get('retry_strategy'),
1103            client_retry_strategy=self.retry_strategy
1104        )
1105
1106        if retry_strategy:
1107            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1108                self.base_client.add_opc_retry_token_if_needed(header_params)
1109                self.base_client.add_opc_client_retries_header(header_params)
1110                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1111            return retry_strategy.make_retrying_call(
1112                self.base_client.call_api,
1113                resource_path=resource_path,
1114                method=method,
1115                path_params=path_params,
1116                header_params=header_params,
1117                body=change_instance_compartment_details)
1118        else:
1119            return self.base_client.call_api(
1120                resource_path=resource_path,
1121                method=method,
1122                path_params=path_params,
1123                header_params=header_params,
1124                body=change_instance_compartment_details)
1125
1126    def create_app_catalog_subscription(self, create_app_catalog_subscription_details, **kwargs):
1127        """
1128        Create a subscription for listing resource version for a compartment. It will take some time to propagate to all regions.
1129
1130
1131        :param oci.core.models.CreateAppCatalogSubscriptionDetails create_app_catalog_subscription_details: (required)
1132            Request for the creation of a subscription for listing resource version for a compartment.
1133
1134        :param str opc_retry_token: (optional)
1135            A token that uniquely identifies a request so it can be retried in case of a timeout or
1136            server error without risk of executing that same action again. Retry tokens expire after 24
1137            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
1138            has been deleted and purged from the system, then a retry of the original creation request
1139            may be rejected).
1140
1141        :param obj retry_strategy: (optional)
1142            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1143
1144            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1145            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1146
1147            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1148
1149        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.AppCatalogSubscription`
1150        :rtype: :class:`~oci.response.Response`
1151
1152        :example:
1153        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_app_catalog_subscription.py.html>`__ to see an example of how to use create_app_catalog_subscription API.
1154        """
1155        resource_path = "/appCatalogSubscriptions"
1156        method = "POST"
1157
1158        # Don't accept unknown kwargs
1159        expected_kwargs = [
1160            "retry_strategy",
1161            "opc_retry_token"
1162        ]
1163        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1164        if extra_kwargs:
1165            raise ValueError(
1166                "create_app_catalog_subscription got unknown kwargs: {!r}".format(extra_kwargs))
1167
1168        header_params = {
1169            "accept": "application/json",
1170            "content-type": "application/json",
1171            "opc-retry-token": kwargs.get("opc_retry_token", missing)
1172        }
1173        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1174
1175        retry_strategy = self.base_client.get_preferred_retry_strategy(
1176            operation_retry_strategy=kwargs.get('retry_strategy'),
1177            client_retry_strategy=self.retry_strategy
1178        )
1179
1180        if retry_strategy:
1181            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1182                self.base_client.add_opc_retry_token_if_needed(header_params)
1183                self.base_client.add_opc_client_retries_header(header_params)
1184                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1185            return retry_strategy.make_retrying_call(
1186                self.base_client.call_api,
1187                resource_path=resource_path,
1188                method=method,
1189                header_params=header_params,
1190                body=create_app_catalog_subscription_details,
1191                response_type="AppCatalogSubscription")
1192        else:
1193            return self.base_client.call_api(
1194                resource_path=resource_path,
1195                method=method,
1196                header_params=header_params,
1197                body=create_app_catalog_subscription_details,
1198                response_type="AppCatalogSubscription")
1199
1200    def create_compute_capacity_reservation(self, create_compute_capacity_reservation_details, **kwargs):
1201        """
1202        Creates a new compute capacity reservation in the specified compartment and availability domain.
1203        Compute capacity reservations let you reserve instances in a compartment.
1204        When you launch an instance using this reservation, you are assured that you have enough space for your instance,
1205        and you won't get out of capacity errors.
1206        For more information, see `Reserved Capacity`__.
1207
1208        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm
1209
1210
1211        :param oci.core.models.CreateComputeCapacityReservationDetails create_compute_capacity_reservation_details: (required)
1212            Details for creating a new compute capacity reservation.
1213
1214            **Caution:** Avoid using any confidential information when you use the API to supply string values.
1215
1216        :param str opc_request_id: (optional)
1217            Unique identifier for the request.
1218            If you need to contact Oracle about a particular request, please provide the request ID.
1219
1220        :param str opc_retry_token: (optional)
1221            A token that uniquely identifies a request so it can be retried in case of a timeout or
1222            server error without risk of executing that same action again. Retry tokens expire after 24
1223            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
1224            has been deleted and purged from the system, then a retry of the original creation request
1225            may be rejected).
1226
1227        :param obj retry_strategy: (optional)
1228            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1229
1230            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1231            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1232
1233            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1234
1235        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeCapacityReservation`
1236        :rtype: :class:`~oci.response.Response`
1237
1238        :example:
1239        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_compute_capacity_reservation.py.html>`__ to see an example of how to use create_compute_capacity_reservation API.
1240        """
1241        resource_path = "/computeCapacityReservations"
1242        method = "POST"
1243
1244        # Don't accept unknown kwargs
1245        expected_kwargs = [
1246            "retry_strategy",
1247            "opc_request_id",
1248            "opc_retry_token"
1249        ]
1250        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1251        if extra_kwargs:
1252            raise ValueError(
1253                "create_compute_capacity_reservation got unknown kwargs: {!r}".format(extra_kwargs))
1254
1255        header_params = {
1256            "accept": "application/json",
1257            "content-type": "application/json",
1258            "opc-request-id": kwargs.get("opc_request_id", missing),
1259            "opc-retry-token": kwargs.get("opc_retry_token", missing)
1260        }
1261        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1262
1263        retry_strategy = self.base_client.get_preferred_retry_strategy(
1264            operation_retry_strategy=kwargs.get('retry_strategy'),
1265            client_retry_strategy=self.retry_strategy
1266        )
1267
1268        if retry_strategy:
1269            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1270                self.base_client.add_opc_retry_token_if_needed(header_params)
1271                self.base_client.add_opc_client_retries_header(header_params)
1272                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1273            return retry_strategy.make_retrying_call(
1274                self.base_client.call_api,
1275                resource_path=resource_path,
1276                method=method,
1277                header_params=header_params,
1278                body=create_compute_capacity_reservation_details,
1279                response_type="ComputeCapacityReservation")
1280        else:
1281            return self.base_client.call_api(
1282                resource_path=resource_path,
1283                method=method,
1284                header_params=header_params,
1285                body=create_compute_capacity_reservation_details,
1286                response_type="ComputeCapacityReservation")
1287
1288    def create_compute_image_capability_schema(self, create_compute_image_capability_schema_details, **kwargs):
1289        """
1290        Creates compute image capability schema.
1291
1292
1293        :param oci.core.models.CreateComputeImageCapabilitySchemaDetails create_compute_image_capability_schema_details: (required)
1294            Compute Image Capability Schema creation details
1295
1296        :param str opc_retry_token: (optional)
1297            A token that uniquely identifies a request so it can be retried in case of a timeout or
1298            server error without risk of executing that same action again. Retry tokens expire after 24
1299            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
1300            has been deleted and purged from the system, then a retry of the original creation request
1301            may be rejected).
1302
1303        :param obj retry_strategy: (optional)
1304            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1305
1306            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1307            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1308
1309            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1310
1311        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeImageCapabilitySchema`
1312        :rtype: :class:`~oci.response.Response`
1313
1314        :example:
1315        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_compute_image_capability_schema.py.html>`__ to see an example of how to use create_compute_image_capability_schema API.
1316        """
1317        resource_path = "/computeImageCapabilitySchemas"
1318        method = "POST"
1319
1320        # Don't accept unknown kwargs
1321        expected_kwargs = [
1322            "retry_strategy",
1323            "opc_retry_token"
1324        ]
1325        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1326        if extra_kwargs:
1327            raise ValueError(
1328                "create_compute_image_capability_schema got unknown kwargs: {!r}".format(extra_kwargs))
1329
1330        header_params = {
1331            "accept": "application/json",
1332            "content-type": "application/json",
1333            "opc-retry-token": kwargs.get("opc_retry_token", missing)
1334        }
1335        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1336
1337        retry_strategy = self.base_client.get_preferred_retry_strategy(
1338            operation_retry_strategy=kwargs.get('retry_strategy'),
1339            client_retry_strategy=self.retry_strategy
1340        )
1341
1342        if retry_strategy:
1343            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1344                self.base_client.add_opc_retry_token_if_needed(header_params)
1345                self.base_client.add_opc_client_retries_header(header_params)
1346                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1347            return retry_strategy.make_retrying_call(
1348                self.base_client.call_api,
1349                resource_path=resource_path,
1350                method=method,
1351                header_params=header_params,
1352                body=create_compute_image_capability_schema_details,
1353                response_type="ComputeImageCapabilitySchema")
1354        else:
1355            return self.base_client.call_api(
1356                resource_path=resource_path,
1357                method=method,
1358                header_params=header_params,
1359                body=create_compute_image_capability_schema_details,
1360                response_type="ComputeImageCapabilitySchema")
1361
1362    def create_dedicated_vm_host(self, create_dedicated_vm_host_details, **kwargs):
1363        """
1364        Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain.
1365        Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers
1366        that are a single tenant and not shared with other customers.
1367        For more information, see `Dedicated Virtual Machine Hosts`__.
1368
1369        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/dedicatedvmhosts.htm
1370
1371
1372        :param oci.core.models.CreateDedicatedVmHostDetails create_dedicated_vm_host_details: (required)
1373            The details for creating a new dedicated virtual machine host.
1374
1375        :param str opc_request_id: (optional)
1376            Unique identifier for the request.
1377            If you need to contact Oracle about a particular request, please provide the request ID.
1378
1379        :param str opc_retry_token: (optional)
1380            A token that uniquely identifies a request so it can be retried in case of a timeout or
1381            server error without risk of executing that same action again. Retry tokens expire after 24
1382            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
1383            has been deleted and purged from the system, then a retry of the original creation request
1384            may be rejected).
1385
1386        :param obj retry_strategy: (optional)
1387            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1388
1389            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1390            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1391
1392            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1393
1394        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DedicatedVmHost`
1395        :rtype: :class:`~oci.response.Response`
1396
1397        :example:
1398        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_dedicated_vm_host.py.html>`__ to see an example of how to use create_dedicated_vm_host API.
1399        """
1400        resource_path = "/dedicatedVmHosts"
1401        method = "POST"
1402
1403        # Don't accept unknown kwargs
1404        expected_kwargs = [
1405            "retry_strategy",
1406            "opc_request_id",
1407            "opc_retry_token"
1408        ]
1409        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1410        if extra_kwargs:
1411            raise ValueError(
1412                "create_dedicated_vm_host got unknown kwargs: {!r}".format(extra_kwargs))
1413
1414        header_params = {
1415            "accept": "application/json",
1416            "content-type": "application/json",
1417            "opc-request-id": kwargs.get("opc_request_id", missing),
1418            "opc-retry-token": kwargs.get("opc_retry_token", missing)
1419        }
1420        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1421
1422        retry_strategy = self.base_client.get_preferred_retry_strategy(
1423            operation_retry_strategy=kwargs.get('retry_strategy'),
1424            client_retry_strategy=self.retry_strategy
1425        )
1426
1427        if retry_strategy:
1428            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1429                self.base_client.add_opc_retry_token_if_needed(header_params)
1430                self.base_client.add_opc_client_retries_header(header_params)
1431                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1432            return retry_strategy.make_retrying_call(
1433                self.base_client.call_api,
1434                resource_path=resource_path,
1435                method=method,
1436                header_params=header_params,
1437                body=create_dedicated_vm_host_details,
1438                response_type="DedicatedVmHost")
1439        else:
1440            return self.base_client.call_api(
1441                resource_path=resource_path,
1442                method=method,
1443                header_params=header_params,
1444                body=create_dedicated_vm_host_details,
1445                response_type="DedicatedVmHost")
1446
1447    def create_image(self, create_image_details, **kwargs):
1448        """
1449        Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service.
1450
1451        When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and
1452        the OCID of the compartment containing that instance. For more information about images,
1453        see `Managing Custom Images`__.
1454
1455        When importing an exported image from Object Storage, you specify the source information
1456        in :func:`image_source_details`.
1457
1458        When importing an image based on the namespace, bucket name, and object name,
1459        use :func:`image_source_via_object_storage_tuple_details`.
1460
1461        When importing an image based on the Object Storage URL, use
1462        :func:`image_source_via_object_storage_uri_details`.
1463        See `Object Storage URLs`__ and `Using Pre-Authenticated Requests`__
1464        for constructing URLs for image import/export.
1465
1466        For more information about importing exported images, see
1467        `Image Import/Export`__.
1468
1469        You may optionally specify a *display name* for the image, which is simply a friendly name or description.
1470        It does not have to be unique, and you can change it. See :func:`update_image`.
1471        Avoid entering confidential information.
1472
1473        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm
1474        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs
1475        __ https://docs.cloud.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm
1476        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm
1477
1478
1479        :param oci.core.models.CreateImageDetails create_image_details: (required)
1480            Image creation details
1481
1482        :param str opc_retry_token: (optional)
1483            A token that uniquely identifies a request so it can be retried in case of a timeout or
1484            server error without risk of executing that same action again. Retry tokens expire after 24
1485            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
1486            has been deleted and purged from the system, then a retry of the original creation request
1487            may be rejected).
1488
1489        :param obj retry_strategy: (optional)
1490            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1491
1492            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1493            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1494
1495            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1496
1497        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Image`
1498        :rtype: :class:`~oci.response.Response`
1499
1500        :example:
1501        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_image.py.html>`__ to see an example of how to use create_image API.
1502        """
1503        resource_path = "/images"
1504        method = "POST"
1505
1506        # Don't accept unknown kwargs
1507        expected_kwargs = [
1508            "retry_strategy",
1509            "opc_retry_token"
1510        ]
1511        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1512        if extra_kwargs:
1513            raise ValueError(
1514                "create_image got unknown kwargs: {!r}".format(extra_kwargs))
1515
1516        header_params = {
1517            "accept": "application/json",
1518            "content-type": "application/json",
1519            "opc-retry-token": kwargs.get("opc_retry_token", missing)
1520        }
1521        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1522
1523        retry_strategy = self.base_client.get_preferred_retry_strategy(
1524            operation_retry_strategy=kwargs.get('retry_strategy'),
1525            client_retry_strategy=self.retry_strategy
1526        )
1527
1528        if retry_strategy:
1529            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1530                self.base_client.add_opc_retry_token_if_needed(header_params)
1531                self.base_client.add_opc_client_retries_header(header_params)
1532                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1533            return retry_strategy.make_retrying_call(
1534                self.base_client.call_api,
1535                resource_path=resource_path,
1536                method=method,
1537                header_params=header_params,
1538                body=create_image_details,
1539                response_type="Image")
1540        else:
1541            return self.base_client.call_api(
1542                resource_path=resource_path,
1543                method=method,
1544                header_params=header_params,
1545                body=create_image_details,
1546                response_type="Image")
1547
1548    def create_instance_console_connection(self, create_instance_console_connection_details, **kwargs):
1549        """
1550        Creates a new console connection to the specified instance.
1551        After the console connection has been created and is available,
1552        you connect to the console using SSH.
1553
1554        For more information about instance console connections, see `Troubleshooting Instances Using Instance Console Connections`__.
1555
1556        __ https://docs.cloud.oracle.com/iaas/Content/Compute/References/serialconsole.htm
1557
1558
1559        :param oci.core.models.CreateInstanceConsoleConnectionDetails create_instance_console_connection_details: (required)
1560            Request object for creating an InstanceConsoleConnection
1561
1562        :param str opc_retry_token: (optional)
1563            A token that uniquely identifies a request so it can be retried in case of a timeout or
1564            server error without risk of executing that same action again. Retry tokens expire after 24
1565            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
1566            has been deleted and purged from the system, then a retry of the original creation request
1567            may be rejected).
1568
1569        :param obj retry_strategy: (optional)
1570            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1571
1572            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1573            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1574
1575            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1576
1577        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InstanceConsoleConnection`
1578        :rtype: :class:`~oci.response.Response`
1579
1580        :example:
1581        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/create_instance_console_connection.py.html>`__ to see an example of how to use create_instance_console_connection API.
1582        """
1583        resource_path = "/instanceConsoleConnections"
1584        method = "POST"
1585
1586        # Don't accept unknown kwargs
1587        expected_kwargs = [
1588            "retry_strategy",
1589            "opc_retry_token"
1590        ]
1591        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1592        if extra_kwargs:
1593            raise ValueError(
1594                "create_instance_console_connection got unknown kwargs: {!r}".format(extra_kwargs))
1595
1596        header_params = {
1597            "accept": "application/json",
1598            "content-type": "application/json",
1599            "opc-retry-token": kwargs.get("opc_retry_token", missing)
1600        }
1601        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1602
1603        retry_strategy = self.base_client.get_preferred_retry_strategy(
1604            operation_retry_strategy=kwargs.get('retry_strategy'),
1605            client_retry_strategy=self.retry_strategy
1606        )
1607
1608        if retry_strategy:
1609            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1610                self.base_client.add_opc_retry_token_if_needed(header_params)
1611                self.base_client.add_opc_client_retries_header(header_params)
1612                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1613            return retry_strategy.make_retrying_call(
1614                self.base_client.call_api,
1615                resource_path=resource_path,
1616                method=method,
1617                header_params=header_params,
1618                body=create_instance_console_connection_details,
1619                response_type="InstanceConsoleConnection")
1620        else:
1621            return self.base_client.call_api(
1622                resource_path=resource_path,
1623                method=method,
1624                header_params=header_params,
1625                body=create_instance_console_connection_details,
1626                response_type="InstanceConsoleConnection")
1627
1628    def delete_app_catalog_subscription(self, listing_id, compartment_id, resource_version, **kwargs):
1629        """
1630        Delete a subscription for a listing resource version for a compartment.
1631
1632
1633        :param str listing_id: (required)
1634            The OCID of the listing.
1635
1636        :param str compartment_id: (required)
1637            The `OCID`__ of the compartment.
1638
1639            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1640
1641        :param str resource_version: (required)
1642            Listing Resource Version.
1643
1644        :param obj retry_strategy: (optional)
1645            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1646
1647            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1648            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1649
1650            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1651
1652        :return: A :class:`~oci.response.Response` object with data of type None
1653        :rtype: :class:`~oci.response.Response`
1654
1655        :example:
1656        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_app_catalog_subscription.py.html>`__ to see an example of how to use delete_app_catalog_subscription API.
1657        """
1658        resource_path = "/appCatalogSubscriptions"
1659        method = "DELETE"
1660
1661        expected_kwargs = ["retry_strategy"]
1662        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1663        if extra_kwargs:
1664            raise ValueError(
1665                "delete_app_catalog_subscription got unknown kwargs: {!r}".format(extra_kwargs))
1666
1667        query_params = {
1668            "listingId": listing_id,
1669            "compartmentId": compartment_id,
1670            "resourceVersion": resource_version
1671        }
1672        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1673
1674        header_params = {
1675            "accept": "application/json",
1676            "content-type": "application/json"
1677        }
1678
1679        retry_strategy = self.base_client.get_preferred_retry_strategy(
1680            operation_retry_strategy=kwargs.get('retry_strategy'),
1681            client_retry_strategy=self.retry_strategy
1682        )
1683
1684        if retry_strategy:
1685            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1686                self.base_client.add_opc_client_retries_header(header_params)
1687                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1688            return retry_strategy.make_retrying_call(
1689                self.base_client.call_api,
1690                resource_path=resource_path,
1691                method=method,
1692                query_params=query_params,
1693                header_params=header_params)
1694        else:
1695            return self.base_client.call_api(
1696                resource_path=resource_path,
1697                method=method,
1698                query_params=query_params,
1699                header_params=header_params)
1700
1701    def delete_compute_capacity_reservation(self, capacity_reservation_id, **kwargs):
1702        """
1703        Deletes the specified compute capacity reservation.
1704
1705
1706        :param str capacity_reservation_id: (required)
1707            The OCID of the compute capacity reservation.
1708
1709        :param str opc_request_id: (optional)
1710            Unique identifier for the request.
1711            If you need to contact Oracle about a particular request, please provide the request ID.
1712
1713        :param str if_match: (optional)
1714            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1715            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1716            will be updated or deleted only if the etag you provide matches the resource's current etag value.
1717
1718        :param obj retry_strategy: (optional)
1719            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1720
1721            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1722            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1723
1724            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1725
1726        :return: A :class:`~oci.response.Response` object with data of type None
1727        :rtype: :class:`~oci.response.Response`
1728
1729        :example:
1730        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_compute_capacity_reservation.py.html>`__ to see an example of how to use delete_compute_capacity_reservation API.
1731        """
1732        resource_path = "/computeCapacityReservations/{capacityReservationId}"
1733        method = "DELETE"
1734
1735        # Don't accept unknown kwargs
1736        expected_kwargs = [
1737            "retry_strategy",
1738            "opc_request_id",
1739            "if_match"
1740        ]
1741        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1742        if extra_kwargs:
1743            raise ValueError(
1744                "delete_compute_capacity_reservation got unknown kwargs: {!r}".format(extra_kwargs))
1745
1746        path_params = {
1747            "capacityReservationId": capacity_reservation_id
1748        }
1749
1750        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1751
1752        for (k, v) in six.iteritems(path_params):
1753            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1754                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1755
1756        header_params = {
1757            "accept": "application/json",
1758            "content-type": "application/json",
1759            "opc-request-id": kwargs.get("opc_request_id", missing),
1760            "if-match": kwargs.get("if_match", missing)
1761        }
1762        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1763
1764        retry_strategy = self.base_client.get_preferred_retry_strategy(
1765            operation_retry_strategy=kwargs.get('retry_strategy'),
1766            client_retry_strategy=self.retry_strategy
1767        )
1768
1769        if retry_strategy:
1770            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1771                self.base_client.add_opc_client_retries_header(header_params)
1772                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1773            return retry_strategy.make_retrying_call(
1774                self.base_client.call_api,
1775                resource_path=resource_path,
1776                method=method,
1777                path_params=path_params,
1778                header_params=header_params)
1779        else:
1780            return self.base_client.call_api(
1781                resource_path=resource_path,
1782                method=method,
1783                path_params=path_params,
1784                header_params=header_params)
1785
1786    def delete_compute_image_capability_schema(self, compute_image_capability_schema_id, **kwargs):
1787        """
1788        Deletes the specified Compute Image Capability Schema
1789
1790
1791        :param str compute_image_capability_schema_id: (required)
1792            The id of the compute image capability schema or the image ocid
1793
1794        :param str if_match: (optional)
1795            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1796            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1797            will be updated or deleted only if the etag you provide matches the resource's current etag value.
1798
1799        :param obj retry_strategy: (optional)
1800            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1801
1802            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1803            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1804
1805            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1806
1807        :return: A :class:`~oci.response.Response` object with data of type None
1808        :rtype: :class:`~oci.response.Response`
1809
1810        :example:
1811        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_compute_image_capability_schema.py.html>`__ to see an example of how to use delete_compute_image_capability_schema API.
1812        """
1813        resource_path = "/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}"
1814        method = "DELETE"
1815
1816        # Don't accept unknown kwargs
1817        expected_kwargs = [
1818            "retry_strategy",
1819            "if_match"
1820        ]
1821        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1822        if extra_kwargs:
1823            raise ValueError(
1824                "delete_compute_image_capability_schema got unknown kwargs: {!r}".format(extra_kwargs))
1825
1826        path_params = {
1827            "computeImageCapabilitySchemaId": compute_image_capability_schema_id
1828        }
1829
1830        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1831
1832        for (k, v) in six.iteritems(path_params):
1833            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1834                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1835
1836        header_params = {
1837            "accept": "application/json",
1838            "content-type": "application/json",
1839            "if-match": kwargs.get("if_match", missing)
1840        }
1841        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1842
1843        retry_strategy = self.base_client.get_preferred_retry_strategy(
1844            operation_retry_strategy=kwargs.get('retry_strategy'),
1845            client_retry_strategy=self.retry_strategy
1846        )
1847
1848        if retry_strategy:
1849            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1850                self.base_client.add_opc_client_retries_header(header_params)
1851                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1852            return retry_strategy.make_retrying_call(
1853                self.base_client.call_api,
1854                resource_path=resource_path,
1855                method=method,
1856                path_params=path_params,
1857                header_params=header_params)
1858        else:
1859            return self.base_client.call_api(
1860                resource_path=resource_path,
1861                method=method,
1862                path_params=path_params,
1863                header_params=header_params)
1864
1865    def delete_console_history(self, instance_console_history_id, **kwargs):
1866        """
1867        Deletes the specified console history metadata and the console history data.
1868
1869
1870        :param str instance_console_history_id: (required)
1871            The OCID of the console history.
1872
1873        :param str if_match: (optional)
1874            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1875            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1876            will be updated or deleted only if the etag you provide matches the resource's current etag value.
1877
1878        :param obj retry_strategy: (optional)
1879            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1880
1881            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1882            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1883
1884            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1885
1886        :return: A :class:`~oci.response.Response` object with data of type None
1887        :rtype: :class:`~oci.response.Response`
1888
1889        :example:
1890        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_console_history.py.html>`__ to see an example of how to use delete_console_history API.
1891        """
1892        resource_path = "/instanceConsoleHistories/{instanceConsoleHistoryId}"
1893        method = "DELETE"
1894
1895        # Don't accept unknown kwargs
1896        expected_kwargs = [
1897            "retry_strategy",
1898            "if_match"
1899        ]
1900        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1901        if extra_kwargs:
1902            raise ValueError(
1903                "delete_console_history got unknown kwargs: {!r}".format(extra_kwargs))
1904
1905        path_params = {
1906            "instanceConsoleHistoryId": instance_console_history_id
1907        }
1908
1909        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1910
1911        for (k, v) in six.iteritems(path_params):
1912            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1913                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1914
1915        header_params = {
1916            "accept": "application/json",
1917            "content-type": "application/json",
1918            "if-match": kwargs.get("if_match", missing)
1919        }
1920        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1921
1922        retry_strategy = self.base_client.get_preferred_retry_strategy(
1923            operation_retry_strategy=kwargs.get('retry_strategy'),
1924            client_retry_strategy=self.retry_strategy
1925        )
1926
1927        if retry_strategy:
1928            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1929                self.base_client.add_opc_client_retries_header(header_params)
1930                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1931            return retry_strategy.make_retrying_call(
1932                self.base_client.call_api,
1933                resource_path=resource_path,
1934                method=method,
1935                path_params=path_params,
1936                header_params=header_params)
1937        else:
1938            return self.base_client.call_api(
1939                resource_path=resource_path,
1940                method=method,
1941                path_params=path_params,
1942                header_params=header_params)
1943
1944    def delete_dedicated_vm_host(self, dedicated_vm_host_id, **kwargs):
1945        """
1946        Deletes the specified dedicated virtual machine host.
1947
1948        If any VM instances are assigned to the dedicated virtual machine host,
1949        the delete operation will fail and the service will return a 409 response code.
1950
1951
1952        :param str dedicated_vm_host_id: (required)
1953            The OCID of the dedicated VM host.
1954
1955        :param str opc_request_id: (optional)
1956            Unique identifier for the request.
1957            If you need to contact Oracle about a particular request, please provide the request ID.
1958
1959        :param obj retry_strategy: (optional)
1960            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1961
1962            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
1963            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1964
1965            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1966
1967        :return: A :class:`~oci.response.Response` object with data of type None
1968        :rtype: :class:`~oci.response.Response`
1969
1970        :example:
1971        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_dedicated_vm_host.py.html>`__ to see an example of how to use delete_dedicated_vm_host API.
1972        """
1973        resource_path = "/dedicatedVmHosts/{dedicatedVmHostId}"
1974        method = "DELETE"
1975
1976        # Don't accept unknown kwargs
1977        expected_kwargs = [
1978            "retry_strategy",
1979            "opc_request_id"
1980        ]
1981        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1982        if extra_kwargs:
1983            raise ValueError(
1984                "delete_dedicated_vm_host got unknown kwargs: {!r}".format(extra_kwargs))
1985
1986        path_params = {
1987            "dedicatedVmHostId": dedicated_vm_host_id
1988        }
1989
1990        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1991
1992        for (k, v) in six.iteritems(path_params):
1993            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1994                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
1995
1996        header_params = {
1997            "accept": "application/json",
1998            "content-type": "application/json",
1999            "opc-request-id": kwargs.get("opc_request_id", missing)
2000        }
2001        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2002
2003        retry_strategy = self.base_client.get_preferred_retry_strategy(
2004            operation_retry_strategy=kwargs.get('retry_strategy'),
2005            client_retry_strategy=self.retry_strategy
2006        )
2007
2008        if retry_strategy:
2009            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2010                self.base_client.add_opc_client_retries_header(header_params)
2011                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2012            return retry_strategy.make_retrying_call(
2013                self.base_client.call_api,
2014                resource_path=resource_path,
2015                method=method,
2016                path_params=path_params,
2017                header_params=header_params)
2018        else:
2019            return self.base_client.call_api(
2020                resource_path=resource_path,
2021                method=method,
2022                path_params=path_params,
2023                header_params=header_params)
2024
2025    def delete_image(self, image_id, **kwargs):
2026        """
2027        Deletes an image.
2028
2029
2030        :param str image_id: (required)
2031            The `OCID`__ of the image.
2032
2033            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
2034
2035        :param str if_match: (optional)
2036            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2037            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2038            will be updated or deleted only if the etag you provide matches the resource's current etag value.
2039
2040        :param obj retry_strategy: (optional)
2041            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2042
2043            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2044            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2045
2046            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2047
2048        :return: A :class:`~oci.response.Response` object with data of type None
2049        :rtype: :class:`~oci.response.Response`
2050
2051        :example:
2052        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_image.py.html>`__ to see an example of how to use delete_image API.
2053        """
2054        resource_path = "/images/{imageId}"
2055        method = "DELETE"
2056
2057        # Don't accept unknown kwargs
2058        expected_kwargs = [
2059            "retry_strategy",
2060            "if_match"
2061        ]
2062        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2063        if extra_kwargs:
2064            raise ValueError(
2065                "delete_image got unknown kwargs: {!r}".format(extra_kwargs))
2066
2067        path_params = {
2068            "imageId": image_id
2069        }
2070
2071        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2072
2073        for (k, v) in six.iteritems(path_params):
2074            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2075                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2076
2077        header_params = {
2078            "accept": "application/json",
2079            "content-type": "application/json",
2080            "if-match": kwargs.get("if_match", missing)
2081        }
2082        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2083
2084        retry_strategy = self.base_client.get_preferred_retry_strategy(
2085            operation_retry_strategy=kwargs.get('retry_strategy'),
2086            client_retry_strategy=self.retry_strategy
2087        )
2088
2089        if retry_strategy:
2090            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2091                self.base_client.add_opc_client_retries_header(header_params)
2092                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2093            return retry_strategy.make_retrying_call(
2094                self.base_client.call_api,
2095                resource_path=resource_path,
2096                method=method,
2097                path_params=path_params,
2098                header_params=header_params)
2099        else:
2100            return self.base_client.call_api(
2101                resource_path=resource_path,
2102                method=method,
2103                path_params=path_params,
2104                header_params=header_params)
2105
2106    def delete_instance_console_connection(self, instance_console_connection_id, **kwargs):
2107        """
2108        Deletes the specified instance console connection.
2109
2110
2111        :param str instance_console_connection_id: (required)
2112            The OCID of the instance console connection.
2113
2114        :param str if_match: (optional)
2115            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2116            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2117            will be updated or deleted only if the etag you provide matches the resource's current etag value.
2118
2119        :param obj retry_strategy: (optional)
2120            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2121
2122            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2123            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2124
2125            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2126
2127        :return: A :class:`~oci.response.Response` object with data of type None
2128        :rtype: :class:`~oci.response.Response`
2129
2130        :example:
2131        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/delete_instance_console_connection.py.html>`__ to see an example of how to use delete_instance_console_connection API.
2132        """
2133        resource_path = "/instanceConsoleConnections/{instanceConsoleConnectionId}"
2134        method = "DELETE"
2135
2136        # Don't accept unknown kwargs
2137        expected_kwargs = [
2138            "retry_strategy",
2139            "if_match"
2140        ]
2141        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2142        if extra_kwargs:
2143            raise ValueError(
2144                "delete_instance_console_connection got unknown kwargs: {!r}".format(extra_kwargs))
2145
2146        path_params = {
2147            "instanceConsoleConnectionId": instance_console_connection_id
2148        }
2149
2150        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2151
2152        for (k, v) in six.iteritems(path_params):
2153            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2154                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2155
2156        header_params = {
2157            "accept": "application/json",
2158            "content-type": "application/json",
2159            "if-match": kwargs.get("if_match", missing)
2160        }
2161        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2162
2163        retry_strategy = self.base_client.get_preferred_retry_strategy(
2164            operation_retry_strategy=kwargs.get('retry_strategy'),
2165            client_retry_strategy=self.retry_strategy
2166        )
2167
2168        if retry_strategy:
2169            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2170                self.base_client.add_opc_client_retries_header(header_params)
2171                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2172            return retry_strategy.make_retrying_call(
2173                self.base_client.call_api,
2174                resource_path=resource_path,
2175                method=method,
2176                path_params=path_params,
2177                header_params=header_params)
2178        else:
2179            return self.base_client.call_api(
2180                resource_path=resource_path,
2181                method=method,
2182                path_params=path_params,
2183                header_params=header_params)
2184
2185    def detach_boot_volume(self, boot_volume_attachment_id, **kwargs):
2186        """
2187        Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment.
2188
2189        This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily
2190        until the attachment is completely removed.
2191
2192
2193        :param str boot_volume_attachment_id: (required)
2194            The OCID of the boot volume attachment.
2195
2196        :param str if_match: (optional)
2197            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2198            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2199            will be updated or deleted only if the etag you provide matches the resource's current etag value.
2200
2201        :param obj retry_strategy: (optional)
2202            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2203
2204            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2205            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2206
2207            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2208
2209        :return: A :class:`~oci.response.Response` object with data of type None
2210        :rtype: :class:`~oci.response.Response`
2211
2212        :example:
2213        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/detach_boot_volume.py.html>`__ to see an example of how to use detach_boot_volume API.
2214        """
2215        resource_path = "/bootVolumeAttachments/{bootVolumeAttachmentId}"
2216        method = "DELETE"
2217
2218        # Don't accept unknown kwargs
2219        expected_kwargs = [
2220            "retry_strategy",
2221            "if_match"
2222        ]
2223        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2224        if extra_kwargs:
2225            raise ValueError(
2226                "detach_boot_volume got unknown kwargs: {!r}".format(extra_kwargs))
2227
2228        path_params = {
2229            "bootVolumeAttachmentId": boot_volume_attachment_id
2230        }
2231
2232        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2233
2234        for (k, v) in six.iteritems(path_params):
2235            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2236                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2237
2238        header_params = {
2239            "accept": "application/json",
2240            "content-type": "application/json",
2241            "if-match": kwargs.get("if_match", missing)
2242        }
2243        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2244
2245        retry_strategy = self.base_client.get_preferred_retry_strategy(
2246            operation_retry_strategy=kwargs.get('retry_strategy'),
2247            client_retry_strategy=self.retry_strategy
2248        )
2249
2250        if retry_strategy:
2251            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2252                self.base_client.add_opc_client_retries_header(header_params)
2253                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2254            return retry_strategy.make_retrying_call(
2255                self.base_client.call_api,
2256                resource_path=resource_path,
2257                method=method,
2258                path_params=path_params,
2259                header_params=header_params)
2260        else:
2261            return self.base_client.call_api(
2262                resource_path=resource_path,
2263                method=method,
2264                path_params=path_params,
2265                header_params=header_params)
2266
2267    def detach_vnic(self, vnic_attachment_id, **kwargs):
2268        """
2269        Detaches and deletes the specified secondary VNIC.
2270        This operation cannot be used on the instance's primary VNIC.
2271        When you terminate an instance, all attached VNICs (primary
2272        and secondary) are automatically detached and deleted.
2273
2274        **Important:** If the VNIC has a
2275        :class:`PrivateIp` that is the
2276        `target of a route rule`__,
2277        deleting the VNIC causes that route rule to blackhole and the traffic
2278        will be dropped.
2279
2280        __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#privateip
2281
2282
2283        :param str vnic_attachment_id: (required)
2284            The OCID of the VNIC attachment.
2285
2286        :param str if_match: (optional)
2287            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2288            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2289            will be updated or deleted only if the etag you provide matches the resource's current etag value.
2290
2291        :param obj retry_strategy: (optional)
2292            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2293
2294            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2295            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2296
2297            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2298
2299        :return: A :class:`~oci.response.Response` object with data of type None
2300        :rtype: :class:`~oci.response.Response`
2301
2302        :example:
2303        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/detach_vnic.py.html>`__ to see an example of how to use detach_vnic API.
2304        """
2305        resource_path = "/vnicAttachments/{vnicAttachmentId}"
2306        method = "DELETE"
2307
2308        # Don't accept unknown kwargs
2309        expected_kwargs = [
2310            "retry_strategy",
2311            "if_match"
2312        ]
2313        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2314        if extra_kwargs:
2315            raise ValueError(
2316                "detach_vnic got unknown kwargs: {!r}".format(extra_kwargs))
2317
2318        path_params = {
2319            "vnicAttachmentId": vnic_attachment_id
2320        }
2321
2322        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2323
2324        for (k, v) in six.iteritems(path_params):
2325            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2326                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2327
2328        header_params = {
2329            "accept": "application/json",
2330            "content-type": "application/json",
2331            "if-match": kwargs.get("if_match", missing)
2332        }
2333        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2334
2335        retry_strategy = self.base_client.get_preferred_retry_strategy(
2336            operation_retry_strategy=kwargs.get('retry_strategy'),
2337            client_retry_strategy=self.retry_strategy
2338        )
2339
2340        if retry_strategy:
2341            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2342                self.base_client.add_opc_client_retries_header(header_params)
2343                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2344            return retry_strategy.make_retrying_call(
2345                self.base_client.call_api,
2346                resource_path=resource_path,
2347                method=method,
2348                path_params=path_params,
2349                header_params=header_params)
2350        else:
2351            return self.base_client.call_api(
2352                resource_path=resource_path,
2353                method=method,
2354                path_params=path_params,
2355                header_params=header_params)
2356
2357    def detach_volume(self, volume_attachment_id, **kwargs):
2358        """
2359        Detaches a storage volume from an instance. You must specify the OCID of the volume attachment.
2360
2361        This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily
2362        until the attachment is completely removed.
2363
2364
2365        :param str volume_attachment_id: (required)
2366            The OCID of the volume attachment.
2367
2368        :param str if_match: (optional)
2369            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2370            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2371            will be updated or deleted only if the etag you provide matches the resource's current etag value.
2372
2373        :param obj retry_strategy: (optional)
2374            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2375
2376            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2377            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2378
2379            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2380
2381        :return: A :class:`~oci.response.Response` object with data of type None
2382        :rtype: :class:`~oci.response.Response`
2383
2384        :example:
2385        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/detach_volume.py.html>`__ to see an example of how to use detach_volume API.
2386        """
2387        resource_path = "/volumeAttachments/{volumeAttachmentId}"
2388        method = "DELETE"
2389
2390        # Don't accept unknown kwargs
2391        expected_kwargs = [
2392            "retry_strategy",
2393            "if_match"
2394        ]
2395        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2396        if extra_kwargs:
2397            raise ValueError(
2398                "detach_volume got unknown kwargs: {!r}".format(extra_kwargs))
2399
2400        path_params = {
2401            "volumeAttachmentId": volume_attachment_id
2402        }
2403
2404        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2405
2406        for (k, v) in six.iteritems(path_params):
2407            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2408                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2409
2410        header_params = {
2411            "accept": "application/json",
2412            "content-type": "application/json",
2413            "if-match": kwargs.get("if_match", missing)
2414        }
2415        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2416
2417        retry_strategy = self.base_client.get_preferred_retry_strategy(
2418            operation_retry_strategy=kwargs.get('retry_strategy'),
2419            client_retry_strategy=self.retry_strategy
2420        )
2421
2422        if retry_strategy:
2423            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2424                self.base_client.add_opc_client_retries_header(header_params)
2425                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2426            return retry_strategy.make_retrying_call(
2427                self.base_client.call_api,
2428                resource_path=resource_path,
2429                method=method,
2430                path_params=path_params,
2431                header_params=header_params)
2432        else:
2433            return self.base_client.call_api(
2434                resource_path=resource_path,
2435                method=method,
2436                path_params=path_params,
2437                header_params=header_params)
2438
2439    def export_image(self, image_id, export_image_details, **kwargs):
2440        """
2441        Exports the specified image to the Oracle Cloud Infrastructure Object Storage service. You can use the Object Storage URL,
2442        or the namespace, bucket name, and object name when specifying the location to export to.
2443
2444        For more information about exporting images, see `Image Import/Export`__.
2445
2446        To perform an image export, you need write access to the Object Storage bucket for the image,
2447        see `Let Users Write Objects to Object Storage Buckets`__.
2448
2449        See `Object Storage URLs`__ and `Using Pre-Authenticated Requests`__
2450        for constructing URLs for image import/export.
2451
2452        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm
2453        __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/commonpolicies.htm#Let4
2454        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs
2455        __ https://docs.cloud.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm
2456
2457
2458        :param str image_id: (required)
2459            The `OCID`__ of the image.
2460
2461            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
2462
2463        :param oci.core.models.ExportImageDetails export_image_details: (required)
2464            Details for the image export.
2465
2466        :param str opc_retry_token: (optional)
2467            A token that uniquely identifies a request so it can be retried in case of a timeout or
2468            server error without risk of executing that same action again. Retry tokens expire after 24
2469            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
2470            has been deleted and purged from the system, then a retry of the original creation request
2471            may be rejected).
2472
2473        :param str if_match: (optional)
2474            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2475            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2476            will be updated or deleted only if the etag you provide matches the resource's current etag value.
2477
2478        :param obj retry_strategy: (optional)
2479            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2480
2481            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2482            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2483
2484            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2485
2486        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Image`
2487        :rtype: :class:`~oci.response.Response`
2488
2489        :example:
2490        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/export_image.py.html>`__ to see an example of how to use export_image API.
2491        """
2492        resource_path = "/images/{imageId}/actions/export"
2493        method = "POST"
2494
2495        # Don't accept unknown kwargs
2496        expected_kwargs = [
2497            "retry_strategy",
2498            "opc_retry_token",
2499            "if_match"
2500        ]
2501        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2502        if extra_kwargs:
2503            raise ValueError(
2504                "export_image got unknown kwargs: {!r}".format(extra_kwargs))
2505
2506        path_params = {
2507            "imageId": image_id
2508        }
2509
2510        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2511
2512        for (k, v) in six.iteritems(path_params):
2513            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2514                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2515
2516        header_params = {
2517            "accept": "application/json",
2518            "content-type": "application/json",
2519            "opc-retry-token": kwargs.get("opc_retry_token", missing),
2520            "if-match": kwargs.get("if_match", missing)
2521        }
2522        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2523
2524        retry_strategy = self.base_client.get_preferred_retry_strategy(
2525            operation_retry_strategy=kwargs.get('retry_strategy'),
2526            client_retry_strategy=self.retry_strategy
2527        )
2528
2529        if retry_strategy:
2530            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2531                self.base_client.add_opc_retry_token_if_needed(header_params)
2532                self.base_client.add_opc_client_retries_header(header_params)
2533                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2534            return retry_strategy.make_retrying_call(
2535                self.base_client.call_api,
2536                resource_path=resource_path,
2537                method=method,
2538                path_params=path_params,
2539                header_params=header_params,
2540                body=export_image_details,
2541                response_type="Image")
2542        else:
2543            return self.base_client.call_api(
2544                resource_path=resource_path,
2545                method=method,
2546                path_params=path_params,
2547                header_params=header_params,
2548                body=export_image_details,
2549                response_type="Image")
2550
2551    def get_app_catalog_listing(self, listing_id, **kwargs):
2552        """
2553        Gets the specified listing.
2554
2555
2556        :param str listing_id: (required)
2557            The OCID of the listing.
2558
2559        :param obj retry_strategy: (optional)
2560            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2561
2562            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2563            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2564
2565            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2566
2567        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.AppCatalogListing`
2568        :rtype: :class:`~oci.response.Response`
2569
2570        :example:
2571        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_app_catalog_listing.py.html>`__ to see an example of how to use get_app_catalog_listing API.
2572        """
2573        resource_path = "/appCatalogListings/{listingId}"
2574        method = "GET"
2575
2576        expected_kwargs = ["retry_strategy"]
2577        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2578        if extra_kwargs:
2579            raise ValueError(
2580                "get_app_catalog_listing got unknown kwargs: {!r}".format(extra_kwargs))
2581
2582        path_params = {
2583            "listingId": listing_id
2584        }
2585
2586        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2587
2588        for (k, v) in six.iteritems(path_params):
2589            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2590                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2591
2592        header_params = {
2593            "accept": "application/json",
2594            "content-type": "application/json"
2595        }
2596
2597        retry_strategy = self.base_client.get_preferred_retry_strategy(
2598            operation_retry_strategy=kwargs.get('retry_strategy'),
2599            client_retry_strategy=self.retry_strategy
2600        )
2601
2602        if retry_strategy:
2603            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2604                self.base_client.add_opc_client_retries_header(header_params)
2605                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2606            return retry_strategy.make_retrying_call(
2607                self.base_client.call_api,
2608                resource_path=resource_path,
2609                method=method,
2610                path_params=path_params,
2611                header_params=header_params,
2612                response_type="AppCatalogListing")
2613        else:
2614            return self.base_client.call_api(
2615                resource_path=resource_path,
2616                method=method,
2617                path_params=path_params,
2618                header_params=header_params,
2619                response_type="AppCatalogListing")
2620
2621    def get_app_catalog_listing_agreements(self, listing_id, resource_version, **kwargs):
2622        """
2623        Retrieves the agreements for a particular resource version of a listing.
2624
2625
2626        :param str listing_id: (required)
2627            The OCID of the listing.
2628
2629        :param str resource_version: (required)
2630            Listing Resource Version.
2631
2632        :param obj retry_strategy: (optional)
2633            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2634
2635            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2636            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2637
2638            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2639
2640        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.AppCatalogListingResourceVersionAgreements`
2641        :rtype: :class:`~oci.response.Response`
2642
2643        :example:
2644        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_app_catalog_listing_agreements.py.html>`__ to see an example of how to use get_app_catalog_listing_agreements API.
2645        """
2646        resource_path = "/appCatalogListings/{listingId}/resourceVersions/{resourceVersion}/agreements"
2647        method = "GET"
2648
2649        expected_kwargs = ["retry_strategy"]
2650        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2651        if extra_kwargs:
2652            raise ValueError(
2653                "get_app_catalog_listing_agreements got unknown kwargs: {!r}".format(extra_kwargs))
2654
2655        path_params = {
2656            "listingId": listing_id,
2657            "resourceVersion": resource_version
2658        }
2659
2660        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2661
2662        for (k, v) in six.iteritems(path_params):
2663            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2664                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2665
2666        header_params = {
2667            "accept": "application/json",
2668            "content-type": "application/json"
2669        }
2670
2671        retry_strategy = self.base_client.get_preferred_retry_strategy(
2672            operation_retry_strategy=kwargs.get('retry_strategy'),
2673            client_retry_strategy=self.retry_strategy
2674        )
2675
2676        if retry_strategy:
2677            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2678                self.base_client.add_opc_client_retries_header(header_params)
2679                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2680            return retry_strategy.make_retrying_call(
2681                self.base_client.call_api,
2682                resource_path=resource_path,
2683                method=method,
2684                path_params=path_params,
2685                header_params=header_params,
2686                response_type="AppCatalogListingResourceVersionAgreements")
2687        else:
2688            return self.base_client.call_api(
2689                resource_path=resource_path,
2690                method=method,
2691                path_params=path_params,
2692                header_params=header_params,
2693                response_type="AppCatalogListingResourceVersionAgreements")
2694
2695    def get_app_catalog_listing_resource_version(self, listing_id, resource_version, **kwargs):
2696        """
2697        Gets the specified listing resource version.
2698
2699
2700        :param str listing_id: (required)
2701            The OCID of the listing.
2702
2703        :param str resource_version: (required)
2704            Listing Resource Version.
2705
2706        :param obj retry_strategy: (optional)
2707            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2708
2709            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2710            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2711
2712            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2713
2714        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.AppCatalogListingResourceVersion`
2715        :rtype: :class:`~oci.response.Response`
2716
2717        :example:
2718        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_app_catalog_listing_resource_version.py.html>`__ to see an example of how to use get_app_catalog_listing_resource_version API.
2719        """
2720        resource_path = "/appCatalogListings/{listingId}/resourceVersions/{resourceVersion}"
2721        method = "GET"
2722
2723        expected_kwargs = ["retry_strategy"]
2724        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2725        if extra_kwargs:
2726            raise ValueError(
2727                "get_app_catalog_listing_resource_version got unknown kwargs: {!r}".format(extra_kwargs))
2728
2729        path_params = {
2730            "listingId": listing_id,
2731            "resourceVersion": resource_version
2732        }
2733
2734        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2735
2736        for (k, v) in six.iteritems(path_params):
2737            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2738                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2739
2740        header_params = {
2741            "accept": "application/json",
2742            "content-type": "application/json"
2743        }
2744
2745        retry_strategy = self.base_client.get_preferred_retry_strategy(
2746            operation_retry_strategy=kwargs.get('retry_strategy'),
2747            client_retry_strategy=self.retry_strategy
2748        )
2749
2750        if retry_strategy:
2751            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2752                self.base_client.add_opc_client_retries_header(header_params)
2753                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2754            return retry_strategy.make_retrying_call(
2755                self.base_client.call_api,
2756                resource_path=resource_path,
2757                method=method,
2758                path_params=path_params,
2759                header_params=header_params,
2760                response_type="AppCatalogListingResourceVersion")
2761        else:
2762            return self.base_client.call_api(
2763                resource_path=resource_path,
2764                method=method,
2765                path_params=path_params,
2766                header_params=header_params,
2767                response_type="AppCatalogListingResourceVersion")
2768
2769    def get_boot_volume_attachment(self, boot_volume_attachment_id, **kwargs):
2770        """
2771        Gets information about the specified boot volume attachment.
2772
2773
2774        :param str boot_volume_attachment_id: (required)
2775            The OCID of the boot volume attachment.
2776
2777        :param obj retry_strategy: (optional)
2778            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2779
2780            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2781            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2782
2783            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2784
2785        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.BootVolumeAttachment`
2786        :rtype: :class:`~oci.response.Response`
2787
2788        :example:
2789        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_boot_volume_attachment.py.html>`__ to see an example of how to use get_boot_volume_attachment API.
2790        """
2791        resource_path = "/bootVolumeAttachments/{bootVolumeAttachmentId}"
2792        method = "GET"
2793
2794        expected_kwargs = ["retry_strategy"]
2795        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2796        if extra_kwargs:
2797            raise ValueError(
2798                "get_boot_volume_attachment got unknown kwargs: {!r}".format(extra_kwargs))
2799
2800        path_params = {
2801            "bootVolumeAttachmentId": boot_volume_attachment_id
2802        }
2803
2804        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2805
2806        for (k, v) in six.iteritems(path_params):
2807            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2808                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2809
2810        header_params = {
2811            "accept": "application/json",
2812            "content-type": "application/json"
2813        }
2814
2815        retry_strategy = self.base_client.get_preferred_retry_strategy(
2816            operation_retry_strategy=kwargs.get('retry_strategy'),
2817            client_retry_strategy=self.retry_strategy
2818        )
2819
2820        if retry_strategy:
2821            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2822                self.base_client.add_opc_client_retries_header(header_params)
2823                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2824            return retry_strategy.make_retrying_call(
2825                self.base_client.call_api,
2826                resource_path=resource_path,
2827                method=method,
2828                path_params=path_params,
2829                header_params=header_params,
2830                response_type="BootVolumeAttachment")
2831        else:
2832            return self.base_client.call_api(
2833                resource_path=resource_path,
2834                method=method,
2835                path_params=path_params,
2836                header_params=header_params,
2837                response_type="BootVolumeAttachment")
2838
2839    def get_compute_capacity_reservation(self, capacity_reservation_id, **kwargs):
2840        """
2841        Gets information about the specified compute capacity reservation.
2842
2843
2844        :param str capacity_reservation_id: (required)
2845            The OCID of the compute capacity reservation.
2846
2847        :param str opc_request_id: (optional)
2848            Unique identifier for the request.
2849            If you need to contact Oracle about a particular request, please provide the request ID.
2850
2851        :param obj retry_strategy: (optional)
2852            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2853
2854            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2855            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2856
2857            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2858
2859        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeCapacityReservation`
2860        :rtype: :class:`~oci.response.Response`
2861
2862        :example:
2863        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_compute_capacity_reservation.py.html>`__ to see an example of how to use get_compute_capacity_reservation API.
2864        """
2865        resource_path = "/computeCapacityReservations/{capacityReservationId}"
2866        method = "GET"
2867
2868        # Don't accept unknown kwargs
2869        expected_kwargs = [
2870            "retry_strategy",
2871            "opc_request_id"
2872        ]
2873        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2874        if extra_kwargs:
2875            raise ValueError(
2876                "get_compute_capacity_reservation got unknown kwargs: {!r}".format(extra_kwargs))
2877
2878        path_params = {
2879            "capacityReservationId": capacity_reservation_id
2880        }
2881
2882        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2883
2884        for (k, v) in six.iteritems(path_params):
2885            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2886                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2887
2888        header_params = {
2889            "accept": "application/json",
2890            "content-type": "application/json",
2891            "opc-request-id": kwargs.get("opc_request_id", missing)
2892        }
2893        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2894
2895        retry_strategy = self.base_client.get_preferred_retry_strategy(
2896            operation_retry_strategy=kwargs.get('retry_strategy'),
2897            client_retry_strategy=self.retry_strategy
2898        )
2899
2900        if retry_strategy:
2901            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2902                self.base_client.add_opc_client_retries_header(header_params)
2903                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2904            return retry_strategy.make_retrying_call(
2905                self.base_client.call_api,
2906                resource_path=resource_path,
2907                method=method,
2908                path_params=path_params,
2909                header_params=header_params,
2910                response_type="ComputeCapacityReservation")
2911        else:
2912            return self.base_client.call_api(
2913                resource_path=resource_path,
2914                method=method,
2915                path_params=path_params,
2916                header_params=header_params,
2917                response_type="ComputeCapacityReservation")
2918
2919    def get_compute_global_image_capability_schema(self, compute_global_image_capability_schema_id, **kwargs):
2920        """
2921        Gets the specified Compute Global Image Capability Schema
2922
2923
2924        :param str compute_global_image_capability_schema_id: (required)
2925            The `OCID`__ of the compute global image capability schema
2926
2927            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
2928
2929        :param obj retry_strategy: (optional)
2930            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2931
2932            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
2933            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2934
2935            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2936
2937        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeGlobalImageCapabilitySchema`
2938        :rtype: :class:`~oci.response.Response`
2939
2940        :example:
2941        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_compute_global_image_capability_schema.py.html>`__ to see an example of how to use get_compute_global_image_capability_schema API.
2942        """
2943        resource_path = "/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}"
2944        method = "GET"
2945
2946        expected_kwargs = ["retry_strategy"]
2947        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2948        if extra_kwargs:
2949            raise ValueError(
2950                "get_compute_global_image_capability_schema got unknown kwargs: {!r}".format(extra_kwargs))
2951
2952        path_params = {
2953            "computeGlobalImageCapabilitySchemaId": compute_global_image_capability_schema_id
2954        }
2955
2956        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2957
2958        for (k, v) in six.iteritems(path_params):
2959            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2960                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
2961
2962        header_params = {
2963            "accept": "application/json",
2964            "content-type": "application/json"
2965        }
2966
2967        retry_strategy = self.base_client.get_preferred_retry_strategy(
2968            operation_retry_strategy=kwargs.get('retry_strategy'),
2969            client_retry_strategy=self.retry_strategy
2970        )
2971
2972        if retry_strategy:
2973            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2974                self.base_client.add_opc_client_retries_header(header_params)
2975                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2976            return retry_strategy.make_retrying_call(
2977                self.base_client.call_api,
2978                resource_path=resource_path,
2979                method=method,
2980                path_params=path_params,
2981                header_params=header_params,
2982                response_type="ComputeGlobalImageCapabilitySchema")
2983        else:
2984            return self.base_client.call_api(
2985                resource_path=resource_path,
2986                method=method,
2987                path_params=path_params,
2988                header_params=header_params,
2989                response_type="ComputeGlobalImageCapabilitySchema")
2990
2991    def get_compute_global_image_capability_schema_version(self, compute_global_image_capability_schema_id, compute_global_image_capability_schema_version_name, **kwargs):
2992        """
2993        Gets the specified Compute Global Image Capability Schema Version
2994
2995
2996        :param str compute_global_image_capability_schema_id: (required)
2997            The `OCID`__ of the compute global image capability schema
2998
2999            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
3000
3001        :param str compute_global_image_capability_schema_version_name: (required)
3002            The name of the compute global image capability schema version
3003
3004        :param obj retry_strategy: (optional)
3005            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3006
3007            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3008            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3009
3010            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3011
3012        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeGlobalImageCapabilitySchemaVersion`
3013        :rtype: :class:`~oci.response.Response`
3014
3015        :example:
3016        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_compute_global_image_capability_schema_version.py.html>`__ to see an example of how to use get_compute_global_image_capability_schema_version API.
3017        """
3018        resource_path = "/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}/versions/{computeGlobalImageCapabilitySchemaVersionName}"
3019        method = "GET"
3020
3021        expected_kwargs = ["retry_strategy"]
3022        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3023        if extra_kwargs:
3024            raise ValueError(
3025                "get_compute_global_image_capability_schema_version got unknown kwargs: {!r}".format(extra_kwargs))
3026
3027        path_params = {
3028            "computeGlobalImageCapabilitySchemaId": compute_global_image_capability_schema_id,
3029            "computeGlobalImageCapabilitySchemaVersionName": compute_global_image_capability_schema_version_name
3030        }
3031
3032        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3033
3034        for (k, v) in six.iteritems(path_params):
3035            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3036                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3037
3038        header_params = {
3039            "accept": "application/json",
3040            "content-type": "application/json"
3041        }
3042
3043        retry_strategy = self.base_client.get_preferred_retry_strategy(
3044            operation_retry_strategy=kwargs.get('retry_strategy'),
3045            client_retry_strategy=self.retry_strategy
3046        )
3047
3048        if retry_strategy:
3049            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3050                self.base_client.add_opc_client_retries_header(header_params)
3051                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3052            return retry_strategy.make_retrying_call(
3053                self.base_client.call_api,
3054                resource_path=resource_path,
3055                method=method,
3056                path_params=path_params,
3057                header_params=header_params,
3058                response_type="ComputeGlobalImageCapabilitySchemaVersion")
3059        else:
3060            return self.base_client.call_api(
3061                resource_path=resource_path,
3062                method=method,
3063                path_params=path_params,
3064                header_params=header_params,
3065                response_type="ComputeGlobalImageCapabilitySchemaVersion")
3066
3067    def get_compute_image_capability_schema(self, compute_image_capability_schema_id, **kwargs):
3068        """
3069        Gets the specified Compute Image Capability Schema
3070
3071
3072        :param str compute_image_capability_schema_id: (required)
3073            The id of the compute image capability schema or the image ocid
3074
3075        :param bool is_merge_enabled: (optional)
3076            Merge the image capability schema with the global image capability schema
3077
3078        :param obj retry_strategy: (optional)
3079            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3080
3081            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3082            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3083
3084            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3085
3086        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeImageCapabilitySchema`
3087        :rtype: :class:`~oci.response.Response`
3088
3089        :example:
3090        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_compute_image_capability_schema.py.html>`__ to see an example of how to use get_compute_image_capability_schema API.
3091        """
3092        resource_path = "/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}"
3093        method = "GET"
3094
3095        # Don't accept unknown kwargs
3096        expected_kwargs = [
3097            "retry_strategy",
3098            "is_merge_enabled"
3099        ]
3100        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3101        if extra_kwargs:
3102            raise ValueError(
3103                "get_compute_image_capability_schema got unknown kwargs: {!r}".format(extra_kwargs))
3104
3105        path_params = {
3106            "computeImageCapabilitySchemaId": compute_image_capability_schema_id
3107        }
3108
3109        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3110
3111        for (k, v) in six.iteritems(path_params):
3112            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3113                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3114
3115        query_params = {
3116            "isMergeEnabled": kwargs.get("is_merge_enabled", missing)
3117        }
3118        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
3119
3120        header_params = {
3121            "accept": "application/json",
3122            "content-type": "application/json"
3123        }
3124
3125        retry_strategy = self.base_client.get_preferred_retry_strategy(
3126            operation_retry_strategy=kwargs.get('retry_strategy'),
3127            client_retry_strategy=self.retry_strategy
3128        )
3129
3130        if retry_strategy:
3131            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3132                self.base_client.add_opc_client_retries_header(header_params)
3133                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3134            return retry_strategy.make_retrying_call(
3135                self.base_client.call_api,
3136                resource_path=resource_path,
3137                method=method,
3138                path_params=path_params,
3139                query_params=query_params,
3140                header_params=header_params,
3141                response_type="ComputeImageCapabilitySchema")
3142        else:
3143            return self.base_client.call_api(
3144                resource_path=resource_path,
3145                method=method,
3146                path_params=path_params,
3147                query_params=query_params,
3148                header_params=header_params,
3149                response_type="ComputeImageCapabilitySchema")
3150
3151    def get_console_history(self, instance_console_history_id, **kwargs):
3152        """
3153        Shows the metadata for the specified console history.
3154        See :func:`capture_console_history`
3155        for details about using the console history operations.
3156
3157
3158        :param str instance_console_history_id: (required)
3159            The OCID of the console history.
3160
3161        :param obj retry_strategy: (optional)
3162            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3163
3164            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3165            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3166
3167            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3168
3169        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ConsoleHistory`
3170        :rtype: :class:`~oci.response.Response`
3171
3172        :example:
3173        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_console_history.py.html>`__ to see an example of how to use get_console_history API.
3174        """
3175        resource_path = "/instanceConsoleHistories/{instanceConsoleHistoryId}"
3176        method = "GET"
3177
3178        expected_kwargs = ["retry_strategy"]
3179        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3180        if extra_kwargs:
3181            raise ValueError(
3182                "get_console_history got unknown kwargs: {!r}".format(extra_kwargs))
3183
3184        path_params = {
3185            "instanceConsoleHistoryId": instance_console_history_id
3186        }
3187
3188        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3189
3190        for (k, v) in six.iteritems(path_params):
3191            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3192                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3193
3194        header_params = {
3195            "accept": "application/json",
3196            "content-type": "application/json"
3197        }
3198
3199        retry_strategy = self.base_client.get_preferred_retry_strategy(
3200            operation_retry_strategy=kwargs.get('retry_strategy'),
3201            client_retry_strategy=self.retry_strategy
3202        )
3203
3204        if retry_strategy:
3205            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3206                self.base_client.add_opc_client_retries_header(header_params)
3207                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3208            return retry_strategy.make_retrying_call(
3209                self.base_client.call_api,
3210                resource_path=resource_path,
3211                method=method,
3212                path_params=path_params,
3213                header_params=header_params,
3214                response_type="ConsoleHistory")
3215        else:
3216            return self.base_client.call_api(
3217                resource_path=resource_path,
3218                method=method,
3219                path_params=path_params,
3220                header_params=header_params,
3221                response_type="ConsoleHistory")
3222
3223    def get_console_history_content(self, instance_console_history_id, **kwargs):
3224        """
3225        Gets the actual console history data (not the metadata).
3226        See :func:`capture_console_history`
3227        for details about using the console history operations.
3228
3229
3230        :param str instance_console_history_id: (required)
3231            The OCID of the console history.
3232
3233        :param int offset: (optional)
3234            Offset of the snapshot data to retrieve.
3235
3236        :param int length: (optional)
3237            Length of the snapshot data to retrieve.
3238
3239        :param obj retry_strategy: (optional)
3240            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3241
3242            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3243            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3244
3245            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3246
3247        :return: A :class:`~oci.response.Response` object with data of type bytes
3248        :rtype: :class:`~oci.response.Response`
3249
3250        :example:
3251        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_console_history_content.py.html>`__ to see an example of how to use get_console_history_content API.
3252        """
3253        resource_path = "/instanceConsoleHistories/{instanceConsoleHistoryId}/data"
3254        method = "GET"
3255
3256        # Don't accept unknown kwargs
3257        expected_kwargs = [
3258            "retry_strategy",
3259            "offset",
3260            "length"
3261        ]
3262        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3263        if extra_kwargs:
3264            raise ValueError(
3265                "get_console_history_content got unknown kwargs: {!r}".format(extra_kwargs))
3266
3267        path_params = {
3268            "instanceConsoleHistoryId": instance_console_history_id
3269        }
3270
3271        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3272
3273        for (k, v) in six.iteritems(path_params):
3274            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3275                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3276
3277        query_params = {
3278            "offset": kwargs.get("offset", missing),
3279            "length": kwargs.get("length", missing)
3280        }
3281        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
3282
3283        header_params = {
3284            "accept": "application/json",
3285            "content-type": "application/json"
3286        }
3287
3288        retry_strategy = self.base_client.get_preferred_retry_strategy(
3289            operation_retry_strategy=kwargs.get('retry_strategy'),
3290            client_retry_strategy=self.retry_strategy
3291        )
3292
3293        if retry_strategy:
3294            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3295                self.base_client.add_opc_client_retries_header(header_params)
3296                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3297            return retry_strategy.make_retrying_call(
3298                self.base_client.call_api,
3299                resource_path=resource_path,
3300                method=method,
3301                path_params=path_params,
3302                query_params=query_params,
3303                header_params=header_params,
3304                response_type="bytes")
3305        else:
3306            return self.base_client.call_api(
3307                resource_path=resource_path,
3308                method=method,
3309                path_params=path_params,
3310                query_params=query_params,
3311                header_params=header_params,
3312                response_type="bytes")
3313
3314    def get_dedicated_vm_host(self, dedicated_vm_host_id, **kwargs):
3315        """
3316        Gets information about the specified dedicated virtual machine host.
3317
3318
3319        :param str dedicated_vm_host_id: (required)
3320            The OCID of the dedicated VM host.
3321
3322        :param str opc_request_id: (optional)
3323            Unique identifier for the request.
3324            If you need to contact Oracle about a particular request, please provide the request ID.
3325
3326        :param obj retry_strategy: (optional)
3327            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3328
3329            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3330            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3331
3332            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3333
3334        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DedicatedVmHost`
3335        :rtype: :class:`~oci.response.Response`
3336
3337        :example:
3338        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_dedicated_vm_host.py.html>`__ to see an example of how to use get_dedicated_vm_host API.
3339        """
3340        resource_path = "/dedicatedVmHosts/{dedicatedVmHostId}"
3341        method = "GET"
3342
3343        # Don't accept unknown kwargs
3344        expected_kwargs = [
3345            "retry_strategy",
3346            "opc_request_id"
3347        ]
3348        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3349        if extra_kwargs:
3350            raise ValueError(
3351                "get_dedicated_vm_host got unknown kwargs: {!r}".format(extra_kwargs))
3352
3353        path_params = {
3354            "dedicatedVmHostId": dedicated_vm_host_id
3355        }
3356
3357        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3358
3359        for (k, v) in six.iteritems(path_params):
3360            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3361                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3362
3363        header_params = {
3364            "accept": "application/json",
3365            "content-type": "application/json",
3366            "opc-request-id": kwargs.get("opc_request_id", missing)
3367        }
3368        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3369
3370        retry_strategy = self.base_client.get_preferred_retry_strategy(
3371            operation_retry_strategy=kwargs.get('retry_strategy'),
3372            client_retry_strategy=self.retry_strategy
3373        )
3374
3375        if retry_strategy:
3376            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3377                self.base_client.add_opc_client_retries_header(header_params)
3378                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3379            return retry_strategy.make_retrying_call(
3380                self.base_client.call_api,
3381                resource_path=resource_path,
3382                method=method,
3383                path_params=path_params,
3384                header_params=header_params,
3385                response_type="DedicatedVmHost")
3386        else:
3387            return self.base_client.call_api(
3388                resource_path=resource_path,
3389                method=method,
3390                path_params=path_params,
3391                header_params=header_params,
3392                response_type="DedicatedVmHost")
3393
3394    def get_image(self, image_id, **kwargs):
3395        """
3396        Gets the specified image.
3397
3398
3399        :param str image_id: (required)
3400            The `OCID`__ of the image.
3401
3402            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
3403
3404        :param obj retry_strategy: (optional)
3405            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3406
3407            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3408            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3409
3410            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3411
3412        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Image`
3413        :rtype: :class:`~oci.response.Response`
3414
3415        :example:
3416        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_image.py.html>`__ to see an example of how to use get_image API.
3417        """
3418        resource_path = "/images/{imageId}"
3419        method = "GET"
3420
3421        expected_kwargs = ["retry_strategy"]
3422        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3423        if extra_kwargs:
3424            raise ValueError(
3425                "get_image got unknown kwargs: {!r}".format(extra_kwargs))
3426
3427        path_params = {
3428            "imageId": image_id
3429        }
3430
3431        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3432
3433        for (k, v) in six.iteritems(path_params):
3434            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3435                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3436
3437        header_params = {
3438            "accept": "application/json",
3439            "content-type": "application/json"
3440        }
3441
3442        retry_strategy = self.base_client.get_preferred_retry_strategy(
3443            operation_retry_strategy=kwargs.get('retry_strategy'),
3444            client_retry_strategy=self.retry_strategy
3445        )
3446
3447        if retry_strategy:
3448            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3449                self.base_client.add_opc_client_retries_header(header_params)
3450                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3451            return retry_strategy.make_retrying_call(
3452                self.base_client.call_api,
3453                resource_path=resource_path,
3454                method=method,
3455                path_params=path_params,
3456                header_params=header_params,
3457                response_type="Image")
3458        else:
3459            return self.base_client.call_api(
3460                resource_path=resource_path,
3461                method=method,
3462                path_params=path_params,
3463                header_params=header_params,
3464                response_type="Image")
3465
3466    def get_image_shape_compatibility_entry(self, image_id, shape_name, **kwargs):
3467        """
3468        Retrieves an image shape compatibility entry.
3469
3470
3471        :param str image_id: (required)
3472            The `OCID`__ of the image.
3473
3474            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
3475
3476        :param str shape_name: (required)
3477            Shape name.
3478
3479        :param str opc_request_id: (optional)
3480            Unique identifier for the request.
3481            If you need to contact Oracle about a particular request, please provide the request ID.
3482
3483        :param obj retry_strategy: (optional)
3484            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3485
3486            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3487            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3488
3489            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3490
3491        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ImageShapeCompatibilityEntry`
3492        :rtype: :class:`~oci.response.Response`
3493
3494        :example:
3495        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_image_shape_compatibility_entry.py.html>`__ to see an example of how to use get_image_shape_compatibility_entry API.
3496        """
3497        resource_path = "/images/{imageId}/shapes/{shapeName}"
3498        method = "GET"
3499
3500        # Don't accept unknown kwargs
3501        expected_kwargs = [
3502            "retry_strategy",
3503            "opc_request_id"
3504        ]
3505        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3506        if extra_kwargs:
3507            raise ValueError(
3508                "get_image_shape_compatibility_entry got unknown kwargs: {!r}".format(extra_kwargs))
3509
3510        path_params = {
3511            "imageId": image_id,
3512            "shapeName": shape_name
3513        }
3514
3515        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3516
3517        for (k, v) in six.iteritems(path_params):
3518            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3519                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3520
3521        header_params = {
3522            "accept": "application/json",
3523            "content-type": "application/json",
3524            "opc-request-id": kwargs.get("opc_request_id", missing)
3525        }
3526        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3527
3528        retry_strategy = self.base_client.get_preferred_retry_strategy(
3529            operation_retry_strategy=kwargs.get('retry_strategy'),
3530            client_retry_strategy=self.retry_strategy
3531        )
3532
3533        if retry_strategy:
3534            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3535                self.base_client.add_opc_client_retries_header(header_params)
3536                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3537            return retry_strategy.make_retrying_call(
3538                self.base_client.call_api,
3539                resource_path=resource_path,
3540                method=method,
3541                path_params=path_params,
3542                header_params=header_params,
3543                response_type="ImageShapeCompatibilityEntry")
3544        else:
3545            return self.base_client.call_api(
3546                resource_path=resource_path,
3547                method=method,
3548                path_params=path_params,
3549                header_params=header_params,
3550                response_type="ImageShapeCompatibilityEntry")
3551
3552    def get_instance(self, instance_id, **kwargs):
3553        """
3554        Gets information about the specified instance.
3555
3556
3557        :param str instance_id: (required)
3558            The `OCID`__ of the instance.
3559
3560            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
3561
3562        :param obj retry_strategy: (optional)
3563            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3564
3565            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3566            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3567
3568            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3569
3570        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Instance`
3571        :rtype: :class:`~oci.response.Response`
3572
3573        :example:
3574        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_instance.py.html>`__ to see an example of how to use get_instance API.
3575        """
3576        resource_path = "/instances/{instanceId}"
3577        method = "GET"
3578
3579        expected_kwargs = ["retry_strategy"]
3580        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3581        if extra_kwargs:
3582            raise ValueError(
3583                "get_instance got unknown kwargs: {!r}".format(extra_kwargs))
3584
3585        path_params = {
3586            "instanceId": instance_id
3587        }
3588
3589        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3590
3591        for (k, v) in six.iteritems(path_params):
3592            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3593                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3594
3595        header_params = {
3596            "accept": "application/json",
3597            "content-type": "application/json"
3598        }
3599
3600        retry_strategy = self.base_client.get_preferred_retry_strategy(
3601            operation_retry_strategy=kwargs.get('retry_strategy'),
3602            client_retry_strategy=self.retry_strategy
3603        )
3604
3605        if retry_strategy:
3606            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3607                self.base_client.add_opc_client_retries_header(header_params)
3608                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3609            return retry_strategy.make_retrying_call(
3610                self.base_client.call_api,
3611                resource_path=resource_path,
3612                method=method,
3613                path_params=path_params,
3614                header_params=header_params,
3615                response_type="Instance")
3616        else:
3617            return self.base_client.call_api(
3618                resource_path=resource_path,
3619                method=method,
3620                path_params=path_params,
3621                header_params=header_params,
3622                response_type="Instance")
3623
3624    def get_instance_console_connection(self, instance_console_connection_id, **kwargs):
3625        """
3626        Gets the specified instance console connection's information.
3627
3628
3629        :param str instance_console_connection_id: (required)
3630            The OCID of the instance console connection.
3631
3632        :param obj retry_strategy: (optional)
3633            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3634
3635            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3636            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3637
3638            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3639
3640        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InstanceConsoleConnection`
3641        :rtype: :class:`~oci.response.Response`
3642
3643        :example:
3644        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_instance_console_connection.py.html>`__ to see an example of how to use get_instance_console_connection API.
3645        """
3646        resource_path = "/instanceConsoleConnections/{instanceConsoleConnectionId}"
3647        method = "GET"
3648
3649        expected_kwargs = ["retry_strategy"]
3650        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3651        if extra_kwargs:
3652            raise ValueError(
3653                "get_instance_console_connection got unknown kwargs: {!r}".format(extra_kwargs))
3654
3655        path_params = {
3656            "instanceConsoleConnectionId": instance_console_connection_id
3657        }
3658
3659        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3660
3661        for (k, v) in six.iteritems(path_params):
3662            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3663                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3664
3665        header_params = {
3666            "accept": "application/json",
3667            "content-type": "application/json"
3668        }
3669
3670        retry_strategy = self.base_client.get_preferred_retry_strategy(
3671            operation_retry_strategy=kwargs.get('retry_strategy'),
3672            client_retry_strategy=self.retry_strategy
3673        )
3674
3675        if retry_strategy:
3676            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3677                self.base_client.add_opc_client_retries_header(header_params)
3678                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3679            return retry_strategy.make_retrying_call(
3680                self.base_client.call_api,
3681                resource_path=resource_path,
3682                method=method,
3683                path_params=path_params,
3684                header_params=header_params,
3685                response_type="InstanceConsoleConnection")
3686        else:
3687            return self.base_client.call_api(
3688                resource_path=resource_path,
3689                method=method,
3690                path_params=path_params,
3691                header_params=header_params,
3692                response_type="InstanceConsoleConnection")
3693
3694    def get_measured_boot_report(self, instance_id, **kwargs):
3695        """
3696        Gets the measured boot report for this shielded instance.
3697
3698
3699        :param str instance_id: (required)
3700            The `OCID`__ of the instance.
3701
3702            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
3703
3704        :param str opc_request_id: (optional)
3705            Unique identifier for the request.
3706            If you need to contact Oracle about a particular request, please provide the request ID.
3707
3708        :param obj retry_strategy: (optional)
3709            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3710
3711            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3712            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3713
3714            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3715
3716        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.MeasuredBootReport`
3717        :rtype: :class:`~oci.response.Response`
3718
3719        :example:
3720        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_measured_boot_report.py.html>`__ to see an example of how to use get_measured_boot_report API.
3721        """
3722        resource_path = "/instances/{instanceId}/measuredBootReport"
3723        method = "GET"
3724
3725        # Don't accept unknown kwargs
3726        expected_kwargs = [
3727            "retry_strategy",
3728            "opc_request_id"
3729        ]
3730        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3731        if extra_kwargs:
3732            raise ValueError(
3733                "get_measured_boot_report got unknown kwargs: {!r}".format(extra_kwargs))
3734
3735        path_params = {
3736            "instanceId": instance_id
3737        }
3738
3739        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3740
3741        for (k, v) in six.iteritems(path_params):
3742            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3743                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3744
3745        header_params = {
3746            "accept": "application/json",
3747            "content-type": "application/json",
3748            "opc-request-id": kwargs.get("opc_request_id", missing)
3749        }
3750        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3751
3752        retry_strategy = self.base_client.get_preferred_retry_strategy(
3753            operation_retry_strategy=kwargs.get('retry_strategy'),
3754            client_retry_strategy=self.retry_strategy
3755        )
3756
3757        if retry_strategy:
3758            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3759                self.base_client.add_opc_client_retries_header(header_params)
3760                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3761            return retry_strategy.make_retrying_call(
3762                self.base_client.call_api,
3763                resource_path=resource_path,
3764                method=method,
3765                path_params=path_params,
3766                header_params=header_params,
3767                response_type="MeasuredBootReport")
3768        else:
3769            return self.base_client.call_api(
3770                resource_path=resource_path,
3771                method=method,
3772                path_params=path_params,
3773                header_params=header_params,
3774                response_type="MeasuredBootReport")
3775
3776    def get_vnic_attachment(self, vnic_attachment_id, **kwargs):
3777        """
3778        Gets the information for the specified VNIC attachment.
3779
3780
3781        :param str vnic_attachment_id: (required)
3782            The OCID of the VNIC attachment.
3783
3784        :param obj retry_strategy: (optional)
3785            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3786
3787            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3788            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3789
3790            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3791
3792        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VnicAttachment`
3793        :rtype: :class:`~oci.response.Response`
3794
3795        :example:
3796        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_vnic_attachment.py.html>`__ to see an example of how to use get_vnic_attachment API.
3797        """
3798        resource_path = "/vnicAttachments/{vnicAttachmentId}"
3799        method = "GET"
3800
3801        expected_kwargs = ["retry_strategy"]
3802        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3803        if extra_kwargs:
3804            raise ValueError(
3805                "get_vnic_attachment got unknown kwargs: {!r}".format(extra_kwargs))
3806
3807        path_params = {
3808            "vnicAttachmentId": vnic_attachment_id
3809        }
3810
3811        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3812
3813        for (k, v) in six.iteritems(path_params):
3814            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3815                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3816
3817        header_params = {
3818            "accept": "application/json",
3819            "content-type": "application/json"
3820        }
3821
3822        retry_strategy = self.base_client.get_preferred_retry_strategy(
3823            operation_retry_strategy=kwargs.get('retry_strategy'),
3824            client_retry_strategy=self.retry_strategy
3825        )
3826
3827        if retry_strategy:
3828            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3829                self.base_client.add_opc_client_retries_header(header_params)
3830                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3831            return retry_strategy.make_retrying_call(
3832                self.base_client.call_api,
3833                resource_path=resource_path,
3834                method=method,
3835                path_params=path_params,
3836                header_params=header_params,
3837                response_type="VnicAttachment")
3838        else:
3839            return self.base_client.call_api(
3840                resource_path=resource_path,
3841                method=method,
3842                path_params=path_params,
3843                header_params=header_params,
3844                response_type="VnicAttachment")
3845
3846    def get_volume_attachment(self, volume_attachment_id, **kwargs):
3847        """
3848        Gets information about the specified volume attachment.
3849
3850
3851        :param str volume_attachment_id: (required)
3852            The OCID of the volume attachment.
3853
3854        :param obj retry_strategy: (optional)
3855            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3856
3857            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3858            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3859
3860            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3861
3862        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VolumeAttachment`
3863        :rtype: :class:`~oci.response.Response`
3864
3865        :example:
3866        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_volume_attachment.py.html>`__ to see an example of how to use get_volume_attachment API.
3867        """
3868        resource_path = "/volumeAttachments/{volumeAttachmentId}"
3869        method = "GET"
3870
3871        expected_kwargs = ["retry_strategy"]
3872        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3873        if extra_kwargs:
3874            raise ValueError(
3875                "get_volume_attachment got unknown kwargs: {!r}".format(extra_kwargs))
3876
3877        path_params = {
3878            "volumeAttachmentId": volume_attachment_id
3879        }
3880
3881        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3882
3883        for (k, v) in six.iteritems(path_params):
3884            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3885                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3886
3887        header_params = {
3888            "accept": "application/json",
3889            "content-type": "application/json"
3890        }
3891
3892        retry_strategy = self.base_client.get_preferred_retry_strategy(
3893            operation_retry_strategy=kwargs.get('retry_strategy'),
3894            client_retry_strategy=self.retry_strategy
3895        )
3896
3897        if retry_strategy:
3898            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3899                self.base_client.add_opc_client_retries_header(header_params)
3900                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3901            return retry_strategy.make_retrying_call(
3902                self.base_client.call_api,
3903                resource_path=resource_path,
3904                method=method,
3905                path_params=path_params,
3906                header_params=header_params,
3907                response_type="VolumeAttachment")
3908        else:
3909            return self.base_client.call_api(
3910                resource_path=resource_path,
3911                method=method,
3912                path_params=path_params,
3913                header_params=header_params,
3914                response_type="VolumeAttachment")
3915
3916    def get_windows_instance_initial_credentials(self, instance_id, **kwargs):
3917        """
3918        Gets the generated credentials for the instance. Only works for instances that require a password to log in, such as Windows.
3919        For certain operating systems, users will be forced to change the initial credentials.
3920
3921
3922        :param str instance_id: (required)
3923            The `OCID`__ of the instance.
3924
3925            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
3926
3927        :param obj retry_strategy: (optional)
3928            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3929
3930            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
3931            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3932
3933            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3934
3935        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InstanceCredentials`
3936        :rtype: :class:`~oci.response.Response`
3937
3938        :example:
3939        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/get_windows_instance_initial_credentials.py.html>`__ to see an example of how to use get_windows_instance_initial_credentials API.
3940        """
3941        resource_path = "/instances/{instanceId}/initialCredentials"
3942        method = "GET"
3943
3944        expected_kwargs = ["retry_strategy"]
3945        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3946        if extra_kwargs:
3947            raise ValueError(
3948                "get_windows_instance_initial_credentials got unknown kwargs: {!r}".format(extra_kwargs))
3949
3950        path_params = {
3951            "instanceId": instance_id
3952        }
3953
3954        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3955
3956        for (k, v) in six.iteritems(path_params):
3957            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3958                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
3959
3960        header_params = {
3961            "accept": "application/json",
3962            "content-type": "application/json"
3963        }
3964
3965        retry_strategy = self.base_client.get_preferred_retry_strategy(
3966            operation_retry_strategy=kwargs.get('retry_strategy'),
3967            client_retry_strategy=self.retry_strategy
3968        )
3969
3970        if retry_strategy:
3971            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3972                self.base_client.add_opc_client_retries_header(header_params)
3973                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3974            return retry_strategy.make_retrying_call(
3975                self.base_client.call_api,
3976                resource_path=resource_path,
3977                method=method,
3978                path_params=path_params,
3979                header_params=header_params,
3980                response_type="InstanceCredentials")
3981        else:
3982            return self.base_client.call_api(
3983                resource_path=resource_path,
3984                method=method,
3985                path_params=path_params,
3986                header_params=header_params,
3987                response_type="InstanceCredentials")
3988
3989    def instance_action(self, instance_id, action, **kwargs):
3990        """
3991        Performs one of the following power actions on the specified instance:
3992
3993        - **START** - Powers on the instance.
3994
3995        - **STOP** - Powers off the instance.
3996
3997        - **RESET** - Powers off the instance and then powers it back on.
3998
3999        - **SOFTSTOP** - Gracefully shuts down the instance by sending a shutdown command to the operating system.
4000        After waiting 15 minutes for the OS to shut down, the instance is powered off.
4001        If the applications that run on the instance take more than 15 minutes to shut down, they could be improperly stopped, resulting
4002        in data corruption. To avoid this, manually shut down the instance using the commands available in the OS before you softstop the
4003        instance.
4004
4005        - **SOFTRESET** - Gracefully reboots the instance by sending a shutdown command to the operating system.
4006        After waiting 15 minutes for the OS to shut down, the instance is powered off and
4007        then powered back on.
4008
4009        - **SENDDIAGNOSTICINTERRUPT** - For advanced users. **Warning: Sending a diagnostic interrupt to a live system can
4010        cause data corruption or system failure.** Sends a diagnostic interrupt that causes the instance's
4011        OS to crash and then reboot. Before you send a diagnostic interrupt, you must configure the instance to generate a
4012        crash dump file when it crashes. The crash dump captures information about the state of the OS at the time of
4013        the crash. After the OS restarts, you can analyze the crash dump to diagnose the issue. For more information, see
4014        `Sending a Diagnostic Interrupt`__.
4015
4016
4017
4018
4019        For more information about managing instance lifecycle states, see
4020        `Stopping and Starting an Instance`__.
4021
4022        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/sendingdiagnosticinterrupt.htm
4023        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/restartinginstance.htm
4024
4025
4026        :param str instance_id: (required)
4027            The `OCID`__ of the instance.
4028
4029            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
4030
4031        :param str action: (required)
4032            The action to perform on the instance.
4033
4034            Allowed values are: "STOP", "START", "SOFTRESET", "RESET", "SOFTSTOP", "SENDDIAGNOSTICINTERRUPT"
4035
4036        :param str opc_retry_token: (optional)
4037            A token that uniquely identifies a request so it can be retried in case of a timeout or
4038            server error without risk of executing that same action again. Retry tokens expire after 24
4039            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
4040            has been deleted and purged from the system, then a retry of the original creation request
4041            may be rejected).
4042
4043        :param str if_match: (optional)
4044            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
4045            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
4046            will be updated or deleted only if the etag you provide matches the resource's current etag value.
4047
4048        :param obj retry_strategy: (optional)
4049            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4050
4051            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
4052            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4053
4054            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4055
4056        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Instance`
4057        :rtype: :class:`~oci.response.Response`
4058
4059        :example:
4060        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/instance_action.py.html>`__ to see an example of how to use instance_action API.
4061        """
4062        resource_path = "/instances/{instanceId}"
4063        method = "POST"
4064
4065        # Don't accept unknown kwargs
4066        expected_kwargs = [
4067            "retry_strategy",
4068            "opc_retry_token",
4069            "if_match"
4070        ]
4071        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4072        if extra_kwargs:
4073            raise ValueError(
4074                "instance_action got unknown kwargs: {!r}".format(extra_kwargs))
4075
4076        path_params = {
4077            "instanceId": instance_id
4078        }
4079
4080        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
4081
4082        for (k, v) in six.iteritems(path_params):
4083            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
4084                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
4085
4086        query_params = {
4087            "action": action
4088        }
4089        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
4090
4091        header_params = {
4092            "accept": "application/json",
4093            "content-type": "application/json",
4094            "opc-retry-token": kwargs.get("opc_retry_token", missing),
4095            "if-match": kwargs.get("if_match", missing)
4096        }
4097        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
4098
4099        retry_strategy = self.base_client.get_preferred_retry_strategy(
4100            operation_retry_strategy=kwargs.get('retry_strategy'),
4101            client_retry_strategy=self.retry_strategy
4102        )
4103
4104        if retry_strategy:
4105            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4106                self.base_client.add_opc_retry_token_if_needed(header_params)
4107                self.base_client.add_opc_client_retries_header(header_params)
4108                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4109            return retry_strategy.make_retrying_call(
4110                self.base_client.call_api,
4111                resource_path=resource_path,
4112                method=method,
4113                path_params=path_params,
4114                query_params=query_params,
4115                header_params=header_params,
4116                response_type="Instance")
4117        else:
4118            return self.base_client.call_api(
4119                resource_path=resource_path,
4120                method=method,
4121                path_params=path_params,
4122                query_params=query_params,
4123                header_params=header_params,
4124                response_type="Instance")
4125
4126    def launch_instance(self, launch_instance_details, **kwargs):
4127        """
4128        Creates a new instance in the specified compartment and the specified availability domain.
4129        For general information about instances, see
4130        `Overview of the Compute Service`__.
4131
4132        For information about access control and compartments, see
4133        `Overview of the IAM Service`__.
4134
4135        For information about availability domains, see
4136        `Regions and Availability Domains`__.
4137        To get a list of availability domains, use the `ListAvailabilityDomains` operation
4138        in the Identity and Access Management Service API.
4139
4140        All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned,
4141        unique ID called an Oracle Cloud Identifier (OCID).
4142        When you create a resource, you can find its OCID in the response. You can
4143        also retrieve a resource's OCID by using a List API operation
4144        on that resource type, or by viewing the resource in the Console.
4145
4146        To launch an instance using an image or a boot volume use the `sourceDetails` parameter in :class:`LaunchInstanceDetails`.
4147
4148        When you launch an instance, it is automatically attached to a virtual
4149        network interface card (VNIC), called the *primary VNIC*. The VNIC
4150        has a private IP address from the subnet's CIDR. You can either assign a
4151        private IP address of your choice or let Oracle automatically assign one.
4152        You can choose whether the instance has a public IP address. To retrieve the
4153        addresses, use the :func:`list_vnic_attachments`
4154        operation to get the VNIC ID for the instance, and then call
4155        :func:`get_vnic` with the VNIC ID.
4156
4157        You can later add secondary VNICs to an instance. For more information, see
4158        `Virtual Network Interface Cards (VNICs)`__.
4159
4160        To launch an instance from a Marketplace image listing, you must provide the image ID of the
4161        listing resource version that you want, but you also must subscribe to the listing before you try
4162        to launch the instance. To subscribe to the listing, use the :func:`get_app_catalog_listing_agreements`
4163        operation to get the signature for the terms of use agreement for the desired listing resource version.
4164        Then, call :func:`create_app_catalog_subscription`
4165        with the signature. To get the image ID for the LaunchInstance operation, call
4166        :func:`get_app_catalog_listing_resource_version`.
4167
4168        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm
4169        __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm
4170        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm
4171        __ https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm
4172
4173
4174        :param oci.core.models.LaunchInstanceDetails launch_instance_details: (required)
4175            Instance details
4176
4177        :param str opc_retry_token: (optional)
4178            A token that uniquely identifies a request so it can be retried in case of a timeout or
4179            server error without risk of executing that same action again. Retry tokens expire after 24
4180            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
4181            has been deleted and purged from the system, then a retry of the original creation request
4182            may be rejected).
4183
4184        :param obj retry_strategy: (optional)
4185            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4186
4187            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
4188            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4189
4190            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4191
4192        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Instance`
4193        :rtype: :class:`~oci.response.Response`
4194
4195        :example:
4196        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/launch_instance.py.html>`__ to see an example of how to use launch_instance API.
4197        """
4198        resource_path = "/instances"
4199        method = "POST"
4200
4201        # Don't accept unknown kwargs
4202        expected_kwargs = [
4203            "retry_strategy",
4204            "opc_retry_token"
4205        ]
4206        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4207        if extra_kwargs:
4208            raise ValueError(
4209                "launch_instance got unknown kwargs: {!r}".format(extra_kwargs))
4210
4211        header_params = {
4212            "accept": "application/json",
4213            "content-type": "application/json",
4214            "opc-retry-token": kwargs.get("opc_retry_token", missing)
4215        }
4216        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
4217
4218        retry_strategy = self.base_client.get_preferred_retry_strategy(
4219            operation_retry_strategy=kwargs.get('retry_strategy'),
4220            client_retry_strategy=self.retry_strategy
4221        )
4222
4223        if retry_strategy:
4224            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4225                self.base_client.add_opc_retry_token_if_needed(header_params)
4226                self.base_client.add_opc_client_retries_header(header_params)
4227                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4228            return retry_strategy.make_retrying_call(
4229                self.base_client.call_api,
4230                resource_path=resource_path,
4231                method=method,
4232                header_params=header_params,
4233                body=launch_instance_details,
4234                response_type="Instance")
4235        else:
4236            return self.base_client.call_api(
4237                resource_path=resource_path,
4238                method=method,
4239                header_params=header_params,
4240                body=launch_instance_details,
4241                response_type="Instance")
4242
4243    def list_app_catalog_listing_resource_versions(self, listing_id, **kwargs):
4244        """
4245        Gets all resource versions for a particular listing.
4246
4247
4248        :param str listing_id: (required)
4249            The OCID of the listing.
4250
4251        :param int limit: (optional)
4252            For list pagination. The maximum number of results per page, or items to return in a paginated
4253            \"List\" call. For important details about how pagination works, see
4254            `List Pagination`__.
4255
4256            Example: `50`
4257
4258            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4259
4260        :param str page: (optional)
4261            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
4262            call. For important details about how pagination works, see
4263            `List Pagination`__.
4264
4265            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4266
4267        :param str sort_order: (optional)
4268            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
4269            is case sensitive.
4270
4271            Allowed values are: "ASC", "DESC"
4272
4273        :param obj retry_strategy: (optional)
4274            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4275
4276            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
4277            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4278
4279            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4280
4281        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.AppCatalogListingResourceVersionSummary`
4282        :rtype: :class:`~oci.response.Response`
4283
4284        :example:
4285        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_app_catalog_listing_resource_versions.py.html>`__ to see an example of how to use list_app_catalog_listing_resource_versions API.
4286        """
4287        resource_path = "/appCatalogListings/{listingId}/resourceVersions"
4288        method = "GET"
4289
4290        # Don't accept unknown kwargs
4291        expected_kwargs = [
4292            "retry_strategy",
4293            "limit",
4294            "page",
4295            "sort_order"
4296        ]
4297        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4298        if extra_kwargs:
4299            raise ValueError(
4300                "list_app_catalog_listing_resource_versions got unknown kwargs: {!r}".format(extra_kwargs))
4301
4302        path_params = {
4303            "listingId": listing_id
4304        }
4305
4306        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
4307
4308        for (k, v) in six.iteritems(path_params):
4309            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
4310                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
4311
4312        if 'sort_order' in kwargs:
4313            sort_order_allowed_values = ["ASC", "DESC"]
4314            if kwargs['sort_order'] not in sort_order_allowed_values:
4315                raise ValueError(
4316                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
4317                )
4318
4319        query_params = {
4320            "limit": kwargs.get("limit", missing),
4321            "page": kwargs.get("page", missing),
4322            "sortOrder": kwargs.get("sort_order", missing)
4323        }
4324        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
4325
4326        header_params = {
4327            "accept": "application/json",
4328            "content-type": "application/json"
4329        }
4330
4331        retry_strategy = self.base_client.get_preferred_retry_strategy(
4332            operation_retry_strategy=kwargs.get('retry_strategy'),
4333            client_retry_strategy=self.retry_strategy
4334        )
4335
4336        if retry_strategy:
4337            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4338                self.base_client.add_opc_client_retries_header(header_params)
4339                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4340            return retry_strategy.make_retrying_call(
4341                self.base_client.call_api,
4342                resource_path=resource_path,
4343                method=method,
4344                path_params=path_params,
4345                query_params=query_params,
4346                header_params=header_params,
4347                response_type="list[AppCatalogListingResourceVersionSummary]")
4348        else:
4349            return self.base_client.call_api(
4350                resource_path=resource_path,
4351                method=method,
4352                path_params=path_params,
4353                query_params=query_params,
4354                header_params=header_params,
4355                response_type="list[AppCatalogListingResourceVersionSummary]")
4356
4357    def list_app_catalog_listings(self, **kwargs):
4358        """
4359        Lists the published listings.
4360
4361
4362        :param int limit: (optional)
4363            For list pagination. The maximum number of results per page, or items to return in a paginated
4364            \"List\" call. For important details about how pagination works, see
4365            `List Pagination`__.
4366
4367            Example: `50`
4368
4369            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4370
4371        :param str page: (optional)
4372            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
4373            call. For important details about how pagination works, see
4374            `List Pagination`__.
4375
4376            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4377
4378        :param str sort_order: (optional)
4379            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
4380            is case sensitive.
4381
4382            Allowed values are: "ASC", "DESC"
4383
4384        :param str publisher_name: (optional)
4385            A filter to return only the publisher that matches the given publisher name exactly.
4386
4387        :param str publisher_type: (optional)
4388            A filter to return only publishers that match the given publisher type exactly. Valid types are OCI, ORACLE, TRUSTED, STANDARD.
4389
4390        :param str display_name: (optional)
4391            A filter to return only resources that match the given display name exactly.
4392
4393        :param obj retry_strategy: (optional)
4394            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4395
4396            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
4397            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4398
4399            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4400
4401        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.AppCatalogListingSummary`
4402        :rtype: :class:`~oci.response.Response`
4403
4404        :example:
4405        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_app_catalog_listings.py.html>`__ to see an example of how to use list_app_catalog_listings API.
4406        """
4407        resource_path = "/appCatalogListings"
4408        method = "GET"
4409
4410        # Don't accept unknown kwargs
4411        expected_kwargs = [
4412            "retry_strategy",
4413            "limit",
4414            "page",
4415            "sort_order",
4416            "publisher_name",
4417            "publisher_type",
4418            "display_name"
4419        ]
4420        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4421        if extra_kwargs:
4422            raise ValueError(
4423                "list_app_catalog_listings got unknown kwargs: {!r}".format(extra_kwargs))
4424
4425        if 'sort_order' in kwargs:
4426            sort_order_allowed_values = ["ASC", "DESC"]
4427            if kwargs['sort_order'] not in sort_order_allowed_values:
4428                raise ValueError(
4429                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
4430                )
4431
4432        query_params = {
4433            "limit": kwargs.get("limit", missing),
4434            "page": kwargs.get("page", missing),
4435            "sortOrder": kwargs.get("sort_order", missing),
4436            "publisherName": kwargs.get("publisher_name", missing),
4437            "publisherType": kwargs.get("publisher_type", missing),
4438            "displayName": kwargs.get("display_name", missing)
4439        }
4440        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
4441
4442        header_params = {
4443            "accept": "application/json",
4444            "content-type": "application/json"
4445        }
4446
4447        retry_strategy = self.base_client.get_preferred_retry_strategy(
4448            operation_retry_strategy=kwargs.get('retry_strategy'),
4449            client_retry_strategy=self.retry_strategy
4450        )
4451
4452        if retry_strategy:
4453            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4454                self.base_client.add_opc_client_retries_header(header_params)
4455                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4456            return retry_strategy.make_retrying_call(
4457                self.base_client.call_api,
4458                resource_path=resource_path,
4459                method=method,
4460                query_params=query_params,
4461                header_params=header_params,
4462                response_type="list[AppCatalogListingSummary]")
4463        else:
4464            return self.base_client.call_api(
4465                resource_path=resource_path,
4466                method=method,
4467                query_params=query_params,
4468                header_params=header_params,
4469                response_type="list[AppCatalogListingSummary]")
4470
4471    def list_app_catalog_subscriptions(self, compartment_id, **kwargs):
4472        """
4473        Lists subscriptions for a compartment.
4474
4475
4476        :param str compartment_id: (required)
4477            The `OCID`__ of the compartment.
4478
4479            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
4480
4481        :param int limit: (optional)
4482            For list pagination. The maximum number of results per page, or items to return in a paginated
4483            \"List\" call. For important details about how pagination works, see
4484            `List Pagination`__.
4485
4486            Example: `50`
4487
4488            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4489
4490        :param str page: (optional)
4491            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
4492            call. For important details about how pagination works, see
4493            `List Pagination`__.
4494
4495            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4496
4497        :param str sort_by: (optional)
4498            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
4499            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
4500            sort order is case sensitive.
4501
4502            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
4503            optionally filter by availability domain if the scope of the resource type is within a
4504            single availability domain. If you call one of these \"List\" operations without specifying
4505            an availability domain, the resources are grouped by availability domain, then sorted.
4506
4507            Allowed values are: "TIMECREATED", "DISPLAYNAME"
4508
4509        :param str sort_order: (optional)
4510            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
4511            is case sensitive.
4512
4513            Allowed values are: "ASC", "DESC"
4514
4515        :param str listing_id: (optional)
4516            A filter to return only the listings that matches the given listing id.
4517
4518        :param obj retry_strategy: (optional)
4519            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4520
4521            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
4522            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4523
4524            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4525
4526        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.AppCatalogSubscriptionSummary`
4527        :rtype: :class:`~oci.response.Response`
4528
4529        :example:
4530        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_app_catalog_subscriptions.py.html>`__ to see an example of how to use list_app_catalog_subscriptions API.
4531        """
4532        resource_path = "/appCatalogSubscriptions"
4533        method = "GET"
4534
4535        # Don't accept unknown kwargs
4536        expected_kwargs = [
4537            "retry_strategy",
4538            "limit",
4539            "page",
4540            "sort_by",
4541            "sort_order",
4542            "listing_id"
4543        ]
4544        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4545        if extra_kwargs:
4546            raise ValueError(
4547                "list_app_catalog_subscriptions got unknown kwargs: {!r}".format(extra_kwargs))
4548
4549        if 'sort_by' in kwargs:
4550            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
4551            if kwargs['sort_by'] not in sort_by_allowed_values:
4552                raise ValueError(
4553                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
4554                )
4555
4556        if 'sort_order' in kwargs:
4557            sort_order_allowed_values = ["ASC", "DESC"]
4558            if kwargs['sort_order'] not in sort_order_allowed_values:
4559                raise ValueError(
4560                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
4561                )
4562
4563        query_params = {
4564            "compartmentId": compartment_id,
4565            "limit": kwargs.get("limit", missing),
4566            "page": kwargs.get("page", missing),
4567            "sortBy": kwargs.get("sort_by", missing),
4568            "sortOrder": kwargs.get("sort_order", missing),
4569            "listingId": kwargs.get("listing_id", missing)
4570        }
4571        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
4572
4573        header_params = {
4574            "accept": "application/json",
4575            "content-type": "application/json"
4576        }
4577
4578        retry_strategy = self.base_client.get_preferred_retry_strategy(
4579            operation_retry_strategy=kwargs.get('retry_strategy'),
4580            client_retry_strategy=self.retry_strategy
4581        )
4582
4583        if retry_strategy:
4584            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4585                self.base_client.add_opc_client_retries_header(header_params)
4586                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4587            return retry_strategy.make_retrying_call(
4588                self.base_client.call_api,
4589                resource_path=resource_path,
4590                method=method,
4591                query_params=query_params,
4592                header_params=header_params,
4593                response_type="list[AppCatalogSubscriptionSummary]")
4594        else:
4595            return self.base_client.call_api(
4596                resource_path=resource_path,
4597                method=method,
4598                query_params=query_params,
4599                header_params=header_params,
4600                response_type="list[AppCatalogSubscriptionSummary]")
4601
4602    def list_boot_volume_attachments(self, availability_domain, compartment_id, **kwargs):
4603        """
4604        Lists the boot volume attachments in the specified compartment. You can filter the
4605        list by specifying an instance OCID, boot volume OCID, or both.
4606
4607
4608        :param str availability_domain: (required)
4609            The name of the availability domain.
4610
4611            Example: `Uocm:PHX-AD-1`
4612
4613        :param str compartment_id: (required)
4614            The `OCID`__ of the compartment.
4615
4616            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
4617
4618        :param int limit: (optional)
4619            For list pagination. The maximum number of results per page, or items to return in a paginated
4620            \"List\" call. For important details about how pagination works, see
4621            `List Pagination`__.
4622
4623            Example: `50`
4624
4625            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4626
4627        :param str page: (optional)
4628            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
4629            call. For important details about how pagination works, see
4630            `List Pagination`__.
4631
4632            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4633
4634        :param str instance_id: (optional)
4635            The OCID of the instance.
4636
4637        :param str boot_volume_id: (optional)
4638            The OCID of the boot volume.
4639
4640        :param obj retry_strategy: (optional)
4641            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4642
4643            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
4644            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4645
4646            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4647
4648        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.BootVolumeAttachment`
4649        :rtype: :class:`~oci.response.Response`
4650
4651        :example:
4652        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_boot_volume_attachments.py.html>`__ to see an example of how to use list_boot_volume_attachments API.
4653        """
4654        resource_path = "/bootVolumeAttachments"
4655        method = "GET"
4656
4657        # Don't accept unknown kwargs
4658        expected_kwargs = [
4659            "retry_strategy",
4660            "limit",
4661            "page",
4662            "instance_id",
4663            "boot_volume_id"
4664        ]
4665        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4666        if extra_kwargs:
4667            raise ValueError(
4668                "list_boot_volume_attachments got unknown kwargs: {!r}".format(extra_kwargs))
4669
4670        query_params = {
4671            "availabilityDomain": availability_domain,
4672            "compartmentId": compartment_id,
4673            "limit": kwargs.get("limit", missing),
4674            "page": kwargs.get("page", missing),
4675            "instanceId": kwargs.get("instance_id", missing),
4676            "bootVolumeId": kwargs.get("boot_volume_id", missing)
4677        }
4678        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
4679
4680        header_params = {
4681            "accept": "application/json, application/x-json-stream",
4682            "content-type": "application/json"
4683        }
4684
4685        retry_strategy = self.base_client.get_preferred_retry_strategy(
4686            operation_retry_strategy=kwargs.get('retry_strategy'),
4687            client_retry_strategy=self.retry_strategy
4688        )
4689
4690        if retry_strategy:
4691            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4692                self.base_client.add_opc_client_retries_header(header_params)
4693                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4694            return retry_strategy.make_retrying_call(
4695                self.base_client.call_api,
4696                resource_path=resource_path,
4697                method=method,
4698                query_params=query_params,
4699                header_params=header_params,
4700                response_type="list[BootVolumeAttachment]")
4701        else:
4702            return self.base_client.call_api(
4703                resource_path=resource_path,
4704                method=method,
4705                query_params=query_params,
4706                header_params=header_params,
4707                response_type="list[BootVolumeAttachment]")
4708
4709    def list_compute_capacity_reservation_instance_shapes(self, compartment_id, **kwargs):
4710        """
4711        Lists the shapes that can be reserved within the specified compartment.
4712
4713
4714        :param str compartment_id: (required)
4715            The `OCID`__ of the compartment.
4716
4717            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
4718
4719        :param str availability_domain: (optional)
4720            The name of the availability domain.
4721
4722            Example: `Uocm:PHX-AD-1`
4723
4724        :param str opc_request_id: (optional)
4725            Unique identifier for the request.
4726            If you need to contact Oracle about a particular request, please provide the request ID.
4727
4728        :param int limit: (optional)
4729            For list pagination. The maximum number of results per page, or items to return in a paginated
4730            \"List\" call. For important details about how pagination works, see
4731            `List Pagination`__.
4732
4733            Example: `50`
4734
4735            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4736
4737        :param str page: (optional)
4738            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
4739            call. For important details about how pagination works, see
4740            `List Pagination`__.
4741
4742            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4743
4744        :param str display_name: (optional)
4745            A filter to return only resources that match the given display name exactly.
4746
4747        :param str sort_by: (optional)
4748            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
4749            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
4750            sort order is case sensitive.
4751
4752            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
4753            optionally filter by availability domain if the scope of the resource type is within a
4754            single availability domain. If you call one of these \"List\" operations without specifying
4755            an availability domain, the resources are grouped by availability domain, then sorted.
4756
4757            Allowed values are: "TIMECREATED", "DISPLAYNAME"
4758
4759        :param str sort_order: (optional)
4760            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
4761            is case sensitive.
4762
4763            Allowed values are: "ASC", "DESC"
4764
4765        :param obj retry_strategy: (optional)
4766            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4767
4768            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
4769            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4770
4771            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4772
4773        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.ComputeCapacityReservationInstanceShapeSummary`
4774        :rtype: :class:`~oci.response.Response`
4775
4776        :example:
4777        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_compute_capacity_reservation_instance_shapes.py.html>`__ to see an example of how to use list_compute_capacity_reservation_instance_shapes API.
4778        """
4779        resource_path = "/computeCapacityReservationInstanceShapes"
4780        method = "GET"
4781
4782        # Don't accept unknown kwargs
4783        expected_kwargs = [
4784            "retry_strategy",
4785            "availability_domain",
4786            "opc_request_id",
4787            "limit",
4788            "page",
4789            "display_name",
4790            "sort_by",
4791            "sort_order"
4792        ]
4793        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4794        if extra_kwargs:
4795            raise ValueError(
4796                "list_compute_capacity_reservation_instance_shapes got unknown kwargs: {!r}".format(extra_kwargs))
4797
4798        if 'sort_by' in kwargs:
4799            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
4800            if kwargs['sort_by'] not in sort_by_allowed_values:
4801                raise ValueError(
4802                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
4803                )
4804
4805        if 'sort_order' in kwargs:
4806            sort_order_allowed_values = ["ASC", "DESC"]
4807            if kwargs['sort_order'] not in sort_order_allowed_values:
4808                raise ValueError(
4809                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
4810                )
4811
4812        query_params = {
4813            "availabilityDomain": kwargs.get("availability_domain", missing),
4814            "compartmentId": compartment_id,
4815            "limit": kwargs.get("limit", missing),
4816            "page": kwargs.get("page", missing),
4817            "displayName": kwargs.get("display_name", missing),
4818            "sortBy": kwargs.get("sort_by", missing),
4819            "sortOrder": kwargs.get("sort_order", missing)
4820        }
4821        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
4822
4823        header_params = {
4824            "accept": "application/json",
4825            "content-type": "application/json",
4826            "opc-request-id": kwargs.get("opc_request_id", missing)
4827        }
4828        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
4829
4830        retry_strategy = self.base_client.get_preferred_retry_strategy(
4831            operation_retry_strategy=kwargs.get('retry_strategy'),
4832            client_retry_strategy=self.retry_strategy
4833        )
4834
4835        if retry_strategy:
4836            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4837                self.base_client.add_opc_client_retries_header(header_params)
4838                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4839            return retry_strategy.make_retrying_call(
4840                self.base_client.call_api,
4841                resource_path=resource_path,
4842                method=method,
4843                query_params=query_params,
4844                header_params=header_params,
4845                response_type="list[ComputeCapacityReservationInstanceShapeSummary]")
4846        else:
4847            return self.base_client.call_api(
4848                resource_path=resource_path,
4849                method=method,
4850                query_params=query_params,
4851                header_params=header_params,
4852                response_type="list[ComputeCapacityReservationInstanceShapeSummary]")
4853
4854    def list_compute_capacity_reservation_instances(self, capacity_reservation_id, **kwargs):
4855        """
4856        Lists the instances launched under a capacity reservation. You can filter results by specifying criteria.
4857
4858
4859        :param str capacity_reservation_id: (required)
4860            The OCID of the compute capacity reservation.
4861
4862        :param str availability_domain: (optional)
4863            The name of the availability domain.
4864
4865            Example: `Uocm:PHX-AD-1`
4866
4867        :param str compartment_id: (optional)
4868            The `OCID`__ of the compartment.
4869
4870            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
4871
4872        :param str opc_request_id: (optional)
4873            Unique identifier for the request.
4874            If you need to contact Oracle about a particular request, please provide the request ID.
4875
4876        :param int limit: (optional)
4877            For list pagination. The maximum number of results per page, or items to return in a paginated
4878            \"List\" call. For important details about how pagination works, see
4879            `List Pagination`__.
4880
4881            Example: `50`
4882
4883            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4884
4885        :param str page: (optional)
4886            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
4887            call. For important details about how pagination works, see
4888            `List Pagination`__.
4889
4890            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
4891
4892        :param str sort_by: (optional)
4893            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
4894            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
4895            sort order is case sensitive.
4896
4897            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
4898            optionally filter by availability domain if the scope of the resource type is within a
4899            single availability domain. If you call one of these \"List\" operations without specifying
4900            an availability domain, the resources are grouped by availability domain, then sorted.
4901
4902            Allowed values are: "TIMECREATED", "DISPLAYNAME"
4903
4904        :param str sort_order: (optional)
4905            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
4906            is case sensitive.
4907
4908            Allowed values are: "ASC", "DESC"
4909
4910        :param obj retry_strategy: (optional)
4911            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4912
4913            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
4914            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4915
4916            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4917
4918        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.CapacityReservationInstanceSummary`
4919        :rtype: :class:`~oci.response.Response`
4920
4921        :example:
4922        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_compute_capacity_reservation_instances.py.html>`__ to see an example of how to use list_compute_capacity_reservation_instances API.
4923        """
4924        resource_path = "/computeCapacityReservations/{capacityReservationId}/instances"
4925        method = "GET"
4926
4927        # Don't accept unknown kwargs
4928        expected_kwargs = [
4929            "retry_strategy",
4930            "availability_domain",
4931            "compartment_id",
4932            "opc_request_id",
4933            "limit",
4934            "page",
4935            "sort_by",
4936            "sort_order"
4937        ]
4938        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4939        if extra_kwargs:
4940            raise ValueError(
4941                "list_compute_capacity_reservation_instances got unknown kwargs: {!r}".format(extra_kwargs))
4942
4943        path_params = {
4944            "capacityReservationId": capacity_reservation_id
4945        }
4946
4947        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
4948
4949        for (k, v) in six.iteritems(path_params):
4950            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
4951                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
4952
4953        if 'sort_by' in kwargs:
4954            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
4955            if kwargs['sort_by'] not in sort_by_allowed_values:
4956                raise ValueError(
4957                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
4958                )
4959
4960        if 'sort_order' in kwargs:
4961            sort_order_allowed_values = ["ASC", "DESC"]
4962            if kwargs['sort_order'] not in sort_order_allowed_values:
4963                raise ValueError(
4964                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
4965                )
4966
4967        query_params = {
4968            "availabilityDomain": kwargs.get("availability_domain", missing),
4969            "compartmentId": kwargs.get("compartment_id", missing),
4970            "limit": kwargs.get("limit", missing),
4971            "page": kwargs.get("page", missing),
4972            "sortBy": kwargs.get("sort_by", missing),
4973            "sortOrder": kwargs.get("sort_order", missing)
4974        }
4975        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
4976
4977        header_params = {
4978            "accept": "application/json, application/x-json-stream",
4979            "content-type": "application/json",
4980            "opc-request-id": kwargs.get("opc_request_id", missing)
4981        }
4982        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
4983
4984        retry_strategy = self.base_client.get_preferred_retry_strategy(
4985            operation_retry_strategy=kwargs.get('retry_strategy'),
4986            client_retry_strategy=self.retry_strategy
4987        )
4988
4989        if retry_strategy:
4990            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4991                self.base_client.add_opc_client_retries_header(header_params)
4992                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4993            return retry_strategy.make_retrying_call(
4994                self.base_client.call_api,
4995                resource_path=resource_path,
4996                method=method,
4997                path_params=path_params,
4998                query_params=query_params,
4999                header_params=header_params,
5000                response_type="list[CapacityReservationInstanceSummary]")
5001        else:
5002            return self.base_client.call_api(
5003                resource_path=resource_path,
5004                method=method,
5005                path_params=path_params,
5006                query_params=query_params,
5007                header_params=header_params,
5008                response_type="list[CapacityReservationInstanceSummary]")
5009
5010    def list_compute_capacity_reservations(self, compartment_id, **kwargs):
5011        """
5012        Lists the compute capacity reservations that match the specified criteria and compartment.
5013
5014        You can limit the list by specifying a compute capacity reservation display name
5015        (the list will include all the identically-named compute capacity reservations in the compartment).
5016
5017
5018        :param str compartment_id: (required)
5019            The `OCID`__ of the compartment.
5020
5021            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
5022
5023        :param str availability_domain: (optional)
5024            The name of the availability domain.
5025
5026            Example: `Uocm:PHX-AD-1`
5027
5028        :param str lifecycle_state: (optional)
5029            A filter to only return resources that match the given lifecycle state.
5030
5031            Allowed values are: "ACTIVE", "CREATING", "UPDATING", "MOVING", "DELETED", "DELETING"
5032
5033        :param str display_name: (optional)
5034            A filter to return only resources that match the given display name exactly.
5035
5036        :param int limit: (optional)
5037            For list pagination. The maximum number of results per page, or items to return in a paginated
5038            \"List\" call. For important details about how pagination works, see
5039            `List Pagination`__.
5040
5041            Example: `50`
5042
5043            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5044
5045        :param str page: (optional)
5046            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
5047            call. For important details about how pagination works, see
5048            `List Pagination`__.
5049
5050            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5051
5052        :param str opc_request_id: (optional)
5053            Unique identifier for the request.
5054            If you need to contact Oracle about a particular request, please provide the request ID.
5055
5056        :param str sort_by: (optional)
5057            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
5058            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
5059            sort order is case sensitive.
5060
5061            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
5062            optionally filter by availability domain if the scope of the resource type is within a
5063            single availability domain. If you call one of these \"List\" operations without specifying
5064            an availability domain, the resources are grouped by availability domain, then sorted.
5065
5066            Allowed values are: "TIMECREATED", "DISPLAYNAME"
5067
5068        :param str sort_order: (optional)
5069            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
5070            is case sensitive.
5071
5072            Allowed values are: "ASC", "DESC"
5073
5074        :param obj retry_strategy: (optional)
5075            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
5076
5077            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
5078            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
5079
5080            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
5081
5082        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.ComputeCapacityReservationSummary`
5083        :rtype: :class:`~oci.response.Response`
5084
5085        :example:
5086        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_compute_capacity_reservations.py.html>`__ to see an example of how to use list_compute_capacity_reservations API.
5087        """
5088        resource_path = "/computeCapacityReservations"
5089        method = "GET"
5090
5091        # Don't accept unknown kwargs
5092        expected_kwargs = [
5093            "retry_strategy",
5094            "availability_domain",
5095            "lifecycle_state",
5096            "display_name",
5097            "limit",
5098            "page",
5099            "opc_request_id",
5100            "sort_by",
5101            "sort_order"
5102        ]
5103        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
5104        if extra_kwargs:
5105            raise ValueError(
5106                "list_compute_capacity_reservations got unknown kwargs: {!r}".format(extra_kwargs))
5107
5108        if 'lifecycle_state' in kwargs:
5109            lifecycle_state_allowed_values = ["ACTIVE", "CREATING", "UPDATING", "MOVING", "DELETED", "DELETING"]
5110            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
5111                raise ValueError(
5112                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
5113                )
5114
5115        if 'sort_by' in kwargs:
5116            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
5117            if kwargs['sort_by'] not in sort_by_allowed_values:
5118                raise ValueError(
5119                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
5120                )
5121
5122        if 'sort_order' in kwargs:
5123            sort_order_allowed_values = ["ASC", "DESC"]
5124            if kwargs['sort_order'] not in sort_order_allowed_values:
5125                raise ValueError(
5126                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
5127                )
5128
5129        query_params = {
5130            "availabilityDomain": kwargs.get("availability_domain", missing),
5131            "compartmentId": compartment_id,
5132            "lifecycleState": kwargs.get("lifecycle_state", missing),
5133            "displayName": kwargs.get("display_name", missing),
5134            "limit": kwargs.get("limit", missing),
5135            "page": kwargs.get("page", missing),
5136            "sortBy": kwargs.get("sort_by", missing),
5137            "sortOrder": kwargs.get("sort_order", missing)
5138        }
5139        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
5140
5141        header_params = {
5142            "accept": "application/json, application/x-json-stream",
5143            "content-type": "application/json",
5144            "opc-request-id": kwargs.get("opc_request_id", missing)
5145        }
5146        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
5147
5148        retry_strategy = self.base_client.get_preferred_retry_strategy(
5149            operation_retry_strategy=kwargs.get('retry_strategy'),
5150            client_retry_strategy=self.retry_strategy
5151        )
5152
5153        if retry_strategy:
5154            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
5155                self.base_client.add_opc_client_retries_header(header_params)
5156                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
5157            return retry_strategy.make_retrying_call(
5158                self.base_client.call_api,
5159                resource_path=resource_path,
5160                method=method,
5161                query_params=query_params,
5162                header_params=header_params,
5163                response_type="list[ComputeCapacityReservationSummary]")
5164        else:
5165            return self.base_client.call_api(
5166                resource_path=resource_path,
5167                method=method,
5168                query_params=query_params,
5169                header_params=header_params,
5170                response_type="list[ComputeCapacityReservationSummary]")
5171
5172    def list_compute_global_image_capability_schema_versions(self, compute_global_image_capability_schema_id, **kwargs):
5173        """
5174        Lists Compute Global Image Capability Schema versions in the specified compartment.
5175
5176
5177        :param str compute_global_image_capability_schema_id: (required)
5178            The `OCID`__ of the compute global image capability schema
5179
5180            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
5181
5182        :param str display_name: (optional)
5183            A filter to return only resources that match the given display name exactly.
5184
5185        :param int limit: (optional)
5186            For list pagination. The maximum number of results per page, or items to return in a paginated
5187            \"List\" call. For important details about how pagination works, see
5188            `List Pagination`__.
5189
5190            Example: `50`
5191
5192            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5193
5194        :param str page: (optional)
5195            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
5196            call. For important details about how pagination works, see
5197            `List Pagination`__.
5198
5199            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5200
5201        :param str sort_by: (optional)
5202            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
5203            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
5204            sort order is case sensitive.
5205
5206            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
5207            optionally filter by availability domain if the scope of the resource type is within a
5208            single availability domain. If you call one of these \"List\" operations without specifying
5209            an availability domain, the resources are grouped by availability domain, then sorted.
5210
5211            Allowed values are: "TIMECREATED", "DISPLAYNAME"
5212
5213        :param str sort_order: (optional)
5214            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
5215            is case sensitive.
5216
5217            Allowed values are: "ASC", "DESC"
5218
5219        :param obj retry_strategy: (optional)
5220            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
5221
5222            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
5223            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
5224
5225            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
5226
5227        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.ComputeGlobalImageCapabilitySchemaVersionSummary`
5228        :rtype: :class:`~oci.response.Response`
5229
5230        :example:
5231        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_compute_global_image_capability_schema_versions.py.html>`__ to see an example of how to use list_compute_global_image_capability_schema_versions API.
5232        """
5233        resource_path = "/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}/versions"
5234        method = "GET"
5235
5236        # Don't accept unknown kwargs
5237        expected_kwargs = [
5238            "retry_strategy",
5239            "display_name",
5240            "limit",
5241            "page",
5242            "sort_by",
5243            "sort_order"
5244        ]
5245        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
5246        if extra_kwargs:
5247            raise ValueError(
5248                "list_compute_global_image_capability_schema_versions got unknown kwargs: {!r}".format(extra_kwargs))
5249
5250        path_params = {
5251            "computeGlobalImageCapabilitySchemaId": compute_global_image_capability_schema_id
5252        }
5253
5254        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
5255
5256        for (k, v) in six.iteritems(path_params):
5257            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
5258                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
5259
5260        if 'sort_by' in kwargs:
5261            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
5262            if kwargs['sort_by'] not in sort_by_allowed_values:
5263                raise ValueError(
5264                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
5265                )
5266
5267        if 'sort_order' in kwargs:
5268            sort_order_allowed_values = ["ASC", "DESC"]
5269            if kwargs['sort_order'] not in sort_order_allowed_values:
5270                raise ValueError(
5271                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
5272                )
5273
5274        query_params = {
5275            "displayName": kwargs.get("display_name", missing),
5276            "limit": kwargs.get("limit", missing),
5277            "page": kwargs.get("page", missing),
5278            "sortBy": kwargs.get("sort_by", missing),
5279            "sortOrder": kwargs.get("sort_order", missing)
5280        }
5281        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
5282
5283        header_params = {
5284            "accept": "application/json",
5285            "content-type": "application/json"
5286        }
5287
5288        retry_strategy = self.base_client.get_preferred_retry_strategy(
5289            operation_retry_strategy=kwargs.get('retry_strategy'),
5290            client_retry_strategy=self.retry_strategy
5291        )
5292
5293        if retry_strategy:
5294            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
5295                self.base_client.add_opc_client_retries_header(header_params)
5296                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
5297            return retry_strategy.make_retrying_call(
5298                self.base_client.call_api,
5299                resource_path=resource_path,
5300                method=method,
5301                path_params=path_params,
5302                query_params=query_params,
5303                header_params=header_params,
5304                response_type="list[ComputeGlobalImageCapabilitySchemaVersionSummary]")
5305        else:
5306            return self.base_client.call_api(
5307                resource_path=resource_path,
5308                method=method,
5309                path_params=path_params,
5310                query_params=query_params,
5311                header_params=header_params,
5312                response_type="list[ComputeGlobalImageCapabilitySchemaVersionSummary]")
5313
5314    def list_compute_global_image_capability_schemas(self, **kwargs):
5315        """
5316        Lists Compute Global Image Capability Schema in the specified compartment.
5317
5318
5319        :param str compartment_id: (optional)
5320            A filter to return only resources that match the given compartment OCID exactly.
5321
5322        :param str display_name: (optional)
5323            A filter to return only resources that match the given display name exactly.
5324
5325        :param int limit: (optional)
5326            For list pagination. The maximum number of results per page, or items to return in a paginated
5327            \"List\" call. For important details about how pagination works, see
5328            `List Pagination`__.
5329
5330            Example: `50`
5331
5332            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5333
5334        :param str page: (optional)
5335            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
5336            call. For important details about how pagination works, see
5337            `List Pagination`__.
5338
5339            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5340
5341        :param str sort_by: (optional)
5342            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
5343            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
5344            sort order is case sensitive.
5345
5346            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
5347            optionally filter by availability domain if the scope of the resource type is within a
5348            single availability domain. If you call one of these \"List\" operations without specifying
5349            an availability domain, the resources are grouped by availability domain, then sorted.
5350
5351            Allowed values are: "TIMECREATED", "DISPLAYNAME"
5352
5353        :param str sort_order: (optional)
5354            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
5355            is case sensitive.
5356
5357            Allowed values are: "ASC", "DESC"
5358
5359        :param obj retry_strategy: (optional)
5360            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
5361
5362            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
5363            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
5364
5365            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
5366
5367        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.ComputeGlobalImageCapabilitySchemaSummary`
5368        :rtype: :class:`~oci.response.Response`
5369
5370        :example:
5371        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_compute_global_image_capability_schemas.py.html>`__ to see an example of how to use list_compute_global_image_capability_schemas API.
5372        """
5373        resource_path = "/computeGlobalImageCapabilitySchemas"
5374        method = "GET"
5375
5376        # Don't accept unknown kwargs
5377        expected_kwargs = [
5378            "retry_strategy",
5379            "compartment_id",
5380            "display_name",
5381            "limit",
5382            "page",
5383            "sort_by",
5384            "sort_order"
5385        ]
5386        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
5387        if extra_kwargs:
5388            raise ValueError(
5389                "list_compute_global_image_capability_schemas got unknown kwargs: {!r}".format(extra_kwargs))
5390
5391        if 'sort_by' in kwargs:
5392            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
5393            if kwargs['sort_by'] not in sort_by_allowed_values:
5394                raise ValueError(
5395                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
5396                )
5397
5398        if 'sort_order' in kwargs:
5399            sort_order_allowed_values = ["ASC", "DESC"]
5400            if kwargs['sort_order'] not in sort_order_allowed_values:
5401                raise ValueError(
5402                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
5403                )
5404
5405        query_params = {
5406            "compartmentId": kwargs.get("compartment_id", missing),
5407            "displayName": kwargs.get("display_name", missing),
5408            "limit": kwargs.get("limit", missing),
5409            "page": kwargs.get("page", missing),
5410            "sortBy": kwargs.get("sort_by", missing),
5411            "sortOrder": kwargs.get("sort_order", missing)
5412        }
5413        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
5414
5415        header_params = {
5416            "accept": "application/json",
5417            "content-type": "application/json"
5418        }
5419
5420        retry_strategy = self.base_client.get_preferred_retry_strategy(
5421            operation_retry_strategy=kwargs.get('retry_strategy'),
5422            client_retry_strategy=self.retry_strategy
5423        )
5424
5425        if retry_strategy:
5426            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
5427                self.base_client.add_opc_client_retries_header(header_params)
5428                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
5429            return retry_strategy.make_retrying_call(
5430                self.base_client.call_api,
5431                resource_path=resource_path,
5432                method=method,
5433                query_params=query_params,
5434                header_params=header_params,
5435                response_type="list[ComputeGlobalImageCapabilitySchemaSummary]")
5436        else:
5437            return self.base_client.call_api(
5438                resource_path=resource_path,
5439                method=method,
5440                query_params=query_params,
5441                header_params=header_params,
5442                response_type="list[ComputeGlobalImageCapabilitySchemaSummary]")
5443
5444    def list_compute_image_capability_schemas(self, **kwargs):
5445        """
5446        Lists Compute Image Capability Schema in the specified compartment. You can also query by a specific imageId.
5447
5448
5449        :param str compartment_id: (optional)
5450            A filter to return only resources that match the given compartment OCID exactly.
5451
5452        :param str image_id: (optional)
5453            The `OCID`__ of an image.
5454
5455            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
5456
5457        :param str display_name: (optional)
5458            A filter to return only resources that match the given display name exactly.
5459
5460        :param int limit: (optional)
5461            For list pagination. The maximum number of results per page, or items to return in a paginated
5462            \"List\" call. For important details about how pagination works, see
5463            `List Pagination`__.
5464
5465            Example: `50`
5466
5467            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5468
5469        :param str page: (optional)
5470            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
5471            call. For important details about how pagination works, see
5472            `List Pagination`__.
5473
5474            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5475
5476        :param str sort_by: (optional)
5477            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
5478            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
5479            sort order is case sensitive.
5480
5481            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
5482            optionally filter by availability domain if the scope of the resource type is within a
5483            single availability domain. If you call one of these \"List\" operations without specifying
5484            an availability domain, the resources are grouped by availability domain, then sorted.
5485
5486            Allowed values are: "TIMECREATED", "DISPLAYNAME"
5487
5488        :param str sort_order: (optional)
5489            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
5490            is case sensitive.
5491
5492            Allowed values are: "ASC", "DESC"
5493
5494        :param obj retry_strategy: (optional)
5495            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
5496
5497            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
5498            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
5499
5500            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
5501
5502        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.ComputeImageCapabilitySchemaSummary`
5503        :rtype: :class:`~oci.response.Response`
5504
5505        :example:
5506        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_compute_image_capability_schemas.py.html>`__ to see an example of how to use list_compute_image_capability_schemas API.
5507        """
5508        resource_path = "/computeImageCapabilitySchemas"
5509        method = "GET"
5510
5511        # Don't accept unknown kwargs
5512        expected_kwargs = [
5513            "retry_strategy",
5514            "compartment_id",
5515            "image_id",
5516            "display_name",
5517            "limit",
5518            "page",
5519            "sort_by",
5520            "sort_order"
5521        ]
5522        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
5523        if extra_kwargs:
5524            raise ValueError(
5525                "list_compute_image_capability_schemas got unknown kwargs: {!r}".format(extra_kwargs))
5526
5527        if 'sort_by' in kwargs:
5528            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
5529            if kwargs['sort_by'] not in sort_by_allowed_values:
5530                raise ValueError(
5531                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
5532                )
5533
5534        if 'sort_order' in kwargs:
5535            sort_order_allowed_values = ["ASC", "DESC"]
5536            if kwargs['sort_order'] not in sort_order_allowed_values:
5537                raise ValueError(
5538                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
5539                )
5540
5541        query_params = {
5542            "compartmentId": kwargs.get("compartment_id", missing),
5543            "imageId": kwargs.get("image_id", missing),
5544            "displayName": kwargs.get("display_name", missing),
5545            "limit": kwargs.get("limit", missing),
5546            "page": kwargs.get("page", missing),
5547            "sortBy": kwargs.get("sort_by", missing),
5548            "sortOrder": kwargs.get("sort_order", missing)
5549        }
5550        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
5551
5552        header_params = {
5553            "accept": "application/json",
5554            "content-type": "application/json"
5555        }
5556
5557        retry_strategy = self.base_client.get_preferred_retry_strategy(
5558            operation_retry_strategy=kwargs.get('retry_strategy'),
5559            client_retry_strategy=self.retry_strategy
5560        )
5561
5562        if retry_strategy:
5563            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
5564                self.base_client.add_opc_client_retries_header(header_params)
5565                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
5566            return retry_strategy.make_retrying_call(
5567                self.base_client.call_api,
5568                resource_path=resource_path,
5569                method=method,
5570                query_params=query_params,
5571                header_params=header_params,
5572                response_type="list[ComputeImageCapabilitySchemaSummary]")
5573        else:
5574            return self.base_client.call_api(
5575                resource_path=resource_path,
5576                method=method,
5577                query_params=query_params,
5578                header_params=header_params,
5579                response_type="list[ComputeImageCapabilitySchemaSummary]")
5580
5581    def list_console_histories(self, compartment_id, **kwargs):
5582        """
5583        Lists the console history metadata for the specified compartment or instance.
5584
5585
5586        :param str compartment_id: (required)
5587            The `OCID`__ of the compartment.
5588
5589            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
5590
5591        :param str availability_domain: (optional)
5592            The name of the availability domain.
5593
5594            Example: `Uocm:PHX-AD-1`
5595
5596        :param int limit: (optional)
5597            For list pagination. The maximum number of results per page, or items to return in a paginated
5598            \"List\" call. For important details about how pagination works, see
5599            `List Pagination`__.
5600
5601            Example: `50`
5602
5603            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5604
5605        :param str page: (optional)
5606            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
5607            call. For important details about how pagination works, see
5608            `List Pagination`__.
5609
5610            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5611
5612        :param str instance_id: (optional)
5613            The OCID of the instance.
5614
5615        :param str sort_by: (optional)
5616            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
5617            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
5618            sort order is case sensitive.
5619
5620            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
5621            optionally filter by availability domain if the scope of the resource type is within a
5622            single availability domain. If you call one of these \"List\" operations without specifying
5623            an availability domain, the resources are grouped by availability domain, then sorted.
5624
5625            Allowed values are: "TIMECREATED", "DISPLAYNAME"
5626
5627        :param str sort_order: (optional)
5628            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
5629            is case sensitive.
5630
5631            Allowed values are: "ASC", "DESC"
5632
5633        :param str lifecycle_state: (optional)
5634            A filter to only return resources that match the given lifecycle state. The state
5635            value is case-insensitive.
5636
5637            Allowed values are: "REQUESTED", "GETTING-HISTORY", "SUCCEEDED", "FAILED"
5638
5639        :param obj retry_strategy: (optional)
5640            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
5641
5642            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
5643            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
5644
5645            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
5646
5647        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.ConsoleHistory`
5648        :rtype: :class:`~oci.response.Response`
5649
5650        :example:
5651        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_console_histories.py.html>`__ to see an example of how to use list_console_histories API.
5652        """
5653        resource_path = "/instanceConsoleHistories"
5654        method = "GET"
5655
5656        # Don't accept unknown kwargs
5657        expected_kwargs = [
5658            "retry_strategy",
5659            "availability_domain",
5660            "limit",
5661            "page",
5662            "instance_id",
5663            "sort_by",
5664            "sort_order",
5665            "lifecycle_state"
5666        ]
5667        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
5668        if extra_kwargs:
5669            raise ValueError(
5670                "list_console_histories got unknown kwargs: {!r}".format(extra_kwargs))
5671
5672        if 'sort_by' in kwargs:
5673            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
5674            if kwargs['sort_by'] not in sort_by_allowed_values:
5675                raise ValueError(
5676                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
5677                )
5678
5679        if 'sort_order' in kwargs:
5680            sort_order_allowed_values = ["ASC", "DESC"]
5681            if kwargs['sort_order'] not in sort_order_allowed_values:
5682                raise ValueError(
5683                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
5684                )
5685
5686        if 'lifecycle_state' in kwargs:
5687            lifecycle_state_allowed_values = ["REQUESTED", "GETTING-HISTORY", "SUCCEEDED", "FAILED"]
5688            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
5689                raise ValueError(
5690                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
5691                )
5692
5693        query_params = {
5694            "availabilityDomain": kwargs.get("availability_domain", missing),
5695            "compartmentId": compartment_id,
5696            "limit": kwargs.get("limit", missing),
5697            "page": kwargs.get("page", missing),
5698            "instanceId": kwargs.get("instance_id", missing),
5699            "sortBy": kwargs.get("sort_by", missing),
5700            "sortOrder": kwargs.get("sort_order", missing),
5701            "lifecycleState": kwargs.get("lifecycle_state", missing)
5702        }
5703        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
5704
5705        header_params = {
5706            "accept": "application/json",
5707            "content-type": "application/json"
5708        }
5709
5710        retry_strategy = self.base_client.get_preferred_retry_strategy(
5711            operation_retry_strategy=kwargs.get('retry_strategy'),
5712            client_retry_strategy=self.retry_strategy
5713        )
5714
5715        if retry_strategy:
5716            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
5717                self.base_client.add_opc_client_retries_header(header_params)
5718                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
5719            return retry_strategy.make_retrying_call(
5720                self.base_client.call_api,
5721                resource_path=resource_path,
5722                method=method,
5723                query_params=query_params,
5724                header_params=header_params,
5725                response_type="list[ConsoleHistory]")
5726        else:
5727            return self.base_client.call_api(
5728                resource_path=resource_path,
5729                method=method,
5730                query_params=query_params,
5731                header_params=header_params,
5732                response_type="list[ConsoleHistory]")
5733
5734    def list_dedicated_vm_host_instance_shapes(self, compartment_id, **kwargs):
5735        """
5736        Lists the shapes that can be used to launch a virtual machine instance on a dedicated virtual machine host within the specified compartment.
5737        You can filter the list by compatibility with a specific dedicated virtual machine host shape.
5738
5739
5740        :param str compartment_id: (required)
5741            The `OCID`__ of the compartment.
5742
5743            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
5744
5745        :param str availability_domain: (optional)
5746            The name of the availability domain.
5747
5748            Example: `Uocm:PHX-AD-1`
5749
5750        :param str dedicated_vm_host_shape: (optional)
5751            Dedicated VM host shape name
5752
5753        :param int limit: (optional)
5754            For list pagination. The maximum number of results per page, or items to return in a paginated
5755            \"List\" call. For important details about how pagination works, see
5756            `List Pagination`__.
5757
5758            Example: `50`
5759
5760            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5761
5762        :param str page: (optional)
5763            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
5764            call. For important details about how pagination works, see
5765            `List Pagination`__.
5766
5767            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5768
5769        :param str opc_request_id: (optional)
5770            Unique identifier for the request.
5771            If you need to contact Oracle about a particular request, please provide the request ID.
5772
5773        :param obj retry_strategy: (optional)
5774            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
5775
5776            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
5777            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
5778
5779            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
5780
5781        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DedicatedVmHostInstanceShapeSummary`
5782        :rtype: :class:`~oci.response.Response`
5783
5784        :example:
5785        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_dedicated_vm_host_instance_shapes.py.html>`__ to see an example of how to use list_dedicated_vm_host_instance_shapes API.
5786        """
5787        resource_path = "/dedicatedVmHostInstanceShapes"
5788        method = "GET"
5789
5790        # Don't accept unknown kwargs
5791        expected_kwargs = [
5792            "retry_strategy",
5793            "availability_domain",
5794            "dedicated_vm_host_shape",
5795            "limit",
5796            "page",
5797            "opc_request_id"
5798        ]
5799        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
5800        if extra_kwargs:
5801            raise ValueError(
5802                "list_dedicated_vm_host_instance_shapes got unknown kwargs: {!r}".format(extra_kwargs))
5803
5804        query_params = {
5805            "availabilityDomain": kwargs.get("availability_domain", missing),
5806            "compartmentId": compartment_id,
5807            "dedicatedVmHostShape": kwargs.get("dedicated_vm_host_shape", missing),
5808            "limit": kwargs.get("limit", missing),
5809            "page": kwargs.get("page", missing)
5810        }
5811        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
5812
5813        header_params = {
5814            "accept": "application/json",
5815            "content-type": "application/json",
5816            "opc-request-id": kwargs.get("opc_request_id", missing)
5817        }
5818        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
5819
5820        retry_strategy = self.base_client.get_preferred_retry_strategy(
5821            operation_retry_strategy=kwargs.get('retry_strategy'),
5822            client_retry_strategy=self.retry_strategy
5823        )
5824
5825        if retry_strategy:
5826            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
5827                self.base_client.add_opc_client_retries_header(header_params)
5828                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
5829            return retry_strategy.make_retrying_call(
5830                self.base_client.call_api,
5831                resource_path=resource_path,
5832                method=method,
5833                query_params=query_params,
5834                header_params=header_params,
5835                response_type="list[DedicatedVmHostInstanceShapeSummary]")
5836        else:
5837            return self.base_client.call_api(
5838                resource_path=resource_path,
5839                method=method,
5840                query_params=query_params,
5841                header_params=header_params,
5842                response_type="list[DedicatedVmHostInstanceShapeSummary]")
5843
5844    def list_dedicated_vm_host_instances(self, compartment_id, dedicated_vm_host_id, **kwargs):
5845        """
5846        Returns the list of instances on the dedicated virtual machine hosts that match the specified criteria.
5847
5848
5849        :param str compartment_id: (required)
5850            The `OCID`__ of the compartment.
5851
5852            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
5853
5854        :param str dedicated_vm_host_id: (required)
5855            The OCID of the dedicated VM host.
5856
5857        :param str availability_domain: (optional)
5858            The name of the availability domain.
5859
5860            Example: `Uocm:PHX-AD-1`
5861
5862        :param int limit: (optional)
5863            For list pagination. The maximum number of results per page, or items to return in a paginated
5864            \"List\" call. For important details about how pagination works, see
5865            `List Pagination`__.
5866
5867            Example: `50`
5868
5869            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5870
5871        :param str page: (optional)
5872            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
5873            call. For important details about how pagination works, see
5874            `List Pagination`__.
5875
5876            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
5877
5878        :param str opc_request_id: (optional)
5879            Unique identifier for the request.
5880            If you need to contact Oracle about a particular request, please provide the request ID.
5881
5882        :param str sort_by: (optional)
5883            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
5884            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
5885            sort order is case sensitive.
5886
5887            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
5888            optionally filter by availability domain if the scope of the resource type is within a
5889            single availability domain. If you call one of these \"List\" operations without specifying
5890            an availability domain, the resources are grouped by availability domain, then sorted.
5891
5892            Allowed values are: "TIMECREATED", "DISPLAYNAME"
5893
5894        :param str sort_order: (optional)
5895            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
5896            is case sensitive.
5897
5898            Allowed values are: "ASC", "DESC"
5899
5900        :param obj retry_strategy: (optional)
5901            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
5902
5903            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
5904            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
5905
5906            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
5907
5908        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DedicatedVmHostInstanceSummary`
5909        :rtype: :class:`~oci.response.Response`
5910
5911        :example:
5912        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_dedicated_vm_host_instances.py.html>`__ to see an example of how to use list_dedicated_vm_host_instances API.
5913        """
5914        resource_path = "/dedicatedVmHosts/{dedicatedVmHostId}/instances"
5915        method = "GET"
5916
5917        # Don't accept unknown kwargs
5918        expected_kwargs = [
5919            "retry_strategy",
5920            "availability_domain",
5921            "limit",
5922            "page",
5923            "opc_request_id",
5924            "sort_by",
5925            "sort_order"
5926        ]
5927        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
5928        if extra_kwargs:
5929            raise ValueError(
5930                "list_dedicated_vm_host_instances got unknown kwargs: {!r}".format(extra_kwargs))
5931
5932        path_params = {
5933            "dedicatedVmHostId": dedicated_vm_host_id
5934        }
5935
5936        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
5937
5938        for (k, v) in six.iteritems(path_params):
5939            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
5940                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
5941
5942        if 'sort_by' in kwargs:
5943            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
5944            if kwargs['sort_by'] not in sort_by_allowed_values:
5945                raise ValueError(
5946                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
5947                )
5948
5949        if 'sort_order' in kwargs:
5950            sort_order_allowed_values = ["ASC", "DESC"]
5951            if kwargs['sort_order'] not in sort_order_allowed_values:
5952                raise ValueError(
5953                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
5954                )
5955
5956        query_params = {
5957            "availabilityDomain": kwargs.get("availability_domain", missing),
5958            "compartmentId": compartment_id,
5959            "limit": kwargs.get("limit", missing),
5960            "page": kwargs.get("page", missing),
5961            "sortBy": kwargs.get("sort_by", missing),
5962            "sortOrder": kwargs.get("sort_order", missing)
5963        }
5964        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
5965
5966        header_params = {
5967            "accept": "application/json, application/x-json-stream",
5968            "content-type": "application/json",
5969            "opc-request-id": kwargs.get("opc_request_id", missing)
5970        }
5971        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
5972
5973        retry_strategy = self.base_client.get_preferred_retry_strategy(
5974            operation_retry_strategy=kwargs.get('retry_strategy'),
5975            client_retry_strategy=self.retry_strategy
5976        )
5977
5978        if retry_strategy:
5979            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
5980                self.base_client.add_opc_client_retries_header(header_params)
5981                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
5982            return retry_strategy.make_retrying_call(
5983                self.base_client.call_api,
5984                resource_path=resource_path,
5985                method=method,
5986                path_params=path_params,
5987                query_params=query_params,
5988                header_params=header_params,
5989                response_type="list[DedicatedVmHostInstanceSummary]")
5990        else:
5991            return self.base_client.call_api(
5992                resource_path=resource_path,
5993                method=method,
5994                path_params=path_params,
5995                query_params=query_params,
5996                header_params=header_params,
5997                response_type="list[DedicatedVmHostInstanceSummary]")
5998
5999    def list_dedicated_vm_host_shapes(self, compartment_id, **kwargs):
6000        """
6001        Lists the shapes that can be used to launch a dedicated virtual machine host within the specified compartment.
6002
6003
6004        :param str compartment_id: (required)
6005            The `OCID`__ of the compartment.
6006
6007            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
6008
6009        :param str availability_domain: (optional)
6010            The name of the availability domain.
6011
6012            Example: `Uocm:PHX-AD-1`
6013
6014        :param str instance_shape_name: (optional)
6015            The name for the instance's shape.
6016
6017        :param int limit: (optional)
6018            For list pagination. The maximum number of results per page, or items to return in a paginated
6019            \"List\" call. For important details about how pagination works, see
6020            `List Pagination`__.
6021
6022            Example: `50`
6023
6024            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6025
6026        :param str page: (optional)
6027            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
6028            call. For important details about how pagination works, see
6029            `List Pagination`__.
6030
6031            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6032
6033        :param str opc_request_id: (optional)
6034            Unique identifier for the request.
6035            If you need to contact Oracle about a particular request, please provide the request ID.
6036
6037        :param obj retry_strategy: (optional)
6038            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
6039
6040            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
6041            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
6042
6043            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
6044
6045        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DedicatedVmHostShapeSummary`
6046        :rtype: :class:`~oci.response.Response`
6047
6048        :example:
6049        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_dedicated_vm_host_shapes.py.html>`__ to see an example of how to use list_dedicated_vm_host_shapes API.
6050        """
6051        resource_path = "/dedicatedVmHostShapes"
6052        method = "GET"
6053
6054        # Don't accept unknown kwargs
6055        expected_kwargs = [
6056            "retry_strategy",
6057            "availability_domain",
6058            "instance_shape_name",
6059            "limit",
6060            "page",
6061            "opc_request_id"
6062        ]
6063        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
6064        if extra_kwargs:
6065            raise ValueError(
6066                "list_dedicated_vm_host_shapes got unknown kwargs: {!r}".format(extra_kwargs))
6067
6068        query_params = {
6069            "availabilityDomain": kwargs.get("availability_domain", missing),
6070            "compartmentId": compartment_id,
6071            "instanceShapeName": kwargs.get("instance_shape_name", missing),
6072            "limit": kwargs.get("limit", missing),
6073            "page": kwargs.get("page", missing)
6074        }
6075        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
6076
6077        header_params = {
6078            "accept": "application/json",
6079            "content-type": "application/json",
6080            "opc-request-id": kwargs.get("opc_request_id", missing)
6081        }
6082        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
6083
6084        retry_strategy = self.base_client.get_preferred_retry_strategy(
6085            operation_retry_strategy=kwargs.get('retry_strategy'),
6086            client_retry_strategy=self.retry_strategy
6087        )
6088
6089        if retry_strategy:
6090            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
6091                self.base_client.add_opc_client_retries_header(header_params)
6092                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
6093            return retry_strategy.make_retrying_call(
6094                self.base_client.call_api,
6095                resource_path=resource_path,
6096                method=method,
6097                query_params=query_params,
6098                header_params=header_params,
6099                response_type="list[DedicatedVmHostShapeSummary]")
6100        else:
6101            return self.base_client.call_api(
6102                resource_path=resource_path,
6103                method=method,
6104                query_params=query_params,
6105                header_params=header_params,
6106                response_type="list[DedicatedVmHostShapeSummary]")
6107
6108    def list_dedicated_vm_hosts(self, compartment_id, **kwargs):
6109        """
6110        Returns the list of dedicated virtual machine hosts that match the specified criteria in the specified compartment.
6111
6112        You can limit the list by specifying a dedicated virtual machine host display name. The list will include all the identically-named
6113        dedicated virtual machine hosts in the compartment.
6114
6115
6116        :param str compartment_id: (required)
6117            The `OCID`__ of the compartment.
6118
6119            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
6120
6121        :param str availability_domain: (optional)
6122            The name of the availability domain.
6123
6124            Example: `Uocm:PHX-AD-1`
6125
6126        :param str lifecycle_state: (optional)
6127            A filter to only return resources that match the given lifecycle state.
6128
6129            Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
6130
6131        :param str display_name: (optional)
6132            A filter to return only resources that match the given display name exactly.
6133
6134        :param str instance_shape_name: (optional)
6135            The name for the instance's shape.
6136
6137        :param int limit: (optional)
6138            For list pagination. The maximum number of results per page, or items to return in a paginated
6139            \"List\" call. For important details about how pagination works, see
6140            `List Pagination`__.
6141
6142            Example: `50`
6143
6144            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6145
6146        :param str page: (optional)
6147            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
6148            call. For important details about how pagination works, see
6149            `List Pagination`__.
6150
6151            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6152
6153        :param str opc_request_id: (optional)
6154            Unique identifier for the request.
6155            If you need to contact Oracle about a particular request, please provide the request ID.
6156
6157        :param str sort_by: (optional)
6158            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
6159            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
6160            sort order is case sensitive.
6161
6162            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
6163            optionally filter by availability domain if the scope of the resource type is within a
6164            single availability domain. If you call one of these \"List\" operations without specifying
6165            an availability domain, the resources are grouped by availability domain, then sorted.
6166
6167            Allowed values are: "TIMECREATED", "DISPLAYNAME"
6168
6169        :param str sort_order: (optional)
6170            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
6171            is case sensitive.
6172
6173            Allowed values are: "ASC", "DESC"
6174
6175        :param float remaining_memory_in_gbs_greater_than_or_equal_to: (optional)
6176            The remaining memory of the dedicated VM host, in GBs.
6177
6178        :param float remaining_ocpus_greater_than_or_equal_to: (optional)
6179            The available OCPUs of the dedicated VM host.
6180
6181        :param obj retry_strategy: (optional)
6182            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
6183
6184            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
6185            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
6186
6187            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
6188
6189        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.DedicatedVmHostSummary`
6190        :rtype: :class:`~oci.response.Response`
6191
6192        :example:
6193        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_dedicated_vm_hosts.py.html>`__ to see an example of how to use list_dedicated_vm_hosts API.
6194        """
6195        resource_path = "/dedicatedVmHosts"
6196        method = "GET"
6197
6198        # Don't accept unknown kwargs
6199        expected_kwargs = [
6200            "retry_strategy",
6201            "availability_domain",
6202            "lifecycle_state",
6203            "display_name",
6204            "instance_shape_name",
6205            "limit",
6206            "page",
6207            "opc_request_id",
6208            "sort_by",
6209            "sort_order",
6210            "remaining_memory_in_gbs_greater_than_or_equal_to",
6211            "remaining_ocpus_greater_than_or_equal_to"
6212        ]
6213        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
6214        if extra_kwargs:
6215            raise ValueError(
6216                "list_dedicated_vm_hosts got unknown kwargs: {!r}".format(extra_kwargs))
6217
6218        if 'lifecycle_state' in kwargs:
6219            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
6220            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
6221                raise ValueError(
6222                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
6223                )
6224
6225        if 'sort_by' in kwargs:
6226            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
6227            if kwargs['sort_by'] not in sort_by_allowed_values:
6228                raise ValueError(
6229                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
6230                )
6231
6232        if 'sort_order' in kwargs:
6233            sort_order_allowed_values = ["ASC", "DESC"]
6234            if kwargs['sort_order'] not in sort_order_allowed_values:
6235                raise ValueError(
6236                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
6237                )
6238
6239        query_params = {
6240            "availabilityDomain": kwargs.get("availability_domain", missing),
6241            "compartmentId": compartment_id,
6242            "lifecycleState": kwargs.get("lifecycle_state", missing),
6243            "displayName": kwargs.get("display_name", missing),
6244            "instanceShapeName": kwargs.get("instance_shape_name", missing),
6245            "limit": kwargs.get("limit", missing),
6246            "page": kwargs.get("page", missing),
6247            "sortBy": kwargs.get("sort_by", missing),
6248            "sortOrder": kwargs.get("sort_order", missing),
6249            "remainingMemoryInGBsGreaterThanOrEqualTo": kwargs.get("remaining_memory_in_gbs_greater_than_or_equal_to", missing),
6250            "remainingOcpusGreaterThanOrEqualTo": kwargs.get("remaining_ocpus_greater_than_or_equal_to", missing)
6251        }
6252        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
6253
6254        header_params = {
6255            "accept": "application/json, application/x-json-stream",
6256            "content-type": "application/json",
6257            "opc-request-id": kwargs.get("opc_request_id", missing)
6258        }
6259        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
6260
6261        retry_strategy = self.base_client.get_preferred_retry_strategy(
6262            operation_retry_strategy=kwargs.get('retry_strategy'),
6263            client_retry_strategy=self.retry_strategy
6264        )
6265
6266        if retry_strategy:
6267            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
6268                self.base_client.add_opc_client_retries_header(header_params)
6269                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
6270            return retry_strategy.make_retrying_call(
6271                self.base_client.call_api,
6272                resource_path=resource_path,
6273                method=method,
6274                query_params=query_params,
6275                header_params=header_params,
6276                response_type="list[DedicatedVmHostSummary]")
6277        else:
6278            return self.base_client.call_api(
6279                resource_path=resource_path,
6280                method=method,
6281                query_params=query_params,
6282                header_params=header_params,
6283                response_type="list[DedicatedVmHostSummary]")
6284
6285    def list_image_shape_compatibility_entries(self, image_id, **kwargs):
6286        """
6287        Lists the compatible shapes for the specified image.
6288
6289
6290        :param str image_id: (required)
6291            The `OCID`__ of the image.
6292
6293            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
6294
6295        :param int limit: (optional)
6296            For list pagination. The maximum number of results per page, or items to return in a paginated
6297            \"List\" call. For important details about how pagination works, see
6298            `List Pagination`__.
6299
6300            Example: `50`
6301
6302            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6303
6304        :param str page: (optional)
6305            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
6306            call. For important details about how pagination works, see
6307            `List Pagination`__.
6308
6309            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6310
6311        :param str opc_request_id: (optional)
6312            Unique identifier for the request.
6313            If you need to contact Oracle about a particular request, please provide the request ID.
6314
6315        :param obj retry_strategy: (optional)
6316            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
6317
6318            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
6319            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
6320
6321            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
6322
6323        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.ImageShapeCompatibilitySummary`
6324        :rtype: :class:`~oci.response.Response`
6325
6326        :example:
6327        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_image_shape_compatibility_entries.py.html>`__ to see an example of how to use list_image_shape_compatibility_entries API.
6328        """
6329        resource_path = "/images/{imageId}/shapes"
6330        method = "GET"
6331
6332        # Don't accept unknown kwargs
6333        expected_kwargs = [
6334            "retry_strategy",
6335            "limit",
6336            "page",
6337            "opc_request_id"
6338        ]
6339        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
6340        if extra_kwargs:
6341            raise ValueError(
6342                "list_image_shape_compatibility_entries got unknown kwargs: {!r}".format(extra_kwargs))
6343
6344        path_params = {
6345            "imageId": image_id
6346        }
6347
6348        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
6349
6350        for (k, v) in six.iteritems(path_params):
6351            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
6352                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
6353
6354        query_params = {
6355            "limit": kwargs.get("limit", missing),
6356            "page": kwargs.get("page", missing)
6357        }
6358        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
6359
6360        header_params = {
6361            "accept": "application/json",
6362            "content-type": "application/json",
6363            "opc-request-id": kwargs.get("opc_request_id", missing)
6364        }
6365        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
6366
6367        retry_strategy = self.base_client.get_preferred_retry_strategy(
6368            operation_retry_strategy=kwargs.get('retry_strategy'),
6369            client_retry_strategy=self.retry_strategy
6370        )
6371
6372        if retry_strategy:
6373            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
6374                self.base_client.add_opc_client_retries_header(header_params)
6375                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
6376            return retry_strategy.make_retrying_call(
6377                self.base_client.call_api,
6378                resource_path=resource_path,
6379                method=method,
6380                path_params=path_params,
6381                query_params=query_params,
6382                header_params=header_params,
6383                response_type="list[ImageShapeCompatibilitySummary]")
6384        else:
6385            return self.base_client.call_api(
6386                resource_path=resource_path,
6387                method=method,
6388                path_params=path_params,
6389                query_params=query_params,
6390                header_params=header_params,
6391                response_type="list[ImageShapeCompatibilitySummary]")
6392
6393    def list_images(self, compartment_id, **kwargs):
6394        """
6395        Lists a subset of images available in the specified compartment, including
6396        `platform images`__ and
6397        `custom images`__.
6398        The list of platform images includes the three most recently published versions
6399        of each major distribution.
6400
6401        The list of images returned is ordered to first show the recent platform images,
6402        then all of the custom images.
6403
6404        **Caution:** Platform images are refreshed regularly. When new images are released, older versions are replaced.
6405        The image OCIDs remain available, but when the platform image is replaced, the image OCIDs are no longer returned as part of the platform image list.
6406
6407        __ https://docs.cloud.oracle.com/iaas/Content/Compute/References/images.htm
6408        __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm
6409
6410
6411        :param str compartment_id: (required)
6412            The `OCID`__ of the compartment.
6413
6414            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
6415
6416        :param str display_name: (optional)
6417            A filter to return only resources that match the given display name exactly.
6418
6419        :param str operating_system: (optional)
6420            The image's operating system.
6421
6422            Example: `Oracle Linux`
6423
6424        :param str operating_system_version: (optional)
6425            The image's operating system version.
6426
6427            Example: `7.2`
6428
6429        :param str shape: (optional)
6430            Shape name.
6431
6432        :param int limit: (optional)
6433            For list pagination. The maximum number of results per page, or items to return in a paginated
6434            \"List\" call. For important details about how pagination works, see
6435            `List Pagination`__.
6436
6437            Example: `50`
6438
6439            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6440
6441        :param str page: (optional)
6442            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
6443            call. For important details about how pagination works, see
6444            `List Pagination`__.
6445
6446            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6447
6448        :param str sort_by: (optional)
6449            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
6450            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
6451            sort order is case sensitive.
6452
6453            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
6454            optionally filter by availability domain if the scope of the resource type is within a
6455            single availability domain. If you call one of these \"List\" operations without specifying
6456            an availability domain, the resources are grouped by availability domain, then sorted.
6457
6458            Allowed values are: "TIMECREATED", "DISPLAYNAME"
6459
6460        :param str sort_order: (optional)
6461            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
6462            is case sensitive.
6463
6464            Allowed values are: "ASC", "DESC"
6465
6466        :param str lifecycle_state: (optional)
6467            A filter to only return resources that match the given lifecycle state. The state
6468            value is case-insensitive.
6469
6470            Allowed values are: "PROVISIONING", "IMPORTING", "AVAILABLE", "EXPORTING", "DISABLED", "DELETED"
6471
6472        :param obj retry_strategy: (optional)
6473            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
6474
6475            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
6476            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
6477
6478            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
6479
6480        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Image`
6481        :rtype: :class:`~oci.response.Response`
6482
6483        :example:
6484        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_images.py.html>`__ to see an example of how to use list_images API.
6485        """
6486        resource_path = "/images"
6487        method = "GET"
6488
6489        # Don't accept unknown kwargs
6490        expected_kwargs = [
6491            "retry_strategy",
6492            "display_name",
6493            "operating_system",
6494            "operating_system_version",
6495            "shape",
6496            "limit",
6497            "page",
6498            "sort_by",
6499            "sort_order",
6500            "lifecycle_state"
6501        ]
6502        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
6503        if extra_kwargs:
6504            raise ValueError(
6505                "list_images got unknown kwargs: {!r}".format(extra_kwargs))
6506
6507        if 'sort_by' in kwargs:
6508            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
6509            if kwargs['sort_by'] not in sort_by_allowed_values:
6510                raise ValueError(
6511                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
6512                )
6513
6514        if 'sort_order' in kwargs:
6515            sort_order_allowed_values = ["ASC", "DESC"]
6516            if kwargs['sort_order'] not in sort_order_allowed_values:
6517                raise ValueError(
6518                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
6519                )
6520
6521        if 'lifecycle_state' in kwargs:
6522            lifecycle_state_allowed_values = ["PROVISIONING", "IMPORTING", "AVAILABLE", "EXPORTING", "DISABLED", "DELETED"]
6523            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
6524                raise ValueError(
6525                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
6526                )
6527
6528        query_params = {
6529            "compartmentId": compartment_id,
6530            "displayName": kwargs.get("display_name", missing),
6531            "operatingSystem": kwargs.get("operating_system", missing),
6532            "operatingSystemVersion": kwargs.get("operating_system_version", missing),
6533            "shape": kwargs.get("shape", missing),
6534            "limit": kwargs.get("limit", missing),
6535            "page": kwargs.get("page", missing),
6536            "sortBy": kwargs.get("sort_by", missing),
6537            "sortOrder": kwargs.get("sort_order", missing),
6538            "lifecycleState": kwargs.get("lifecycle_state", missing)
6539        }
6540        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
6541
6542        header_params = {
6543            "accept": "application/json",
6544            "content-type": "application/json"
6545        }
6546
6547        retry_strategy = self.base_client.get_preferred_retry_strategy(
6548            operation_retry_strategy=kwargs.get('retry_strategy'),
6549            client_retry_strategy=self.retry_strategy
6550        )
6551
6552        if retry_strategy:
6553            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
6554                self.base_client.add_opc_client_retries_header(header_params)
6555                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
6556            return retry_strategy.make_retrying_call(
6557                self.base_client.call_api,
6558                resource_path=resource_path,
6559                method=method,
6560                query_params=query_params,
6561                header_params=header_params,
6562                response_type="list[Image]")
6563        else:
6564            return self.base_client.call_api(
6565                resource_path=resource_path,
6566                method=method,
6567                query_params=query_params,
6568                header_params=header_params,
6569                response_type="list[Image]")
6570
6571    def list_instance_console_connections(self, compartment_id, **kwargs):
6572        """
6573        Lists the console connections for the specified compartment or instance.
6574
6575        For more information about instance console connections, see `Troubleshooting Instances Using Instance Console Connections`__.
6576
6577        __ https://docs.cloud.oracle.com/iaas/Content/Compute/References/serialconsole.htm
6578
6579
6580        :param str compartment_id: (required)
6581            The `OCID`__ of the compartment.
6582
6583            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
6584
6585        :param str instance_id: (optional)
6586            The OCID of the instance.
6587
6588        :param int limit: (optional)
6589            For list pagination. The maximum number of results per page, or items to return in a paginated
6590            \"List\" call. For important details about how pagination works, see
6591            `List Pagination`__.
6592
6593            Example: `50`
6594
6595            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6596
6597        :param str page: (optional)
6598            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
6599            call. For important details about how pagination works, see
6600            `List Pagination`__.
6601
6602            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6603
6604        :param obj retry_strategy: (optional)
6605            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
6606
6607            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
6608            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
6609
6610            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
6611
6612        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.InstanceConsoleConnection`
6613        :rtype: :class:`~oci.response.Response`
6614
6615        :example:
6616        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_instance_console_connections.py.html>`__ to see an example of how to use list_instance_console_connections API.
6617        """
6618        resource_path = "/instanceConsoleConnections"
6619        method = "GET"
6620
6621        # Don't accept unknown kwargs
6622        expected_kwargs = [
6623            "retry_strategy",
6624            "instance_id",
6625            "limit",
6626            "page"
6627        ]
6628        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
6629        if extra_kwargs:
6630            raise ValueError(
6631                "list_instance_console_connections got unknown kwargs: {!r}".format(extra_kwargs))
6632
6633        query_params = {
6634            "compartmentId": compartment_id,
6635            "instanceId": kwargs.get("instance_id", missing),
6636            "limit": kwargs.get("limit", missing),
6637            "page": kwargs.get("page", missing)
6638        }
6639        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
6640
6641        header_params = {
6642            "accept": "application/json",
6643            "content-type": "application/json"
6644        }
6645
6646        retry_strategy = self.base_client.get_preferred_retry_strategy(
6647            operation_retry_strategy=kwargs.get('retry_strategy'),
6648            client_retry_strategy=self.retry_strategy
6649        )
6650
6651        if retry_strategy:
6652            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
6653                self.base_client.add_opc_client_retries_header(header_params)
6654                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
6655            return retry_strategy.make_retrying_call(
6656                self.base_client.call_api,
6657                resource_path=resource_path,
6658                method=method,
6659                query_params=query_params,
6660                header_params=header_params,
6661                response_type="list[InstanceConsoleConnection]")
6662        else:
6663            return self.base_client.call_api(
6664                resource_path=resource_path,
6665                method=method,
6666                query_params=query_params,
6667                header_params=header_params,
6668                response_type="list[InstanceConsoleConnection]")
6669
6670    def list_instance_devices(self, instance_id, **kwargs):
6671        """
6672        Gets a list of all the devices for given instance. You can optionally filter results by device availability.
6673
6674
6675        :param str instance_id: (required)
6676            The `OCID`__ of the instance.
6677
6678            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
6679
6680        :param bool is_available: (optional)
6681            A filter to return only available devices or only used devices.
6682
6683        :param str name: (optional)
6684            A filter to return only devices that match the given name exactly.
6685
6686        :param int limit: (optional)
6687            For list pagination. The maximum number of results per page, or items to return in a paginated
6688            \"List\" call. For important details about how pagination works, see
6689            `List Pagination`__.
6690
6691            Example: `50`
6692
6693            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6694
6695        :param str page: (optional)
6696            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
6697            call. For important details about how pagination works, see
6698            `List Pagination`__.
6699
6700            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6701
6702        :param str opc_request_id: (optional)
6703            Unique identifier for the request.
6704            If you need to contact Oracle about a particular request, please provide the request ID.
6705
6706        :param str sort_by: (optional)
6707            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
6708            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
6709            sort order is case sensitive.
6710
6711            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
6712            optionally filter by availability domain if the scope of the resource type is within a
6713            single availability domain. If you call one of these \"List\" operations without specifying
6714            an availability domain, the resources are grouped by availability domain, then sorted.
6715
6716            Allowed values are: "TIMECREATED", "DISPLAYNAME"
6717
6718        :param str sort_order: (optional)
6719            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
6720            is case sensitive.
6721
6722            Allowed values are: "ASC", "DESC"
6723
6724        :param obj retry_strategy: (optional)
6725            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
6726
6727            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
6728            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
6729
6730            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
6731
6732        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Device`
6733        :rtype: :class:`~oci.response.Response`
6734
6735        :example:
6736        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_instance_devices.py.html>`__ to see an example of how to use list_instance_devices API.
6737        """
6738        resource_path = "/instances/{instanceId}/devices"
6739        method = "GET"
6740
6741        # Don't accept unknown kwargs
6742        expected_kwargs = [
6743            "retry_strategy",
6744            "is_available",
6745            "name",
6746            "limit",
6747            "page",
6748            "opc_request_id",
6749            "sort_by",
6750            "sort_order"
6751        ]
6752        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
6753        if extra_kwargs:
6754            raise ValueError(
6755                "list_instance_devices got unknown kwargs: {!r}".format(extra_kwargs))
6756
6757        path_params = {
6758            "instanceId": instance_id
6759        }
6760
6761        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
6762
6763        for (k, v) in six.iteritems(path_params):
6764            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
6765                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
6766
6767        if 'sort_by' in kwargs:
6768            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
6769            if kwargs['sort_by'] not in sort_by_allowed_values:
6770                raise ValueError(
6771                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
6772                )
6773
6774        if 'sort_order' in kwargs:
6775            sort_order_allowed_values = ["ASC", "DESC"]
6776            if kwargs['sort_order'] not in sort_order_allowed_values:
6777                raise ValueError(
6778                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
6779                )
6780
6781        query_params = {
6782            "isAvailable": kwargs.get("is_available", missing),
6783            "name": kwargs.get("name", missing),
6784            "limit": kwargs.get("limit", missing),
6785            "page": kwargs.get("page", missing),
6786            "sortBy": kwargs.get("sort_by", missing),
6787            "sortOrder": kwargs.get("sort_order", missing)
6788        }
6789        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
6790
6791        header_params = {
6792            "accept": "application/json",
6793            "content-type": "application/json",
6794            "opc-request-id": kwargs.get("opc_request_id", missing)
6795        }
6796        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
6797
6798        retry_strategy = self.base_client.get_preferred_retry_strategy(
6799            operation_retry_strategy=kwargs.get('retry_strategy'),
6800            client_retry_strategy=self.retry_strategy
6801        )
6802
6803        if retry_strategy:
6804            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
6805                self.base_client.add_opc_client_retries_header(header_params)
6806                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
6807            return retry_strategy.make_retrying_call(
6808                self.base_client.call_api,
6809                resource_path=resource_path,
6810                method=method,
6811                path_params=path_params,
6812                query_params=query_params,
6813                header_params=header_params,
6814                response_type="list[Device]")
6815        else:
6816            return self.base_client.call_api(
6817                resource_path=resource_path,
6818                method=method,
6819                path_params=path_params,
6820                query_params=query_params,
6821                header_params=header_params,
6822                response_type="list[Device]")
6823
6824    def list_instances(self, compartment_id, **kwargs):
6825        """
6826        Lists the instances in the specified compartment and the specified availability domain.
6827        You can filter the results by specifying an instance name (the list will include all the identically-named
6828        instances in the compartment).
6829
6830
6831        :param str compartment_id: (required)
6832            The `OCID`__ of the compartment.
6833
6834            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
6835
6836        :param str availability_domain: (optional)
6837            The name of the availability domain.
6838
6839            Example: `Uocm:PHX-AD-1`
6840
6841        :param str capacity_reservation_id: (optional)
6842            The OCID of the compute capacity reservation.
6843
6844        :param str display_name: (optional)
6845            A filter to return only resources that match the given display name exactly.
6846
6847        :param int limit: (optional)
6848            For list pagination. The maximum number of results per page, or items to return in a paginated
6849            \"List\" call. For important details about how pagination works, see
6850            `List Pagination`__.
6851
6852            Example: `50`
6853
6854            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6855
6856        :param str page: (optional)
6857            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
6858            call. For important details about how pagination works, see
6859            `List Pagination`__.
6860
6861            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
6862
6863        :param str sort_by: (optional)
6864            The field to sort by. You can provide one sort order (`sortOrder`). Default order for
6865            TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
6866            sort order is case sensitive.
6867
6868            **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
6869            optionally filter by availability domain if the scope of the resource type is within a
6870            single availability domain. If you call one of these \"List\" operations without specifying
6871            an availability domain, the resources are grouped by availability domain, then sorted.
6872
6873            Allowed values are: "TIMECREATED", "DISPLAYNAME"
6874
6875        :param str sort_order: (optional)
6876            The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
6877            is case sensitive.
6878
6879            Allowed values are: "ASC", "DESC"
6880
6881        :param str lifecycle_state: (optional)
6882            A filter to only return resources that match the given lifecycle state. The state
6883            value is case-insensitive.
6884
6885            Allowed values are: "MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"
6886
6887        :param obj retry_strategy: (optional)
6888            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
6889
6890            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
6891            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
6892
6893            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
6894
6895        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Instance`
6896        :rtype: :class:`~oci.response.Response`
6897
6898        :example:
6899        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_instances.py.html>`__ to see an example of how to use list_instances API.
6900        """
6901        resource_path = "/instances"
6902        method = "GET"
6903
6904        # Don't accept unknown kwargs
6905        expected_kwargs = [
6906            "retry_strategy",
6907            "availability_domain",
6908            "capacity_reservation_id",
6909            "display_name",
6910            "limit",
6911            "page",
6912            "sort_by",
6913            "sort_order",
6914            "lifecycle_state"
6915        ]
6916        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
6917        if extra_kwargs:
6918            raise ValueError(
6919                "list_instances got unknown kwargs: {!r}".format(extra_kwargs))
6920
6921        if 'sort_by' in kwargs:
6922            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
6923            if kwargs['sort_by'] not in sort_by_allowed_values:
6924                raise ValueError(
6925                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
6926                )
6927
6928        if 'sort_order' in kwargs:
6929            sort_order_allowed_values = ["ASC", "DESC"]
6930            if kwargs['sort_order'] not in sort_order_allowed_values:
6931                raise ValueError(
6932                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
6933                )
6934
6935        if 'lifecycle_state' in kwargs:
6936            lifecycle_state_allowed_values = ["MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"]
6937            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
6938                raise ValueError(
6939                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
6940                )
6941
6942        query_params = {
6943            "availabilityDomain": kwargs.get("availability_domain", missing),
6944            "capacityReservationId": kwargs.get("capacity_reservation_id", missing),
6945            "compartmentId": compartment_id,
6946            "displayName": kwargs.get("display_name", missing),
6947            "limit": kwargs.get("limit", missing),
6948            "page": kwargs.get("page", missing),
6949            "sortBy": kwargs.get("sort_by", missing),
6950            "sortOrder": kwargs.get("sort_order", missing),
6951            "lifecycleState": kwargs.get("lifecycle_state", missing)
6952        }
6953        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
6954
6955        header_params = {
6956            "accept": "application/json, application/x-json-stream",
6957            "content-type": "application/json"
6958        }
6959
6960        retry_strategy = self.base_client.get_preferred_retry_strategy(
6961            operation_retry_strategy=kwargs.get('retry_strategy'),
6962            client_retry_strategy=self.retry_strategy
6963        )
6964
6965        if retry_strategy:
6966            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
6967                self.base_client.add_opc_client_retries_header(header_params)
6968                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
6969            return retry_strategy.make_retrying_call(
6970                self.base_client.call_api,
6971                resource_path=resource_path,
6972                method=method,
6973                query_params=query_params,
6974                header_params=header_params,
6975                response_type="list[Instance]")
6976        else:
6977            return self.base_client.call_api(
6978                resource_path=resource_path,
6979                method=method,
6980                query_params=query_params,
6981                header_params=header_params,
6982                response_type="list[Instance]")
6983
6984    def list_shapes(self, compartment_id, **kwargs):
6985        """
6986        Lists the shapes that can be used to launch an instance within the specified compartment. You can
6987        filter the list by compatibility with a specific image.
6988
6989
6990        :param str compartment_id: (required)
6991            The `OCID`__ of the compartment.
6992
6993            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
6994
6995        :param str availability_domain: (optional)
6996            The name of the availability domain.
6997
6998            Example: `Uocm:PHX-AD-1`
6999
7000        :param int limit: (optional)
7001            For list pagination. The maximum number of results per page, or items to return in a paginated
7002            \"List\" call. For important details about how pagination works, see
7003            `List Pagination`__.
7004
7005            Example: `50`
7006
7007            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
7008
7009        :param str page: (optional)
7010            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
7011            call. For important details about how pagination works, see
7012            `List Pagination`__.
7013
7014            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
7015
7016        :param str image_id: (optional)
7017            The `OCID`__ of an image.
7018
7019            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
7020
7021        :param obj retry_strategy: (optional)
7022            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7023
7024            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7025            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7026
7027            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7028
7029        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.Shape`
7030        :rtype: :class:`~oci.response.Response`
7031
7032        :example:
7033        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_shapes.py.html>`__ to see an example of how to use list_shapes API.
7034        """
7035        resource_path = "/shapes"
7036        method = "GET"
7037
7038        # Don't accept unknown kwargs
7039        expected_kwargs = [
7040            "retry_strategy",
7041            "availability_domain",
7042            "limit",
7043            "page",
7044            "image_id"
7045        ]
7046        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7047        if extra_kwargs:
7048            raise ValueError(
7049                "list_shapes got unknown kwargs: {!r}".format(extra_kwargs))
7050
7051        query_params = {
7052            "availabilityDomain": kwargs.get("availability_domain", missing),
7053            "compartmentId": compartment_id,
7054            "limit": kwargs.get("limit", missing),
7055            "page": kwargs.get("page", missing),
7056            "imageId": kwargs.get("image_id", missing)
7057        }
7058        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
7059
7060        header_params = {
7061            "accept": "application/json",
7062            "content-type": "application/json"
7063        }
7064
7065        retry_strategy = self.base_client.get_preferred_retry_strategy(
7066            operation_retry_strategy=kwargs.get('retry_strategy'),
7067            client_retry_strategy=self.retry_strategy
7068        )
7069
7070        if retry_strategy:
7071            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7072                self.base_client.add_opc_client_retries_header(header_params)
7073                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7074            return retry_strategy.make_retrying_call(
7075                self.base_client.call_api,
7076                resource_path=resource_path,
7077                method=method,
7078                query_params=query_params,
7079                header_params=header_params,
7080                response_type="list[Shape]")
7081        else:
7082            return self.base_client.call_api(
7083                resource_path=resource_path,
7084                method=method,
7085                query_params=query_params,
7086                header_params=header_params,
7087                response_type="list[Shape]")
7088
7089    def list_vnic_attachments(self, compartment_id, **kwargs):
7090        """
7091        Lists the VNIC attachments in the specified compartment. A VNIC attachment
7092        resides in the same compartment as the attached instance. The list can be
7093        filtered by instance, VNIC, or availability domain.
7094
7095
7096        :param str compartment_id: (required)
7097            The `OCID`__ of the compartment.
7098
7099            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
7100
7101        :param str availability_domain: (optional)
7102            The name of the availability domain.
7103
7104            Example: `Uocm:PHX-AD-1`
7105
7106        :param str instance_id: (optional)
7107            The OCID of the instance.
7108
7109        :param int limit: (optional)
7110            For list pagination. The maximum number of results per page, or items to return in a paginated
7111            \"List\" call. For important details about how pagination works, see
7112            `List Pagination`__.
7113
7114            Example: `50`
7115
7116            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
7117
7118        :param str page: (optional)
7119            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
7120            call. For important details about how pagination works, see
7121            `List Pagination`__.
7122
7123            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
7124
7125        :param str vnic_id: (optional)
7126            The OCID of the VNIC.
7127
7128        :param obj retry_strategy: (optional)
7129            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7130
7131            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7132            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7133
7134            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7135
7136        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.VnicAttachment`
7137        :rtype: :class:`~oci.response.Response`
7138
7139        :example:
7140        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_vnic_attachments.py.html>`__ to see an example of how to use list_vnic_attachments API.
7141        """
7142        resource_path = "/vnicAttachments"
7143        method = "GET"
7144
7145        # Don't accept unknown kwargs
7146        expected_kwargs = [
7147            "retry_strategy",
7148            "availability_domain",
7149            "instance_id",
7150            "limit",
7151            "page",
7152            "vnic_id"
7153        ]
7154        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7155        if extra_kwargs:
7156            raise ValueError(
7157                "list_vnic_attachments got unknown kwargs: {!r}".format(extra_kwargs))
7158
7159        query_params = {
7160            "availabilityDomain": kwargs.get("availability_domain", missing),
7161            "compartmentId": compartment_id,
7162            "instanceId": kwargs.get("instance_id", missing),
7163            "limit": kwargs.get("limit", missing),
7164            "page": kwargs.get("page", missing),
7165            "vnicId": kwargs.get("vnic_id", missing)
7166        }
7167        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
7168
7169        header_params = {
7170            "accept": "application/json, application/x-json-stream",
7171            "content-type": "application/json"
7172        }
7173
7174        retry_strategy = self.base_client.get_preferred_retry_strategy(
7175            operation_retry_strategy=kwargs.get('retry_strategy'),
7176            client_retry_strategy=self.retry_strategy
7177        )
7178
7179        if retry_strategy:
7180            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7181                self.base_client.add_opc_client_retries_header(header_params)
7182                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7183            return retry_strategy.make_retrying_call(
7184                self.base_client.call_api,
7185                resource_path=resource_path,
7186                method=method,
7187                query_params=query_params,
7188                header_params=header_params,
7189                response_type="list[VnicAttachment]")
7190        else:
7191            return self.base_client.call_api(
7192                resource_path=resource_path,
7193                method=method,
7194                query_params=query_params,
7195                header_params=header_params,
7196                response_type="list[VnicAttachment]")
7197
7198    def list_volume_attachments(self, compartment_id, **kwargs):
7199        """
7200        Lists the volume attachments in the specified compartment. You can filter the
7201        list by specifying an instance OCID, volume OCID, or both.
7202
7203        Currently, the only supported volume attachment type are :class:`IScsiVolumeAttachment` and
7204        :class:`ParavirtualizedVolumeAttachment`.
7205
7206
7207        :param str compartment_id: (required)
7208            The `OCID`__ of the compartment.
7209
7210            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
7211
7212        :param str availability_domain: (optional)
7213            The name of the availability domain.
7214
7215            Example: `Uocm:PHX-AD-1`
7216
7217        :param int limit: (optional)
7218            For list pagination. The maximum number of results per page, or items to return in a paginated
7219            \"List\" call. For important details about how pagination works, see
7220            `List Pagination`__.
7221
7222            Example: `50`
7223
7224            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
7225
7226        :param str page: (optional)
7227            For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
7228            call. For important details about how pagination works, see
7229            `List Pagination`__.
7230
7231            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
7232
7233        :param str instance_id: (optional)
7234            The OCID of the instance.
7235
7236        :param str volume_id: (optional)
7237            The OCID of the volume.
7238
7239        :param obj retry_strategy: (optional)
7240            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7241
7242            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7243            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7244
7245            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7246
7247        :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.VolumeAttachment`
7248        :rtype: :class:`~oci.response.Response`
7249
7250        :example:
7251        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/list_volume_attachments.py.html>`__ to see an example of how to use list_volume_attachments API.
7252        """
7253        resource_path = "/volumeAttachments"
7254        method = "GET"
7255
7256        # Don't accept unknown kwargs
7257        expected_kwargs = [
7258            "retry_strategy",
7259            "availability_domain",
7260            "limit",
7261            "page",
7262            "instance_id",
7263            "volume_id"
7264        ]
7265        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7266        if extra_kwargs:
7267            raise ValueError(
7268                "list_volume_attachments got unknown kwargs: {!r}".format(extra_kwargs))
7269
7270        query_params = {
7271            "availabilityDomain": kwargs.get("availability_domain", missing),
7272            "compartmentId": compartment_id,
7273            "limit": kwargs.get("limit", missing),
7274            "page": kwargs.get("page", missing),
7275            "instanceId": kwargs.get("instance_id", missing),
7276            "volumeId": kwargs.get("volume_id", missing)
7277        }
7278        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
7279
7280        header_params = {
7281            "accept": "application/json, application/x-json-stream",
7282            "content-type": "application/json"
7283        }
7284
7285        retry_strategy = self.base_client.get_preferred_retry_strategy(
7286            operation_retry_strategy=kwargs.get('retry_strategy'),
7287            client_retry_strategy=self.retry_strategy
7288        )
7289
7290        if retry_strategy:
7291            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7292                self.base_client.add_opc_client_retries_header(header_params)
7293                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7294            return retry_strategy.make_retrying_call(
7295                self.base_client.call_api,
7296                resource_path=resource_path,
7297                method=method,
7298                query_params=query_params,
7299                header_params=header_params,
7300                response_type="list[VolumeAttachment]")
7301        else:
7302            return self.base_client.call_api(
7303                resource_path=resource_path,
7304                method=method,
7305                query_params=query_params,
7306                header_params=header_params,
7307                response_type="list[VolumeAttachment]")
7308
7309    def remove_image_shape_compatibility_entry(self, image_id, shape_name, **kwargs):
7310        """
7311        Removes a shape from the compatible shapes list for the image.
7312
7313
7314        :param str image_id: (required)
7315            The `OCID`__ of the image.
7316
7317            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
7318
7319        :param str shape_name: (required)
7320            Shape name.
7321
7322        :param obj retry_strategy: (optional)
7323            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7324
7325            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7326            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7327
7328            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7329
7330        :return: A :class:`~oci.response.Response` object with data of type None
7331        :rtype: :class:`~oci.response.Response`
7332
7333        :example:
7334        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/remove_image_shape_compatibility_entry.py.html>`__ to see an example of how to use remove_image_shape_compatibility_entry API.
7335        """
7336        resource_path = "/images/{imageId}/shapes/{shapeName}"
7337        method = "DELETE"
7338
7339        expected_kwargs = ["retry_strategy"]
7340        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7341        if extra_kwargs:
7342            raise ValueError(
7343                "remove_image_shape_compatibility_entry got unknown kwargs: {!r}".format(extra_kwargs))
7344
7345        path_params = {
7346            "imageId": image_id,
7347            "shapeName": shape_name
7348        }
7349
7350        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
7351
7352        for (k, v) in six.iteritems(path_params):
7353            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
7354                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
7355
7356        header_params = {
7357            "accept": "application/json",
7358            "content-type": "application/json"
7359        }
7360
7361        retry_strategy = self.base_client.get_preferred_retry_strategy(
7362            operation_retry_strategy=kwargs.get('retry_strategy'),
7363            client_retry_strategy=self.retry_strategy
7364        )
7365
7366        if retry_strategy:
7367            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7368                self.base_client.add_opc_client_retries_header(header_params)
7369                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7370            return retry_strategy.make_retrying_call(
7371                self.base_client.call_api,
7372                resource_path=resource_path,
7373                method=method,
7374                path_params=path_params,
7375                header_params=header_params)
7376        else:
7377            return self.base_client.call_api(
7378                resource_path=resource_path,
7379                method=method,
7380                path_params=path_params,
7381                header_params=header_params)
7382
7383    def terminate_instance(self, instance_id, **kwargs):
7384        """
7385        Terminates the specified instance. Any attached VNICs and volumes are automatically detached
7386        when the instance terminates.
7387
7388        To preserve the boot volume associated with the instance, specify `true` for `PreserveBootVolumeQueryParam`.
7389        To delete the boot volume when the instance is deleted, specify `false` or do not specify a value for `PreserveBootVolumeQueryParam`.
7390
7391        This is an asynchronous operation. The instance's `lifecycleState` will change to TERMINATING temporarily
7392        until the instance is completely removed.
7393
7394
7395        :param str instance_id: (required)
7396            The `OCID`__ of the instance.
7397
7398            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
7399
7400        :param str if_match: (optional)
7401            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
7402            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
7403            will be updated or deleted only if the etag you provide matches the resource's current etag value.
7404
7405        :param bool preserve_boot_volume: (optional)
7406            Specifies whether to delete or preserve the boot volume when terminating an instance.
7407            When set to `true`, the boot volume is preserved. The default value is `false`.
7408
7409        :param obj retry_strategy: (optional)
7410            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7411
7412            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7413            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7414
7415            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7416
7417        :return: A :class:`~oci.response.Response` object with data of type None
7418        :rtype: :class:`~oci.response.Response`
7419
7420        :example:
7421        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/terminate_instance.py.html>`__ to see an example of how to use terminate_instance API.
7422        """
7423        resource_path = "/instances/{instanceId}"
7424        method = "DELETE"
7425
7426        # Don't accept unknown kwargs
7427        expected_kwargs = [
7428            "retry_strategy",
7429            "if_match",
7430            "preserve_boot_volume"
7431        ]
7432        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7433        if extra_kwargs:
7434            raise ValueError(
7435                "terminate_instance got unknown kwargs: {!r}".format(extra_kwargs))
7436
7437        path_params = {
7438            "instanceId": instance_id
7439        }
7440
7441        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
7442
7443        for (k, v) in six.iteritems(path_params):
7444            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
7445                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
7446
7447        query_params = {
7448            "preserveBootVolume": kwargs.get("preserve_boot_volume", missing)
7449        }
7450        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
7451
7452        header_params = {
7453            "accept": "application/json",
7454            "content-type": "application/json",
7455            "if-match": kwargs.get("if_match", missing)
7456        }
7457        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
7458
7459        retry_strategy = self.base_client.get_preferred_retry_strategy(
7460            operation_retry_strategy=kwargs.get('retry_strategy'),
7461            client_retry_strategy=self.retry_strategy
7462        )
7463
7464        if retry_strategy:
7465            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7466                self.base_client.add_opc_client_retries_header(header_params)
7467                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7468            return retry_strategy.make_retrying_call(
7469                self.base_client.call_api,
7470                resource_path=resource_path,
7471                method=method,
7472                path_params=path_params,
7473                query_params=query_params,
7474                header_params=header_params)
7475        else:
7476            return self.base_client.call_api(
7477                resource_path=resource_path,
7478                method=method,
7479                path_params=path_params,
7480                query_params=query_params,
7481                header_params=header_params)
7482
7483    def update_compute_capacity_reservation(self, capacity_reservation_id, update_compute_capacity_reservation_details, **kwargs):
7484        """
7485        Updates the specified capacity reservation and its associated capacity configurations.
7486        Fields that are not provided in the request will not be updated. Capacity configurations that are not included will be deleted.
7487        Avoid entering confidential information.
7488
7489
7490        :param str capacity_reservation_id: (required)
7491            The OCID of the compute capacity reservation.
7492
7493        :param oci.core.models.UpdateComputeCapacityReservationDetails update_compute_capacity_reservation_details: (required)
7494            Update compute capacity reservation details.
7495
7496        :param str if_match: (optional)
7497            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
7498            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
7499            will be updated or deleted only if the etag you provide matches the resource's current etag value.
7500
7501        :param str opc_request_id: (optional)
7502            Unique identifier for the request.
7503            If you need to contact Oracle about a particular request, please provide the request ID.
7504
7505        :param obj retry_strategy: (optional)
7506            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7507
7508            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7509            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7510
7511            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7512
7513        :return: A :class:`~oci.response.Response` object with data of type None
7514        :rtype: :class:`~oci.response.Response`
7515
7516        :example:
7517        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_compute_capacity_reservation.py.html>`__ to see an example of how to use update_compute_capacity_reservation API.
7518        """
7519        resource_path = "/computeCapacityReservations/{capacityReservationId}"
7520        method = "PUT"
7521
7522        # Don't accept unknown kwargs
7523        expected_kwargs = [
7524            "retry_strategy",
7525            "if_match",
7526            "opc_request_id"
7527        ]
7528        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7529        if extra_kwargs:
7530            raise ValueError(
7531                "update_compute_capacity_reservation got unknown kwargs: {!r}".format(extra_kwargs))
7532
7533        path_params = {
7534            "capacityReservationId": capacity_reservation_id
7535        }
7536
7537        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
7538
7539        for (k, v) in six.iteritems(path_params):
7540            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
7541                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
7542
7543        header_params = {
7544            "accept": "application/json",
7545            "content-type": "application/json",
7546            "if-match": kwargs.get("if_match", missing),
7547            "opc-request-id": kwargs.get("opc_request_id", missing)
7548        }
7549        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
7550
7551        retry_strategy = self.base_client.get_preferred_retry_strategy(
7552            operation_retry_strategy=kwargs.get('retry_strategy'),
7553            client_retry_strategy=self.retry_strategy
7554        )
7555
7556        if retry_strategy:
7557            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7558                self.base_client.add_opc_client_retries_header(header_params)
7559                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7560            return retry_strategy.make_retrying_call(
7561                self.base_client.call_api,
7562                resource_path=resource_path,
7563                method=method,
7564                path_params=path_params,
7565                header_params=header_params,
7566                body=update_compute_capacity_reservation_details)
7567        else:
7568            return self.base_client.call_api(
7569                resource_path=resource_path,
7570                method=method,
7571                path_params=path_params,
7572                header_params=header_params,
7573                body=update_compute_capacity_reservation_details)
7574
7575    def update_compute_image_capability_schema(self, compute_image_capability_schema_id, update_compute_image_capability_schema_details, **kwargs):
7576        """
7577        Updates the specified Compute Image Capability Schema
7578
7579
7580        :param str compute_image_capability_schema_id: (required)
7581            The id of the compute image capability schema or the image ocid
7582
7583        :param oci.core.models.UpdateComputeImageCapabilitySchemaDetails update_compute_image_capability_schema_details: (required)
7584            Updates the freeFormTags, definedTags, and display name of the image capability schema
7585
7586        :param str if_match: (optional)
7587            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
7588            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
7589            will be updated or deleted only if the etag you provide matches the resource's current etag value.
7590
7591        :param obj retry_strategy: (optional)
7592            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7593
7594            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7595            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7596
7597            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7598
7599        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeImageCapabilitySchema`
7600        :rtype: :class:`~oci.response.Response`
7601
7602        :example:
7603        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_compute_image_capability_schema.py.html>`__ to see an example of how to use update_compute_image_capability_schema API.
7604        """
7605        resource_path = "/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}"
7606        method = "PUT"
7607
7608        # Don't accept unknown kwargs
7609        expected_kwargs = [
7610            "retry_strategy",
7611            "if_match"
7612        ]
7613        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7614        if extra_kwargs:
7615            raise ValueError(
7616                "update_compute_image_capability_schema got unknown kwargs: {!r}".format(extra_kwargs))
7617
7618        path_params = {
7619            "computeImageCapabilitySchemaId": compute_image_capability_schema_id
7620        }
7621
7622        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
7623
7624        for (k, v) in six.iteritems(path_params):
7625            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
7626                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
7627
7628        header_params = {
7629            "accept": "application/json",
7630            "content-type": "application/json",
7631            "if-match": kwargs.get("if_match", missing)
7632        }
7633        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
7634
7635        retry_strategy = self.base_client.get_preferred_retry_strategy(
7636            operation_retry_strategy=kwargs.get('retry_strategy'),
7637            client_retry_strategy=self.retry_strategy
7638        )
7639
7640        if retry_strategy:
7641            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7642                self.base_client.add_opc_client_retries_header(header_params)
7643                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7644            return retry_strategy.make_retrying_call(
7645                self.base_client.call_api,
7646                resource_path=resource_path,
7647                method=method,
7648                path_params=path_params,
7649                header_params=header_params,
7650                body=update_compute_image_capability_schema_details,
7651                response_type="ComputeImageCapabilitySchema")
7652        else:
7653            return self.base_client.call_api(
7654                resource_path=resource_path,
7655                method=method,
7656                path_params=path_params,
7657                header_params=header_params,
7658                body=update_compute_image_capability_schema_details,
7659                response_type="ComputeImageCapabilitySchema")
7660
7661    def update_console_history(self, instance_console_history_id, update_console_history_details, **kwargs):
7662        """
7663        Updates the specified console history metadata.
7664
7665
7666        :param str instance_console_history_id: (required)
7667            The OCID of the console history.
7668
7669        :param oci.core.models.UpdateConsoleHistoryDetails update_console_history_details: (required)
7670            Update instance fields
7671
7672        :param str if_match: (optional)
7673            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
7674            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
7675            will be updated or deleted only if the etag you provide matches the resource's current etag value.
7676
7677        :param obj retry_strategy: (optional)
7678            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7679
7680            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7681            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7682
7683            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7684
7685        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ConsoleHistory`
7686        :rtype: :class:`~oci.response.Response`
7687
7688        :example:
7689        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_console_history.py.html>`__ to see an example of how to use update_console_history API.
7690        """
7691        resource_path = "/instanceConsoleHistories/{instanceConsoleHistoryId}"
7692        method = "PUT"
7693
7694        # Don't accept unknown kwargs
7695        expected_kwargs = [
7696            "retry_strategy",
7697            "if_match"
7698        ]
7699        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7700        if extra_kwargs:
7701            raise ValueError(
7702                "update_console_history got unknown kwargs: {!r}".format(extra_kwargs))
7703
7704        path_params = {
7705            "instanceConsoleHistoryId": instance_console_history_id
7706        }
7707
7708        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
7709
7710        for (k, v) in six.iteritems(path_params):
7711            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
7712                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
7713
7714        header_params = {
7715            "accept": "application/json",
7716            "content-type": "application/json",
7717            "if-match": kwargs.get("if_match", missing)
7718        }
7719        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
7720
7721        retry_strategy = self.base_client.get_preferred_retry_strategy(
7722            operation_retry_strategy=kwargs.get('retry_strategy'),
7723            client_retry_strategy=self.retry_strategy
7724        )
7725
7726        if retry_strategy:
7727            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7728                self.base_client.add_opc_client_retries_header(header_params)
7729                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7730            return retry_strategy.make_retrying_call(
7731                self.base_client.call_api,
7732                resource_path=resource_path,
7733                method=method,
7734                path_params=path_params,
7735                header_params=header_params,
7736                body=update_console_history_details,
7737                response_type="ConsoleHistory")
7738        else:
7739            return self.base_client.call_api(
7740                resource_path=resource_path,
7741                method=method,
7742                path_params=path_params,
7743                header_params=header_params,
7744                body=update_console_history_details,
7745                response_type="ConsoleHistory")
7746
7747    def update_dedicated_vm_host(self, dedicated_vm_host_id, update_dedicated_vm_host_details, **kwargs):
7748        """
7749        Updates the displayName, freeformTags, and definedTags attributes for the specified dedicated virtual machine host.
7750        If an attribute value is not included, it will not be updated.
7751
7752
7753        :param str dedicated_vm_host_id: (required)
7754            The OCID of the dedicated VM host.
7755
7756        :param oci.core.models.UpdateDedicatedVmHostDetails update_dedicated_vm_host_details: (required)
7757            Update dedicated VM host details
7758
7759        :param str if_match: (optional)
7760            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
7761            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
7762            will be updated or deleted only if the etag you provide matches the resource's current etag value.
7763
7764        :param str opc_request_id: (optional)
7765            Unique identifier for the request.
7766            If you need to contact Oracle about a particular request, please provide the request ID.
7767
7768        :param str opc_retry_token: (optional)
7769            A token that uniquely identifies a request so it can be retried in case of a timeout or
7770            server error without risk of executing that same action again. Retry tokens expire after 24
7771            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
7772            has been deleted and purged from the system, then a retry of the original creation request
7773            may be rejected).
7774
7775        :param obj retry_strategy: (optional)
7776            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7777
7778            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7779            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7780
7781            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7782
7783        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.DedicatedVmHost`
7784        :rtype: :class:`~oci.response.Response`
7785
7786        :example:
7787        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_dedicated_vm_host.py.html>`__ to see an example of how to use update_dedicated_vm_host API.
7788        """
7789        resource_path = "/dedicatedVmHosts/{dedicatedVmHostId}"
7790        method = "PUT"
7791
7792        # Don't accept unknown kwargs
7793        expected_kwargs = [
7794            "retry_strategy",
7795            "if_match",
7796            "opc_request_id",
7797            "opc_retry_token"
7798        ]
7799        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7800        if extra_kwargs:
7801            raise ValueError(
7802                "update_dedicated_vm_host got unknown kwargs: {!r}".format(extra_kwargs))
7803
7804        path_params = {
7805            "dedicatedVmHostId": dedicated_vm_host_id
7806        }
7807
7808        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
7809
7810        for (k, v) in six.iteritems(path_params):
7811            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
7812                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
7813
7814        header_params = {
7815            "accept": "application/json",
7816            "content-type": "application/json",
7817            "if-match": kwargs.get("if_match", missing),
7818            "opc-request-id": kwargs.get("opc_request_id", missing),
7819            "opc-retry-token": kwargs.get("opc_retry_token", missing)
7820        }
7821        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
7822
7823        retry_strategy = self.base_client.get_preferred_retry_strategy(
7824            operation_retry_strategy=kwargs.get('retry_strategy'),
7825            client_retry_strategy=self.retry_strategy
7826        )
7827
7828        if retry_strategy:
7829            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7830                self.base_client.add_opc_retry_token_if_needed(header_params)
7831                self.base_client.add_opc_client_retries_header(header_params)
7832                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7833            return retry_strategy.make_retrying_call(
7834                self.base_client.call_api,
7835                resource_path=resource_path,
7836                method=method,
7837                path_params=path_params,
7838                header_params=header_params,
7839                body=update_dedicated_vm_host_details,
7840                response_type="DedicatedVmHost")
7841        else:
7842            return self.base_client.call_api(
7843                resource_path=resource_path,
7844                method=method,
7845                path_params=path_params,
7846                header_params=header_params,
7847                body=update_dedicated_vm_host_details,
7848                response_type="DedicatedVmHost")
7849
7850    def update_image(self, image_id, update_image_details, **kwargs):
7851        """
7852        Updates the display name of the image. Avoid entering confidential information.
7853
7854
7855        :param str image_id: (required)
7856            The `OCID`__ of the image.
7857
7858            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
7859
7860        :param oci.core.models.UpdateImageDetails update_image_details: (required)
7861            Updates the image display name field. Avoid entering confidential information.
7862
7863        :param str opc_retry_token: (optional)
7864            A token that uniquely identifies a request so it can be retried in case of a timeout or
7865            server error without risk of executing that same action again. Retry tokens expire after 24
7866            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
7867            has been deleted and purged from the system, then a retry of the original creation request
7868            may be rejected).
7869
7870        :param str if_match: (optional)
7871            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
7872            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
7873            will be updated or deleted only if the etag you provide matches the resource's current etag value.
7874
7875        :param obj retry_strategy: (optional)
7876            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7877
7878            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7879            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7880
7881            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7882
7883        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Image`
7884        :rtype: :class:`~oci.response.Response`
7885
7886        :example:
7887        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_image.py.html>`__ to see an example of how to use update_image API.
7888        """
7889        resource_path = "/images/{imageId}"
7890        method = "PUT"
7891
7892        # Don't accept unknown kwargs
7893        expected_kwargs = [
7894            "retry_strategy",
7895            "opc_retry_token",
7896            "if_match"
7897        ]
7898        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
7899        if extra_kwargs:
7900            raise ValueError(
7901                "update_image got unknown kwargs: {!r}".format(extra_kwargs))
7902
7903        path_params = {
7904            "imageId": image_id
7905        }
7906
7907        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
7908
7909        for (k, v) in six.iteritems(path_params):
7910            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
7911                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
7912
7913        header_params = {
7914            "accept": "application/json",
7915            "content-type": "application/json",
7916            "opc-retry-token": kwargs.get("opc_retry_token", missing),
7917            "if-match": kwargs.get("if_match", missing)
7918        }
7919        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
7920
7921        retry_strategy = self.base_client.get_preferred_retry_strategy(
7922            operation_retry_strategy=kwargs.get('retry_strategy'),
7923            client_retry_strategy=self.retry_strategy
7924        )
7925
7926        if retry_strategy:
7927            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
7928                self.base_client.add_opc_retry_token_if_needed(header_params)
7929                self.base_client.add_opc_client_retries_header(header_params)
7930                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
7931            return retry_strategy.make_retrying_call(
7932                self.base_client.call_api,
7933                resource_path=resource_path,
7934                method=method,
7935                path_params=path_params,
7936                header_params=header_params,
7937                body=update_image_details,
7938                response_type="Image")
7939        else:
7940            return self.base_client.call_api(
7941                resource_path=resource_path,
7942                method=method,
7943                path_params=path_params,
7944                header_params=header_params,
7945                body=update_image_details,
7946                response_type="Image")
7947
7948    def update_instance(self, instance_id, update_instance_details, **kwargs):
7949        """
7950        Updates certain fields on the specified instance. Fields that are not provided in the
7951        request will not be updated. Avoid entering confidential information.
7952
7953        Changes to metadata fields will be reflected in the instance metadata service (this may take
7954        up to a minute).
7955
7956        The OCID of the instance remains the same.
7957
7958
7959        :param str instance_id: (required)
7960            The `OCID`__ of the instance.
7961
7962            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
7963
7964        :param oci.core.models.UpdateInstanceDetails update_instance_details: (required)
7965            Update instance fields
7966
7967        :param str opc_retry_token: (optional)
7968            A token that uniquely identifies a request so it can be retried in case of a timeout or
7969            server error without risk of executing that same action again. Retry tokens expire after 24
7970            hours, but can be invalidated before then due to conflicting operations (for example, if a resource
7971            has been deleted and purged from the system, then a retry of the original creation request
7972            may be rejected).
7973
7974        :param str if_match: (optional)
7975            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
7976            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
7977            will be updated or deleted only if the etag you provide matches the resource's current etag value.
7978
7979        :param obj retry_strategy: (optional)
7980            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
7981
7982            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
7983            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
7984
7985            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
7986
7987        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Instance`
7988        :rtype: :class:`~oci.response.Response`
7989
7990        :example:
7991        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_instance.py.html>`__ to see an example of how to use update_instance API.
7992        """
7993        resource_path = "/instances/{instanceId}"
7994        method = "PUT"
7995
7996        # Don't accept unknown kwargs
7997        expected_kwargs = [
7998            "retry_strategy",
7999            "opc_retry_token",
8000            "if_match"
8001        ]
8002        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
8003        if extra_kwargs:
8004            raise ValueError(
8005                "update_instance got unknown kwargs: {!r}".format(extra_kwargs))
8006
8007        path_params = {
8008            "instanceId": instance_id
8009        }
8010
8011        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
8012
8013        for (k, v) in six.iteritems(path_params):
8014            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
8015                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
8016
8017        header_params = {
8018            "accept": "application/json",
8019            "content-type": "application/json",
8020            "opc-retry-token": kwargs.get("opc_retry_token", missing),
8021            "if-match": kwargs.get("if_match", missing)
8022        }
8023        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
8024
8025        retry_strategy = self.base_client.get_preferred_retry_strategy(
8026            operation_retry_strategy=kwargs.get('retry_strategy'),
8027            client_retry_strategy=self.retry_strategy
8028        )
8029
8030        if retry_strategy:
8031            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
8032                self.base_client.add_opc_retry_token_if_needed(header_params)
8033                self.base_client.add_opc_client_retries_header(header_params)
8034                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
8035            return retry_strategy.make_retrying_call(
8036                self.base_client.call_api,
8037                resource_path=resource_path,
8038                method=method,
8039                path_params=path_params,
8040                header_params=header_params,
8041                body=update_instance_details,
8042                response_type="Instance")
8043        else:
8044            return self.base_client.call_api(
8045                resource_path=resource_path,
8046                method=method,
8047                path_params=path_params,
8048                header_params=header_params,
8049                body=update_instance_details,
8050                response_type="Instance")
8051
8052    def update_instance_console_connection(self, instance_console_connection_id, update_instance_console_connection_details, **kwargs):
8053        """
8054        Updates the defined tags and free-form tags for the specified instance console connection.
8055
8056
8057        :param str instance_console_connection_id: (required)
8058            The OCID of the instance console connection.
8059
8060        :param oci.core.models.UpdateInstanceConsoleConnectionDetails update_instance_console_connection_details: (required)
8061            Update instanceConsoleConnection tags
8062
8063        :param str opc_request_id: (optional)
8064            Unique identifier for the request.
8065            If you need to contact Oracle about a particular request, please provide the request ID.
8066
8067        :param str if_match: (optional)
8068            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
8069            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
8070            will be updated or deleted only if the etag you provide matches the resource's current etag value.
8071
8072        :param obj retry_strategy: (optional)
8073            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
8074
8075            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
8076            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
8077
8078            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
8079
8080        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InstanceConsoleConnection`
8081        :rtype: :class:`~oci.response.Response`
8082
8083        :example:
8084        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_instance_console_connection.py.html>`__ to see an example of how to use update_instance_console_connection API.
8085        """
8086        resource_path = "/instanceConsoleConnections/{instanceConsoleConnectionId}"
8087        method = "PUT"
8088
8089        # Don't accept unknown kwargs
8090        expected_kwargs = [
8091            "retry_strategy",
8092            "opc_request_id",
8093            "if_match"
8094        ]
8095        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
8096        if extra_kwargs:
8097            raise ValueError(
8098                "update_instance_console_connection got unknown kwargs: {!r}".format(extra_kwargs))
8099
8100        path_params = {
8101            "instanceConsoleConnectionId": instance_console_connection_id
8102        }
8103
8104        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
8105
8106        for (k, v) in six.iteritems(path_params):
8107            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
8108                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
8109
8110        header_params = {
8111            "accept": "application/json",
8112            "content-type": "application/json",
8113            "opc-request-id": kwargs.get("opc_request_id", missing),
8114            "if-match": kwargs.get("if_match", missing)
8115        }
8116        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
8117
8118        retry_strategy = self.base_client.get_preferred_retry_strategy(
8119            operation_retry_strategy=kwargs.get('retry_strategy'),
8120            client_retry_strategy=self.retry_strategy
8121        )
8122
8123        if retry_strategy:
8124            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
8125                self.base_client.add_opc_client_retries_header(header_params)
8126                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
8127            return retry_strategy.make_retrying_call(
8128                self.base_client.call_api,
8129                resource_path=resource_path,
8130                method=method,
8131                path_params=path_params,
8132                header_params=header_params,
8133                body=update_instance_console_connection_details,
8134                response_type="InstanceConsoleConnection")
8135        else:
8136            return self.base_client.call_api(
8137                resource_path=resource_path,
8138                method=method,
8139                path_params=path_params,
8140                header_params=header_params,
8141                body=update_instance_console_connection_details,
8142                response_type="InstanceConsoleConnection")
8143
8144    def update_volume_attachment(self, volume_attachment_id, update_volume_attachment_details, **kwargs):
8145        """
8146        Updates information about the specified volume attachment.
8147
8148
8149        :param str volume_attachment_id: (required)
8150            The OCID of the volume attachment.
8151
8152        :param oci.core.models.UpdateVolumeAttachmentDetails update_volume_attachment_details: (required)
8153            Update information about the specified volume attachment.
8154
8155        :param str opc_request_id: (optional)
8156            Unique identifier for the request.
8157            If you need to contact Oracle about a particular request, please provide the request ID.
8158
8159        :param str if_match: (optional)
8160            For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
8161            parameter to the value of the etag from a previous GET or POST response for that resource. The resource
8162            will be updated or deleted only if the etag you provide matches the resource's current etag value.
8163
8164        :param obj retry_strategy: (optional)
8165            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
8166
8167            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
8168            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
8169
8170            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
8171
8172        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VolumeAttachment`
8173        :rtype: :class:`~oci.response.Response`
8174
8175        :example:
8176        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.53.1/core/update_volume_attachment.py.html>`__ to see an example of how to use update_volume_attachment API.
8177        """
8178        resource_path = "/volumeAttachments/{volumeAttachmentId}"
8179        method = "PUT"
8180
8181        # Don't accept unknown kwargs
8182        expected_kwargs = [
8183            "retry_strategy",
8184            "opc_request_id",
8185            "if_match"
8186        ]
8187        extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
8188        if extra_kwargs:
8189            raise ValueError(
8190                "update_volume_attachment got unknown kwargs: {!r}".format(extra_kwargs))
8191
8192        path_params = {
8193            "volumeAttachmentId": volume_attachment_id
8194        }
8195
8196        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
8197
8198        for (k, v) in six.iteritems(path_params):
8199            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
8200                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
8201
8202        header_params = {
8203            "accept": "application/json",
8204            "content-type": "application/json",
8205            "opc-request-id": kwargs.get("opc_request_id", missing),
8206            "if-match": kwargs.get("if_match", missing)
8207        }
8208        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
8209
8210        retry_strategy = self.base_client.get_preferred_retry_strategy(
8211            operation_retry_strategy=kwargs.get('retry_strategy'),
8212            client_retry_strategy=self.retry_strategy
8213        )
8214
8215        if retry_strategy:
8216            if not isinstance(retry_strategy, retry.NoneRetryStrategy):
8217                self.base_client.add_opc_client_retries_header(header_params)
8218                retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
8219            return retry_strategy.make_retrying_call(
8220                self.base_client.call_api,
8221                resource_path=resource_path,
8222                method=method,
8223                path_params=path_params,
8224                header_params=header_params,
8225                body=update_volume_attachment_details,
8226                response_type="VolumeAttachment")
8227        else:
8228            return self.base_client.call_api(
8229                resource_path=resource_path,
8230                method=method,
8231                path_params=path_params,
8232                header_params=header_params,
8233                body=update_volume_attachment_details,
8234                response_type="VolumeAttachment")
8235